Bug 79782

Summary: ports/Mk/bsd.php.mk 1.15 breaks oracle
Product: Ports & Packages Reporter: dirk.meyer <dirk.meyer>
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description dirk.meyer 2005-04-11 09:40:19 UTC
	After buill and install, php can't load the extension.

PHP Warning:  Unknown(): Unable to load dynamic library '/usr/local/lib/php/20020429/oracle.so' - /usr/local/lib/php/20020429/oracle.so: Undefined symbol &quot;nscontrol&quot; in Unknown on line 0

	old package php4-oracle-4.3.10_2 was okay.

-r--r--r--  1 root  wheel  2126950 Apr  4 07:36 ok/lib/php/20020429/oracle.so

	new package php4-oracle-4.3.11 wasn not loadable.
-r--r--r--  1 root  wheel   519817 Apr  6 06:17 1/lib/php/20020429/oracle.so

	recompiled old package php4-oracle-4.3.10_2 was not loadable.
-r--r--r--  1 root  wheel   519817 Apr 11 09:37 2/lib/php/20020429/oracle.so

	The oracle.so has not all required statis libs included.

	link comamnd line which creates the broken oracle.lo:
cc -shared  oracle.lo  -Wl,--rpath -Wl,/usr/local/oracle7/lib  -L/usr/local/oracle7/lib -lncr -lsqlnet -lclient -lcommon -lgeneric -lepc -lc3v6 -lnlsrtl3 -lcore3 -lwrap  -Wl,-soname -Wl,oracle.so -o ./.libs/oracle.so

	link comamnd line which creates an valid oracle.lo:
cc -shared  -Wl,--rpath -Wl,/image/usr/ports/current/php4-oracle/work/php-4.3.10/ext/oracle/modules -Wl,--rpath -Wl,/usr/local/oracle7/lib  oracle.lo  -L/usr/local/oracle7/lib -lclient -lsqlnet -lncr -lsqlnet -lclient -lcommon -lgeneric -lsqlnet -lncr -lsqlnet -lclient -lcommon -lgeneric -lepc -lnlsrtl3 -lc3v6 -lcore3 -lnlsrtl3 -lwrap -lcore3 -lwrap  -Wl,-soname -Wl,oracle.so -o ./.libs/oracle.so

Fix: 

Add this line:

	USE_LIBTOOL_VER=        13

	Either add that line to ports/Mk/bsd.php.mk
	or to ports/databases/php4-oracle/Makefile

	I have not checked how much other ports have been affected by the change in bsd.php.mk.
How-To-Repeat: 
	build in /usr/ports/databases/php4-oracle
	check sizes of shared object, or try to load it.
Comment 1 Dirk Meyer freebsd_committer freebsd_triage 2005-04-11 13:04:36 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

- over to maintainer
Comment 2 Alex Dupre freebsd_committer freebsd_triage 2005-04-11 16:33:13 UTC
Can you try if:

USE_LIBTOOL_VER=        14

has the same effect?

--
Alex Dupre
Comment 3 dirk.meyer 2005-04-12 12:15:24 UTC
Alex Dupre schrieb:,

> Can you try if:
> USE_LIBTOOL_VER=        14

error, it complains that libtool14 does not exists.

USE_LIBTOOL_VER=	15

will create the small defunt oracle.so

USE_LIBTOOL_VER=	13
-rw-r--r--  1 root  wheel  735003 Apr 12 12:32 /usr/ports/packages/All/php4-oracle-4.3.11.tgz

kind regards Dirk

- Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
- [dirk.meyer@dinoex.sub.org],[dirk.meyer@guug.de],[dinoex@FreeBSD.org]

