#20928 [Fbk->Opn]: Static compile of PHP module with IBM DB2 doesn't work right with apache

From: Date: Fri, 20 Dec 2002 01:59:33 +0000
Subject: #20928 [Fbk->Opn]: Static compile of PHP module with IBM DB2 doesn't work right with apache
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-28059@lists.php.net to get a copy of this message
 ID:               20928
 User updated by:  truth@ichaos.com
 Reported By:      truth@ichaos.com
-Status:           Feedback
+Status:           Open
 Bug Type:         ODBC related
 Operating System: RH 7.2
 PHP Version:      4.3.0RC2
 New Comment:

The latest snapshot yields this error when compiling PHP:

gcc  -Isapi/cli/
-I/usr/src/redhat/BUILD/php4-STABLE-200212200030/sapi/cli/ -DPH
P_ATOM_INC -I/usr/src/redhat/BUILD/php4-STABLE-200212200030/include
-I/usr/src/r
edhat/BUILD/php4-STABLE-200212200030/main
-I/usr/src/redhat/BUILD/php4-STABLE-20
0212200030 -I/usr/src/redhat/BUILD/php4-STABLE-200212200030/Zend
-I/usr/local/in
clude -I/usr/include/imap
-I/usr/src/redhat/BUILD/php4-STABLE-200212200030/ext/x
ml/expat  -I/usr/src/redhat/BUILD/php4-STABLE-200212200030/TSRM  -g -O2
 -c /usr
/src/redhat/BUILD/php4-STABLE-200212200030/sapi/cli/php_cli.c -o
sapi/cli/php_cl
i.o  && echo > sapi/cli/php_cli.lo
gcc  -Isapi/cli/
-I/usr/src/redhat/BUILD/php4-STABLE-200212200030/sapi/cli/ -DPH
P_ATOM_INC -I/usr/src/redhat/BUILD/php4-STABLE-200212200030/include
-I/usr/src/r
edhat/BUILD/php4-STABLE-200212200030/main
-I/usr/src/redhat/BUILD/php4-STABLE-20
0212200030 -I/usr/src/redhat/BUILD/php4-STABLE-200212200030/Zend
-I/usr/local/in
clude -I/usr/include/imap
-I/usr/src/redhat/BUILD/php4-STABLE-200212200030/ext/x
ml/expat  -I/usr/src/redhat/BUILD/php4-STABLE-200212200030/TSRM  -g -O2
 -c /usr
/src/redhat/BUILD/php4-STABLE-200212200030/sapi/cli/getopt.c -o
sapi/cli/getopt.
o  && echo > sapi/cli/getopt.lo
gcc  -Imain/ -I/usr/src/redhat/BUILD/php4-STABLE-200212200030/main/
-DPHP_ATOM_I
NC -I/usr/src/redhat/BUILD/php4-STABLE-200212200030/include
-I/usr/src/redhat/BU
ILD/php4-STABLE-200212200030/main
-I/usr/src/redhat/BUILD/php4-STABLE-2002122000
30 -I/usr/src/redhat/BUILD/php4-STABLE-200212200030/Zend
-I/usr/local/include -I
/usr/include/imap
-I/usr/src/redhat/BUILD/php4-STABLE-200212200030/ext/xml/expat
  -I/usr/src/redhat/BUILD/php4-STABLE-200212200030/TSRM  -g -O2  -c
main/interna
l_functions_cli.c -o main/internal_functions_cli.o  && echo >
main/internal_func
tions_cli.lo
/bin/sh libtool --silent --mode=link gcc -export-dynamic -g -O2 
-L/home/db2inst
1/lib -rdynamic -L/usr/local/lib -L/usr/local/Informix/lib
-L/usr/local/Informix
/lib/esql -L/usr/src/redhat/BUILD/php4-STABLE-200212200030/ext/informix
 -R /usr
