Problems with gcc 3.2

Ricardo Anguiano
Wed Oct 23 10:17:00 GMT 2002

Jeff Holle <> writes:

> I've just installed gcc 3.2 on my linux system (Mandrake 8.2).
> Typing "gcc -v" from command line reports:
>     Configured with: ./configure
>     Thread model: posix
>     gcc version 3.2
> In compiling and running a simple boost.python extension module (which
> worked with gcc 2.96.0), I get:
>      $python
>     Traceback (most recent call last):
>       File "", line 1, in ?
>         import HELLO
>     ImportError: cannot open shared object file: No such
>     file or directory
> This appears to be because is installed in
> /usr/local/lib instead of /usr/lib (where the 2.96.0 shared libraries
> seem to be).
> What do I have to do to my environment to fix this?
> Note:
> I tried to define LD_LIBRARY_PATH (which was not previously defined)
> to "/usr/local/lib:/usr/lib:/lib", to no affect.

That's the right environment variable, but I don't know why it isn't
working.  You can try either:

        0) printing the value of LD_LIBRARY_PATH from within the
           python script to make sure it is defined and has the right
        1) compiling the module statically (-static).
        2) copying into /usr/lib

Ricardo Anguiano
CodeSourcery, LLC

More information about the Gcc-help mailing list