Ken Moffat via blfs-support
2018-09-19 19:42:32 UTC
I hate trying to build with rust!
Actually, I guess that people on this list probably know that, but
I've found yet another example of the variability in its builds.
Backstory : on -dev in June I had build failures with 1.25.0 which
was apparently trying to link to static libcrmf.a. I took a punt on
installing libssh2 (shared only) and was able to build.
Later, I discovered that our workaround for something ssl-related in
Python2 no longer worked in 2.7.15. That seemed to explain why
libssh2 was now required.
Since then, I've built rustc-1.25.0 at least 9 times without
problems. Earlier this week I built the latest version, 1.29.0, so
that I can test firefox-63-beta. On the machine I was using, I put
it in /opt because I wasn't sure if it would build everything else :
in fact, the only problem was firefox-62.0 (broken by 1.29.0) and I
have a patch to fix that.
Today I'm trying to update on a different machine. Both machines
are running 8.3. Twice the install (technically, the DESTDIR install)
has failed during its stage2 compilation of cargo with a message that
it could not find -lssh2.a and perhaps I needed to add a directory
with an -L flag.
Swore a bit, but decided that if it needs the static lib then I'd
better try giving it to it. Did not help: it finds it, but the link
failed:
/usr/bin/ld: /scratch/working/rustc-1.29.0-src/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/liblibssh2_sys-f2e78b83b37f7883.rlib(crypt.o): relocation R_X86_64_32 against `.data' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status
That machine is now powered off before my next attempt.
But looking at this machine, where the install in /opt was fine:
/usr/bin/cargo from rustc-1.25.0 links to libssh2.so.
/opt/new/bin/cargo from rustc-1.29.0 does NOT link to it, and
libssh2.a is not available on this system.
Conclusion: the build is random.
That randomness might also explain my results from comparing
firefox-63beta builds using gcc/g++ and clang/clang++ on the machine
where I managed to install 1.29.0. With clang (vanilla and system
graphite2/harfbuzz) the builds [only, i.e. ./mach build] took around
26 minutes, a similar pair with gcc took just over 32 minutes each.
But then I wanted to do a further test, because I thought that
static libcrmf.a (which I normally hide, and had forgotten about
until I checked the build of seamonkey and failed at that point)
appeared to not be needed now - but I wasn't 100% sure. Did a
further build of firefox beta with gcc, this time it took 24m29!
So, I think that building with rust is not at all predictable.
Interestingly, the firefox builds with clang used significantly less
space, although the sizes of the total installed files were
similar. But since I can't reliably build it ...
ĸen
Actually, I guess that people on this list probably know that, but
I've found yet another example of the variability in its builds.
Backstory : on -dev in June I had build failures with 1.25.0 which
was apparently trying to link to static libcrmf.a. I took a punt on
installing libssh2 (shared only) and was able to build.
Later, I discovered that our workaround for something ssl-related in
Python2 no longer worked in 2.7.15. That seemed to explain why
libssh2 was now required.
Since then, I've built rustc-1.25.0 at least 9 times without
problems. Earlier this week I built the latest version, 1.29.0, so
that I can test firefox-63-beta. On the machine I was using, I put
it in /opt because I wasn't sure if it would build everything else :
in fact, the only problem was firefox-62.0 (broken by 1.29.0) and I
have a patch to fix that.
Today I'm trying to update on a different machine. Both machines
are running 8.3. Twice the install (technically, the DESTDIR install)
has failed during its stage2 compilation of cargo with a message that
it could not find -lssh2.a and perhaps I needed to add a directory
with an -L flag.
Swore a bit, but decided that if it needs the static lib then I'd
better try giving it to it. Did not help: it finds it, but the link
failed:
/usr/bin/ld: /scratch/working/rustc-1.29.0-src/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/liblibssh2_sys-f2e78b83b37f7883.rlib(crypt.o): relocation R_X86_64_32 against `.data' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status
That machine is now powered off before my next attempt.
But looking at this machine, where the install in /opt was fine:
/usr/bin/cargo from rustc-1.25.0 links to libssh2.so.
/opt/new/bin/cargo from rustc-1.29.0 does NOT link to it, and
libssh2.a is not available on this system.
Conclusion: the build is random.
That randomness might also explain my results from comparing
firefox-63beta builds using gcc/g++ and clang/clang++ on the machine
where I managed to install 1.29.0. With clang (vanilla and system
graphite2/harfbuzz) the builds [only, i.e. ./mach build] took around
26 minutes, a similar pair with gcc took just over 32 minutes each.
But then I wanted to do a further test, because I thought that
static libcrmf.a (which I normally hide, and had forgotten about
until I checked the build of seamonkey and failed at that point)
appeared to not be needed now - but I wasn't 100% sure. Did a
further build of firefox beta with gcc, this time it took 24m29!
So, I think that building with rust is not at all predictable.
Interestingly, the firefox builds with clang used significantly less
space, although the sizes of the total installed files were
similar. But since I can't reliably build it ...
ĸen
--
Tout est bien, tout va bien, tout va pour le mieux qu'il soit possible
-- Candide, de Voltaire
(Everything is for the best, in the best of all possible worlds)
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/b
Tout est bien, tout va bien, tout va pour le mieux qu'il soit possible
-- Candide, de Voltaire
(Everything is for the best, in the best of all possible worlds)
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/b