On 15/04/2018 09:25, Pierre Labastie wrote:
> On 14/04/2018 23:50, Ken Moffat wrote:
>> On Sat, Apr 14, 2018 at 10:26:22PM +0200, Pierre Labastie wrote:
>>>
>>>>>
>>>>> 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
>> [...]
>>> [... 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.
>>>
>> Indeed it does, but I see that I also use -DLLVM_LINK_LLVM_DYLIB=ON.
>> I assume that might have been in the book at some time, but it's
>> what I've been using without obvious problems.
> 
> I'll try -DLLVM_LINK_LLVM_DYLIB=ON soon

Done, and it built. Ken, don't you think the instructions should wipe out
/sources/RUST after installing?

Pierre


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