1 (edited by routednbooted 2010-07-19 15:55:39)

Topic: ld-uClibc.so.0

/backfire/staging_dir/toolchain-mips_gcc-4.3.3+cs_uClibc- warning: ld-uClibc.so.0, needed by /mnt/netshare/backfire/staging_dir/toolchain-mips_gcc-4.3.3+cs_uClibc-, not found (try using -rpath or -rpath-link)

where is ld-uClibc.so.0 supposed to live? so i can make at least a link to it.


ant@debian:/mnt/netshare/backfire$ find|grep ld-uClibc.so.0

Re: ld-uClibc.so.0

Ok, i've now configured to use my own personal toolchain... that works... properly. but with buildroot, who knows...

There should be a precompiled toolchain for at least x86 computers. especially with how easy it is to break gcc builds. the only reason to ever compile from source is if you have something really exotic.

and its just broke again, well done boys.

Re: ld-uClibc.so.0

Hey routednbooted!, can you please tell me how did you do that? i'm getting the same error while trying to compile a programa wich access the memory directly, but i haven't been able to solve this sad:(:(. I'm working with a especial version of the Ben NanoNote, it's called Sie, and is intended for hardware and electronics hacking.

There is special options to compile my toolchain and avoid this problem? Thank you in advance

Re: ld-uClibc.so.0

This error usually happens if you move the toolchain after compilation. The gcc and other utils have absolute paths coded in which will fail if the toolchain is moved.

Re: ld-uClibc.so.0

Hi jow!, you're right, but i haven't move my toolchain after the (loooooong) compilation. Maybe the problem is due to that i'm trying to compile source files that resides in a different folder. The first problem i got was:

../mipsel-openwrt-linux-uclibc/bin/ld: cannot find -lgcc_s

And i solved it with an LDFLAG:

-lgcc_s -L/home/juanjo/openwrt-xburst/build_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.32/gcc-4.3.3-final/mipsel-openwrt-linux-uclibc/libgcc

Now what i get is:

/home/juanjo/openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.32/usr/bin/../lib/gcc/mipsel-openwrt-linux-uclibc/4.3.3/../../../../mipsel-openwrt-linux-uclibc/bin/ld: warning: ld-uClibc.so.0, needed by /home/juanjo/openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.32/usr/bin/../lib/gcc/mipsel-openwrt-linux-uclibc/4.3.3/../../../../mipsel-openwrt-linux-uclibc/lib/libc.so, not found (try using -rpath or -rpath-link)

So i don't know where the linker is looking for ld-uClibc.so.0 because i have many copies of that file in the whole toolchain. When i try to put -rpath-link "/home/juanjo/NanoNote/openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.32/lib/" whether in LDFLAGS or CCFLAGS (in this case it make not effect), i get this:

mipsel-openwrt-linux-gcc: unrecognized option '-rpath-link'

this is the makefile i have:

CC  = mipsel-openwrt-linux-gcc
all: ram_test

DEBUG = -O3 -g0

COMMON_SOURCES =  ram_test.c jz47xx_gpio.c jz47xx_mmap.c

H_SOURCES = jz47xx_gpio.h jz47xx_mmap.h


WARNINGS= -Wcast-align -Wpacked -Wpadded -Wall


LDFLAGS = -lgcc_s -L/home/juanjo/NanoNote/openwrt-xburst/build_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.32/gcc-4.3.3-final/mipsel-openwrt-linux-uclibc/libgcc


ADCw        : $(COMMON_OBJECTS) ram_test.o
    $(CC) $(LDFLAGS) $(COMMON_OBJECTS) ram_test.o -o ram_test

    $(CC) -c $(CCFLAGS) $< -o $@

    rm -f *.o ram_test ${EXEC} *~ ram_test

    indent -bad -bap -nbc -bl -nce -i2 --no-tabs --line-length120 $(COMMON_SOURCES) $(H_SOURCES)


Re: ld-uClibc.so.0

/home/juanjo/openwrt-xburst/ != /home/juanjo/NanoNote/openwrt-xburst/

Looks to me like you did move it.

Re: ld-uClibc.so.0

Nop!, it was just an edition i did when doing the post, sorry about that. But don't worry, i solved this by myself, after a long reading, y write this parameter for LDFLAGS:

-B /home/juanjo/NanoNote/openwrt-xburst/build_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.32/uClibc-0.9.32/lib

and after do a make, it works quite right.

Thanks for all the responses, i hope this info will be helpful for other people. big_smile:D:D

8 (edited by piqard 2011-10-02 03:17:11)

Re: ld-uClibc.so.0

jow wrote:

This error usually happens if you move the toolchain after compilation. The gcc and other utils have absolute paths coded in which will fail if the toolchain is moved.

Exactly that's the case when I download the precompiled toolchain. I wish there would be an easy way to fix this instead of compiling my own sdk or changing my project Makefile.

Anyways, I'd like to share my solution to this.


#Makefile introduction...
LDFLAGS+=-rpath-link $(shell find $(STAGING_DIR) -name ld-uClibc.so.0)

this doesn't interfere with building outside the SDK. Better solutions are very welcome.

I decided to move my changes to ./package/myproject/Makefile. This seems to be the better place since it doesn't introduce any changes to my original project Makefile

# See /LICENSE for more information.

include $(TOPDIR)/rules.mk

TARGET_LDFLAGS+=-rpath-link $(shell find $(STAGING_DIR) -name ld-uClibc.so.0)


Re: ld-uClibc.so.0

Look to me, like some stuff from here belongs into OpenWrt Buildroot - Technical Reference

Re: ld-uClibc.so.0

I had the same problem with a ar71xx OpenWrt SDK and I patched rules.mk by adding  -Wl,-rpath=$(TOOLCHAIN_DIR)/lib to TARGET_LDFLAGS: