Opened 11 years ago

Closed 7 years ago

#41595 closed defect (fixed)

php: SIZEOF_LONG needs to vary based on bitness

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc:
Port: php

Description

In ${prefix}/include/${php}/php/main/php_config.h, #define SIZEOF_LONG needs to vary based on __LP64__; we need an ed script here like we use in other ports.

Change History (4)

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

For example, compiling php53-gd universal for x86_64 i386 produces this warning:

In file included from /opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_php/php53-gd/work/php-5.3.27/ext/gd/libgd/gdft.c:65:
In file included from /opt/local/include/freetype2/freetype.h:33:
/opt/local/include/freetype2/config/ftconfig.h:88:9: warning: 'SIZEOF_LONG' macro redefined
#define SIZEOF_LONG 4
        ^
/opt/local/include/php53/php/main/php_config.h:2278:9: note: previous definition is here
#define SIZEOF_LONG 8
        ^

comment:2 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Or php56-postgresql:

In file included from /opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_php/php56-postgresql/work/php-5.6.0alpha1/ext/pdo_pgsql/pdo_pgsql.c:39:
/opt/local/include/postgresql93/pg_config.h:768:9: warning: 'SIZEOF_LONG' macro redefined
#define SIZEOF_LONG 4
        ^
/opt/local/include/php56/php/main/../main/php_config.h:2312:9: note: previous definition is here
#define SIZEOF_LONG 8
        ^
In file included from /opt/local/var/macports/build/_Users_rschmidt_macports_dports_lang_php/php56-postgresql/work/php-5.6.0alpha1/ext/pdo_pgsql/pdo_pgsql.c:39:
/opt/local/include/postgresql93/pg_config.h:778:9: warning: 'SIZEOF_SIZE_T' macro redefined
#define SIZEOF_SIZE_T 4
        ^
/opt/local/include/php56/php/main/../main/php_config.h:2333:9: note: previous definition is here
#define SIZEOF_SIZE_T 8
        ^
2 warnings generated.

comment:3 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Port: php5 removed
Status: newaccepted

There are a number of values that vary on 32-bit and 64-bit systems. Different PHP versions introduce different values that vary. And I'm sure there are values that vary on big- and little-endian systems but I haven't investigated yet. With all of this going on, I feel more certain about not messing it up now or in future versions of PHP by using the muniversal portgroup instead of an ed script.

comment:4 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: acceptedclosed

In 62ee49555460c61c7d1bc74f1bc08d96c44887e4/macports-ports:

php: Build universal properly

Closes: #41595

Also ensure that the parsers are not regenerated, even if the
dependencies to do so are installed.

Note: See TracTickets for help on using tickets.