php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77676 Unable to run tests when building shared exension on AIX
Submitted: 2019-02-28 03:21 UTC Modified: 2019-03-02 17:56 UTC
From: kadler at us dot ibm dot com Assigned: petk (profile)
Status: Closed Package: *General Issues
PHP Version: 7.3.2 OS: AIX
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: kadler at us dot ibm dot com
New email:
PHP Version: OS:

 

 [2019-02-28 03:21 UTC] kadler at us dot ibm dot com
Description:
------------
When building a PHP extension on AIX, I am unable to run tests. Here's the output I get (building ibm_db):

-bash-4.4$ make test

Build complete.
Don't forget to run 'make test'.

/bin/sh: line 12: .: /QOpenSys/home/kadler/ibm_db2_73/modules/ibm_db2.so: cannot execute binary file
PHP Warning:  PHP Startup: Unable to load dynamic library '' (tried: /QOpenSys/home/kadler/ibm_db2_73/modules/ (Invalid argument), /QOpenSys/home/kadler/ibm_db2_73/modules/.so (Could not load module /QOpenSys/home/kadler/ibm_db2_73/modules/.so.
System error: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '' (tried: /QOpenSys/home/kadler/ibm_db2_73/modules/ (Invalid argument), /QOpenSys/home/kadler/ibm_db2_73/modules/.so (Could not load module /QOpenSys/home/kadler/ibm_db2_73/modules/.so.
System error: No such file or directory)) in Unknown on line 0

=====================================================================
PHP         : /QOpenSys/pkgs/bin/php 
Warning: PHP Startup: Unable to load dynamic library '' (tried: /QOpenSys/home/kadler/ibm_db2_73/modules/ (Invalid argument), /QOpenSys/home/kadler/ibm_db2_73/modules/.so (Could not load module /QOpenSys/home/kadler/ibm_db2_73/modules/.so.
System error: No such file or directory)) in Unknown on line 0

PHP_SAPI    : cli
PHP_VERSION : 7.3.1
ZEND_VERSION: 3.3.1
PHP_OS      : OS400 - OS400 wernstrom 2 7 0010000ACBAA
INI actual  : /QOpenSys/home/kadler/ibm_db2_73/tmp-php.ini
More .INIs  :   
---------------------------------------------------------------------


This is due to how the Makefile is generated on AIX. The code to load the test extensions reads in the dlname from the libtool.la file:

PHP_TEST_SHARED_EXTENSIONS =  ` \
        if test "x$(PHP_MODULES)" != "x"; then \
                for i in $(PHP_MODULES)""; do \
                        . $$i; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
                done; \
        fi; \
        if test "x$(PHP_ZEND_EX)" != "x"; then \
                for i in $(PHP_ZEND_EX)""; do \
                        . $$i; $(top_srcdir)/build/shtool echo -n -- " -d $(ZEND_EXT_TYPE)=$(top_builddir)/modules/$$dlname"; \
                done; \
        fi`


However, on AIX PHP_MODULES is set to a bare .so:

PHP_MODULES = $(phplibdir)/ibm_db2.so


Above output shows results for 7.3, but the problem goes back to PHP 5.6 (at least).



Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-02-28 03:31 UTC]
The following pull request has been associated:

Patch Name: Fix shared module generation on AIX bug #77676
On GitHub:  https://github.com/php/php-src/pull/3896
Patch:      https://github.com/php/php-src/pull/3896.patch
 [2019-03-02 17:56 UTC] petk@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: petk
 [2019-03-02 17:56 UTC] petk@php.net
Bug resolved and fix applied via http://git.php.net/?p=php-src.git;a=commit;h=700f876a1ae5957bda027b36b1fdf3ffdbe57f6f to PHP-7.2 and up... Thank you for helping us make PHP better.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 14 17:01:25 2024 UTC