Bug 250651 - print/pecl-pdflib fails to build with php80
Summary: print/pecl-pdflib fails to build with php80
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Alex Dupre
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-26 20:10 UTC by Jack
Modified: 2020-10-27 23:16 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (ale)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jack 2020-10-26 20:10:11 UTC
Compile error with php80

===>  Building for php80-pecl-pdflib-4.1.4_1
--- pdf.lo ---
/bin/sh /usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/libtool --mode=compile cc -I. -I/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4 -I/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/include -I/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/main -I/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -O2 -pipe -march=ivybridge -fstack-protector-strong -fno-strict-aliasing    -c /usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c -o pdf.lo
mkdir .libs
 cc -I. -I/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4 -I/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/include -I/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/main -I/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -O2 -pipe -march=ivybridge -fstack-protector-strong -fno-strict-aliasing -c /usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c  -fPIC -DPIC -o .libs/pdf.o
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:207:24: error: expected ')'
    const char *errmsg TSRMLS_DC)
                       ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:206:27: note: to match this '('
static void _pdf_exception(int errnum, const char *apiname,
                          ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:217:45: error: use of undeclared identifier 'TSRMLS_C'
        def_ex = zend_exception_get_default(TSRMLS_C);
                                            ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:222:66: error: expected ')'
                            sizeof("apiname")-1, (char *)apiname TSRMLS_CC);
                                                                 ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:221:39: note: to match this '('
           zend_update_property_string(def_ex, &ex, "apiname",
                                      ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:226:65: error: expected ')'
                            sizeof("message")-1, (char *)errmsg TSRMLS_CC);
                                                                ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:225:39: note: to match this '('
           zend_update_property_string(def_ex, &ex, "message",
                                      ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:229:20: error: expected ')'
            errnum TSRMLS_CC);
                   ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:228:34: note: to match this '('
        zend_update_property_long(def_ex, &ex, "code", sizeof("code")-1,
                                 ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:230:41: error: expected ')'
        zend_throw_exception_object(&ex TSRMLS_CC);
                                        ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:230:36: note: to match this '('
        zend_throw_exception_object(&ex TSRMLS_CC);
                                   ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:271:51: error: expected ')'
static void free_pdf_resource(zend_resource *rsrc TSRMLS_DC)
                                                  ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:271:30: note: to match this '('
static void free_pdf_resource(zend_resource *rsrc TSRMLS_DC)
                             ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:313:33: error: expected ')'
pdflib_object_dtor(void *object TSRMLS_DC)
                                ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:313:19: note: to match this '('
pdflib_object_dtor(void *object TSRMLS_DC)
                  ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:317:40: error: expected ')'
    zend_object_std_dtor(&intern->zobj TSRMLS_CC);
                                       ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:317:25: note: to match this '('
    zend_object_std_dtor(&intern->zobj TSRMLS_CC);
                        ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:331:48: error: expected ')'
pdflib_object_new(zend_class_entry *class_type TSRMLS_DC)
                                               ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:331:18: note: to match this '('
pdflib_object_new(zend_class_entry *class_type TSRMLS_DC)
                 ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:338:52: error: expected ')'
    zend_object_std_init(&object->zobj, class_type TSRMLS_CC);
                                                   ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:338:25: note: to match this '('
    zend_object_std_init(&object->zobj, class_type TSRMLS_CC);
                        ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:405:31: error: expected ')'
        php_error_docref(NULL TSRMLS_CC, E_ERROR,
                              ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:405:25: note: to match this '('
        php_error_docref(NULL TSRMLS_CC, E_ERROR,
                        ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:421:44: error: use of undeclared identifier 'TSRMLS_C'
                zend_exception_get_default(TSRMLS_C) TSRMLS_CC);
                                           ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:428:61: error: expected ')'
                sizeof("apiname")-1, "", ZEND_ACC_PROTECTED TSRMLS_CC);
                                                            ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:427:37: note: to match this '('
        zend_declare_property_string(pdflib_exception_class, "apiname",
                                    ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:443:57: error: expected ')'
        pdflib_class = zend_register_internal_class(&ce TSRMLS_CC);
                                                        ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:443:52: note: to match this '('
        pdflib_class = zend_register_internal_class(&ce TSRMLS_CC);
                                                   ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:468:25: warning: incompatible pointer types passing 'zval *' (aka 'struct _zval_struct *') to parameter of type 'zend_object *' (aka 'struct _zend_object *') [-Wincompatible-pointer-types]
                        this_ptr, "apiname", sizeof("apiname")-1, 1, &rv));
                        ^~~~~~~~
