Help - Search - Members - Calendar
Full Version: Gcc Cannot Find -lc
OESF Forums > Distros, Development, and Model Specific Forums > Everything Development > User Request for Applications
Olivier
evrything was fine, but when I lauch gcc from console (gcc -o foo -lm foo.c), I ve got following error:

"ld: cannot find -lc"

if I compile as root, i have got :
error while loading shared libraries: libopcodes-2.9.5.0.31.so: cannot load shared object file: no such file or directory

I try several workarounds without succes:
binutils & binutiks-dev ipk install
libstd6-1.2.2_arm.ipk install

I am not a specialist of gcc, but would like it to run in order to create my app, or to get source package et compile them.

Any help is welcome...
[B]
jfox
QUOTE(Olivier @ May 29 2005, 10:51 AM)
evrything was fine, but when I lauch gcc from console  (gcc -o foo -lm foo.c), I ve got following error:

  "ld: cannot find -lc"

if I compile as root, i have got :
error while loading shared libraries: libopcodes-2.9.5.0.31.so: cannot load shared object file: no such file or directory

I try several workarounds without succes:
binutils & binutiks-dev ipk install
libstd6-1.2.2_arm.ipk install

I am not a specialist of gcc, but would like it to run in order to create my app, or to get source package et compile them.

Any help is welcome...
[B]
*


The error is saying that it cannot find "libc.so" in the path specified by $LIBRARY_PATH. If you are compiling on the Zaurus, you need to create a symbolic link from /lib/libc.so.6 to <path>/libc.so where <path> is in $LIBRARY_PATH. This may have to be done for a number of libraries: libm.so, libpthread.so, libncurses.so, etc.

Jeffrey Fox
jfox
QUOTE(Olivier @ May 29 2005, 10:51 AM)
evrything was fine, but when I lauch gcc from console  (gcc -o foo -lm foo.c), I ve got following error:

  "ld: cannot find -lc"

if I compile as root, i have got :
error while loading shared libraries: libopcodes-2.9.5.0.31.so: cannot load shared object file: no such file or directory

I try several workarounds without succes:
binutils & binutiks-dev ipk install
libstd6-1.2.2_arm.ipk install

I am not a specialist of gcc, but would like it to run in order to create my app, or to get source package et compile them.

Any help is welcome...
[B]
*


The error is saying that it cannot find "libc.so" in the path specified by $LIBRARY_PATH. If you are compiling on the Zaurus, you need to create a symbolic link from /lib/libc.so.6 to <path>/libc.so where <path> is in $LIBRARY_PATH. This may have to be done for a number of libraries: libm.so, libpthread.so, libncurses.so, etc.

Jeffrey Fox

p. s. If you are using zgcc 2.02, then you are not correctly using zgcc.sh. Say
" . <pathto>/zgcc.sh" before compiling. Note the dot.
inode0
QUOTE(jfox @ Jul 1 2005, 06:35 AM)
The error is saying that it cannot find "libc.so" in the path specified by $LIBRARY_PATH. If you are compiling on the Zaurus, you need to create a symbolic link from /lib/libc.so.6 to <path>/libc.so where <path> is in $LIBRARY_PATH. This may have to be done for a number of libraries: libm.so, libpthread.so, libncurses.so, etc.

Jeffrey Fox

p. s. If you are using zgcc 2.02, then you are not correctly using zgcc.sh. Say
" . <pathto>/zgcc.sh" before compiling. Note the dot.

Hi Jeffrey,

I tried to contact you directly in the past to report a problem with the way libc is configured in zgcc but I think it may not have reached you. There are standard libc functions not implemented in the shared library, usually the ones a user will notice are the stat related functions. libc.so should not be a simple symbolic link to /lib/libc.so.6 but rather should be a file containing something like the following:
CODE
/* GNU ld script
  Use the shared library, but some functions are only in
  the static library, so try that secondarily.  */
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a )

zgcc has worked beautifully for me on many many packages after installing libc_nonshared.a and making this change to the way zgcc was configured. I did run into this problem repeatedly when there was simply a symbolic link in place.

John
xfaethorx
QUOTE(inode0 @ Aug 21 2005, 01:32 PM)
QUOTE(jfox @ Jul 1 2005, 06:35 AM)
The error is saying that it cannot find "libc.so" in the path specified by $LIBRARY_PATH. If you are compiling on the Zaurus, you need to create a symbolic link from /lib/libc.so.6 to <path>/libc.so where <path> is in $LIBRARY_PATH. This may have to be done for a number of libraries: libm.so, libpthread.so, libncurses.so, etc.

Jeffrey Fox

p. s. If you are using zgcc 2.02, then you are not correctly using zgcc.sh. Say
" . <pathto>/zgcc.sh" before compiling. Note the dot.

Hi Jeffrey,

I tried to contact you directly in the past to report a problem with the way libc is configured in zgcc but I think it may not have reached you. There are standard libc functions not implemented in the shared library, usually the ones a user will notice are the stat related functions. libc.so should not be a simple symbolic link to /lib/libc.so.6 but rather should be a file containing something like the following:
CODE
/* GNU ld script
  Use the shared library, but some functions are only in
  the static library, so try that secondarily.  */
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a )

zgcc has worked beautifully for me on many many packages after installing libc_nonshared.a and making this change to the way zgcc was configured. I did run into this problem repeatedly when there was simply a symbolic link in place.

John
*




i have a c3100 and i've encountered the same problem but I can't find libc_nonshared.a anywhere (its certainly not on the device or any feeds i've tried) ? can someone post it up? I'm runnin 2.95.2
inode0
QUOTE(xfaethorx @ Sep 13 2005, 11:26 AM)
i have a c3100 and i've encountered the same problem but I can't find libc_nonshared.a anywhere (its certainly not on the device or any feeds i've tried) ? can someone post it up? I'm runnin 2.95.2

I use the one from the Embedix cross compiler. There are links here.

John
xfaethorx
alas all the links are fubar'ed on that page so I can't track it down. If anyone has a compatible 2.95.2 libc_nonshared then can post or get to me I'd appriciate it!
inode0
QUOTE(xfaethorx @ Sep 14 2005, 08:29 AM)
alas all the links are fubar'ed on that page so I can't track it down. If anyone has a compatible 2.95.2 libc_nonshared then can post or get to me I'd appriciate it!

Sorry about that. The links on this Compiler Setup page work.

John
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.