i am trying to build stages1 through 4 using catalyst2 but emerging binutils-2.16.1 fails in stage2: /bin/sh /var/tmp/portage/binutils-2.16.1/work/binutils-2.16.1/ld/../ylwrap "bison -y" /var/tmp/portage/binutils-2.16.1/work/binutils-2.16.1/ld/ldgram.y y.tab.c ldgram.c y.tab.h ldgram.h -- -d make[3]: *** [ldgram.c] Error 1 make[3]: Leaving directory `/var/tmp/portage/binutils-2.16.1/work/build/ld' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/binutils-2.16.1/work/build/ld' make[1]: *** [all-recursive-am] Error 2 make[1]: Leaving directory `/var/tmp/portage/binutils-2.16.1/work/build/ld' make: *** [all-ld] Error 2 the spec files i am using are very simple: stage1: subarch: pentium4 version_stamp: artavatar.rc2 target: stage1 rel_type: default profile: default-linux/x86/2006.0 snapshot: 20060415 source_subpath: gentoo/stage3-i686-2006.0 stage2: subarch: pentium4 version_stamp: artavatar.rc2 target: stage2 rel_type: default profile: default-linux/x86/2006.0 snapshot: 20060415 source_subpath: default/stage1-pentium4-artavatar.rc2 when i build the stage2 from the official stage3-i686-2006.0 the error doesnt occure. not sure if it is a catalyst only problem. i was unable to reproduce it otherwise though. my guess is that binutil-2.16.1 doesnt work with the version in use of some other package, probably bison.
Created attachment 84793 [details] output from emerge --info inside chroot
Comment on attachment 84793 [details] output from emerge --info inside chroot this seams strange: sys-devel/autoconf: [Not Present] sys-devel/automake: [Not Present] sys-devel/libtool: [Not Present]
Created attachment 84796 [details] output from emerge binutils topmost errors are: perl /var/tmp/portage/binutils-2.16.1/work/binutils-2.16.1/gas/../etc/texi2pod.pl -Dman < /var/tmp/portage/binutils-2.16.1/work/binutils-2.16.1/gas/doc/as.texinfo > as.pod perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = "en_US.utf8", LANG = (unset) are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). cannot open asconfig.texi or /asconfig.texi: No such file or directory make[3]: [as.1] Error 2 (ignored) (pod2man --center="GNU Development Tools" --release="binutils-2.16.1" --section=1 as.pod | \ sed -e '/^.if n .na/d' > as.1.T$$ && \ mv -f as.1.T$$ as.1) || \ (rm -f as.1.T$$ && exit 1) perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = "en_US.utf8", LANG = (unset) are supported and installed on your system. perl: warning: Falling back to the standard locale ("C").
Problems building packages such as this aren't a catalyst problem. Reassigning to the maintainer.
(In reply to comment #4) > Problems building packages such as this aren't a catalyst problem. Reassigning > to the maintainer. yes thought so too. (after a while...) still i am a bit confused about those lines from the emerge --info output: sys-devel/autoconf: [Not Present] sys-devel/automake: [Not Present] sys-devel/libtool: [Not Present]
what version of bison is that ?
bison-2.1 [1.875d]
and a little above the error message i already posted i get: checking for flex... flex checking for flex... (cached) flex checking for yywrap in -lfl... yes checking lex output file root... flex: fatal internal error, exec failed lex.yy
that's much more interesting what version of flex do you have on there ?
flex 2.5.33 when i try to emerge flex i get: <...> checking for bison... /usr/bin/bison checking for help2man... help2man checking for gm4... no checking for gnum4... no checking for m4... no checking for GNU m4... no configure: error: GNU M4 1.4 is required after emerging in two steps m4 and flex, binutils can also be emerged. but after this emerging binutils fails: (i found no errors above) <...> checking for flex... flex checking for yywrap in -lfl... yes checking lex output file root... lex.yy checking whether yytext is a pointer... yes checking for bison... bison -y checking for i686-pc-linux-gnu-ranlib... i686-pc-linux-gnu-ranlib checking for gm4... no checking for gnum4... no checking for m4... /usr/bin/m4 checking whether m4 supports frozen files... yes <...> echo '#! /bin/sh' >yacc echo 'exec /usr/bin/bison -y "$@"' >>yacc chmod a+x yacc make[3]: Leaving directory `/var/tmp/portage/bison-2.1/work/bison-2.1/src' make[2]: Leaving directory `/var/tmp/portage/bison-2.1/work/bison-2.1/src' Making all in doc make[2]: Entering directory `/var/tmp/portage/bison-2.1/work/bison-2.1/doc' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/var/tmp/portage/bison-2.1/work/bison-2.1/doc' Making all in examples make[2]: Entering directory `/var/tmp/portage/bison-2.1/work/bison-2.1/examples' Making all in calc++ make[3]: Entering directory `/var/tmp/portage/bison-2.1/work/bison-2.1/examples/calc++' make all-am make[4]: Entering directory `/var/tmp/portage/bison-2.1/work/bison-2.1/examples/calc++' source='calc++-scanner.cc' object='calc++-scanner.o' libtool=no \ DEPDIR=.deps depmode=none /bin/sh ../../build-aux/depcomp \ g++ -DHAVE_CONFIG_H -I. -I. -I../.. -O2 -march=pentium4 -pipe -c -o calc++-scanner.o calc++-scanner.cc ../../build-aux/depcomp: line 512: exec: g++: not found make[4]: *** [calc++-scanner.o] Error 127 make[4]: Leaving directory `/var/tmp/portage/bison-2.1/work/bison-2.1/examples/calc++' make[3]: *** [all] Error 2 make[3]: Leaving directory `/var/tmp/portage/bison-2.1/work/bison-2.1/examples/calc++' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/bison-2.1/work/bison-2.1/examples' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/bison-2.1/work/bison-2.1' make: *** [all] Error 2
that's a different issue so installing flex-2.5.33-r1 fixes things ?
(In reply to comment #11) > that's a different issue > > so installing flex-2.5.33-r1 fixes things ? > Kind of. on a live system it does but not when using catalyst. in this case i have to manually fix the stage1 tar it up again an go on to stage2. i am now trying if adding DEPEND="sys-devel/m4 sys-devel/flex" to the binutils ebuild fixes this. Note: little mistake above: as you have correctly seen the last output in my last post is from emerging bison not binutils.
the fix i suggested above works. i also tried to simply add m4, flex and bison to the baselayout explicetly in a custon profile. the problem with this is that i have no way to affect the order of in which they are compiled. and no surprise it wasnt the correct one. with my first solution i also cant fully control the order in which the are emerged, without editing DEPEND in all respective ebuilds also. the order required is: 1. m4 2. flex 3. bison 4. binutils > that's a different issue i am not so sure about that. it very much looks like some of these packages depend on another having been compiled in the precense of yet another. i have found a way to work around this problem but adding dependencies to the packages doesnt seam like a good solution, as they are not real dependencies. just if the other packages are precent the order in which the are emerged seam to matter. so here are the steps to reproduce: 1. get catalyst2 2. use spec file like this: subarch: pentium4 version_stamp: binutilproblem target: stage1 rel_type: default profile: default-linux/x86/2006.0 snapshot: 20060510 source_subpath: default/stage3-i686-2006.0 3. create the stage1 4. try to create stage2 from it -> always fails 5. manually chroot into stage1 and experience how the order in which these packages are emerged matter
i fail to see the bug then flex-2.5.33 is no longer in portage, only 2.5.33-r1 is the 2006.0 stages were built with flex-2.5.4a-r6 on them
(In reply to comment #14) > i fail to see the bug then > > flex-2.5.33 is no longer in portage, only 2.5.33-r1 is > > the 2006.0 stages were built with flex-2.5.4a-r6 on them > this might be causing my problem: i havent exlicetly choosen to use 2.5.33-r1 over 2.5.4a-r6, but for some reason the first is always picked. i have even added: >=sys-devel/flex-2.5.4a-r6 to packages in my profile but 2.5.33-r1 is still used. on my woring installation 2.5.33-r1 is also installed and it was setup using 2006.0. when emerge flex again it does not update to 2.5.41-r6. however i can explicetly install this version.
The fix is an RDEPEND on m4 in bison's ebuild. When building binutils (and that ldgram.y file), bison makes a call to m4_init() (which somehow tries calling /usr/bin/m4), and fails because m4 never gets merged into /tmp/stage1root during a catalyst run. Thus, bison SIGPIPE's. Portage doesn't factor in DEPENDs when calc'ing deps on binpkgs, so in catalyst, m4 only got merged into the stage1 /, not the /tmp/stage1root. The RDEPEND makes m4 get merged twice -- once in /, a second time in /tmp/stage1root, thus allowing it to exist in stage2 and make bison happy. bison-2.1 and 2.2 ebuilds have this change. Can one of you guys do a check to make sure it's fixed for you? I've been building 2006.1-pre stages for mips, and this is what solved the issue for me.