php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34247 configure claims g++ does not support shared libraries (when used as LD)
Submitted: 2005-08-25 13:36 UTC Modified: 2005-08-25 13:39 UTC
From: arattink at correct dot net Assigned:
Status: Not a bug Package: *Configuration Issues
PHP Version: 5.1.0RC1 OS: Linux 2.4.25 SMP
Private report: No CVE-ID: None
 [2005-08-25 13:36 UTC] arattink at correct dot net
Description:
------------
The configure fails to discover that that g++ (ie LD=/usr/bin/g++)   
supports shared libraries.   
From the output:   
   
checking whether the gcc linker (/usr/bin/g++) supports shared   
libraries... no   
   
I can assure you that g++ (used as 'ld) does support shared libs. I   
need to use g++ specificly because ld does not link C++ libraries   
correctly and we use some C++ code in our own extensions.  
   
g++ --version         ==>   2.95.3   
   
For the record: *only* LD is set, not CC or CXX or any xxxFLAGS. 

Reproduce code:
---------------
LD=/usr/bin/g++ ./configure --disable_all

Expected result:
----------------
checking whether the gcc linker (/usr/bin/g++) supports shared 
libraries... yes 
 
 

Actual result:
--------------
checking whether the gcc linker (/usr/bin/g++) supports shared   
libraries... no   
   
Unfortunately it is nigh impossible to figure out what configure   
does.    
   
I also tried gcc-3.4.3 which claimed g++ did and did not support it   
in the same run, but in the end refused to build the .so file anyway.   
I also tried 'LD="g++ -v"' and '--with-gnu-ld' but to no avail.   
All these tests on a freshly untarred tarball to be sure.   
   
 Yours sincerely,   
Arnoud Rattink.   
   

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-25 13:37 UTC] sniper@php.net
Trying to outsmart configure is not bug in PHP.
If your stuff doesn't work without setting g++ as linker, it's not PHP's fault.

 [2005-08-25 13:39 UTC] sniper@php.net
There are extensions in PECL written in C++ and compiling them does not require setting LD as g++ so it's something wrong with your stuff, not PHP's.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC