php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #3090 Forgotten -lgcc in final link stage
Submitted: 2000-01-03 12:02 UTC Modified: 2000-12-04 09:44 UTC
From: dnehring at telemedia dot de Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0 Latest CVS (03/01/2000) OS: Solaris 2.6
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: dnehring at telemedia dot de
New email:
PHP Version: OS:

 

 [2000-01-03 12:02 UTC] dnehring at telemedia dot de
Hi *,

when compiling PHP4 as apxs-module, libtool forgets to include -lgcc to the libraries. So, when compiling with
gcc, the final module failed:

Cannot load /usr/local/tm/mod_php-4.0-20000103/libexec/mod_php.so into server: ld.so.1: /usr/local/tm/apache-1.3.9/bin/httpd: fatal: relocation error: file /usr/local/tm/mod_php-4.0-20000103/libexec/mod_php.so: symbol __muldi3: referenced symbol not found

As solution would be to give "ld" the hint to link libgcc.a
to the library, I do it the following way:

CFLAGS="-O3 -fomit-frame-pointer -L/usr/local/egcs/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.90.29" \
LIBS="-lgcc" \
./configure --with-apxs=/usr/local/tm/apache/bin/apxs \
        --with-config-file-path=/var/config/php4 \
        --disable-debug \
[...]

Please fix this problem with libtool/ld, I do not like my
solution.

Dirk

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-03-12 11:04 UTC] sas at cvs dot php dot net
You should not mix executables/modules compiled with different compilers. 

Moving it to feature request.
 [2000-12-04 09:44 UTC] sniper@php.net
There is configure option --enable-libgcc which does this.

--Jani
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Mon Jun 15 16:00:01 2026 UTC