While rebuilding a box from scratch, I found that the bootstrap fails on sed due to the USE line containing 'static' ( error bellow ). what is really weird is that this USE line has worked in the past with bootstrap.sh. To top this off, the prior install will successfully re-compile sed ( emerge sed ) with the static use flag. same versions of sed... actually it should be the same versions of everything... the _old_ install has been "emerge sync; emerge world" fairly regularly... any ideas? /doug ##### ##### error when running scripts/bootstrap.sh ##### gcc -mcpu=athlon-xp -march=athlon-xp -O3 -pipe -fomit-frame-pointer -funroll-loops - frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -static -o sed sed.o compile.o execute.o regex.o fmt.o ../lib/libsed.a /usr/lib/gcc-lib/i586-pc-linux-gnu/3.2.2/../../../../i586-pc-linux-gnu/bin/ld: cannot find -lc collect2: ld returned 1 exit status make[2]: *** [sed] Error 1 make[2]: Leaving directory `/var/tmp/portage/sed-4.0.7/work/sed-4.0.7/sed' ##### ##### the current USE works on the _old_ gentoo that's been updated over the ages... ##### segfault-gw root # grep USE= /etc/make.conf #USE="X gtk gnome -alsa" USE="-arts -cups -kde -gnome -libwww -motif -oggvorbis -pdflib -quicktime sse static - svga" segfault-gw root # emerge sed Calculating dependencies ...done! >>> emerge (1 of 1) sys-apps/sed-4.0.7 to / /* snip */ >>> original instance of package unmerged safely. >>> Regenerating /etc/ld.so.cache... >>> sys-apps/sed-4.0.7 merged. sys-apps/sed selected: none protected: 4.0.7 omitted: none >>> clean: No packages selected for removal. ##### ##### make.conf diff ( relative to the one in stage1-x86-1.4_rc4.tar.bz2 ) ##### *** make.conf.orig Fri Apr 11 14:25:55 2003 --- make.conf Tue Jun 10 04:55:29 2003 *************** *** 21,26 **** --- 21,27 ---- # # Example: #USE="X gtk gnome -alsa" + USE="-arts -cups -kde -gnome -libwww -motif -oggvorbis -pdflib -quicktime sse static - svga" # Host Setting # ============ *************** *** 63,68 **** --- 64,70 ---- # #CFLAGS="-mcpu=athlon-xp -O3 -pipe" #CFLAGS="-march=pentium3 -O3 -pipe" + CFLAGS="-mcpu=athlon-xp -march=athlon-xp -O3 -pipe -fomit-frame-pointer -funroll- loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4" # If you set a CFLAGS above, then this line will set your default C++ flags to # the same settings. *************** *** 158,163 **** --- 160,166 ---- # on your specified mirror. We _HIGHLY_ recommend that you change this setting # to a nearby mirror by merging and using the 'mirrorselect' tool. #GENTOO_MIRRORS="<your_mirror_here> http://gentoo.oregonstate.edu/ http:// www.ibiblio.org/pub/Linux/distributions/gentoo" + GENTOO_MIRRORS="http://csociety-ftp.ecn.purdue.edu/pub/gentoo http:// gentoo.oregonstate.edu/ http://www.ibiblio.org/pub/Linux/distributions/gentoo" # Advanced Features # ================= *************** *** 167,172 **** --- 170,176 ---- # the number of parallel makes (-j) to perform. The suggested number # for parallel makes is CPUs+1. #MAKEOPTS="-j2" + MAKEOPTS="-j2" # # AUTOCLEAN enables portage to automatically clean out older or overlapping # packages from the system after every successful merge. This is the *************** *** 193,198 **** --- 197,203 ---- # prevents the clean phase from deleting the temp files ($T) from a merge. # 'keepwork' prevents the clean phase from deleting the $WORKDIR. #FEATURES="sandbox buildpkg ccache distcc userpriv usersandbox notitles noclean noauto cvs keeptemp keepwork" + FEATURES="sandbox buildpkg" # # CCACHE_SIZE sets the space use limitations for ccache. The default size is # 2G, and will be set if not defined otherwise and ccache is in features. Reproducible: Always Steps to Reproduce: 1. boot livecd, create partitons, mkreiserfs, mount em 2. explode stage1-x86-1.4_rc4.tar.bz2; chroot; env-update; emerge sync 4. patch make.conf using provided patch in message 5. cd /usr/portage; scripts/bootstrap.sh 6. a few minutes in boom sed fails to compile... 7. remove static from USE line in make.conf 8. cd /usr/portage; scripts/bootstrap.sh will pass... Actual Results: gcc -mcpu=athlon-xp -march=athlon-xp -O3 -pipe -fomit-frame-pointer -funroll-loops - frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -static -o sed sed.o compile.o execute.o regex.o fmt.o ../lib/libsed.a /usr/lib/gcc-lib/i586-pc-linux-gnu/3.2.2/../../../../i586-pc-linux-gnu/bin/ld: cannot find -lc collect2: ld returned 1 exit status make[2]: *** [sed] Error 1 make[2]: Leaving directory `/var/tmp/portage/sed-4.0.7/work/sed-4.0.7/sed' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/sed-4.0.7/work/sed-4.0.7' make: *** [all] Error 2 !!! ERROR: sys-apps/sed-4.0.7 failed. !!! Function src_compile, Line 28, Exitcode 2 !!! Static build failed Expected Results: compiled. I'm uncertain about the severity level..
hey cool, RIT
This is a documented problem (see ufed for example). If only I knew why it's a problem....
*** Bug 24340 has been marked as a duplicate of this bug. ***
should be "fixed" by the warning about static and bootstrap in current install docs and use.desc.
I disagree with this solution. about 185 ebuilds use the static directive, and not all of them are part of the bootstrap! It is more then reasonable that users of gentoo would want to statically compile packages ( e.g. mysql ). By taking ths course, you're forcing developers to rework ebuilds and invent less descript USE directives inorder to support statically compiled e-builds. To me, retooling bootstrap.sh to strip out static from make.conf is the solution that effects the least amount of ebuilds. Does anyone else agree? /d % find /usr/portage/ -type f -name \*.ebuild -exec grep -H static {} \; | cut -d":" -f1 | cut -d"/" -f1-3 | sort | uniq ./app-admin/bacula ./app-admin/chkrootkit ./app-admin/cpu ./app-admin/systemimager-server-bin ./app-arch/dump ./app-crypt/gnupg ./app-crypt/mhash ./app-crypt/mit-krb5 ./app-doc/doxygen ./app-emulation/pose ./app-misc/dnetc ./app-misc/symlinks ./app-misc/towitoko ./app-misc/zisofs-tools ./app-office/abiword ./app-sci/blas ./app-sci/lapack ./app-sci/octave ./app-shells/bash ./app-shells/csh ./app-shells/ksh ./app-shells/rssh ./app-shells/sash ./app-shells/zsh ./app-text/aspell ./app-text/crm114 ./dev-ada/asis ./dev-db/myodbc ./dev-db/mysql ./dev-db/pgeasy ./dev-lang/entity ./dev-lang/gnat ./dev-lang/perl ./dev-lang/swi-prolog-lite ./dev-libs/ace ./dev-libs/beecrypt ./dev-libs/cryptlib ./dev-libs/cyrus-sasl ./dev-libs/hdf5 ./dev-libs/libextractor ./dev-libs/libgcrypt ./dev-libs/libol ./dev-libs/libtc ./dev-libs/tc2 ./dev-libs/tc2-modules ./dev-python/qscintilla ./dev-util/cvsup ./dev-util/rhide ./dev-util/tkcvs ./games-arcade/xevil ./games-emulation/advancemame ./games-emulation/raine ./games-fps/quakeforge ./games-misc/c++robots ./games-misc/fortune-mod-bofh-excuses ./games-util/qstat ./gnome-base/libgnomeprint ./gnome-extra/gnome-network ./media-gfx/blender ./media-gfx/bootsplash ./media-gfx/cthumb ./media-gfx/imagemagick ./media-gfx/pornview ./media-gfx/xpaint ./media-libs/a52dec ./media-libs/allegro ./media-libs/freetype ./media-libs/imlib2 ./media-libs/jpeg ./media-libs/libao ./media-libs/ming ./media-libs/svgalib ./media-sound/awesfx ./media-sound/beast ./media-sound/digitaldj ./media-sound/festival ./media-sound/grip ./media-sound/mad ./media-sound/speech-tools ./media-video/avidemux ./media-video/avifile ./media-video/ffmpeg ./media-video/vcdgear ./net-analyzer/netcat ./net-analyzer/zodiac ./net-dialup/speedtouch ./net-dns/djbdns ./net-dns/mydns ./net-dns/pdns ./net-firewall/fwbuilder ./net-fs/samba ./net-im/naim ./net-irc/eggdrop ./net-libs/libfwbuilder ./net-libs/libwww ./net-mail/checkpassword ./net-mail/evolution ./net-mail/hotwayd ./net-mail/pine ./net-mail/pine-maildir ./net-mail/qtools ./net-misc/clockspeed ./net-misc/dhcp ./net-misc/dhcpcd ./net-misc/dhcpv6 ./net-misc/fakeidentd ./net-misc/icecast ./net-misc/iputils ./net-misc/openssh ./net-misc/rsync ./net-misc/rwbs ./net-misc/stunnel ./net-misc/vconfig ./net-misc/wget ./net-nds/openldap ./net-news/nget ./net-print/omni ./net-www/apache ./net-www/cherokee ./net-www/horde-imp ./net-www/konqueror-embedded ./net-www/links ./net-www/memcached ./net-www/mozilla ./net-www/opera ./net-www/webfs ./sys-apps/baselayout ./sys-apps/busybox ./sys-apps/bzip2 ./sys-apps/coreutils ./sys-apps/daemontools ./sys-apps/debianutils ./sys-apps/diffutils ./sys-apps/grep ./sys-apps/grub ./sys-apps/grub-static ./sys-apps/isapnptools ./sys-apps/lsof ./sys-apps/mdadm ./sys-apps/mkinitrd ./sys-apps/module-init-tools ./sys-apps/modutils ./sys-apps/net-tools ./sys-apps/nictools ./sys-apps/parted ./sys-apps/quik ./sys-apps/sed ./sys-apps/sh-utils ./sys-apps/shadow ./sys-apps/supersed ./sys-apps/tar ./sys-apps/tcp-wrappers ./sys-apps/textutils ./sys-apps/tinylogin ./sys-apps/util-linux ./sys-devel/binutils ./sys-devel/bison ./sys-devel/flex ./sys-devel/gcc ./sys-devel/hardened-gcc ./sys-devel/kgcc ./sys-devel/libperl ./sys-devel/make ./sys-devel/patch ./sys-devel/spython ./sys-fs/e2fsprogs ./sys-fs/evms ./sys-fs/ext2resize ./sys-fs/lvm-user ./sys-kernel/ksymoops ./sys-libs/cracklib ./sys-libs/db ./sys-libs/gdbm ./sys-libs/glibc ./sys-libs/ncurses ./sys-libs/nss-mysql ./sys-libs/pam ./x11-base/xfree ./x11-libs/fltk ./x11-libs/lesstif ./x11-libs/wxGTK ./x11-libs/xclass ./x11-misc/tkhylafax ./x11-misc/xnview ./x11-wm/afterstep
So in /usr/portage/scripts/bootstrap.sh, line 106, if (ORIGUSE ~ /[[:space:]]*(build|bootstrap)[[:space:]]*/) should change to something like if (ORIGUSE ~ /[[:space:]]*(build|bootstrap|static)[[:space:]]*/) Right? And the error message should be adjusted as well.
Actually, adding the following between 101 and 102 would fix the bootstraping problem and leave the static functionality intact for all the other ebuilds... export ORIGUSE="${ORIGUSE/static/} your proposed solution appears to support the oposed solution. That is to say, the "static" directive is only for the bootstrapping internally, and would force the bootstrap to fail if it were present.
hmm... my bad... it should be: export ORIGUSE="${ORIGUSE//static/}"
Can I do anything to help out on this? -doug
Um, Can I do anything here to help out? -doug
Tossing this back to bug-wranglers as I do not have time to deal with it, sorry.
douglas: i think the solution that was implemented was miscommunicated to you we did not 'drop static support' ... that was never the idea :) we just added a warning to the use.desc about not putting 'static' in USE when doing a bootstrap: static - !!do not set this during bootstrap!! Causes things to be statically linked instead of dynamically
Hi Guys, This is just an opinion... having bootstap*.sh ignore static, is the least intrusive to the gentoo builder. It comes down to putting the exception into the code, or putting the burden on the user via documentation, warnings, failed bootstraps, and extra steps. The extra steps being build first make.conf (less static directive), run bootstrap, add static to make.conf and continue emerge worlding away. Since users like me are naive, skim documents, and error prone... I think the better solution is controlling the problem via a minor software change and having bootstrap*.sh ignore static altogether without throwing an error. nuf said on this... what ever you pick, I'll accept and shut up.. I promise =) so here are the two resolutions that i see: 1) add [CODE]export ORIGUSE="${ORIGUSE//static/}"[/CODE] to bootstrap*.sh and remove the use.desc note and other refs in install if i've missed them. 2) as andrew suggested, change to [CODE]if (ORIGUSE ~ /[[:space:]]*(build|bootstrap|static)[[:space:]]*/)[/CODE] and add appropriate verbiage to the error text... obviously, i think #1 is better... and if you choose #2, I suspect i can just [CODE]%USE="-static" scripts/bootstrap-2.6.sh[/CODE] in my build scripts. -d p.s. it would be really great if portage eventually evolved to package level make.conf configurations... shift make.conf to xml... inheritance with the children overriding the parent, if present... p.s.s and yes, mysql static does make a _noticeable_ difference...