Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 35138 - Can't emerge mkinitrd (-fPIC & ssp) errors
Summary: Can't emerge mkinitrd (-fPIC & ssp) errors
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: solar (RETIRED)
URL:
Whiteboard:
Keywords: InVCS
: 86262 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-12-05 07:45 UTC by Bill McCarty
Modified: 2005-12-29 00:48 UTC (History)
4 users (show)

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


Attachments
patch to build nash as a static binary. (mkinitrd-nash-static.diff,370 bytes, patch)
2004-01-26 08:26 UTC, Andy Wang
Details | Diff
mkinitrd-3.5.7-dietssp.patch (mkinitrd-3.5.7-dietssp.patch,7.76 KB, patch)
2004-08-07 02:11 UTC, solar (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bill McCarty 2003-12-05 07:45:08 UTC
>>> emerge (2 of 2) sys-apps/mkinitrd-3.5.7 to /
>>> Downloading
http://mirror.tucdemonic.org/gentoo//distfiles/mkinitrd-3.5.7.tar.bz2
--07:33:29--  http://mirror.tucdemonic.org/gentoo/distfiles/mkinitrd-3.5.7.tar.bz2
           => `/usr/portage/distfiles/mkinitrd-3.5.7.tar.bz2'
Resolving mirror.tucdemonic.org... 128.196.95.10
Connecting to mirror.tucdemonic.org[128.196.95.10]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 53,233 [application/x-tar]

100%[====================================>] 53,233       151.28K/s

07:33:29 (150.68 KB/s) - `/usr/portage/distfiles/mkinitrd-3.5.7.tar.bz2' saved
[53233/53233]

>>> md5 src_uri ;-) mkinitrd-3.5.7.tar.bz2
>>> Unpacking source...
>>> Unpacking mkinitrd-3.5.7.tar.bz2 to /var/tmp/portage/mkinitrd-3.5.7/work
>>> Source unpacked.
diet gcc -Wall -DVERSION=\"3.5.7\" -g -DUSE_DIET=1   -c -o nash.o nash.c
diet gcc -Wall -DVERSION=\"3.5.7\" -g -DUSE_DIET=1   -c -o mount_by_label.o
mount_by_label.c
nash.c: In function `runStartup':
nash.c:1158: warning: implicit declaration of function `display_uuid_cache'
nash.c: In function `pivot_root':
nash.c:76: can't find a register in class `BREG' while reloading `asm'
make: *** [nash.o] Error 1

!!! ERROR: sys-apps/mkinitrd-3.5.7 failed.
!!! Function src_compile, Line 33, Exitcode 2
!!! nash compile failed.


Reproducible: Always
Steps to Reproduce:
1. emerge mkinitrd

Actual Results:  
See error in details, above

Expected Results:  
successful compilation and installation of mkinitrd

1. emerge automatically compiled dietlibc-0.23 before attempting to compile
mkinitrd.
2. Using kernel linux-2.4.23-grsec-1.9.13

Severity deemed major, since defect prevents installation of kernel that
includes recent fix for dobrk() vulnerability.
Comment 1 SpanKY gentoo-dev 2004-01-25 17:25:59 UTC
removed dietlibc support since it seems to be broken :/
Comment 2 SpanKY gentoo-dev 2004-01-26 00:22:32 UTC
removing it isnt a clean solution ...
Comment 3 Andy Wang 2004-01-26 08:26:21 UTC
Created attachment 24446 [details, diff]
patch to build nash as a static binary.

Perhaps it makes sense to patch the Makefile so nash is linked statically? 
Take diet completely out of the picture.  The initrd will be a little larger,
but this should pretty much always work (hopefully)
Comment 4 solar (RETIRED) gentoo-dev 2004-08-07 02:11:52 UTC
Created attachment 36933 [details, diff]
mkinitrd-3.5.7-dietssp.patch

Patch that allows mkinitrd/nash to compile for me with dietlibc and 
-fstack-protector via the hardened toolchain while using a native uClibc 
buildhost. Outputs about a 37K-38K static nash.
Comment 5 solar (RETIRED) gentoo-dev 2004-08-07 02:17:03 UTC
        epatch ${FILESDIR}/mkinitrd-lvm_statics.diff
+        epatch ${FILESDIR}/mkinitrd-3.5.7-dietssp.patch
Comment 6 SpanKY gentoo-dev 2004-10-02 23:30:29 UTC
solar: could you please add this for us ?
Comment 7 solar (RETIRED) gentoo-dev 2004-10-03 07:56:54 UTC
hrmm.. I'm going to have to recode this. After working on the patch for this bug I said to myself I just assume patch dietlibc to behave.

