php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19572 Compilation fails with undefined reference to `__log1p'
Submitted: 2002-09-24 04:16 UTC Modified: 2002-09-24 10:53 UTC
From: pkett at genesis-midi dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 4.2.3 OS: Linux (Suse 6.1)
Private report: No CVE-ID: None
 [2002-09-24 04:16 UTC] pkett at genesis-midi dot com
I am attempting to compile PHP under Linux with 
egcs-1.1.2. 
 
If I compile php as a DSO module it compiles fine but 
apache won't load it complaining of unresolved symbols. 
 
If I try and compile it into apache I get the following 
compilation errors : 
 
      -o httpd buildmark.o modules.o 
modules/standard/libstandard.a modules/proxy/libproxy.a 
modules/php4/libphp4.a main/libmain.a ./os/unix/libos.a 
ap/libap.a    -Wl,-rpath,/usr/local/mysql/lib  -rdynamic 
-L/usr/local/mysql/lib -Lmodules/php4 -L../modules/php4 
-L../../modules/php4 -lmodphp4   -lmysqlclient -lz -lcrypt 
-lresolv -lm -ldl -lnsl  -lresolv -lcrypt   -lm -lcrypt 
-lndbm -lexpat 
modules/php4/libphp4.a(zend_ini_scanner.lo): warning: 
multiple common of `yytext' 
modules/php4/libphp4.a(zend_language_scanner.lo): warning: 
previous common is here 
modules/php4/libphp4.a(math.lo): In function `zif_atanh': 
/usr/include/__math.h:426: undefined reference to 
`__log1p' 
collect2: ld returned 1 exit status 
make[2]: *** [target_static] Error 1 
make[2]: Leaving directory `/home/pkett/apache_1.3.26/src' 
make[1]: *** [build-std] Error 2 
make[1]: Leaving directory `/home/pkett/apache_1.3.26' 
make: *** [build] Error 2 
 
 
I have tried with 4.2.2 and 4.2.3 with the same results - 
I suspect it's due to using egcs and not a more recent 
version of gcc but can anyone confirm this? 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-24 06:20 UTC] sniper@php.net
There might be something wrong (or missing) in your system.
Could you try installing GCC 2.95.3 ?

 [2002-09-24 06:21 UTC] sniper@php.net
Forgot to ask: Are you able to compile anything else? Do you have the kernel headers links correctly set?

 [2002-09-24 08:11 UTC] pkett at genesis-midi dot com
Can compile other stuff without problems - in fact I upgraded apache on the machine just prior to attempting to compile php.

I have just installed gcc 2.95.3 on there and am in the process of retrying php. I'll let you know if that fixes the problem.
 [2002-09-24 08:47 UTC] pkett at genesis-midi dot com
Upgrading gcc to version 2.95.3 has solved the problem.

Maybe something should be added to the FAQ to indicate that it won't compile properly on older versions. The version I was using BTW was the version installed with Suse 6.1 not something I added afterwards.
 [2002-09-24 10:53 UTC] sniper@php.net
It has compiled fine with that older (?) version too.
You just had something missing in your system.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 17 15:01:28 2024 UTC