C modules with gcc 3.0.x

Gerhard =?unknown-8bit?Q?H=E4ring?= gh_pythonlist at gmx.de
Sun Nov 11 22:14:25 CET 2001

On Sun, Nov 11, 2001 at 03:47:18PM -0500, Robert Nikander wrote:
> Has anyone been using gcc 3 with python C modules?  When gcc 2.95 compiles
> the module everything works fine, but if I use gcc 3 I get this....
> Python 2.2b1 (#2, Nov 11 2001, 12:36:39) [GCC 2.95.3 20010315 (release -
> Linux-Mandrake 8.0 for PPC)] on linux2 Type "help", "copyright", "credits"
> or "license" for more information.
> >>> import spam
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> ImportError: libgcc_s.so.1: cannot load shared object file: No such file
> or directory

Well, programs compiled with gcc 3.x need a runtime library called libgcc_s.
This one cannot be found in your linker's search path.

Your options are:

- set LD_LIBRARY_PATH to the directory this library can be found (I think it
  will be in $GCC3_ROOT/lib)

- use the runtime_library_dirs of your setup.py to add the "-R" option to gcc.
  This should work, but in reality, it doesn't <wink>. It's either a bug in
  distutils or in my gcc (2.95.3).

- Add the $GCC3_ROOT/lib directory to your dynamic loader's search path

mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id 86AB43C0
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))

More information about the Python-list mailing list