php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9400 Duplicate symbol with GD
Submitted: 2001-02-22 08:34 UTC Modified: 2001-06-07 18:01 UTC
From: l_faillie at yahoo dot com Assigned:
Status: Closed Package: Sockets related
PHP Version: 4.0.4pl1 OS: HP-UX 10.20
Private report: No CVE-ID: None
 [2001-02-22 08:34 UTC] l_faillie at yahoo dot com
Hello all,

i have severals problem when compiling php-4.0.4pl1 under my HP-UX 10.20 box at work.

I use :

apache_1.3.17 with mod_so
gd-1.8.4
postgresql-7.0.3

gcc version 2.95.2

configure --with-ndbm --with-ftp --with-gd --with-pgsql --enable-sockets
--with-apxs=/usr/local/apache/bin/apxs

1/ First of all, it seems HP's include files are broken, so I have added 
#define _IN_ADDR_T
at the beginning of sockets.c otherwith i got a "dupplicate symbole error".

2/ I got a linker error

        /bin/sh /datas/depot/php-4.0.4pl1/libtool --silent --mode=link gcc  -I. -I/datas/depot/php-4.0.4pl1/ -I/datas/depot/php-4.0.4pl1/main
 -I/datas/depot/php-4.0.4pl1 -I/usr/local/apache/include -I/datas/depot/php-4.0.4pl1/Zend -I/usr/local/include -I/datas/depot/php-4.0.4pl1/ex
t/mysql/libmysql -I/datas/depot/php-4.0.4pl1/ext/xml/expat/xmltok -I/datas/depot/php-4.0.4pl1/ext/xml/expat/xmlparse -I/datas/depot/php-4.0.4
pl1/TSRM  -DHPUX10 -DUSE_HSREGEX -DUSE_EXPAT -DXML_BYTE_ORDER=21 -g -O2   -o libphp4.la -rpath /datas/depot/php-4.0.4pl1/libs -avoid-version
-L/usr/local/lib -L/usr/local/pgsql/lib  -R /usr/local/lib -R /usr/local/pgsql/lib stub.lo  Zend/libZend.la  sapi/apache/libsapi.la  main/lib
main.la  regex/libregex.la  ext/dba/libdba.la ext/gd/libgd.la ext/mysql/libmysql.la ext/pcre/libpcre.la ext/pgsql/libpgsql.la ext/posix/libpo
six.la ext/session/libsession.la ext/sockets/libsockets.la ext/standard/libstandard.la ext/xml/libxml.la  TSRM/libtsrm.la -lpq -lttf -lgd -lm
 -lcrypt
/usr/ccs/bin/ld: Duplicate symbol "gdImageColorResolve" in files .libs/libphp4.lax/libgd.al/gd.lo and /usr/local/lib/libgd.a(gd.o)
/usr/ccs/bin/ld: Duplicate symbols are not allowed in shared libraries
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.


Someone has a tips about this error ?

Thanks for your help

- Laurent

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-22 18:55 UTC] sniper@php.net
Maybe 'make clean' would help?

--Jani

 [2001-03-08 11:20 UTC] l_faillie at yahoo dot com
Hello all,

Arg, the system disk of my workstation has died so i have reinstalled all stuffs from scratch ... and this time it's compiling ok :-)))

But i have also added the _IN_ADDR_T.

