Hello all, i'm currently trying to get a modularized (i.e. "shared") PHP to build on AIX, but i'm running into some wierd linking issues with php-cli and php-cgi, which i hope someone here can help me out with. The environment is: AIX: 6100-08-01-1245 xlC: 11.01.0000.0009 php: 5.3.26
the relevant configure snippet from the RPM spec file is shown below. If every "shared" keyword is removed in there, i get a "php", "php-cgi" and "libphp5.so", each one by itself working like they are supposed to and with the following number of symbols (via "dump -Tv"): php: 7177 php-cgi: 7201 libphp5.so: 7236 If i build with the "shared" keyword like shown below, the build is also successful, but the binaries have the following number of symbols: php: 896 php-cgi: 900 libphp5.so: 6151 Executing PHP code depending on e.g. the MySQL module via the libphp5.so in Apache works fine. But running code depending on e.g. the MySQL module in "php" or "php-cgi" results in errors like this: PHP Warning: PHP Startup: Unable to load dynamic library '/libdir/php/modules/mysql.so' - rtld: 0712-001 Symbol OnUpdateLong was referenced from module /libdir/php/modules/mysql.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol zend_ini_boolean_displayer_cb was referenced from module /libdir/php/modules/mysql.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol display_link_numbers was referenced from module /libdir/php/modules/mysql.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol OnUpdateString was referenced from module /libdir/php/modules/mysql.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol OnUpdateStringUnempty was referenced from module /libdir/php/modules/mysql.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol zend_parse_parameters was referenc in Unknown on line 0 Does anyone have an idea where to look why php and php-cgi aren't build like libphp5.so when configured as "shared"? Thanks & best regards, Frank Fegert ###################################################################### [...] buildphp() { ln -sf ../configure %configure \ --cache-file=../config.cache \ --prefix=%{_prefix} \ --disable-debug \ --enable-calendar \ --enable-ctype \ --enable-dom \ --enable-fileinfo \ --enable-flatfile \ --enable-ftp \ --enable-hash \ --enable-inifile \ --enable-json \ --enable-mbstring=all \ --enable-mbregex \ --enable-pdo=shared \ --enable-shared --enable-static \ --enable-soap \ --enable-sockets \ --enable-zip \ --enable-wddx \ --without-pear \ --with-bz2 \ --with-curl=shared,%{_prefix} \ --with-exec-dir=%{_prefix} \ --with-freetype-dir=shared,%{_prefix} \ --with-gd=shared,%{_prefix} --enable-gd-native-ttf \ --with-gdbm=shared,%{_prefix} \ --with-gettext=%{_prefix} \ --with-gmp=shared,%{_prefix} \ --with-jpeg-dir=shared,%{_prefix} \ --with-ldap=shared,%{_prefix} \ --with-libxml-dir=%{_prefix} \ --with-mhash=%{_prefix} \ --with-mysql=shared,%{_prefix} --with-mysql-sock=/var/opt/freeware/mysql/run/mysql.sock \ --with-mysqli=shared,mysqlnd \ --with-openssl=%{_prefix} \ --with-pcre-regex=%{_prefix} \ --without-pdo-dblib \ --with-pdo-mysql=shared,%{_prefix} \ --with-pdo-odbc=shared,unixODBC,%{_prefix} \ --with-pdo-sqlite=shared,%{_prefix} \ --with-pdo-dblib=shared,%{_prefix} \ --with-png-dir=shared,%{_prefix} \ --without-sqlite \ --with-sqlite3=shared,%{_prefix} \ --with-t1lib=%{_prefix} \ --with-unixODBC=shared,%{_prefix} \ --with-xpm-dir=%{_prefix} \ --with-zlib \ --with-zlib-dir=%{_prefix} \ $* gmake %{?_smp_mflags} } # Build the Apache module mkdir build-apache cd build-apache buildphp \ --with-config-file-path=%{_sysconfdir}/%{name}/httpd \ --with-config-file-scan-dir=%{_sysconfdir}/%{name}/httpd/conf.d \ --with-apxs2=%{_sbindir}/apxs cd .. # Build the CGI version of PHP mkdir build-cgi cd build-cgi buildphp \ --enable-force-cgi-redirect \ --enable-fastcgi \ --with-config-file-path=%{_sysconfdir}/%{name}/cgi \ --with-config-file-scan-dir=%{_sysconfdir}/%{name}/cgi/conf.d cd .. # Build the command line version of PHP mkdir build-cli cd build-cli buildphp \ --with-config-file-path=%{_sysconfdir}/%{name}/cli \ --with-config-file-scan-dir=%{_sysconfdir}/%{name}/cli/conf.d \ --disable-cgi cd .. [...] ######################################################################