/bin/sh ./libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -O2 -march=core2 -ggdb -pipe -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -o ctangleboot ctangleboot.o cwebboot.o lib/lib.a /var/tmp/portage/dev-tex/luatex-0.40.5/work/luatex-beta-0.40.5/source/texk/kpathsea/libkpathsea.la -lm x86_64-pc-linux-gnu-ranlib liblua51.a eval: 1: libtool_args+=: not found eval: 1: compile_command+=: not found eval: 1: finalize_command+=: not found eval: 1: libtool_args+=: not found eval: 1: compile_command+=: not found eval: 1: finalize_command+=: not found eval: 1: libtool_args+=: not found eval: 1: compile_command+=: not found eval: 1: finalize_command+=: not found eval: 1: libtool_args+=: not found eval: 1: compile_command+=: not found eval: 1: finalize_command+=: not found eval: 1: libtool_args+=: not found eval: 1: compile_command+=: not found eval: 1: finalize_command+=: not found eval: 1: libtool_args+=: not found eval: 1: libtool_args+=: not found eval: 1: compile_command+=: not found eval: 1: finalize_command+=: not found eval: 1: libtool_args+=: not found eval: 1: compile_command+=: not found eval: 1: finalize_command+=: not found eval: 1: libtool_args+=: not found eval: 1: compile_command+=: not found eval: 1: finalize_command+=: not found eval: 1: libtool_args+=: not found eval: 1: compile_command+=: not found eval: 1: finalize_command+=: not found eval: 1: libtool_args+=: not found eval: 1: compile_command+=: not found eval: 1: finalize_command+=: not found eval: 1: libtool_args+=: not found eval: 1: libtool_args+=: not found eval: 1: libtool_args+=: not found x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I./.. -I/var/tmp/portage/dev-tex/luatex-0.40.5/work/luatex-beta-0.40.5/source/texk -I/var/tmp/portage/dev-tex/luatex-0.40.5/work/luatex-beta-0.40.5/source/texk -I./luatexdir/lua51 -I./luatexdir/zziplib -O2 -march=core2 -ggdb -pipe -MT libluamisc_a-lfs.o -MD -MP -MF .deps/libluamisc_a-lfs.Tpo -c -o libluamisc_a-lfs.o `test -f 'luatexdir/luafilesystem/src/lfs.c' || echo './'`luatexdir/luafilesystem/src/lfs.c libtool: link: x86_64-pc-linux-gnu-gcc -Wl,--as-needed lib/lib.a /var/tmp/portage/dev-tex/luatex-0.40.5/work/luatex-beta-0.40.5/source/texk/kpathsea/.libs/libkpathsea.a -lm lib/lib.a(main.o): In function `main': /var/tmp/portage/dev-tex/luatex-0.40.5/work/luatex-beta-0.40.5/source/texk/web2c/lib/main.c:25: undefined reference to `mainbody' collect2: ld returned 1 exit status make[4]: *** [ctangleboot] Error 1 make[4]: *** Waiting for unfinished jobs.... mv -f .deps/libluamisc_a-lfs.Tpo .deps/libluamisc_a-lfs.Po mv -f .deps/tangleboot.Tpo .deps/tangleboot.Po make[4]: Leaving directory `/var/tmp/portage/dev-tex/luatex-0.40.5/work/luatex-beta-0.40.5/source/texk/web2c' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/var/tmp/portage/dev-tex/luatex-0.40.5/work/luatex-beta-0.40.5/source/texk/web2c' make[2]: *** [all] Error 2 make[2]: Leaving directory `/var/tmp/portage/dev-tex/luatex-0.40.5/work/luatex-beta-0.40.5/source/texk/web2c' make[1]: *** [subtexk] Error 1 make[1]: Leaving directory `/var/tmp/portage/dev-tex/luatex-0.40.5/work/luatex-beta-0.40.5/source/texk' make: *** [all-recursive] Error 1 * * ERROR: dev-tex/luatex-0.40.5 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 2744: Called die * The specific snippet of code: * emake || die "failed to build luatex" * The die message: * failed to build luatex
Created attachment 195272 [details] build.log
Created attachment 195274 [details] my emerge --info
Same here with a different CPU and different profile, CFLAGS, and LDFLAGS (see attachment).
Created attachment 195423 [details] output of emerge --info
actually this should be fixed by the hard dep on libtool 2.2.6
(In reply to comment #5) > actually this should be fixed by the hard dep on libtool 2.2.6 > Doesn't seem so. I already have libtool-2.2.6a installed (check my emerge --info).
I do have sys-devel/libtool-2.2.6a and dev-tex/luatex-0.40.5 compiles fine now, so it must be something else.
Created attachment 195521 [details] emerge --info Actually, I do have stray files from a previous installation of sys-devel/libtool-1.5.26, as I'm in the middle of a @preserved-rebuild emerge.
I already have sys-devel/libtool-2.2.6a installed (look at the output of emerge --info) and also tried to rebuild it before emerging luatex - but it does not work. Please let me know if you need further input.
(In reply to comment #9) > Please let me know if you need further input. the full build log and the output of ./libtool --version in /var/tmp/portage/dev-tex/luatex-0.40.5/work/luatex-beta-0.40.5/source/texk/kpathsea/ (assuming its the same bug as the original reporter...)
Created attachment 195532 [details] build.log
segfault ~ # cd /var/tmp/portage/dev-tex/luatex-0.40.5/work/luatex-beta-0.40.5/source/texk/kpathsea/ segfault kpathsea # ./libtool --version ltmain.sh (GNU libtool) 2.2.6 Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 Copyright (C) 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
please post a full build log with MAKEOPTS="-j1" because I cant reproduce it and have really no clue what could be the problem...
For the build log attached, I already had commented out the MAKEOPTS part from make.conf, so it should be the same as setting it to 1 - however, I explicitly set it as desired, here is the output...
Created attachment 195641 [details] build.log
(In reply to comment #15) > Created an attachment (id=195641) [edit] > build.log Thanks; this seems to be the libtool in /var/tmp/portage/dev-tex/luatex-0.40.5/work/luatex-beta-0.40.5/source/texk/web2c that is broken somehow. Could you please give me the './libtool --version' output from that directory after a failure?
It does not look strange: segfault ~ # cd /var/tmp/portage/dev-tex/luatex-0.40.5/work/luatex-beta-0.40.5/source/texk/web2c segfault web2c # ./libtool --version ltmain.sh (GNU libtool) 2.2.6 Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 Copyright (C) 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Even for DIR in $(find /var/tmp/portage/dev-tex/luatex-0.40.5/work/luatex-beta-0.40.5/source -name libtool -exec dirname {} \;); do cd "${DIR}"; ././libtool --version; done does not show anything strange.
(In reply to comment #17) > segfault ~ # cd > /var/tmp/portage/dev-tex/luatex-0.40.5/work/luatex-beta-0.40.5/source/texk/web2c > segfault web2c # ./libtool --version weird, could you please attach it? this libtool seems broken since: /bin/sh ./libtool --tag=CC --mode=link i686-pc-linux-gnu-gcc -O2 -march=native -fomit-frame-pointer -pipe -Wl,-O1 -o tangleboot tangleboot.o lib/lib.a /var/tmp/portage/dev-tex/luatex-0.40.5/work/luatex-beta-0.40.5/source/texk/kpathsea/libkpathsea.la -lm becomes: libtool: link: i686-pc-linux-gnu-gcc lib/lib.a /var/tmp/portage/dev-tex/luatex-0.40.5/work/luatex-beta-0.40.5/source/texk/kpathsea/.libs/libkpathsea.a -lm with some errors, and obviously, since tangleboot.o was dropped, you get this failure.
Created attachment 195681 [details] ${WORKDIR}/luatex-beta-0.40.5/source/texk/web2c/libtool
libtool is executed under the /bin/sh interpreter (dash on my system), but at least the following function uses a non-posix construct (+=), which is not supported by dash. func_append () { eval "$1+=\$2" } Running libtool with bash does solve the issue. I don't know what the root cause is though: either libtool should request bash, or that code shouldn't be there.
indeed, i can reproduce the failure with sh as dash, though configure outputs this: checking whether the shell understands "+="... yes and... well... this check is intended for using += or not in libtool... and the check seems to be lying...
I have dash, too - so this really seems to be the problem.
(In reply to comment #21) > and... well... this check is intended for using += or not in libtool... and the > check seems to be lying... > But the configure script is run by bash... make[1]: Entering directory `/var/tmp/portage/dev-tex/luatex-0.40.5/work/luatex-beta-0.40.5/source/texk' === configuring in web2c (/var/tmp/portage/dev-tex/luatex-0.40.5/work/luatex-beta-0.40.5/source/texk/web2c) make: running /bin/bash ./configure
This should be solved by running an econf in "${S}"/texk/web2c or by patching texk/Makefile.am
I can confirm that setting /bin/sh as a symlink to /bin/bash solves the problem for me.
okey, now if I do: CONFIG_SHELL=/bin/sh emerge -1 luatex, this works even with dash as /bin/sh. It is still unclear to me why luatex autofoo uses bash as CONFIG_SHELL which causes these issues...
should be fixed by configuring and building in the texk/web2c subdir as it was done in older ebuilds.