snapgear ucfront and uclibc 0.9.28.2 warnings
Hamish Moffatt
hamish at cloud.net.au
Mon Feb 26 03:43:01 UTC 2007
On Mon, Feb 26, 2007 at 12:24:18PM +1100, Hamish Moffatt wrote:
> Hi,
> I'm attempting to use uClibc 0.9.28.2 within the Snapgear linux
> development environment.
>
> The library has built ok, but when I link anything I get the following
> warning;
>
> hamish at snake:~/project/work/snapgear_dev$ PATH=`pwd`/tools:$PATH ucfront-gcc arm-linux-gcc -msoft-float -mbig-endian test.c
> /usr/local/lib/gcc/arm-linux/3.4.4/../../../../arm-linux/bin/ld: warning: ld-uClibc.so.0, needed by /home/hamish/project/work/snapgear_dev/uClibc/lib/libc.so, not found (try using -rpath or -rpath-link)
FWIW, I took its suggestion and modified ucfront to use -rpath-link.
This appears to be working correctly, in that binaries run and I can
link with libdl ok too.
Here is a patch. (Against snapgear 3.3.0's ucfront.)
--- ../snapgear_base/tools/ucfront/ucfront.c 2005-09-01 00:42:45.000000000 +1000
+++ snapgear_dev/tools/ucfront/ucfront.c 2007-02-26 13:36:03.000000000 +1100
@@ -634,6 +634,10 @@
}
if (!nodefaultlibs) {
+ char *rpath;
+ x_asprintf(&rpath, "-Wl,-rpath-link,%s", libc_libdir);
+ args_add_prefix(stripped_args, rpath);
+
args_add_prefix(stripped_args, libc_libdir);
args_add_prefix(stripped_args, "-L");
libpaths[num_lib_paths++] = libc_libdir;
HTH,
Hamish
--
Hamish Moffatt VK3SB <hamish at debian.org> <hamish at cloud.net.au>
More information about the uClibc
mailing list