I think the problem was from a precompiled package I got from HP-UX porting center :-(
This time, I have recompiled all stuff.

But now, I have a problem for the installation :

gmake install

...

gmake[1]: Entering directory `/datas/depot/php-4.0.4pl1'
/usr/local/apache/bin/apxs -i -a -n php4 libs/libphp4.sl
apxs:Error: file libs/libphp4.sl is not a DSO
gmake[1]: *** [install-sapi] Error 1
gmake[1]: Leaving directory `/datas/depot/php-4.0.4pl1'
gmake: *** [install-recursive] Error 1


Any clue ?

Thanks for your help.
 [2001-03-08 18:58 UTC] sniper@php.net
Might be that the Apache in HP-UX expects .so instead
of .sl ? Try renaming the libphp4.sl to libphp4.so

--Jani

 [2001-03-09 05:33 UTC] l_faillie at yahoo dot com
Hi Jani,

unfortunatly, it doesn't work :-(

[root]/usr/local/apache/bin $apachectl configtest
/usr/lib/dld.sl: Unresolved symbol: SUN_LEN (code)  from /usr/local/apache/libexec/libphp4.sl
/usr/lib/dld.sl: Unresolved symbol: hstrerror (code)  from /usr/local/apache/libexec/libphp4.sl
Syntax error on line 207 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libphp4.sl into server: No such file or directory

[root]/usr/local/apache/bin $ll /usr/local/apache/libexec/libphp4.sl
-rwxr-xr-x   1 root       sys        7176620 Mar  8 18:33 /usr/local/apache/libexec/libphp4.sl

Obviously, the same thing if a rename the file to libphp4.so

- Laurent
 [2001-03-09 06:21 UTC] sniper@php.net
Please try the latest CVS snapshot from http://snaps.php.net/ and this time DO NOT tamper with
the sources by yourself..

--Jani

 [2001-03-09 09:51 UTC] l_faillie at yahoo dot com
Hi Jani,

I download the file and then

1/ When I compile with the orginal source code :

$ gmake

datas/depot/php4-200103090345/Zend -I/datas/depot/php4-200103090345/ext/xml/expat/xmltok -I/datas/depot/php4-200
103090345/ext/xml/expat/xmlparse -I/datas/depot/php4-200103090345/TSRM  -DHPUX10 -DUSE_HSREGEX -DUSE_EXPAT -DSUPP
ORT_UTF8 -DXML_BYTE_ORDER=21 -g -O2  -c sockets.c
In file included from /usr/include/netdb.h:71,
                 from sockets.c:44:
/usr/include/netinet/in.h:96: conflicting types for `u_int'
/usr/include/sys/types.h:281: previous declaration of `u_int'
sockets.c: In function `php_if_strerror':
sockets.c:1088: warning: assignment makes pointer from integer without a cast
gmake[3]: *** [sockets.lo] Error 1
gmake[3]: Leaving directory `/datas/depot/php4-200103090345/ext/sockets'
...

2/ After adding #define _IN_ADDR_T into sockets.c

gmake[3]: Entering directory `/datas/depot/php4-200103090345/ext/sockets'
/bin/sh /datas/depot/php4-200103090345/libtool --silent --mode=compile gcc  -I. -I/datas/depot/php4-200103090345/
ext/sockets -I/datas/depot/php4-200103090345/main -I/datas/depot/php4-200103090345 -I/usr/local/apache/include -I
/datas/depot/php4-200103090345/Zend -I/datas/depot/php4-200103090345/ext/xml/expat/xmltok -I/datas/depot/php4-200
103090345/ext/xml/expat/xmlparse -I/datas/depot/php4-200103090345/TSRM  -DHPUX10 -DUSE_HSREGEX -DUSE_EXPAT -DSUPP
ORT_UTF8 -DXML_BYTE_ORDER=21 -g -O2  -c sockets.c
sockets.c: In function `php_if_strerror':
sockets.c:1090: warning: assignment makes pointer from integer without a cast

...

and the compile finishes successfully.

3/ $ gmake install

...

gmake[1]: Entering directory `/datas/depot/php4-200103090345'
/usr/local/apache/bin/apxs -i -a -n php4 libs/libphp4.sl
apxs:Error: file libs/libphp4.sl is not a DSO
gmake[1]: *** [install-sapi] Error 1
gmake[1]: Leaving directory `/datas/depot/php4-200103090345'
gmake: *** [install-recursive] Error 1

4/

cp libs/libphp4.sl /usr/local/apache/libexec/libphp4.so

[root]/usr/local/apache $bin/apachectl configtest
/usr/lib/dld.sl: Unresolved symbol: hstrerror (code)  from /usr/local/apache/libexec/libphp4.sl
Syntax error on line 207 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libphp4.sl into server: No such file or directory

So, it's the same symptoms than with the previous release :-(

Bye

Laurent

PS: I'm in holiday next week :-)
 [2001-03-09 13:19 UTC] sniper@php.net
Okay, could you try configuring PHP without the socket support? ie. leave --enable-sockets out of your configure line. Remember to delete config.cache before reconfiguring!
And do 'make clean' after configure.

The sockets extension is considered EXPERIMENTAL at the moment (as you can see, it doesn't compile right in every system.. :) so I would first like to see that PHP works
for you WITHOUT it.

And did you compile Apache yourself?

--Jani

 [2001-03-20 13:02 UTC] l_faillie at yahoo dot com
Hi Jani,

1/ Yes I compile my self Apache because I found only HPUX 11 binary (and because, in security point of view, it's safter).

2/ I compile successfully PHP on my machine but using staticaly compiled module into apache.
I found the cause of my last problem : it's because hstrerror() doesn't exist under HP-UX. So i only use strerror() into socket.c and now all compile OK.

I will now try to recompile the whole stuff as dymamicaly loaded module (because php takes a very very long time to compile on my old workstation and it will be a mess at every apache or PHP new release if I still use a static module).

3/ I'm trying also to compile PHP on my own SPARC workstation at home and socket.c doesn't compile also under Solaris 7. It's again because of a mishandling of header.
Is it usefull for you to have my patch for solaris ?

Bye

Laurent
 [2001-06-02 21:24 UTC] sniper@php.net
This should be fixed with PHP 4.0.6, please try the 
latest release candidate:

http://www.php.net/~andi/php-4.0.6RC2.tar.gz

-Jani

 [2001-06-07 18:01 UTC] l_faillie at yahoo dot com
Ok, I will try it ASAP (but i'm very busy actualy)

Laurent
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Apr 01 12:01:22 2020 UTC