[ Sorry for the late reply, it seems it was left around an emacs buffer unsent ]
Robert Schwebel <[EMAIL PROTECTED]> writes: > Btw: which version do you think is better to be used for hacking lsh to be > able to run with uClibc, 1.2.x or 1.3.x? 1.2.x is the stable branch. The only changes on that branch are bugfixes, which make it a lot less likely that bugs (as well as portability problems) creep in between versions. 1.3.x is the development versions, they generally passes the testsuite, and works for me, but there can be quite big changes between versions. The requirements on the development environment should be similar (although the next 1.3.x version will need liboop, http://www.liboop.org, but that should be easy to install). > I'm not able to compile 1.3.4 properly on my "normal" glibc-2.2.2 system; > it stops here: I noticed that after the release, when compiling with an gcc-2.x under Solaris. Appearantly mixing code and declarations (like in C++) is allowed by c99 and gcc-3.0. The solution is to move the declaration, as you notice. > Oops, a first test (generating a key with lsh-keygen, starting lshd and > connecting with openssh) works, but results in a > > lshd: Protocol error: Unexpected EOF > > The daemon just prints this line when I 'exit' from the ssh connection. To track this down, som more information (i.e. a some of the -v, --debug and --trace flags passed to lshd) is needed. But perhaps it's easier for you to keep working with 1.2.5. > now: > > ----------8<---------- > robert@callisto:~/embedded/lsh-1.3.4-rs/src/argp ! > nm -n argp-parse.o | grep argp_parse > U __argp_parse > ---------->8---------- Odd. I get 00001190 T argp_parse > This looks terribly like the #define magic doesn't work... but why? I > tested the mechanism with this little test code in argp-namefrob.h: Perhaps looking at the code after preprocessing might shed some light on this? Copy the command that compiled argp-parse.o, and replace -c with -E. > The toplevel config.h has defines for SIZEOF_[INT|LONG|SHORT], but without > any value. Then something went wrong with the configure test. Please check config.log. > > What's libnsl? On Solaris it's the nameservice library, but I've never > > encountered any linux installation that have that. > > Well, libnsl is part of glibc, and lsh seems to link against it: configure checks for a definition of gethostbyname in libnsl, because that's needded on Solaris. I've never seen it on any linux or glibc system. So first thing you have to figure out is whether or not you have to link with libnsl to get gethostbyname. > ----------8<---------- > robert@callisto:~/embedded/lsh-1.3.4-works/src ! ldd lshd > libutil.so.1 => /lib/libutil.so.1 (0x40025000) > libnsl.so.1 => /lib/libnsl.so.1 (0x40028000) > libcrypt.so.1 => /lib/libcrypt.so.1 (0x4003f000) > libc.so.6 => /lib/libc.so.6 (0x4006d000) > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) > ---------->8---------- > > > My guess is that libnsl is something you don't want to link with. You > > could try replacing the > > > > AC_CHECK_LIB(nsl, gethostbyname) > > > > check in configure.in with > > > > AC_SEARCH_LIBS(gethostbyname, nsl) > > I've tried to change that, in my hacked-up 1.2.5 version, but at the > moment I assume that I have to solve the argp-problem first. Most of the > stuff compiles now with my uggly hack, but it fails at the very last > linking stage: > > ----------8<---------- > make[3]: Entering directory `/home/robert/embedded/lsh-1.2.5-rs/src' > gcc -g -O2 -ggdb3 -Wall -W -Wmissing-prototypes -Wmissing-declarations > -Wstrict-prototypes -Waggregate-return -Wpointer-arith > -Wbad-function-cast -Wnested-externs -L /home/robert/embedded/gmp-2.0.2 -o > lsh lsh.o liblsh.a symmetric/libsymmetric.a argp/libargp.a -lutil -lcrypt > -lgmp > liblsh.a(client.o): In function `client_argp_parser': > /home/robert/embedded/lsh-1.2.5-rs/src/client.c:879: undefined reference > to `argp_usage' argp_usage should be defined in argp-usage.c. Hmm, or rather, it is usually inlined, unless you have disabled optimization. > /home/robert/embedded/gmp-2.0.2/libgmp.a(set_str.o): In function > `digit_value_in_base': > /home/robert/embedded/gmp-2.0.2/mpz/set_str.c:38: undefined reference to > `__ctype_b' This seems to be a problem with gmp. Did it pass its testsuite? My guess is that you need to link in the tables used by the ctype.h macros (like isdigit, isspace, ...). That's usually provided by libc. Regards, /Niels