I went off and made it behave on atleast x86/x86_64 
But sparc/sparc64 however I'm not sure if it works as expected. 
Can somebody try ~arch dietlibc on a sparc? My sparc64 has been powered down for months and I just assume never turn it back on myself till somebody recodes the elf headers.
Comment 8 solar (RETIRED) gentoo-dev 2004-10-10 11:56:53 UTC
actually it can go in as is. One small change I'm going to slip in then that will make dietlibc USE based for x86.
Comment 9 solar (RETIRED) gentoo-dev 2004-10-10 15:49:53 UTC
InCVS as mkinitrd-3.5.7-r3.ebuild: KEYWORDS="~x86 ~ppc ~sparc ~amd64"
Comment 10 solar (RETIRED) gentoo-dev 2004-10-28 13:47:45 UTC
Bug seems safe to close now.
Comment 11 SpanKY gentoo-dev 2005-03-22 15:28:52 UTC
*** Bug 86262 has been marked as a duplicate of this bug. ***
Comment 12 sf 2005-12-29 00:45:26 UTC
mkinitrd-3.5.7-r3 does not build (mkinitrd-3.5.7-r2 does):

# emerge -B =mkinitrd-3.5.7-r3
Calculating dependencies ...done!
>>> emerge (1 of 1) sys-apps/mkinitrd-3.5.7-r3 to /
>>> md5 files   ;-) mkinitrd-3.5.7-r2.ebuild
>>> md5 files   ;-) mkinitrd-4.2.0.3.ebuild
>>> md5 files   ;-) mkinitrd-3.5.7-r3.ebuild
>>> md5 files   ;-) files/mkinitrd-lvm_statics.diff
>>> md5 files   ;-) files/digest-mkinitrd-3.5.7-r2
>>> md5 files   ;-) files/digest-mkinitrd-3.5.7-r3
>>> md5 files   ;-) files/mkinitrd-selinux.diff
>>> md5 files   ;-) files/digest-mkinitrd-4.2.0.3
>>> md5 files   ;-) files/mkinitrd-3.5.7-dietssp.patch
>>> md5 src_uri ;-) mkinitrd-3.5.7.tar.bz2
>>> Unpacking source...
>>> Unpacking mkinitrd-3.5.7.tar.bz2 to /tmp/gentoo/tmp/portage/mkinitrd-3.5.7-r3/work
 * Applying mkinitrd-lvm_statics.diff ...                                 [ ok ]
 * Applying mkinitrd-3.5.7-dietssp.patch ...                              [ ok ]
>>> Source unpacked.
cc -Wall -DVERSION=\"3.5.7\" -g -fno-stack-protector   -c -o nash.o nash.c
cc1: error: unrecognized command line option "-fno-stack-protector"
make: *** [nash.o] Error 1

!!! ERROR: sys-apps/mkinitrd-3.5.7-r3 failed.
!!! Function src_compile, Line 43, Exitcode 2
!!! nash compile failed.
!!! If you need support, post the topmost build error, NOT this status message.


Portage 2.0.53 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.4.20041102-r1, 2.6.14.3 i686)
=================================================================
System uname: 2.6.14.3 i686 Intel(R) Pentium(R) 4 Mobile CPU 1.70GHz
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.8.1-r4
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i586-pc-linux-gnu"
CFLAGS="-march=i586 -O2 -Os -fomit-frame-pointer -pipe"
CHOST="i586-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=i586 -O2 -Os -fomit-frame-pointer -pipe"
DISTDIR="/gentoo/distfiles"
FEATURES="autoconfig buildpkg collision-protect distlock distlocks fixpackages sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="http://mirrors.sec.informatik.tu-darmstadt.de/gentoo http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US.utf8"
PKGDIR="/gentoo/packages"
PORTAGE_TMPDIR="/tmp/gentoo/tmp"
PORTDIR="/gentoo/portage"
PORTDIR_OVERLAY="/gentoo/overlay"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X X509 Xaw3d aalib acl acpi activefilter adns alsa apm async audiofile avi berkdb bidi bitmap-fonts bzip2 caps cdb cdr chroot crypt cscope cspoe cups curl dga directfb doc dts dv dvb dvd dvdr dvdread edl eds emboss encode erandom ethereal evo exif expat f77 fam fbcon ffmpeg firebird firefox flac flash foomaticdb fortran freetds freetype gb gcj gd gdbm ggi gif gmp gnutls gphoto2 gpm gps gstreamer gtk gtk2 hbci idn imagemagick imap imlib imlib2 informix innodb ipv6 java jbig jikes jpeg junit ladcca lcms ldap libcaca libg++ libwww lirc lua mad mailwrapper mcal md5sum mikmod mng motif mozilla mozsvg mp3 mpeg mpi mysql nas ncurses nhc98 nls nntp nptl oav oci8 odbc ogg oggvorbis opengl oss pam pcmcia pcre pda pdflib pg-hier pg-intdatetime pg-vacuumdelay pic pie plotutils png pnp postgres ppds prebuilt quicktime readline recode rtc samba sasl scanner sdl slang slp snmp socks5 speex spell ssl svg svga tcpd tetex threads tiff truetype truetype-fonts type1-fonts udev unicode usb vanilla vorbis wavelan wmf xface xine xinerama xml xml2 xmms xv xvid xvmc zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS
Comment 13 SpanKY gentoo-dev 2005-12-29 00:48:53 UTC
dont screw around with USE=vanilla