Opened 19 years ago

Closed 19 years ago

#1584 closed defect (remind)

sysvinit 2.86 bug with regards to AMD64 / x86-64

Reported by: Treshix@… Owned by: lfs-book@…
Priority: lowest Milestone:
Component: Book Version: SVN
Severity: major Keywords:
Cc:

Description

Sysvinit fails to pass -lcrypt when linking sulogin if libcrypt.a exists not in /usr/lib but in /usr/lib64.

this is due to a bug in the makefile, as it only checks for libcrypt in /usr/lib. If you're compiling it to be a ELF 64bit binary, you need to link against /usr/lib64, especially if you have disabled multilib as a number of things currently insist on installing to lib64 directories without detecting this unless manually told otherwise.

I'm not sure if this patch should be committed, however, in the event that /usr/lib/libcrypt.a does not exist and /usr/lib64/libcrypt.a does, this should handle things nicely.

If this is of use, drop me an email and let me know. If it is not, drop me an email and let me know how to be of use. Thank you.

-JMD

Patch as follows:

--- src/Makefile 2005-06-24 23:59:58.000000000 -0600 +++ ../sysvinit-2.86/src/Makefile 2005-06-25 00:16:04.000000000 -0600 @@ -50,10 +50,12 @@

MANDIR = /usr/share/man

# Additional libs for GNU libc.

-ifneq ($(wildcard /usr/lib/libcrypt.a),) +# Also check /usr/lib64 as glibc regards this as a standard now.

+ifneq ($(wildcard /usr/lib/libcrypt.a)
$(wildcard /usr/lib64/libcrypt.a),)

LCRYPT = -lcrypt endif

+

all: $(BIN) $(SBIN) $(USRBIN)

init: init.o init_utmp.o

Attachments (1)

sysvinit-amd64.patch (482 bytes ) - added by Treshix@… 19 years ago.
The patch which fixes sysvinit-2.86/src/Makefile to look in /usr/lib64 for libcrypt.a

Download all attachments as: .zip

Change History (6)

by Treshix@…, 19 years ago

Attachment: sysvinit-amd64.patch added

The patch which fixes sysvinit-2.86/src/Makefile to look in /usr/lib64 for libcrypt.a

comment:1 by Matthew Burgess, 19 years ago

Thanks for your contribution. Would you mind contacting the sysvinit maintainer to get his feedback and ideally have it applied upstream so we don't have to maintain the patch ourselves? See ftp://ftp.cistron.nl/pub/people/miquels/sysvinit/sysvinit-2.85.lsm for the email address.

comment:2 by Matthew Burgess, 19 years ago

As an aside, have any of the cross-lfs folks hit this already and can at least CONFIRM this bug? I don't remember seeing any reports on it, and I don't see any relevant patches at http://svn.linuxfromscratch.org/viewcvs.cgi/trunk/patches/?root=cross-lfs either.

comment:3 by jim@…, 19 years ago

This should be an issue on any architecture that uses a multilib scenario. Will verify shortly on sparc64 builds.

comment:4 by Matthew Burgess, 19 years ago

Jim, what's the status on this? Has cross-lfs managed to verify and/or fix this?

comment:5 by jim@…, 19 years ago

Resolution: remind
Status: newclosed

No complaints from my testers, but I can see how this can cause an error though.

Note: See TracTickets for help on using tickets.