#19219 [Fbk->Opn]: Cannot build with-informix for Apache DSO

From: Date: Wed, 04 Sep 2002 15:41:41 +0000
Subject: #19219 [Fbk->Opn]: Cannot build with-informix for Apache DSO
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-18428@lists.php.net to get a copy of this message
ID: 19219 User updated by: jerrysmith@directvinternet.com Reported By: jerrysmith@directvinternet.com -Status: Feedback +Status: Open Bug Type: Informix related Operating System: HPUX 11.0 PHP Version: 4.2.2 New Comment: I downloade the suggested latest tar file. Actually, this provides worse results: /bin/sh libtool --silent --mode=link cc -export-dynamic -g -avoid-version -module -L/usr/informix/lib -L/usr/inf ormix/lib/esql -R /usr/informix/lib -R /usr/informix/lib/esql ext/ctype/ctype.lo ext/informix/ifx.lo ext/mbstring/mbfilter_ja.lo ext/mbstring/mbfilter_cn.lo ext/mbstring/mbfilter_tw.lo ext/mbstring/mbfilter_kr.lo ext/mbstring/mbfilter_ru.lo ext/mbstring/mbfilter.lo ext/mbstring/mbstring.lo ext/mbstring/mbregex.lo ext/mbstring/php_mbregex.lo ext/mbstring/html_entities.lo ext/overload/overload.lo ext/pcre/pcrelib/maketables.lo ext/pcre/pcrelib/get.lo ext/pcre/pcrelib/study.lo ext/pcre/pcrelib/pcre.lo ext/pcre/php_pcre.lo ext/posix/posix.lo ext/session/session.lo ext/session/mod_files.lo ext/session/mod_mm.lo ext/session/mod_user.lo ext/standard/array.lo ext/standard/base64.lo ext/standard/basic_functions.lo ext/standard/browscap.lo ext/standard/crc32.lo ext/standard/crypt.lo ext/standard/cyr_convert.lo ext/standard/datetime.lo ext/standard/dir.lo ext/standard/dl.lo ext/standard/dns.lo ext/standard/exec.lo ext/standard/file.lo ext/standard/filestat.lo ext/standard/flock_compat.lo ext/standard/formatted_print.lo ext/standard/fsock.lo ext/standard/head.lo ext/standard/html.lo ext/standard/image.lo ext/standard/info.lo ext/standard/iptc.lo ext/standard/lcg.lo ext/standard/link.lo ext/standard/mail.lo ext/standard/math.lo ext/standard/md5.lo ext/standard/metaphone.lo ext/standard/microtime.lo ext/standard/pack.lo ext/standard/pageinfo.lo ext/standard/parsedate.lo ext/standard/quot_print.lo ext/standard/rand.lo ext/standard/reg.lo ext/standard/soundex.lo ext/standard/string.lo ext/standard/scanf.lo ext/standard/syslog.lo ext/standard/type.lo ext/standard/uniqid.lo ext/standard/url.lo ext/standard/url_scanner.lo ext/standard/var.lo ext/standard/versioning.lo ext/standard/assert.lo ext/standard/strnatcmp.lo ext/standard/levenshtein.lo ext/standard/incomplete_class.lo ext/standard/url_scanner_ex.lo ext/standard/ftp_fopen_wrapper.lo ext/standard/http_fopen_wrapper.lo ext/standard/php_fopen_wrapper.lo ext/standard/credits.lo ext/standard/var_unserializer.lo ext/standard/ftok.lo ext/standard/aggregation.lo ext/standard/sha1.lo ext/tokenizer/tokenizer.lo ext/xml/xml.lo ext/xml/expat/xmlparse.lo ext/xml/expat/xmlrole.lo ext/xml/expat/xmltok.lo regex/regcomp.lo regex/regexec.lo regex/regerror.lo regex/regfree.lo TSRM/TSRM.lo TSRM/tsrm_strtok_r.lo TSRM/tsrm_virtual_cwd.lo main/main.lo main/snprintf.lo main/spprintf.lo main/php_sprintf.lo main/safe_mode.lo main/fopen_wrappers.lo main/alloca.lo main/php_ini.lo main/SAPI.lo main/rfc1867.lo main/php_content_types.lo main/strlcpy.lo main/strlcat.lo main/mergesort.lo main/reentrancy.lo main/php_variables.lo main/php_ticks.lo main/streams.lo main/network.lo main/php_open_temporary_file.lo main/php_logos.lo main/output.lo main/memory_streams.lo main/user_streams.lo Zend/zend_language_parser.lo Zend/zend_language_scanner.lo Zend/zend_ini_parser.lo Zend/zend_ini_scanner.lo Zend/zend_alloc.lo Zend/zend_compile.lo Zend/zend_constants.lo Zend/zend_dynamic_array.lo Zend/zend_execute_API.lo Zend/zend_highlight.lo Zend/zend_llist.lo Zend/zend_opcode.lo Zend/zend_operators.lo Zend/zend_ptr_stack.lo Zend/zend_stack.lo Zend/zend_variables.lo Zend/zend.lo Zend/zend_API.lo Zend/zend_extensions.lo Zend/zend_hash.lo Zend/zend_list.lo Zend/zend_indent.lo Zend/zend_builtin_functions.lo Zend/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo Zend/zend_multibyte.lo Zend/zend_execute.lo sapi/cli/php_cli.lo sapi/cli/getopt.lo main/internal_functions_cli.lo -L/usr/informix/lib/esql -lixos -L/usr/inform ix/lib/esql -lixgen -L/usr/informix/lib/esql -lixsql -L/usr/informix/lib -li xasf -L/usr/informix/lib/esql -lixos -L/usr/informix/lib/esql -lixgen -L/usr /informix/lib/esql -lixgls -lnsl_s -lV3 -lcl -lsec -L/usr/informix/lib/esql -lixglx -lcrypt -lm -lnsl -lcrypt -o sapi/cli/php Installing PHP SAPI module apxs:Error: file libs/libphp4.sl is not a DSO *** Error exit code 1 Stop. Previous Comments: ------------------------------------------------------------------------ [2002-09-03 18:13:35] sniper@php.net Well..you can always try this snapshot then: http://snaps.php.net/php4-latest.tar.gz Compiled as shared module.. ------------------------------------------------------------------------ [2002-09-03 18:09:24] jerrysmith@directvinternet.com I cannot recompile the Apache. HP has a strange way of doing things. I attempted to build an Apache webserver but gave up. This version I am running is a pre-built binary in the hp DEPOT format obtained from an HP user group. ------------------------------------------------------------------------ [2002-09-03 18:02:39] sniper@php.net Try compiling PHP as static module for Apache instead. (this really is not PHP bug but libtool one..) ------------------------------------------------------------------------ [2002-09-03 17:56:02] jerrysmith@directvinternet.com CONFIGURATION ============= Running the HP Depot Version of Apache 1.3.26 that we pre-built for HPUX11 to work with DSO. ---------------------------------- [hpserv02] ./httpd -v Server version: Apache/1.3.26 (Unix) Server built: Jun 24 2002 20:07:33 [hpserv02] ./httpd -l Compiled-in modules: http_core.c mod_so.c suexec: disabled; invalid wrapper /usr/local/apache/bin/suexec [hpserv02] ----------------------------------- BUG DESCRIPTION =============== The HPUX os shared libraries are built with the .sl suffix. I found a post on google where the fix is to simply rename the file libphp4.sl to libphp4.so. I created a script for various types of builds to automatically fix this and help identify the informix problem. Note: I can build the basic php4.2.2 by configuring with and or without mysql and it executes fine..ie.. I can run the test url <?phpinfo()?>. The informix build completes but the apache will not start. STEPS TO RECREATE PROBLEM ========================== The script I am using to correct the shared library problem is as follows: (note the different configurations I have built) # Setup Environment.. export INFORMIXDIR=/usr/informix export PATH=$PATH:$INFORMIXDIR/bin export DBPATH=/usr/informix export INFORMIXSERVER=sedb export LD_LIBRARY_PATH=/usr/lib:/opt/langtools/lib:/usr/informix/lib/esqlc:/usr/informix/lib/incl/esqlc # added these variables from a post I found on Google that reportedly worked for static build.. export "IFX_LIBS=""-L$INFORMIXDIR/lib -L$INFORMIXDIR/lib/esql""" export "IFX_INCDIR=""-L$INFORMIXDIR/incl/esql""" export "IFX_LIBDIR=""-L$INFORMIXDIR/lib -L$INFORMIXDIR/lib/esql""" # stop WebServer apachectl stop ./configure --with-apxs=/usr/informix/apache/bin/apxs --with-mysql=no --with-informix=yes #./configure --with-apxs=/usr/informix/apache/bin/apxs --with-mysql=yes #./configure --with-apxs=/usr/informix/apache/bin/apxs --with-mysql=no make make install # since HPUX shared libraries have the .sl suffix we have to rename thelibphp4 # mv libs/libphp4.sl libs/libphp4.so cp libs/libphp4.so /usr/informix/apache/lib/modules # re-execute the failed command.. apxs -S LIBEXECDIR="/usr/informix/apache/lib/modules" -i -a -n php4 libs/libphp4.so # start WebServer apachectl start ####################END OF SCRIPT########################### NOTE: As stated before, if I build a php without the informix module, all works as it should. If I build the informix configuration, the build completed, but with the following warnings: .....previous lines omitted... Making all in . /bin/sh /usr/local/src/php-4.2.2/libtool --silent --mode=link cc -I. -I/usr/local/src/php-4.2.2/ -I/usr/local/src/php-4.2.2/main -I/usr/local/src/php-4.2.2 -I/usr/local/apache/include -I/usr/local/src/php-4.2.2/Zend -I/usr/informix/incl/esql -I/usr/local/src/php-4.2.2/ext/xml/expat -DHPUX11 -DUSE_HSREGEX -DUSE_EXPAT -I/usr/local/src/php-4.2.2/TSRM -g -prefer-pic -o libphp4.la -rpath /usr/local/src/php-4.2.2/libs -avoid-version -L/usr/informix/lib -L/usr/informix/lib/esql -R /usr/informix/lib -R /usr/informix/lib/esql stub.lo Zend/libZend.la sapi/apache/libsapi.la main/libmain.la regex/libregex.la /usr/local/src/php-4.2.2/ext/ctype/libctype.la /usr/local/src/php-4.2.2/ext/informix/libinformix.la /usr/local/src/php-4.2.2/ext/pcre/libpcre.la /usr/local/src/php-4.2.2/ext/posix/libposix.la /usr/local/src/php-4.2.2/ext/session/libsession.la /usr/local/src/php-4.2.2/ext/standard/libstandard.la /usr/local/src/php-4.2.2/ext/xml/libxml.la TSRM/libtsrm.la -lpam -L/usr/informix/lib/esql -lixos -L/usr/informix/lib/esql -lixgen -L/usr/informix/lib/esql -lixsql -L/usr/informix/lib -lixasf -L/usr/informix/lib/esql -lixos -L/usr/informix/lib/esql -lixgen -L/usr/informix/lib/esql -lixgls -lnsl_s -lV3 -lcl -lsec -L/usr/informix/lib/esql -lixglx -lcrypt -lm -lnsl -lcrypt *** Warning: This library needs some functionality provided by -lV3. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have. *** Warning: This library needs some functionality provided by -lcrypt. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have. *** Warning: This library needs some functionality provided by -lcrypt. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have. *** The inter-library dependencies that have been dropped here will be *** automatically added whenever a program is linked with this library *** or is declared to -dlopen it. Making install in . /usr/local/src/php-4.2.2/build/shtool mkdir -p "/usr/local/apache/lib/modules" && /usr/informix/apache/bin/apxs -S LIBEXECDIR="/usr/local/apache/lib/modules" -i -a -n php4 libs/libphp4.sl apxs:Error: file libs/libphp4.sl is not a DSO *** Error exit code 1 Stop. *** Error exit code 1 Stop. ########################################################## ERROR ENCOUNTERED ================= at this point my script fixes the above error and attempts to start the apache server... ###########LINES FROM SCRIPT############### # since HPUX shared libraries have the .sl suffix we have to rename thelibphp4 # mv libs/libphp4.sl libs/libphp4.so cp libs/libphp4.so /usr/informix/apache/lib/modules # re-execute the failed command.. apxs -S LIBEXECDIR="/usr/informix/apache/lib/modules" -i -a -n php4 libs/libphp4.so # start WebServer apachectl start ############################################### [activating module `php4' in /usr/local/apache/etc/httpd.conf] cp libs/libphp4.so /usr/informix/apache/lib/modules/libphp4.so chmod 755 /usr/informix/apache/lib/modules/libphp4.so cp /usr/local/apache/etc/httpd.conf /usr/local/apache/etc/httpd.conf.bak cp /usr/local/apache/etc/httpd.conf.new /usr/local/apache/etc/httpd.conf rm /usr/local/apache/etc/httpd.conf.new /usr/lib/dld.sl: Can't shl_load() a library containing Thread Local Storage: /usr/lib/libcl.2 /usr/lib/dld.sl: Exec format error Syntax error on line 236 of /usr/local/apache/etc/httpd.conf: Cannot load /usr/local/apache/lib/modules/libphp4.so into server: Exec format error /usr/informix/apache/bin/apachectl start: httpd could not be started ===============END PROBLEM DEFINITION==================== Notes: I have done some research and believe that the library in question (libcl.2 not a shared library) could be replaced with a shared one in the make file, but I don't know what library to replace it with? I have completely wiped the file structure containing the php-4.2.2 directory and re-run the entire process with no change in the results. Please help! Thanks, Jerry ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19219&edit=1

« previous php.bugs (#18428) next »