#23758 [Opn]: Must link -lgcc_s rather than -lgcc
| From: | pbriggs at clinitech dot net | Date: | Tue, 09 Mar 2004 02:11:10 +0000 |
| Subject: | #23758 [Opn]: Must link -lgcc_s rather than -lgcc | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-56131@lists.php.net to get a copy of this message | ||
ID: 23758
User updated by: pbriggs at clinitech dot net
Reported By: pbriggs at clinitech dot net
Status: Open
Bug Type: Compile Failure
Operating System: HPUX 11.00
PHP Version: 4CVS, 5CVS
New Comment:
If I use the GCC 3.3.2 binary provided by the HP Software and Porting
Archive at http://hpux.cs.utah.edu/ they don't include a
libgcc_s.sl,
so when I compiled PHP, I didn't specify the -enable-libgcc on the
./configure command.
Everything compiled and install fine without needing lgcc_s. I'm not
sure how their binary differs from mine when I compiled GCC myself.
Previous Comments:
------------------------------------------------------------------------
[2004-01-27 17:20:39] pbriggs at clinitech dot net
Same issue exists in version 4.3.5RC1. This time I did ./configure
process, edited the Makefile and changed -lgcc to -lgcc_s. That
produced the corrected module that I could load into Apache2.
------------------------------------------------------------------------
[2003-05-22 18:45:51] pbriggs at clinitech dot net
Ok, tried as you suggested. Same error.
------------------------------------------------------------------------
[2003-05-22 18:07:16] sniper@php.net
Try this:
CFLAGS=-shared-libgcc ./configure --disable-cli ..plus your options..
(and leave the --enable-libgcc part out)
------------------------------------------------------------------------
[2003-05-22 17:37:55] pbriggs at clinitech dot net
The version of GCC is 3.3. I have had previous versions of PHP
installed, but in each case, I had to link libgcc_s.1 when its being
used as an Apache module.
I just attempted to leave out --enable-libgcc, and what I get is this
error from Apache 2.0.45:
Cannot load /opt/apache/modules/libphp4.so into server: Unresolved
external: __umoddi3
The function its looking for is apparently in libgcc, so I have to
compile with --enable-libgcc to take care of the problem. This appears
to be documented in bugs 16808, 15189, 12222, 12232.
Using --enable-libgcc fixes the issue, but in the case of an Apache as
a module, it needs to be the shared version lgcc_s to avoid libtool
creating a static, rather than shared object for Apache.
The only thing I haven't tried is maybe making a symbolic link of
libgcc.sl -> libgcc_s.1, but I'm not sure if that is really the best
solution.
------------------------------------------------------------------------
[2003-05-22 17:02:18] sniper@php.net
Did you try without --enable-libgcc ??
What gcc version are you using? Did you have some older
version installed before you installed the new one?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/23758
--
Edit this bug report at http://bugs.php.net/?id=23758&edit=1