/local/lib -R /usr/local/Informix/lib -R /usr/local/Informix/lib/esql
-R /usr/sr
c/redhat/BUILD/php4-STABLE-200212200030/ext/informix ext/zlib/zlib.lo
ext/zlib/z
lib_fopen_wrapper.lo ext/bcmath/bcmath.lo ext/bcmath/number.lo
ext/bcmath/libbcm
ath/src/add.lo ext/bcmath/libbcmath/src/div.lo
ext/bcmath/libbcmath/src/init.lo
ext/bcmath/libbcmath/src/neg.lo ext/bcmath/libbcmath/src/outofmem.lo
ext/bcmath/
libbcmath/src/raisemod.lo ext/bcmath/libbcmath/src/rt.lo
ext/bcmath/libbcmath/sr
c/sub.lo ext/bcmath/libbcmath/src/compare.lo
ext/bcmath/libbcmath/src/divmod.lo
ext/bcmath/libbcmath/src/int2num.lo
ext/bcmath/libbcmath/src/num2long.lo ext/bcm
ath/libbcmath/src/output.lo ext/bcmath/libbcmath/src/recmul.lo
ext/bcmath/libbcm
ath/src/sqrt.lo ext/bcmath/libbcmath/src/zero.lo
ext/bcmath/libbcmath/src/debug.
lo ext/bcmath/libbcmath/src/doaddsub.lo
ext/bcmath/libbcmath/src/nearzero.lo ext
/bcmath/libbcmath/src/num2str.lo ext/bcmath/libbcmath/src/raise.lo
ext/bcmath/li
bbcmath/src/rmzero.lo ext/bcmath/libbcmath/src/str2num.lo
ext/ctype/ctype.lo ext
/fdf/fdf.lo ext/imap/php_imap.lo ext/informix/ifx.lo ext/ldap/ldap.lo
ext/mysql/
php_mysql.lo ext/mysql/libmysql/libmysql.lo
ext/mysql/libmysql/errmsg.lo ext/mys
ql/libmysql/net.lo ext/mysql/libmysql/violite.lo
ext/mysql/libmysql/password.lo
ext/mysql/libmysql/my_init.lo ext/mysql/libmysql/my_lib.lo
ext/mysql/libmysql/my
_static.lo ext/mysql/libmysql/my_malloc.lo
ext/mysql/libmysql/my_realloc.lo ext/
mysql/libmysql/my_create.lo ext/mysql/libmysql/my_delete.lo
ext/mysql/libmysql/m
y_tempnam.lo ext/mysql/libmysql/my_open.lo
ext/mysql/libmysql/mf_casecnv.lo ext/
mysql/libmysql/my_read.lo ext/mysql/libmysql/my_write.lo
ext/mysql/libmysql/erro
rs.lo ext/mysql/libmysql/my_error.lo ext/mysql/libmysql/my_getwd.lo
ext/mysql/li
bmysql/my_div.lo ext/mysql/libmysql/mf_pack.lo
ext/mysql/libmysql/my_messnc.lo e
xt/mysql/libmysql/mf_dirname.lo ext/mysql/libmysql/mf_fn_ext.lo
ext/mysql/libmys
ql/mf_wcomp.lo ext/mysql/libmysql/typelib.lo
ext/mysql/libmysql/safemalloc.lo ex
t/mysql/libmysql/my_alloc.lo ext/mysql/libmysql/mf_format.lo
ext/mysql/libmysql/
mf_path.lo ext/mysql/libmysql/mf_unixpath.lo
ext/mysql/libmysql/my_fopen.lo ext/
mysql/libmysql/mf_loadpath.lo ext/mysql/libmysql/my_pthread.lo
ext/mysql/libmysq
l/my_thr_init.lo ext/mysql/libmysql/thr_mutex.lo
ext/mysql/libmysql/mulalloc.lo
ext/mysql/libmysql/string.lo ext/mysql/libmysql/default.lo
ext/mysql/libmysql/my
_compress.lo ext/mysql/libmysql/array.lo ext/mysql/libmysql/my_once.lo
ext/mysql
/libmysql/list.lo ext/mysql/libmysql/my_net.lo
ext/mysql/libmysql/dbug.lo ext/my
sql/libmysql/strmov.lo ext/mysql/libmysql/strxmov.lo
ext/mysql/libmysql/strnmov.
lo ext/mysql/libmysql/strmake.lo ext/mysql/libmysql/strend.lo
ext/mysql/libmysql
/strfill.lo ext/mysql/libmysql/is_prefix.lo
ext/mysql/libmysql/int2str.lo ext/my
sql/libmysql/str2int.lo ext/mysql/libmysql/strinstr.lo
ext/mysql/libmysql/strcon
t.lo ext/mysql/libmysql/strcend.lo ext/mysql/libmysql/bchange.lo
ext/mysql/libmy
sql/bmove.lo ext/mysql/libmysql/bmove_upp.lo
ext/mysql/libmysql/longlong2str.lo
ext/mysql/libmysql/strtoull.lo ext/mysql/libmysql/strtoll.lo
ext/mysql/libmysql/
charset.lo ext/mysql/libmysql/ctype.lo ext/odbc/php_odbc.lo
ext/overload/overloa
d.lo ext/pcre/pcrelib/maketables.lo ext/pcre/pcrelib/get.lo
ext/pcre/pcrelib/stu
dy.lo ext/pcre/pcrelib/pcre.lo ext/pcre/php_pcre.lo ext/pdf/pdf.lo
ext/posix/pos
ix.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/ba
sic_functions.lo ext/standard/browscap.lo ext/standard/crc32.lo
ext/standard/cry
pt.lo ext/standard/cyr_convert.lo ext/standard/datetime.lo
ext/standard/dir.lo e
xt/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_pri
nt.lo ext/standard/fsock.lo ext/standard/head.lo ext/standard/html.lo
ext/standa
rd/image.lo ext/standard/info.lo ext/standard/iptc.lo
ext/standard/lcg.lo ext/st
andard/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/standa
rd/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/uniqi
d.lo ext/standard/url.lo ext/standard/url_scanner.lo
ext/standard/var.lo ext/sta
ndard/versioning.lo ext/standard/assert.lo ext/standard/strnatcmp.lo
ext/standar
d/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/standa
rd/php_fopen_wrapper.lo ext/standard/credits.lo ext/standard/css.lo
ext/standard
/var_unserializer.lo ext/standard/ftok.lo ext/standard/aggregation.lo
ext/standa
rd/sha1.lo ext/sysvsem/sysvsem.lo ext/sysvshm/sysvshm.lo
ext/tokenizer/tokenizer
.lo ext/wddx/wddx.lo ext/xml/xml.lo ext/xml/expat/xmlparse.lo
ext/xml/expat/xmlr
ole.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_mod
e.lo main/fopen_wrappers.lo main/alloca.lo main/php_ini.lo main/SAPI.lo
main/rfc
1867.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 m
ain/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/ze
nd_language_scanner.lo Zend/zend_ini_parser.lo Zend/zend_ini_scanner.lo
Zend/zen
d_alloc.lo Zend/zend_compile.lo Zend/zend_constants.lo
Zend/zend_dynamic_array.l
o Zend/zend_execute_API.lo Zend/zend_highlight.lo Zend/zend_llist.lo
Zend/zend_o
pcode.lo Zend/zend_operators.lo Zend/zend_ptr_stack.lo
Zend/zend_stack.lo Zend/z
end_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 Ze
nd/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo
Zend/zend_multibyte.lo Ze
nd/zend_execute.lo sapi/cli/php_cli.lo sapi/cli/getopt.lo
main/internal_function
s_cli.lo -ldb2 -lcrypto -lssl -lc-client -lifsql -lifasf -lifgen -lifos
-lifgls
-ldl -lcrypt -lphpifx -lifglx -lpdf -lz -lldap -llber -lcrypt -lpam
-lfdftk -lz
-lcrypt -lresolv -lm -ldl -lnsl -lcrypt  -o sapi/cli/php
/usr/bin/ld: cannot find -ldb2
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.41745 (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.41745 (%build)


Previous Comments:
------------------------------------------------------------------------

[2002-12-11 17:11:19] sniper@php.net

And note that the libpath is there now..but most likely the library
(like I suspected earlier) is not there.


------------------------------------------------------------------------

[2002-12-11 17:09:32] sniper@php.net

Please try newer snapshot and with CLEAN apache sources.


------------------------------------------------------------------------

[2002-12-11 12:46:56] truth@ichaos.com

This is still broken, I used the PHP4.3.x_dev snapshot.

------------------------------------------------------------------------

[2002-12-11 10:45:28] truth@ichaos.com

Fixed in which snapshot release? Just tried 4.3.x-dev and it's still
broken:

===> src/modules/php4
gcc -c  -I../../os/unix -I../../include  -O2 -march=i386 -mcpu=i686
-DLINUX=22 -
I/usr/include/db1 -DMOD_SSL=208110 -DEAPI ../../apaci -fpic
-DSHARED_MODULE -D
LINUX=22 -I/usr/include/db1 -DMOD_SSL=208110 
-I/usr/src/redhat/BUILD/php4-STABL
E-200212111430/main
-I/usr/src/redhat/BUILD/php4-STABLE-200212111430/Zend -I/usr
/src/redhat/BUILD/php4-STABLE-200212111430/TSRM
-I/usr/src/redhat/BUILD/php4-STA
BLE-200212111430
-I/usr/src/redhat/BUILD/php4-STABLE-200212111430/sapi/apache -I
/usr/src/redhat/BUILD/php4-STABLE-200212111430/main
-I/usr/src/redhat/BUILD/php4
-STABLE-200212111430/Zend
-I/usr/src/redhat/BUILD/php4-STABLE-200212111430/TSRM
  mod_php4.c && mv mod_php4.o mod_php4.so-o
rm -f libphp4.so
gcc -shared -o libphp4.so mod_php4.so-o libmodphp4.a 
-Wl,-rpath,/usr/local/lib
-Wl,-rpath,/usr/local/Informix/lib
-Wl,-rpath,/usr/local/Informix/lib/esql -Wl,-
rpath,/usr/src/redhat/BUILD/php4-STABLE-200212111430/ext/informix 
-rdynamic -L/
usr/local/lib -L/usr/local/Informix/lib -L/usr/local/Informix/lib/esql
-L/usr/sr
c/redhat/BUILD/php4-STABLE-200212111430/ext/informix -Lmodules/php4
-L../modules
/php4 -L../../modules/php4 -lmodphp4  -L/home/db2inst1/lib   -rdynamic
-L/usr/lo
cal/lib -L/usr/local/Informix/lib -L/usr/local/Informix/lib/esql
-L/usr/src/redh
at/BUILD/php4-STABLE-200212111430/ext/informix  -ldb2 -lcrypto -lssl
-lc-client
 -lifsql -lifasf -lifgen -lifos -lifgls -ldl -lcrypt -lphpifx -lifglx
-lpdf -lz
-lldap -llber -lcrypt -lpam -lfdftk -lz -lcrypt -lresolv -lm -ldl -lnsl
 -lcrypt
   -lm -lcrypt -ldb1 -ldb -lexpat -ldl -Wl,-rpath,/usr/local/lib
-Wl,-rpath,/usr
/local/Informix/lib -Wl,-rpath,/usr/local/Informix/lib/esql
-Wl,-rpath,/usr/src/
redhat/BUILD/php4-STABLE-200212111430/ext/informix  -rdynamic
-L/usr/local/lib -
L/usr/local/Informix/lib -L/usr/local/Informix/lib/esql
-L/usr/src/redhat/BUILD/
php4-STABLE-200212111430/ext/informix -Lmodules/php4 -L../modules/php4
-L../../m
odules/php4 -lmodphp4  -L/home/db2inst1/lib   -rdynamic
-L/usr/local/lib -L/usr/
local/Informix/lib -L/usr/local/Informix/lib/esql
-L/usr/src/redhat/BUILD/php4-S
TABLE-200212111430/ext/informix  -ldb2 -lcrypto -lssl -lc-client 
-lifsql -lifas
f -lifgen -lifos -lifgls -ldl -lcrypt -lphpifx -lifglx -lpdf -lz -lldap
-llber -
lcrypt -lpam -lfdftk -lz -lcrypt -lresolv -lm -ldl -lnsl  -lcrypt   -lm
-lcrypt
-ldb1 -ldb
/usr/bin/ld: cannot find -ldb2
collect2: ld returned 1 exit status
make[4]: *** [libphp4.so] Error 1
make[3]: *** [all] Error 1
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/usr/src/redhat/BUILD/apache_1.3.26/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/usr/src/redhat/BUILD/apache_1.3.26'
make: *** [build] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.86132 (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.86132 (%build)

------------------------------------------------------------------------

[2002-12-11 02:42:30] sniper@php.net

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.



------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/20928

-- 
Edit this bug report at http://bugs.php.net/?id=20928&edit=1



Thread (18 messages)

« previous php.bugs (#28059) next »