[uClibc]Library paths

Erik Andersen andersen at codepoet.org
Wed Jan 2 00:44:01 UTC 2002


On Tue Jan 01, 2002 at 11:45:00PM +0100, Robert Schwebel wrote:
> Hi,
> 
> I've just tried to use uClibc-0.9.8 and run into a problem: the compiler
> wrapper links executables against
> 
>   /usr/i386-linux-uclibc/lib/ld-uClibc.so.0
> 
> whereas 'make install_target' installs the libraries in /lib, so dynamic
> linking is broken.
> 
> Please excuse me if this is some kind of a deja-vue, I've reported
> something similar before with an older version ;-) Bug or am I still not
> fully back from the silvester party? :)

All this stuff is controlled by your config file.  The location
which the compiler wrapper uses for ld-uClibc is defined by
SHARED_LIB_LOADER_PATH.  It defaults to $(DEVEL_PREFIX)/lib, but
should be set to just /lib when building stuff to actually deploy
onto a target system.

The location where 'make install_target' installs stuff is into
$(PREFIX)$(TARGET_PREFIX).  

This is what you probably want to do...

       (cd $(UCLIBC_DIR); ln -fs extra/Configs/Config.$(ARCH) Config); \
	$(MAKE) CROSS=$(CROSS) DEVEL_PREFIX=$(BUILD_DIR) SYSTEM_DEVEL_PREFIX=$(BUILD_DIR)/usr \
	    SHARED_LIB_LOADER_PATH=/lib KERNEL_SOURCE=$(KERNEL_DIR) -C $(UCLIBC_DIR); \
	$(MAKE) CROSS=$(CROSS) DEVEL_PREFIX=$(BUILD_DIR) SYSTEM_DEVEL_PREFIX=$(BUILD_DIR)/usr \
	    SHARED_LIB_LOADER_PATH=/lib KERNEL_SOURCE=$(KERNEL_DIR) -C $(UCLIBC_DIR) install; \
	    ln -fs $(BUILD_DIR)/include $(BUILD_DIR)/usr/include; \

You might also want to check out how this is done using the buildroot
example system for inspiration

    http://uclibc.org/cgi-bin/cvsweb/buildroot/

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--



More information about the uClibc mailing list