Skip to contentSkip to conversation

2013.02: sysvinit-2.88 build failure undefined reference to -lcrypt

Buildroot New Roland Uuesoo 3 participants 4 messages Mar 12, 2013 – Apr 14, 2013

lore
Share & tools
lore
#0 lore raw

Hi.

Sysvinit doesn't build on the following system:

Buildroot: 2013.02
OS: Ubuntu 12.10 x64

The problem looks very similar to this....
http://buildroot-busybox.2317881.n4.nabble.com/Bug-2401-New-sysvinit-2-86-fails-to-build-on-MIPS-because-is-missing-lcrypt-td6901.html

Compile output is basically the same as the link above:
sulogin.c:(.text+0xf94): undefined reference to `crypt'

As I understand the problem is this...

sysvinit's makefile can't find libcrypt.a and doesn't add -lcrypt to sulogin.c linker options.

On 64bit ubuntu the libcrypt.a is located at
/usr/lib/x86_64-linux-gnu/libcrypt.a

Best regards,
Roland Uuesoo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130312/3a36e8f5/attachment-0001.html>

Tested-by Roland Uuesoo
#1 lore raw
Quoted 13 lines · Roland Uuesoo

Sysvinit doesn't build on the following system:

Buildroot: 2013.02
OS: Ubuntu 12.10 x64

The problem looks very similar to this....
http://buildroot-busybox.2317881.n4.nabble.com/Bug-2401-New-sysvinit-2-86-fails-to-build-on-MIPS-because-is-missing-lcrypt-td6901.html

Compile output is basically the same as the link above:
sulogin.c:(.text+0xf94): undefined reference to `crypt'

Quoted 7 lines

As I understand the problem is this...

sysvinit's makefile can't find libcrypt.a and doesn't add -lcrypt to sulogin.c linker options.

On 64bit ubuntu the libcrypt.a is located at
/usr/lib/x86_64-linux-gnu/libcrypt.a

Wow, it looks like this one has been lingering around ever since
7e2bf630 in December 2010...

It looks like the LCRYPT variable is no longer working. I'll cook up a
patch, but can't really test it since the included makefile works for me.

If my patch works, please reply to it with

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#2 lore raw

PATCH 1/1 sysvinit: fix linking of sulogin with -lcrypt

From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]>

The LCRYPT variable is no longer used; use SULOGINLIBS instead.

---
 package/sysvinit/sysvinit.mk |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/sysvinit/sysvinit.mk +1 -1
index 10feb96..606c33e 100644
@@ -24,7 +24,7 @@ SYSVINIT_POST_PATCH_HOOKS = SYSVINIT_DEBIAN_PATCHES
 define SYSVINIT_BUILD_CMDS
 	# Force sysvinit to link against libcrypt as it otherwise
 	# use an incorrect test to see if it's available
-	$(MAKE) $(TARGET_CONFIGURE_OPTS) LCRYPT="-lcrypt" -C $(@D)/src
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) SULOGINLIBS="-lcrypt" -C $(@D)/src
 endef
 
 define SYSVINIT_INSTALL_TARGET_CMDS
Signature · 1 line
1.7.10.4
#3 lore raw

PATCH 1/1 sysvinit: fix linking of sulogin with -lcrypt

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle (Essensium/Mind) <[email protected]> writes:

Arnout> From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]> Arnout> The LCRYPT variable is no longer used; use SULOGINLIBS instead.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard