On Sat, Apr 14, 2018 at 10:50:11PM +0100, Ken Moffat wrote:
> On Sat, Apr 14, 2018 at 10:26:22PM +0200, Pierre Labastie wrote:
> > 
> > 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"
> > 
> > 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.

> Sorry to offer that different suggestion after you have gone to bed.
> I'll try a couple of manual DESTDIR llvm builds to confirm what gets
> installed, including clang and compiler-rt (does anybody know of
> anything that actually needs compiler-rt, I don't bother building it
> on all machines and so far nothing seems to need it ?).
Now completed, the book's version DESTDIR'd to BUILDONLY, the one

ken@origin /scratch/ken $du -sh BUILD*

TRying to get only the important things into listings (size, name,
and symlink details) so that I can diff them:

ls -l BUILDONLY/usr/bin | awk '{ print $5 " " $9 " " $10 " " $11 }' >ONLYBIN


similarly for /usr/lib to ONLYLIB and LINKLIB

for the binaries, a lot of differences, mostly in size.
Attached as bindiff

Comparing ldd output for the first file, bugpoint, the BUILDONLY
version (i.e. what is in the book) lacks

        libLLVM-6.0.so => /scratch/ken/BUILDLINK/usr/bin/../lib/libLLVM-6.0.so 
        libffi.so.6 => /usr/lib/libffi.so.6 (0x00007f20c7586000)
        libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007f20c6987000)
        libicui18n.so.60 => /usr/lib/libicui18n.so.60 (0x00007f20c64d9000)
        libicuuc.so.60 => /usr/lib/libicuuc.so.60 (0x00007f20c611b000)
        libicudata.so.60 => /usr/lib/libicudata.so.60 (0x00007f20c4573000)
        liblzma.so.5 => /lib/liblzma.so.5 (0x00007f20c434d000)

Diffing the contents of /usr/lib (but not its subdirectories) only
shows differences in size for libclang.so.6.0 and libLTO.so.6.0.0

Comparing the ldd output for libclang.so.6.0 shows a similar
difference, i.e. it pulls in libLLVM, libffi, libxml2, libicu*,

Given that one of the old issues I found suggested that the problem
only happened with static libs, and that libffi is being pulled in
by libclang.so when built my way, I suspect this is the cause of
Bruce's failure as well as Pierre's.

So, I suggest rebuilding llvm with -DLLVM_LINK_LLVM_DYLIB=ON and
confirming that rustc will then build with the config.toml that is
in the book.

If that works, as well as changing llvm the rust build needs to
mention "clang from llvm-6.0 (built with

NB I haven't built the docs or run the tests, so I don't have a view
on the space used by llvm built like this, except that it will be
smaller.  I blew away the initial source from building like the
book, but building my way the source is 1.7GB (1740 MB) and the
DESTDIR is 588 MB (2.3 GB).  Interestingly, for the book's build I'm
at 1740+1142 (2.8 GB).

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