I am trying to build rust 1.23.0 on a build server for sailfishos. The error I get is:
[41622s] /home/abuild/.../stage2/bin/rustdoc: error while loading shared libraries: librustc_driver-776fea242aeb0ff0.so: cannot open shared object file: No such file or directory
[41622s] error: Could not document core.
What can I do to fix the error or skip generating the docs?
I am said package maintainer for Fedora. I keep our rust.spec such that it's always possible to re-bootstrap from recent upstream binaries, but it looks like your source has stripped that logic. Here are Fedora's sources, if you'd like to see how I do it:
So in theory I could build the latest version using 'bootstrapping' ? Do they have an arm binary available for bootstrapping? Can this binary be added as an archive (the build process has no network)?
The bootstrap flag adds the additional Source, but this has to be downloaded at some point, just as you must for the plain source tarball in the first place. I use spectool -g rust.spec for this.
I don't know about your build system, but in Fedora we use fedpkg to upload all sources to a lookaside cache. Then the actual build always pulls from there instead of downloading from the original URL.
Yeah, it's a problem for 32-bit architectures. Even if the system has a ton of ram, individual processes are still limited to a 32-bit address space -- 4GB max, but often only 2GB or 3GB depending on how the kernel memory is split. If you scan Fedora's rust.spec for debuginfo, you'll see that I've disabled most debuginfo for the 32-bit arches, which is enough for the build to get by.
It looks like you were letting rust use its bundled LLVM, rather than linking an existing libLLVM.so from the system. That generates a ton of code and debuginfo too, if your build system sets -g in CFLAGS and CXXFLAGS. You may need to filter that out, or append -g0, something like that.