/usr/local/include/php/Zend/zend_API.h:404:73: note: passing argument to parameter 'object' here
ZEND_API zval *zend_read_property(zend_class_entry *scope, zend_object *object, const char *name, size_t name_length, zend_bool silent, zval *rv);
                                                                        ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:469:24: error: expected ';' after do/while statement
    RETURN_STR(apiname)
                       ^
                       ;
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:488:74: warning: incompatible pointer types passing 'zval *' (aka 'struct _zval_struct *') to parameter of type 'zend_object *' (aka 'struct _zend_object *') [-Wincompatible-pointer-types]
    message = zval_get_string(zend_read_property(pdflib_exception_class, this_ptr, "message",
                                                                         ^~~~~~~~
/usr/local/include/php/Zend/zend_API.h:404:73: note: passing argument to parameter 'object' here
ZEND_API zval *zend_read_property(zend_class_entry *scope, zend_object *object, const char *name, size_t name_length, zend_bool silent, zval *rv);
                                                                        ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:490:24: error: expected ';' after do/while statement
    RETURN_STR(message)
                       ^
                       ;
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:510:55: warning: incompatible pointer types passing 'zval *' (aka 'struct _zval_struct *') to parameter of type 'zend_object *' (aka 'struct _zend_object *') [-Wincompatible-pointer-types]
    code = zend_read_property(pdflib_exception_class, this_ptr, "code",
                                                      ^~~~~~~~
/usr/local/include/php/Zend/zend_API.h:404:73: note: passing argument to parameter 'object' here
ZEND_API zval *zend_read_property(zend_class_entry *scope, zend_object *object, const char *name, size_t name_length, zend_bool silent, zval *rv);
                                                                        ^
In file included from /usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:530:
./php_wrapped.c:22:9: error: expected ')'
        SET_ERROR_HANDLING(EH_THROW, pdflib_exception_class);
        ^
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:154:64: note: expanded from macro 'SET_ERROR_HANDLING'
    zend_replace_error_handling(type, handler, &error_handling TSRMLS_CC)
                                                               ^
./php_wrapped.c:22:9: note: to match this '('
/usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:154:32: note: expanded from macro 'SET_ERROR_HANDLING'
    zend_replace_error_handling(type, handler, &error_handling TSRMLS_CC)
                               ^
In file included from /usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4/pdf.c:530:
./php_wrapped.c:24:62: error: expected ')'
        if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
                                                             ^
./php_wrapped.c:24:45: note: to match this '('
        if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
                                            ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
3 warnings and 20 errors generated.
*** [pdf.lo] Error code 1

make[3]: stopped in /usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4
1 error

make[3]: stopped in /usr/obj/usr/ports/print/pecl-pdflib/work-php80/pdflib-4.1.4
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/print/pecl-pdflib
*** Error code 1
Comment 1 Alex Dupre freebsd_committer 2020-10-27 09:54:58 UTC
The pecl package is unmaintained and deprecated, and the port was marked not compatible with php 8.0.

If you provide a fix I'll commit it, but I'm not going to spend time on fixing it, you should really find a better alternative.
Comment 2 Jack 2020-10-27 22:17:37 UTC
Should the Makefile be marked as such for php80 so people don't attempt to install it with php80?
Comment 3 Alex Dupre freebsd_committer 2020-10-27 22:32:17 UTC
Yes, it's what I did here: https://svnweb.freebsd.org/ports?view=revision&revision=553429
Comment 4 Jack 2020-10-27 23:16:50 UTC
Ah, wrong bug report, sorry about that.