Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 57226

Summary: bootstrap on hppa fails at emerge baselayout
Product: Gentoo Linux Reporter: Felix Schmitt <schmitt>
Component: [OLD] baselayoutAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: blocker CC: hppa
Priority: High    
Version: unspecified   
Hardware: HPPA   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Felix Schmitt 2004-07-15 14:18:34 UTC
scripts/bootstrap.sh coughs up after successfully building gcc-3.3.2, at baselayout-1.9.4-r2, package sysvinit-2.84
-------
SYSTEM: Apollo series 700 
cpu: HP9000/705 37MHz (1.1a) (VEEERY slow :-)
ram: 32MB, 150MB swap/disk
location/software: stage1-hppa-20040710.tar.bz2

Reproducible: Always
Steps to Reproduce:
1. Get a HP Apollo series 700
2. Get stage1-hppa-20040710.tar.bz2, do all installation steps according to the manual up to the "scripts/bootstrap.sh" step
3. Do "scripts/bootstrap.sh" and wait for approx. 3 days :-)
Actual Results:  
scripts/bootstrap.sh will abort after successfully building gcc-3.2.2, right 
at compiling sysvinit-2.84; error: 
<PRE> 
gcc   -o sulogin sulogin.o 
sulogin.o(.text+0xa88): In function `main': 
: undefined reference to `crypt' 
collect2: ld returned 1 exit status 
make: *** [sulogin] Error 1 
</PRE> 
 

Expected Results:  
well well, bootstrap.sh should have finished its job... 
 

REASON: 
Makefile of sysvinit-2.84 probably broken. There is a -lcrypt missing for the 
linker. Here is a snippet out of the sysvinit-2.84/src/Makefile (ll 30-33): 
<PRE> 
# Additional libs for Gnu Libc 
ifneq ($(wildcard /usr/lib/libcrypt.a),) 
LCRYPT		= -lcrypt 
endif 
</PRE> 
This rule doesn't make sense to me; it reads:  
"If you find a static libcrypt, use the dynamic one as fallback." 
If should read: "If you DON'T find a static libcrypt, use the dynamic one as 
fallback." 
/usr/lib/libcrypt.a is missing in stage1-hppa-20040710.tar.bz2 
-> Makefile does not give any -lcrypt option to "gcc sulogin" 
-> linker barfs 
-> end of story/bootstrap.sh 
-------- 
 
IMMEDIATE BUGFIX SUGGESTION (BOTCHED UP): 
do "touch /usr/lib/libcrypt.a", then do "scripts/bootstrap.sh" again. 
This doesn't screw up anything, since according to the above Makefile, it will 
find the static faked libcrypt.a, and decide to use the dynamic one instead. 
-------- 
 
PERMANENT BUGFIX SUGGESTION: 
Either 
>>> Fix sysvinit-2.84/src/Makefile so that above snippet will look like this 
(ll 30-33): 
<PRE> 
# Additional libs for Gnu Libc 
ifneq ($(wildcard /usr/lib/libcrypt.a),) 
LCRYPT		= -lcrypt 
endif 
</PRE> 
or 
>>> supply a static /usr/lib/libcrypt.a with stage1-hppa-20040710.tar.bz2 
-------- 
 
(My first reported bug :-) Hope it helps)
Comment 1 Felix Schmitt 2004-07-15 14:25:33 UTC
doggarnit, there is a mistake. Should have been:
PERMANENT BUGFIX SUGGESTION: 
Either 
>>> Fix sysvinit-2.84/src/Makefile so that above snippet will look like this 
(ll 30-33): 
<PRE> 
# Additional libs for Gnu Libc 
ifeq ($(wildcard /usr/lib/libcrypt.a),) 
LCRYPT          = -lcrypt 
endif 
</PRE> 
ifeq!!! NOT ifneq!!!
Sorry, I really read through the bug report again before I submitted it :-)
Comment 2 Guy Martin (RETIRED) gentoo-dev 2004-07-15 14:57:13 UTC
This has already been fixed in portage.
I know this is a slow box, but you'll have to emerge sync :)

ChangeLog entry :
  09 Jul 2004; Aron Griffis <agriffis@gentoo.org> +baselayout-1.9.4-r3.ebuild:
  Bump to -r3 to fix building of sulogin in catalyst stages


Have fun compiling :)