Odd build errors



We have a GCC in /usr/rcf that was not built with --disable-shared.
As such, there is a /usr/rcf/lib/libgcc_s.so.

We also have a (preferred) GCC in /afs/rcf/lang/gcc/current that
was built with --disable-shared. As such, there is no
/afs/rcf/lang/gcc/current/lib/libgcc_s.so and binaries built
with this compiler do not link to any shared libgcc_s.

I have the following problem with Python 2.4.2. I also tried
2.4.4. Moving up to 2.5 is not an option.

Problem: Builds fine! Rebuild after dropping in Setup.local
causes some magic new build process that ends up
finding and linking in /usr/rcf/lib/libgcc_s.so !

===============================================================================
PATH=/afs/rcf/lang/gcc/sun4x_59/4.1.1/bin:/usr/ccs/bin:/usr/bin:/bin:/usr/ucb
# NOTE: No reference to /usr/rcf/bin, therefore NO picking up the bogus
# GCC and its shared libgcc_s.so
===============================================================================
sun4x_59:cairo> ../configure --prefix=/afs/rcf/lang/python/sun4x_59/2.4.2
sun4x_59:cairo> make
....
===============================================================================
# after successful build...
sun4x_59:cairo> ldd python
libresolv.so.2 => /usr/lib/libresolv.so.2
libsocket.so.1 => /usr/lib/libsocket.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
librt.so.1 => /usr/lib/librt.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libm.so.1 => /usr/lib/libm.so.1
libpthread.so.1 => /usr/lib/libpthread.so.1
libc.so.1 => /usr/lib/libc.so.1
libmp.so.2 => /usr/lib/libmp.so.2
libaio.so.1 => /usr/lib/libaio.so.1
libmd5.so.1 => /usr/lib/libmd5.so.1
libthread.so.1 => /usr/lib/libthread.so.1
/usr/platform/SUNW,Sun-Fire-280R/lib/libc_psr.so.1
/usr/platform/SUNW,Sun-Fire-280R/lib/libmd5_psr.so.1
sun4x_59:cairo>
#
# Ta daaa! No libgcc_s.so linked in. GOOD.
#
# Now we drop our Setup.local in place for Solaris 9.
#
sun4x_59:cairo> cp ~/Python242.sun4x_59.Setup.local Modules/Setup.local
===============================================================================
sun4x_59:cairo> make
....
c++ -pthread -o python \
Modules/python.o \
libpython2.4.a -lresolv -lsocket -lnsl -lrt -ldl -L/afs/rcf/lang/tcl/@sys/8.2.3/lib -R/afs/rcf/lang/tcl/@sys/8.2.3/lib -L/afs/rcf/lang/tk/@sys/8.2.3/lib -R/afs/rcf/lang/tk/@sys/8.2.3/lib -ltk8.2 -ltcl8.2 -L/usr/openwin/lib -R/usr/openwin/lib -lX11 -R/usr/rcf/lib -L/usr/rcf/lib -lreadline -ltermcap -L/usr/rcf/lib -R/usr/rcf/lib -lssl -lcrypto -L/usr/rcf/lib -R/usr/rcf/lib -lgdbm -L/usr/rcf/lib -R/usr/rcf/lib -lz -lm
ld: warning: global symbol `_GLOBAL_OFFSET_TABLE_' has non-global binding:
(file /usr/rcf/lib/libstdc++.so value=LOCL);
ld: warning: global symbol `_GLOBAL_OFFSET_TABLE_' has non-global binding:
(file /usr/rcf/lib/libgcc_s.so.1 value=LOCL);
case $MAKEFLAGS in \
*-s*) CC='gcc -pthread' LDSHARED='gcc -pthread -shared' OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ../setup.py -q build;; \
*) CC='gcc -pthread' LDSHARED='gcc -pthread -shared' OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ../setup.py build;; \
esac
ld.so.1: python: fatal: libgcc_s.so.1: open failed: No such file or directory
Killed
make: *** [sharedmods] Error 137
sun4x_59:cairo> ldd python
libresolv.so.2 => /usr/lib/libresolv.so.2
libsocket.so.1 => /usr/lib/libsocket.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
librt.so.1 => /usr/lib/librt.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libX11.so.4 => /usr/openwin/lib/libX11.so.4
libcurses.so.1 => /usr/lib/libcurses.so.1
libgdbm.so.2 => /usr/rcf/lib/libgdbm.so.2
libstdc++.so.5 => /usr/rcf/lib/libstdc++.so.5
libm.so.1 => /usr/lib/libm.so.1
libpthread.so.1 => /usr/lib/libpthread.so.1
libc.so.1 => /usr/lib/libc.so.1
libmp.so.2 => /usr/lib/libmp.so.2
libaio.so.1 => /usr/lib/libaio.so.1
libmd5.so.1 => /usr/lib/libmd5.so.1
libXext.so.0 => /usr/openwin/lib/libXext.so.0
libgcc_s.so.1 => (file not found) # NOOOOOO
libthread.so.1 => /usr/lib/libthread.so.1
/usr/platform/SUNW,Sun-Fire-280R/lib/libc_psr.so.1
/usr/platform/SUNW,Sun-Fire-280R/lib/libmd5_psr.so.1
sun4x_59:cairo>

.



Relevant Pages

  • Re: PyPerl 1.0.1 [requires Visual Studio compiler?]
    ... Python was built with version 6 of Visual Studio, and extensions need to ... > be built with the same version of the compiler, ...
    (comp.lang.python)
  • Re: Help with chaos math extensions.
    ... In order to build extensions, you need the compiler the interpreter was built on, or at least that is what is reported to me by calling setup.py. ... in python in the past, and have had good success, but it would run so slowly because of the overhead involved with the calculation. ...
    (comp.lang.python)
  • Re: How to build Python modules on windows?
    ... > how can I build python modules on windows? ... > extensions need to be built with the same version of the compiler, ... Compiler" ... I'm usually annoyed by IDEs because, for instance, they don't use VIM ...
    (comp.lang.python)
  • Re: Compiling and installing python 2.5.2 with Visual C++ 2008
    ... extensions must be built with a compiler than can generate compatible binaries. ... Visual Studio 2003 was not found on this system. ... SoQt, PyQt) with visual c++ 8, I decided to recompile python itself. ...
    (comp.lang.python)
  • Re: Building C extensions
    ... the same compiler that has been used to build python. ... python has been built using Visual C, how can I build an extension if ... If you don't have mingw32, either, you can't build the extension module. ... You need to get a supported compiler. ...
    (comp.lang.python)