Re: error while loading shared libraries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



nikka <nikka9@xxxxxxxxx> writes:

> I am using linux red hat 2.4.18-14 running on a virtual VMWare machine
> I wrote a short program (for a university course HW assignment), compiled it
> on the machine and when running it, I get the following error:
> ./myprogram: error while loading shared libraries: ./myprogram: undefined
> symbol: sigpending, version GLIBC_2.0
>
> this is a runtime error that happens when my code tries to execute the
> function sigpending
> we tried compiling with/without a makefile, on 3 different computers (all
> with same configuration), and we still get this error
> the same thing happens when the program runs the functions "read", "write"
> or "longjmp" and probably other functions supplied by linux

This should not happen if you are building the program on the same
system as you are running it on.

What it means is that at link time the program saw a libc.so for which
the default definition of sigpending was in version GLIBC_2.0.  At
runtime, however, the symbol was not found with that version.  Try
running readelf -s on your program and on your libc (presumably
/lib/libc.so.6) and look for sigpending.  The version will follow one
or two '@' characters.

Run ldd to see precisely which library your program is using.

This is technically not a compiler issue.  It is a library issue or
possibly a linker issue.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux