Compiling glib-2.10.3 fails with ../libtool: eval: line 4328: syntax error near unexpected token `|' Last lines of output: giounix.lo gspawn.lo generating symbol list for `libglib-2.0.la' /usr/bin/nm -B .libs/garray.o .libs/gasyncqueue.o .libs/gatomic.o .libs/gbacktrace.o .libs/gcache.o .libs/gcompletion.o .libs/gconvert.o .libs/gdataset.o .libs/gdate.o .libs/gdir.o .libs/gerror.o .libs/gfileutils.o .libs/ghash.o .libs/ghook.o .libs/giochannel.o .libs/gkeyfile.o .libs/glist.o .libs/gmain.o .libs/gmappedfile.o .libs/gmarkup.o .libs/gmem.o .libs/gmessages.o .libs/gnode.o .libs/goption.o .libs/gpattern.o .libs/gprimes.o .libs/gqsort.o .libs/gqueue.o .libs/grel.o .libs/grand.o .libs/gscanner.o .libs/gshell.o .libs/gslice.o .libs/gslist.o .libs/gstdio.o .libs/gstrfuncs.o .libs/gstring.o .libs/gthread.o .libs/gthreadpool.o .libs/gtimer.o .libs/gtree.o .libs/guniprop.o .libs/gutf8.o .libs/gunibreak.o .libs/gunicollate.o .libs/gunidecomp.o .libs/gutils.o .libs/gprintf.o .libs/giounix.o .libs/gspawn.o libcharset/.libs/libcharset.a | | /bin/sed 's/.* //' | sort | uniq > .libs/libglib-2.0.exp ../libtool: eval: line 4328: syntax error near unexpected token `|' ../libtool: eval: line 4328: `/usr/bin/nm -B .libs/garray.o .libs/gasyncqueue.o .libs/gatomic.o .libs/gbacktrace.o .libs/gcache.o .libs/gcompletion.o .libs/gconvert.o .libs/gdataset.o .libs/gdate.o .libs/gdir.o .libs/gerror.o .libs/gfileutils.o .libs/ghash.o .libs/ghook.o .libs/giochannel.o .libs/gkeyfile.o .libs/glist.o .libs/gmain.o .libs/gmappedfile.o .libs/gmarkup.o .libs/gmem.o .libs/gmessages.o .libs/gnode.o .libs/goption.o .libs/gpattern.o .libs/gprimes.o .libs/gqsort.o .libs/gqueue.o .libs/grel.o .libs/grand.o .libs/gscanner.o .libs/gshell.o .libs/gslice.o .libs/gslist.o .libs/gstdio.o .libs/gstrfuncs.o .libs/gstring.o .libs/gthread.o .libs/gthreadpool.o .libs/gtimer.o .libs/gtree.o .libs/guniprop.o .libs/gutf8.o .libs/gunibreak.o .libs/gunicollate.o .libs/gunidecomp.o .libs/gutils.o .libs/gprintf.o .libs/giounix.o .libs/gspawn.o libcharset/.libs/libcharset.a | | /bin/sed 's/.* //' | sort | uniq > .libs/libglib-2.0.exp' make[4]: *** [libglib-2.0.la] Fehler 1 make[4]: Leaving directory `/var/tmp/portage/glib-2.10.3/work/glib-2.10.3/glib' make[3]: *** [all-recursive] Fehler 1 make[3]: Leaving directory `/var/tmp/portage/glib-2.10.3/work/glib-2.10.3/glib' make[2]: *** [all] Fehler 2 make[2]: Leaving directory `/var/tmp/portage/glib-2.10.3/work/glib-2.10.3/glib' make[1]: *** [all-recursive] Fehler 1 make[1]: Leaving directory `/var/tmp/portage/glib-2.10.3/work/glib-2.10.3' make: *** [all] Fehler 2 !!! ERROR: dev-libs/glib-2.10.3 failed. Call stack: ebuild.sh, line 1539: Called dyn_compile ebuild.sh, line 939: Called src_compile glib-2.10.3.ebuild, line 59: Called die !!! make failed !!! If you need support, post the topmost build error, and the call stack if relevant. # emerge --info Portage 2.1-r1 (default-linux/amd64/2006.0/no-multilib, gcc-hardened, glibc-2.3.6-r3, 2.6.17.6-grsec x86_64) ================================================================= System uname: 2.6.17.6-grsec x86_64 AMD Athlon(tm) 64 Processor 3500+ Gentoo Base System version 1.6.15 ccache version 2.3 [enabled] app-admin/eselect-compiler: [Not Present] dev-lang/python: 2.4.2 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.3 dev-util/confcache: 0.4.2-r1 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r3 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=athlon64 -fstack-protector -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /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/" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-O2 -march=athlon64 -fstack-protector -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache collision-protect confcache distlocks metadata-transfer multilib-strict parallel-fetch sandbox sfperms strict userpriv usersandbox" GENTOO_MIRRORS="http://mirror.switch.ch/mirror/gentoo/" LANG="de_DE.UTF-8" LC_ALL="de_DE.UTF-8" LINGUAS="de en" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="amd64 acl apache2 bash-completion bzip2 crypt exif gif idn imagemagick imap ipv6 jpeg mailwrapper mysql ncurses nls nptl nptlonly pam pcre perl png python qdbm readline ruby spell sqlite ssl tiff truetype unicode userlocales vhosts xml zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux linguas_de linguas_en userland_GNU" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS
Very similar bug occuring with net-misc/neon-0.25.3, so maybe it's something related to the build-system. Same machine, last lines: /bin/sh ..//libtool --quiet --mode=link x86_64-pc-linux-gnu-gcc -no-undefined -rpath /usr/lib64 -version-info 25:3:0 -export-symbols-regex '^ne_[^_]' -o libneon.la ne_request.lo ne_session.lo ne_basic.lo ne_string.lo ne_uri.lo ne_dates.lo ne_alloc.lo ne_md5.lo ne_utils.lo ne_socket.lo ne_auth.lo ne_redirect.lo ne_compress.lo ne_207.lo ne_xml.lo ne_props.lo ne_locks.lo ne_xmlreq.lo ne_acl.lo ne_openssl.lo -lz -lssl -lcrypto -ldl -lexpat ..//libtool: eval: line 4161: syntax error near unexpected token `|' ..//libtool: eval: line 4161: `/usr/bin/nm -B .libs/ne_request.o .libs/ne_session.o .libs/ne_basic.o .libs/ne_string.o .libs/ne_uri.o .libs/ne_dates.o .libs/ne_alloc.o .libs/ne_md5.o .libs/ne_utils.o .libs/ne_socket.o .libs/ne_auth.o .libs/ne_redirect.o .libs/ne_compress.o .libs/ne_207.o .libs/ne_xml.o .libs/ne_props.o .libs/ne_locks.o .libs/ne_xmlreq.o .libs/ne_acl.o .libs/ne_openssl.o | | /bin/sed 's/.* //' | sort | uniq > .libs/libneon.exp' make[1]: *** [libneon.la] Fehler 1 make[1]: Leaving directory `/var/tmp/portage/neon-0.25.3/work/neon-0.25.3/src' make: *** [subdirs] Fehler 2 !!! ERROR: net-misc/neon-0.25.3 failed. Call stack: ebuild.sh, line 1539: Called dyn_compile ebuild.sh, line 939: Called src_compile neon-0.25.3.ebuild, line 52: Called die !!! make failed !!! If you need support, post the topmost build error, and the call stack if relevant.
if you remove "-pipe" from your CFLAGS, does that change the result?
No, tested for both mentioned packages, doesn't change this. In the command pipe executed at the last statement, there is something missing, perhaps an empty variable?
looks like: export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" ( from /usr/bin/libtool ) looks like your global_symbol_pipe is blank for some reason.
what is your output of: grep -r "global_symbol_pipe" /usr/bin/libtool
# grep -r "global_symbol_pipe" /usr/bin/libtool global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" if test -z "$global_symbol_pipe"; then if test -z "$global_symbol_pipe"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" # lt_preloaded_symbols. The linker will fail if global_symbol_pipe global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" To be more readable: # grep -C1 -n "global_symbol_pipe" /usr/bin/libtool 268-# Take the output of nm and produce a listing of raw symbols and C names. 269:global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" 270- -- 339-# The commands to list exported symbols. 340:export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" 341- -- 3212- $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." 3213: if test -z "$global_symbol_pipe"; then 3214- $echo -- 4177- $echo "*** application is linked with the -dlopen flag." 4178: if test -z "$global_symbol_pipe"; then 4179- $echo -- 4897- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then 4898: if test -n "$NM" && test -n "$global_symbol_pipe"; then 4899- dlsyms="${outputname}S.c" -- 4940- $show "extracting global C symbols from \`$arg'" 4941: $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" 4942- done -- 4981- $run eval '$echo ": $name " >> "$nlist"' 4982: $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" 4983- done -- 5121- # We keep going just in case the user didn't refer to 5122: # lt_preloaded_symbols. The linker will fail if global_symbol_pipe 5123- # really was required. -- 7544-# Take the output of nm and produce a listing of raw symbols and C names. 7545:global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" 7546- -- 7615-# The commands to list exported symbols. 7616:export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" 7617- Interresting: On another box with the same libtool-version, the last lines are repeated some lines afterwards.
could you also attach config.log ? thanks
wow. I tried recompiling libtool on this box and I think now it's really messed up: # grep -r "global_symbol_pipe" /usr/bin/libtool global_symbol_pipe="" export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" if test -z "$global_symbol_pipe"; then if test -z "$global_symbol_pipe"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" # lt_preloaded_symbols. The linker will fail if global_symbol_pipe global_symbol_pipe="" export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" Some idea how to fix that?
Created attachment 92103 [details] config.log from glib merge
can you attach config.log from libtool? something must be failing to make it set it to "". Then if we get libtool back without the global_symbol_pipe="", we'll look at the application's config.log.
Created attachment 92104 [details] config.log from libtool install
specifically, i think its this test failing, causing it not to be set. configure:6088: checking command to parse /usr/bin/nm -B output from x86_64-pc-linux-gnu-gcc object configure:6293: result: failed
Is this the reason for this test to fail: # nm -B /usr/bin/x86_64-pc-linux-gnu-gcc nm: /usr/bin/x86_64-pc-linux-gnu-gcc: no symbols Or what could be the reason? (possibly off-topic: on this machine, we have some trouble atm with upgrading gcc from 3.4.6 to 4.1.1, but 3.4.6 should be untouched and woring as before, I thought. If this could be related, give me hints how to debug it.)
no, thats probably not the reason. if you look around line 7120 in configure, you'll see the test its actually performing. It doesn't even get to point to testing the program, it just prints failed. I'm trying to see specifically what point(s) it could be bombing out at.
turning off confcache repaired my libtool. :) # grep -r "global_symbol_pipe" /usr/bin/libtool global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" if test -z "$global_symbol_pipe"; then if test -z "$global_symbol_pipe"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" # lt_preloaded_symbols. The linker will fail if global_symbol_pipe global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" just as is has been before. the other problems persist.
now that you have turned off confcache, glib still doesn't compile? does the config.log still just say "failed" for: configure:6088: checking command to parse /usr/bin/nm -B output from x86_64-pc-linux-gnu-gcc object or is the error different?
configure:9495: checking command to parse /usr/bin/nm -B output from x86_64-pc-linux-gnu-gcc object configure:9600: x86_64-pc-linux-gnu-gcc -c -O2 -march=athlon64 -fstack-protector -pipe conftest.c >&5 configure:9603: $? = 0 configure:9607: /usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' \> conftest.nm configure:9610: $? = 0 configure:9662: x86_64-pc-linux-gnu-gcc -o conftest -O2 -march=athlon64 -fstack-protector -pipe conftest.c conftstm.o >&5 /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: conftstm.o: relocation R_X86_64_32 against `a local symbol' can not be used w hen making a shared object; recompile with -fPIC conftstm.o: could not read symbols: Bad value collect2: ld returned 1 exit status configure:9665: $? = 1 configure:9600: x86_64-pc-linux-gnu-gcc -c -O2 -march=athlon64 -fstack-protector -pipe conftest.c >&5 configure:9603: $? = 0 configure:9607: /usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p' \> conftest.nm configure:9610: $? = 0 cannot run sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p' configure:9700: result: failed
could you attach the new config.log? thanks
Created attachment 92119 [details] config.log from glib
can you tell us the output of: echo | gcc -E -dM - | grep __pi -i
# echo | gcc -E -dM - | grep __pi -i #define __pic__ 1 #define __PIC__ 1
it looks like your using hardened. can you try: "Hardened Gentoo has added support for transparent PIE/SSP building via GCC's specfile. This means that any users upgrading an older Hardened install should remove any LDFLAGS or CFLAGS used to trigger PIE/SSP. Also, the hardened-gcc package is now deprecated and should be unmerged (version 5.0 is a dummy package). To get the current GCC, add USE="hardened pic" to /etc/make.conf if not using the hardened profile.To maintain a consistant toolchain, first emerge binutils gcc virtual/libc. Next, rebuild the entire system with emerge -e world. All future packages will be built with PIE/SSP." from http://www.gentoo.org/proj/en/hardened/pax-quickstart.xml thanks.
So, finally... ;-) We don't use a hardened profile, but the hardened-version of gcc. Maybe the problem was that we did not set USE="hardened" but switched gcc to its hardened profile (with gcc-config). Now, I set USE="hardened", re-merged gcc and binutils and switched gcc back to default profile. I don't know what exactly did it, but now glib and neon compile without error. Thanks for your suggestions!!
thanks for the quick replies. mark bug as resolved.