[uClibc]LSH mostly works on uClibc system
Robert Schwebel
robert at schwebel.de
Mon Oct 15 09:15:13 UTC 2001
Hi!
There are still some issues with the port - perhaps one of the libc
experts on this list has an idea what the correct solution is.
In <errno.h> there are two varialbles defined, in case it is compiled with
-D_GNU_SOURCE:
extern char *program_invocation_name, *program_invocation_short_name;
Somehow these variables are also compiled into glibc:
robert at callisto:~ ! nm -n /lib/libc.so.6 |grep program_invocation
00116084 V program_invocation_name
00116088 V program_invocation_short_name
robert at callisto:~ !
but not in uClibc:
robert at callisto:~ ! nm -n /usr/i386-linux-uclibc/lib/libc.so.0 |grep
program_invocation
robert at callisto:~ !
(I must say I don't completely understand the magic behind this. Shouldn't
the variable be declared just from the statement in errno.h? What does "V"
mean in nm's output? Variable?)
Now, the autoconf test for program_invocation_name compiles this code:
void *p = (void *) &program_invocation_name;
to test if the feature is there. The test is positive with glibc as well
as with uClibc. But during compilation it doesn't work:
----------8<----------
robert at callisto:~/embedded/lsh-1.2.5/src/argp !
PATH=/usr/i386-linux-uclibc/bin:$PATH make
gcc -g -O2 -ggdb3 -Wall -W -Wmissing-prototypes -Wmissing-declarations
-Wstrict-prototypes -Waggregate-return -Wpointer-arith
-Wbad-function-cast -Wnested-externs -o argp-test argp-test.o libargp.a
libargp.a(argp-parse.o): In function `argp_default_parser':
/home/robert/embedded/lsh-1.2.5/src/argp/argp-parse.c:118: undefined
reference to `program_invocation_name'
/home/robert/embedded/lsh-1.2.5/src/argp/argp-parse.c:129: undefined
reference to `program_invocation_short_name'
libargp.a(argp-help.o): In function `__argp_short_program_name':
/home/robert/embedded/lsh-1.2.5/src/argp/argp-help.c:1748: undefined
reference to `program_invocation_short_name'
collect2: ld returned 1 exit status
make: *** [argp-test] Error 1
---------->8----------
Any idea?
Robert
--
+--------------------------------------------------------+
| Dipl.-Ing. Robert Schwebel |
| Linux Solutions for Science and Industry |
| Braunschweiger Straße 79, 31134 Hildesheim, Germany |
| Phone: +49-5121-28619-0 Fax: +49-5121-28619-4 |
+--------------------------------------------------------+
More information about the uClibc
mailing list