On Fri, Apr 13, 2018 at 11:38:26PM -0500, Bruce Dubbs wrote:
> Using the new instructions in the book O could not get rustc to build. I was
> getting:
> --- stderr
> error: couldn't load codegen backend 
> "/tmp/rustc-test/rustc-1.25.0-src/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/codegen-backends/librustc_trans-llvm.so":
> "/tmp/rustc-test/rustc-1.25.0-src/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/codegen-backends/librustc_trans-llvm.so:
> undefined symbol: ffi_type_float"
> =======
> Note:  ffi_type_float is defined as a symbol in libffi.so.
> When I removed the line
> llvm-config = "/usr/bin/llvm-config"
> from config.toml, it seem to work (still building, but past the problem
> area.)

With that change, it should be building its shipped llvm.  If you
have a log, you should see something like:

   Compiling rustc-main v0.0.0 
    Finished release [optimized] target(s) in 458.11 secs
Copying stage0 rustc from stage0 (x86_64-unknown-linux-gnu -> 
x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building LLVM for x86_64-unknown-linux-gnu
running: "cmake" "/scratch/working/rustc-1.25.0-src/src/llvm" 
"-DCMAKE_C_FLAGS=-ffunction-sections -fdata-sections -fPIC -march=native -m64" 
"-DCMAKE_CXX_FLAGS=-ffunction-sections -fdata-sections -fPIC -march=native 
-- The C compiler identification is GNU 7.3.0

I can only find old references on this.  I think arch used to have
something, but their current build seems to use the shipped llvm
(they force ninja, which will only be used by cmake, i.e. building

There was a suggestion from several years ago that this used to
happen if _static_ llvm libs were used.  Latest issue was
https://github.com/rust-lang/rust/issues/39880 but that should have
been fixed.

I don't know why I didn't get the libffi problem (building
on 8.2 and newer).

In my seventh decade astride this planet, and as my own cells degrade,
there are some things I cannot do now: skydiving, marathon running,
calculus. I couldn't do them in my 20s either, so no big loss.
            -- Derek Smalls, formerly of Spinal Tap
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to