--- In Jason Stahls <> wrote:
>
> j.chitte wrote:
> > Hi,
> >
> > I am trying to build sysvinit-2.86 (patched) following this guide:
> >
> > http://cross-lfs.org/view/clfs-sysroot/arm/final-system/sysvinit.html
> >
> > most of it seems to be fine but it fails in sulogin.c
> >
> > arm-unknown-linux-gnueabi-gcc -Wall -O2 -fomit-frame-pointer -D_GNU_SOURCE
> > -s killall5.c -o killall5
> > arm-unknown-linux-gnueabi-gcc -Wall -O2 -fomit-frame-pointer -D_GNU_SOURCE
> > -c -o sulogin.o sulogin.c
> > arm-unknown-linux-gnueabi-gcc -s -o sulogin sulogin.o
> > sulogin.o: In function `main':
> > sulogin.c:(.text+0x9c4): undefined reference to `crypt'
> > collect2: ld returned 1 exit status
> > make: *** [sulogin] Error 1
> >
> >
> > from sulogin.c
> >
> > #include <sys/ioctl.h>
> > #if defined(__GLIBC__)
> > # include <crypt.h>
> > #endif
> >
> > ....
> >
> > /*
> > * Ask for the password.
> > */
> > while(pwd) {
> > if ((p = getpasswd(pwd->pw_passwd)) == NULL) break;
> > if (pwd->pw_passwd[0] == 0 ||
> > strcmp(crypt(p, pwd->pw_passwd), pwd->pw_passwd) == 0)
> > sushell(pwd);
> > printf("Login incorrect.\n");
> > }
> >
> >
> >
> > It looks like the __GLIBC__ test is failing to include the header file.
> > What have I missed?
>
> More likely it's found the header but not the lib, the error you got is
> from ld trying to link in the libcrypt.so to sulogin.o. Check the make
> file to make sure LD is looking in the right place for libcrypt.
>
> --
> Jason Stahls
>
Thanks Jason.
I must have had my nose too near to the screen for too long. I was not paying
attention to what the message was telling me.
That's got it fixed.
192.168.1.50 login: root
Password:
login: can't chdir to home directory '/root'
login[330]: root login on 'UNKNOWN'
BusyBox v1.15.0.svn (2009-05-12 20:45:46 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.
INIT: Id "vty1" respawning too fast: disabled for 5 minutes
INIT: Id "lgn1" respawning too fast: disabled for 5 minutes
Not exactly a fully working system but at least a 2.6 eabi kernel with a recent
busybox.
Now just to tidy up some loose ends and port my ADC support software to the new
driver.
thanks for you helpful comment.
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|