#23758 [Fbk->Opn]: Must link -lgcc_s rather than -lgcc

From: Date: Thu, 22 May 2003 22:37:55 +0000
Subject: #23758 [Fbk->Opn]: Must link -lgcc_s rather than -lgcc
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-40225@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:           Feedback
+Status:           Open
 Bug Type:         Compile Failure
 Operating System: HPUX 11.00
 PHP Version:      4.3.2RC4
 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------

[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?


------------------------------------------------------------------------

[2003-05-22 12:04:55] pbriggs at clinitech dot net

PHP-4.3.2RC4 on HP-UX 11.00

./configure --prefix=/opt/php --with apxs2=/opt/apache/bin/apxs
--with-mysql=/opt/mysql4 -enable libgcc --enable-sockets

In order to avoid "unresolved symbol: __umoddi3" error when attempting
to start Apache 2 with PHP as a module, I must use the configure option
--enable-libgcc.  Because -lgcc is not a shared library, PHP does not
compile a shared object that Apache can use as a module.  A static
libphp4.a object is created in .libs directory.

What I have done is rerun the linker step manually by copying and
pasting the long linker command on my telnet terminal.  I then
substitute -lgcc with -lgcc_s and that make libtool happy which then
creates the correct shared object libphp4.sl in .libs which Apache can
then load as a module.



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=23758&edit=1



Thread (9 messages)

« previous php.bugs (#40225) next »