Bug 2401

Summary: sysvinit-2.86 fails to build on MIPS because is missing -lcrypt
Product: buildroot Reporter: Sérgio <sergio>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: minor CC: buildroot
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:
Attachments: fix problem on 64-bits host

Description Sérgio 2010-08-11 18:55:19 UTC
with buildroot git version from today . 
same config of bug #635 (https://bugs.busybox.net/attachment.cgi?id=2269)

buildroot/output/staging/usr/bin/mipsel-unknown-linux-uclibc-gcc --sysroot=buildroot/output/staging  -o bootlogd bootlogd.o -lutil
sulogin.o: In function `main':
sulogin.c:(.text+0xf94): undefined reference to `crypt'
collect2: ld returned 1 exit status
make[1]: *** [sulogin] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `buildroot/output/build/sysvinit-2.86/src'
make: *** [buildroot/output/build/sysvinit-2.86/src/init] Error 2
Comment 1 Sérgio 2010-08-11 19:15:56 UTC
Created attachment 2335 [details]
fix problem on 64-bits host

Hi, with this patch , I could compile successfully  sysvinit-2.86
Comment 2 Thomas Petazzoni 2010-08-13 14:28:39 UTC
Ok, we need to pass LCRYPT=-lcrypt when building sysvinit. I'll cook a patch to fix this. Thanks!
Comment 3 Thomas Petazzoni 2010-08-13 14:29:49 UTC
By the way, Sergio, which distribution are you using ? Here, even my limited x86_64 Debian chroot has /usr/lib/libcrypt.a, so I didn't see the potential problem.
Comment 4 Sérgio 2010-08-13 15:00:54 UTC
Fedora13.x86_64
Comment 5 Sérgio 2010-08-13 15:14:17 UTC
(In reply to comment #3)
> Here, even my limited
> x86_64 Debian chroot has /usr/lib/libcrypt.a, so I didn't see the potential
> problem.

yum provides */libcrypt.a
(...)
Repo        : fedora
Filename    : /usr/lib/dietlibc/lib-x86_64/libcrypt.a

uClibc-devel-0.9.30.1-2.fc12.x86_64 : Header files and libraries for uClibc library
Repo        : fedora
Filename    : /usr/lib64/uClibc/libcrypt.a

uClibc-devel-0.9.30.1-2.fc12.i686 : Header files and libraries for uClibc library
Repo        : fedora
Filename    : /usr/lib/uClibc/libcrypt.a

dietlibc-devel-0.32-0.fc12.i686 : dietlibc development files
Repo        : fedora
Filename    : /usr/lib/dietlibc/lib-i386/libcrypt.a

arm-gp2x-linux-glibc-2.3.6-7.fc12.noarch : Cross Compiled GNU C Library targeted at arm-gp2x-linux
Repo        : fedora
Filename    : /usr/arm-gp2x-linux/lib/libcrypt.a

glibc-static-2.12-3.x86_64 : C library static libraries for -static linking.
Repo        : updates
Filename    : /usr/lib64/libcrypt.a

glibc-static-2.12-3.i686 : C library static libraries for -static linking.
Repo        : updates
Filename    : /usr/lib/libcrypt.a



I have installed /usr/lib64/libcrypt.a, 

Should I install also glibc-static-2.12-3.i686  ?
Comment 6 Thomas Petazzoni 2010-08-22 06:41:13 UTC
Thanks, fixed in my for-2010.08 branch.