ts-7000
[Top] [All Lists]

[ts-7000] problems cross compiling sysvinit

To:
Subject: [ts-7000] problems cross compiling sysvinit
From: "j.chitte" <>
Date: Wed, 13 May 2009 00:52:58 -0000
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?

TIA.




------------------------------------

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/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU