GCC 9.3.0, Compile --pure and libtool error

As part of the Compile --pure testing, I tried upgrading GCC to 9.3.0 and compiling it, but I get this libtool-related error which strikes me as a bit odd?:

make[4]: Nothing to be done for 'install-data-am'.
/System/Index/bin/mkdir -p '/Programs/GCC/9.3.0/lib/../lib'
/bin/sh ../libtool   --mode=install /System/Index/bin/install -c   liblsan.la '/Programs/GCC/9.3.0/lib/../lib'
libtool: install: error: cannot install `liblsan.la' to a directory not ending in /usr/lib/../lib
make[4]: *** [Makefile:498: install-toolexeclibLTLIBRARIES] Error 1
make[4]: Leaving directory '/Data/Compile/Sources/gcc-9.3.0/_build/x86_64-pc-linux-gnu/libsanitizer/lsan'
make[3]: *** [Makefile:666: install-am] Error 2
make[3]: Leaving directory '/Data/Compile/Sources/gcc-9.3.0/_build/x86_64-pc-linux-gnu/libsanitizer/lsan'
make[2]: *** [Makefile:527: install-recursive] Error 1
make[2]: Leaving directory '/Data/Compile/Sources/gcc-9.3.0/_build/x86_64-pc-linux-gnu/libsanitizer'
make[1]: *** [Makefile:11215: install-target-libsanitizer] Error 2
make[1]: *** Waiting for unfinished jobs....

Since you guys are probably used to dealing with stuff like this, I figured I might as well ask.

Guidance welcome.

EDIT: Forgot to add that Compile also needs Flex and Bison as Dependencies and that GCC needs LibXML2 too.

LibTool has this odd check in which it fails to install files when build prefix differs from installation prefix. Our LibTool recipe has a patch to work around that problem, but sometimes programs ship their own libtool script and then installation fails.

You may want to explicitly set LIBTOOL=$goboExecutables/libtool on the environment=( ) array in the recipe or, alternatively, in the install_variables=( ) array. That way you’ll force the build scripts to use the system-wide copy of libtool.

1 Like

It looks like GCC doesn’t respect the LIBTOOL variable, which means I’ll probably need to manually patch/sed the libtool binary in question (sadly)…

How about overwriting the libtool script on pre_build()? Something like cp -a $goboExecutables/libtool $dir/libtool.

Or in the pre_install() phase.

I don’t know, I’ll figure something out.

I hope.

EDIT: Duh. The pre_install() phase already does this, I just need to generalise it in a for loop it seems.

EDIT2: Ah, that’s another issue. I just need to copy in the Gobo version to make it work. Simples.

1 Like


Before I commit anything GCC related, I think we need to have a proper discussion re. having a DevBase 017.1 set of deps vs. doing it in Compile like we do now.

In literally ever other Linux distro I’ve been involved with (particularly from-source distros), there has been a system set that was self-hosting.

I really feel like Gobo could benefit from something like that. And since it’s GNU based, it makes sense to have all the GNU development tools there so non-system-base (i.e. leaf applications or stacks) only need to add their specific deps.

Please have a think about it and perhaps discuss it with hisham?