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
------------------------------------
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/
|