On 14/04/2018 19:18, Pierre Labastie wrote: > On 14/04/2018 18:18, Bruce Dubbs wrote: >> On 04/13/2018 11:38 PM, 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. >>> >>>
>> >> Do we need to adjust the book's instructions? >> > > I'd say not before understanding what is going on... Let me try building rust > with the new instructions, after installing llvm 6, and removing completely > llvm 5 (using porg). > And then... Another error on my side: --------- [...] cargo:rustc-link-search=native=/sources/rust/rustc-1.25.0-src/build/x86_64-unkno wn-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/rustc_llvm-7878 f9d37a1306fb/out --- stderr llvm-config: error: missing: /usr/lib/libLLVMDemangle.so llvm-config: error: missing: /usr/lib/libLLVMSupport.so llvm-config: error: missing: /usr/lib/libLLVMBinaryFormat.so llvm-config: error: missing: /usr/lib/libLLVMCore.so llvm-config: error: missing: /usr/lib/libLLVMAsmParser.so llvm-config: error: missing: /usr/lib/libLLVMBitReader.so llvm-config: error: missing: /usr/lib/libLLVMMC.so llvm-config: error: missing: /usr/lib/libLLVMMCParser.so llvm-config: error: missing: /usr/lib/libLLVMObject.so [... fifty so lines like that ...] llvm-config: error: missing: /usr/lib/libLLVMX86AsmParser.so llvm-config: error: missing: /usr/lib/libLLVMX86Disassembler.so thread 'main' panicked at 'command did not execute successfully: "/usr/bin/llvm-config" "--link-shared" "--libs" "--system-libs" "asmparser" "bitreader" "bitwriter" "instrumentation" "interpreter" "ipo" "linker" "lto" "mcjit" "x86" --------------- And indeed, running the command: --------------- $ llvm-config --link-shared --libs --------------- returns the same list of errors as above, while --------------- $ llvm-config --libs --------------- returns a bunch of static libraries without errors. I think there is a switch for building shared libraries in llvm. The book was using it at a time, but there were problems with mesa IIRC. The switch is -DBUILD_SHARED_LIBS=ON, and the documentation still says: ``BUILD_SHARED_LIBS is only recommended for use by LLVM developers. If you want to build LLVM as a shared library, you should use the LLVM_BUILD_LLVM_DYLIB option.'' The book uses the LLVM_BUILD_LLVM_DYLIB option. So: three persons; three different outcomes... Let me rebuild llvm with -DBUILD_SHARED_LIBS=ON. I'll give the results tomorrow (my time), since llvm+rustc build time ~ 3 hours, and I'll be sleeping when it ends. Pierre -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page