wdiff of buildlog:
/bin/sh [-/usr/local/bin/libtool13-] {+/usr/local/bin/libtool15+} --mode=link cc -DPHP_ATOM_INC -I/image/usr/ports/current/php4-oracle/work/php-4.3.11/ext/oracle/include -I/image/usr/ports/current/php4-oracle/work/php-4.3.11/ext/oracle/main -I/image/usr/ports/current/php4-oracle/work/php-4.3.11/ext/oracle -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/oracle7/rdbms/public -I/usr/local/oracle7/rdbms/demo  -DHAVE_CONFIG_H  -O -p ipe -W -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Winline -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings   -o ./oracle.la -export-dynamic -avoid-version -prefer-pic -module -rpath /image/usr/ports/current/php4-oracle/work/php-4.3.11/ext/oracle/modules  oracle.lo -R/usr/local/oracle7/lib -L/usr/local/oracle7/lib -lclient -R/usr/local/oracle7/lib -L/usr/local/oracle7/lib -lsqlnet !
 -R/usr/local/oracle7/lib -L/usr/local/oracle7/lib -lncr -R/usr/local/oracle7/lib -L/usr/local/oracle7/lib -lsqlnet -R/usr/local/oracle7/lib -L/usr/local/oracle7/lib -lclient -R/usr/local/oracle7/lib -L/usr/local/oracle7/lib -lcommon -R/usr/local/oracle7/lib -L/usr/local/oracle7/lib -lgeneric -R/usr/local/oracle7/lib -L/usr/local/oracle7/lib -lsqlnet -R/usr/local/oracle7/lib -L/usr/local/oracle7/lib -lncr -R/usr/local/oracle7/lib -L/usr/local/oracle7/lib -lsqlnet -R/usr/local/oracle7/lib -L/usr/local/oracl e7/lib -lclient -R/usr/local/oracle7/lib -L/usr/local/oracle7/lib -lcommon -R/usr/local/oracle7/lib -L/usr/local/oracle7/lib -lgeneric -R/usr/local/oracle7/lib -L/usr/local/oracle7/lib -lepc -R/usr/local/oracle7/lib -L/usr/local/oracle7/lib -lnlsrtl3 -R/usr/local/oracle7/lib -L/usr/local/oracle7/lib -lc3v6 -R/usr/local/oracle7/lib -L/usr/local/oracle7/lib -lcore3 -R/usr/local/oracle7/lib -L/usr /local/oracle7/lib -lnlsrtl3 -R/usr/local/oracle7/lib -L/usr/local/oracle7/lib -!
 lwrap -R/usr/local/oracle7/lib -L/usr/local/oracle7/lib -lcore!
 3 -lwrap

[-rm -fr ./.libs/oracle.la ./.libs/oracle.* ./.libs/oracle.*-]
cc -shared  [--Wl,--rpath -Wl,/image/usr/ports/current/php4-oracle/work/php-4.3.11/ext/oracle/modules-]  {+.libs/oracle.o+}  -Wl,--rpath -Wl,/usr/local/oracle7/lib  [-oracle.lo-] -L/usr/local/oracle7/lib [--lclient -lsqlnet -lncr -lsqlnet -lclient -lcommon -lgeneric -lsqlnet-] -lncr -lsqlnet -lclient -lcommon -lgeneric -lepc [--lnlsrtl3-] -lc3v6 [--lcore3-] -lnlsrtl3 [--lwrap-] -lcore3 -lwrap  -Wl,-soname -Wl,oracle.so -o ./.libs/oracle.so
creating ./oracle.la
(cd ./.libs && rm -f oracle.la && ln -s ../oracle.la oracle.la)
/bin/sh [-/usr/local/bin/libtool13-] {+/usr/local/bin/libtool15+} --mode=install cp ./oracle.la /image/usr/ports/current/php4-oracle/work/php-4.3.11/ext/oracle/modules
Comment 4 dirk.meyer 2005-04-13 12:17:53 UTC
Alex Dupre schrieb:,

> I tried php4 and php5 with USE_LIBTOOL_VER=13/15 and without it. It 
> seems that the only working combination is php5 + libtool 1.3.
> php4 + libtool 1.3 doesn't work for me.

I checked the diffrent USE_LIBTOOL_VER only in php4-oracle,
I did not have the time to recompile all php ports.

Gruß Dirk

- Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
- [dirk.meyer@dinoex.sub.org],[dirk.meyer@guug.de],[dinoex@FreeBSD.org]
- Tel. +49-5606-6512
- Tel. +49-178-5678703
- Fax  +49-5606-55023
Comment 5 dirk.meyer 2005-04-13 16:07:32 UTC
Alex Dupre schrieb:,

> Yes, I'm talking about php4-oracle and php5-oracle. No other php-* ports 
> I tested have this problem.

System: FreeBSD 4.11-RELEASE-p2 #7: Tue Apr  5 13:47:42 CEST 2005
Clean jail, dependecies installed as package.

php4-oracle works with libtool13 here.
without libtool or with libtool15,
the functions from libclient.a are not included in the shared object.

kind regards Dirk

- Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
- [dirk.meyer@dinoex.sub.org],[dirk.meyer@guug.de],[dinoex@FreeBSD.org]
Comment 6 dusty 2005-05-19 15:55:43 UTC
Just wanted to verify that this fix worked for php5 as well in case anyone is having issues and reads this bug report.

I am running:
5.4-RELEASE
php5-5.0.4_2
php5-oracle-5.0.4_2
oracle7-client-0.02
apache-2.0.53

At first, I got 
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20041030/oracle.so' - /usr/local/lib/php/20041030/oracle.so: Undefined symbol &quot;nscontrol&quot; in Unknown on line 0

I added 
USE_LIBTOOL_VER=        13
to /usr/ports/databases/php5-oracle/Makefile

Now, its working.
Comment 7 Alex Dupre freebsd_committer freebsd_triage 2005-06-14 15:28:05 UTC
State Changed
From-To: open->closed

A fix has been committed.