Robert Schwebel <[EMAIL PROTECTED]> writes:

> Configuring on linux-2.4.9-rthal6 with glibc-2.2.2 without switches (just
> added paths to headers and lib of gmp) works fine in the beginning,
> besides lots of warnings like this one:
> 
>   atoms_gperf.c:332: warning: missing initializer
>   atoms_gperf.c:332: warning: (near initialization for `wordlist[487].id')

These are harmless. The code is automatically generated, which is why
I don't think it's very impotant to fix these warnings.

> This seems to come from several $(addprefix ../,) commands in the makefile
> which obviously are missing their second parameters. Seems to be a problem
> in the Makefile.am, but I simply removed the lines in the Makefile and it
> worked afterwards.

This seems to be a bug in the Makefile.am. It reads

LDADD = ../liblsh.a ../symmetric/libsymmetric.a $(addprefix ../,@LIBARGP@)

which breaks if LIBARGP is empty. I can't see right away what the
right way is to fix it. If lsh's own argp is used, then it should
work, because configure should set LIBARGP to "argp/libargp.a".

> Now, the more difficult part ;-) My goal is to run lsh on an embedded
> machine with very restricted ressources, so I'm currently trying to
> compile and link it against uClibc.

One thing that you may have to consider once the compilation problems
are resolved, is sources of randomness. The code in unix_randomness.c
may not get enough entropy on an embedded system, and that may break
any security in lsh. Or if you still have a good /dev/urandom, that
might be good enough.

> Here's where I'm stuck at the moment: uClibc doesn't have argp_parse,
> which was recognized correctly by the configure script and therefore lsh's
> own implementation is used. The linker breaks up here:

> Very strange, as it was weak_aliased() in argp-parse.c:
> 
>   #ifdef weak_alias
>   weak_alias (__argp_parse, argp_parse)
>   #endif
> 
> The original glibc implementation looks like this:
> 
>   robert@callisto:~/embedded/glibc-2.2.4/argp ! \
>     nm -n argp-parse.o |grep argp_parse
>   00000e40 T __argp_parse
>   00000e40 W argp_parse
> 
> Which seems to be correct.

All this weak alias stuff and symbols with a "__" prefix (which I
don't fully understand) should only be used when argp is compiled as a
part of glibc, not when it is compiled stand-alone like with lsh.

Look at argp-namefrob.h. If _LIBC is undefined (like in lsh's case),
it just #defines __argp_parse argp_parse.

Regards,
/Niels

Reply via email to