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 
(file:///scratch/working/rustc-1.25.0-src/src/rustc)
    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" 
"-DLLVM_ENABLE_ASSERTIONS=OFF" "-DLLVM_TARGETS_TO_BUILD=X86" 
"-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly" 
"-DLLVM_INCLUDE_EXAMPLES=OFF" "-DLLVM_INCLUDE_TESTS=OFF" 
"-DLLVM_INCLUDE_DOCS=OFF" "-DLLVM_ENABLE_ZLIB=OFF" "-DWITH_POLLY=OFF" 
"-DLLVM_ENABLE_TERMINFO=OFF" "-DLLVM_ENABLE_LIBEDIT=OFF" 
"-DLLVM_PARALLEL_COMPILE_JOBS=4" "-DLLVM_TARGET_ARCH=x86_64" 
"-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-unknown-linux-gnu" 
"-DLLVM_LINK_LLVM_DYLIB=ON" "-DCMAKE_C_COMPILER=cc" "-DCMAKE_CXX_COMPILER=c++" 
"-DCMAKE_C_FLAGS=-ffunction-sections -fdata-sections -fPIC -march=native -m64" 
"-DCMAKE_CXX_FLAGS=-ffunction-sections -fdata-sections -fPIC -march=native 
-m64" 
"-DCMAKE_INSTALL_PREFIX=/scratch/working/rustc-1.25.0-src/build/x86_64-unknown-linux-gnu/llvm"
 "-DCMAKE_BUILD_TYPE=Release"
-- 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
llvm).

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).

ĸen
-- 
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
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to