Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 341385 - sys-apps/sysvinit-2.88-r1 fails with undefined reference to `crypt'
Summary: sys-apps/sysvinit-2.88-r1 fails with undefined reference to `crypt'
Status: RESOLVED DUPLICATE of bug 365199
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 454946 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-10-16 21:14 UTC by Fernando (likewhoa)
Modified: 2013-02-01 15:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,8.42 KB, text/plain)
2010-10-16 21:15 UTC, Fernando (likewhoa)
Details
patch that lets the Makefile find libcrypte (sysvinit-2.88-r1-libcrypte.patch,292 bytes, text/x-patch)
2011-04-28 04:54 UTC, Kfir Lavi
Details
epatch for libcrypte (sysvinit-2.88-r1.ebuild.patch,467 bytes, text/x-patch)
2011-04-28 04:58 UTC, Kfir Lavi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fernando (likewhoa) 2010-10-16 21:14:55 UTC
failing even with -j1 

Reproducible: Always

Steps to Reproduce:
1. emerge =sys-apps/sysvinit-2.88-r1


Actual Results:  
i686-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed  sulogin.o    -o sulogin
sulogin.o: In function `main':
sulogin.c:(.text+0x5a6): undefined reference to `crypt'
collect2: ld returned 1 exit status
make: *** [sulogin] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/var/tmp/portage/sys-apps/sysvinit-2.88-r1/work/sysvinit-2.88dsf/src'
 * ERROR: sys-apps/sysvinit-2.88-r1 failed:



Portage 2.1.8.3 (default/linux/x86/10.0, gcc-4.4.3, glibc-2.11.2-r0, 2.6.34-hardened-r1 i686)
=================================================================
System uname: Linux-2.6.34-hardened-r1-i686-Intel-R-_Xeon-R-_CPU_E5420_@_2.50GHz-with-gentoo-1.12.13
Timestamp of tree: Sat, 16 Oct 2010 19:30:01 +0000
distcc 3.1 i686-pc-linux-gnu [disabled]
ccache version 2.4 [disabled]
app-shells/bash:     4.1_p7
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    2.3-r1
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.6.3-r1, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA @BINARY-REDISTRIBUTABLE"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="bn brx cy dgo eo eu fa gl gu_IN id kk kn_IN kok ks ku mai mn mni my sa_IN sat sd ta_IN tn uz en ca"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl atm berkdb bindist branding bzip2 cairo cli cracklib crypt cups cxx dbus dri fbcondecor fortran gdbm gif gnome gpm iconv ipv6 jpeg livecd loop-aes mmx mng modules mudflap ncurses nls nouveau nptl nptlonly opengl openmp pam pcre perl png portaudio pppd python qt3support qt4 readline reflection session socks5 sse sse2 ssl sysfs tcpd tiff truetype unicode usb x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="bn brx cy dgo eo eu fa gl gu_IN id kk kn_IN kok ks ku mai mn mni my sa_IN sat sd ta_IN tn uz en ca" PHP_TARGETS="php-5.2" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nouveau fbdev glint intel mach64 mga neomagic nv r128 radeon savage tdfx trident vesa via vmware cirrus ast chips i128 i740 imstt s3virge tseng v4l vermilion" XFCE_PLUGINS="menu" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Fernando (likewhoa) 2010-10-16 21:15:55 UTC
Created attachment 250947 [details]
build.log
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2010-10-16 22:19:36 UTC
That's missing -lcrypt and src/Makefile has:

# Additional libs for GNU libc.
ifneq ($(wildcard /usr/lib*/libcrypt.a),)
  SULOGINLIBS   += -lcrypt
endif

I've seen this problem before... but can't find the bug now... weird.
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2010-10-16 22:21:02 UTC
SULOGINLIBS="-lcrypt" emerge -1 sysvinit   (for a one-time quick workaround)
Comment 4 SpanKY gentoo-dev 2010-10-17 04:12:53 UTC
i imagine if you manually screwed up your system by deleting the static libraries, you'd hit this problem.
Comment 5 Fernando (likewhoa) 2010-10-18 03:01:37 UTC
(In reply to comment #4)
> i imagine if you manually screwed up your system by deleting the static
> libraries, you'd hit this problem.
> 

The libraries are not there and glibc has never been compiled on that system so i have no idea how they would have been removed unless manually by hand which is not the case. 

Comment 6 Fernando (likewhoa) 2010-10-18 03:21:41 UTC
closing this as recompiling glibc fixed it but i still have no idea how lib got deleted. I will need to track down the stage3 tarball that i used to check if it's missing on it.
Comment 7 Kfir Lavi 2011-04-28 04:51:37 UTC
Hi,
I'm building using catalyst, and do have glibc installed. 
My system shows that there is no /usr/lib*/libcrypt.a but a /usr/lib*/libcrypt.so
Patching the src/Makefile of the source helped solve this problem.

I have attached a patch to to the source and the ebuild. 

Regards,
Kfir
Comment 8 Kfir Lavi 2011-04-28 04:54:05 UTC
Created attachment 271417 [details]
patch that lets the Makefile find libcrypte

makefile tries to find libcrypt.a but in the system you will find libcrypte.so
I changed 'a' to 'so' and it works for me.
Comment 9 Kfir Lavi 2011-04-28 04:58:02 UTC
Created attachment 271419 [details]
epatch for libcrypte

this patch adds the patch of libcrypt just for version sysvinit-2.88-r1 . this is why I'm using ${PN}-${PVR} instead of ${P}

Kfir
Comment 10 Samuli Suominen (RETIRED) gentoo-dev 2011-04-28 13:09:36 UTC
(In reply to comment #7)
> Hi,
> I'm building using catalyst, and do have glibc installed. 
> My system shows that there is no /usr/lib*/libcrypt.a but a
> /usr/lib*/libcrypt.so

Then file a bug against glibc that libcrypt.a was not built and attach build.log of glibc, emerge --info, emerge -pv glibc, etc. there
Comment 11 SpanKY gentoo-dev 2011-04-28 13:13:12 UTC
no, dont do that.  catalyst itself deletes the .a libs.
Comment 12 Samuli Suominen (RETIRED) gentoo-dev 2011-04-28 13:16:28 UTC
(In reply to comment #11)
> no, dont do that.  catalyst itself deletes the .a libs.

so reopen this bug, or file a bug against catalyst for punting necessary libs?
Comment 13 SpanKY gentoo-dev 2011-04-28 13:23:29 UTC
sysvinit failing is just one such package that'd fail due to missing static libs.  i dont see value in fixing one package when there are many many more that'd fail (and arent really "fixable").

i dont know what the exact behavior of catalyst is in exact versions and for different targets, but the autobuilds look fine to me since they have libc.a.
Comment 14 Samuli Suominen (RETIRED) gentoo-dev 2011-04-28 13:33:20 UTC
Bug 365199 then
Comment 15 Kfir Lavi 2011-05-05 13:55:03 UTC
Ok,
I agree that this patch is no good as catalyst stage1 target file does remove the libcrypt.a. 
I will post a patch for catalyst in bug 365199 

Regards,
kfir
Comment 16 Samuli Suominen (RETIRED) gentoo-dev 2013-02-01 14:40:22 UTC
*** Bug 454946 has been marked as a duplicate of this bug. ***
Comment 17 Samuli Suominen (RETIRED) gentoo-dev 2013-02-01 15:02:28 UTC

*** This bug has been marked as a duplicate of bug 365199 ***