On 2018-08-06 15:11 -0400, Michael Shell wrote:
> On Mon, 06 Aug 2018 19:52:52 +0800
> Xi Ruoyao <[email protected]> wrote:
> 
> > No.  /tools/lib/libquadmath.so.* is useless now.  After "6.10
> > Adjusting the Toolchain" the default dynamic linker should have
> > been changed to /lib64/ld-linux-x86-64.so.2 instead of
> > /tools/lib64/ld-linux-x86-64.so.2.  Then it should search /usr/lib,
> > not /tools/lib.
> > 
> > MPFR configure script add "-lquadmath" if
> 
> 
>    Xi,
> 
> Good catch! But, I think what threw me (and Hazel) off is why does
> the MPFR build process attempt to link against libquadmath in the
> first place? After all, as you said, libquadmath won't be available
> (in /usr/lib) until after gcc is (re)installed in step 6.20.1
> 
> So, MPFR's configure detects libquadmath (in /tools/lib) and then
> links its tests against libquadmath, but those tests later fail
> because the dynamic linker is set to link from what is in /usr/lib?

I made a mistake descripting what MPFR configure was doing.  Should be:

    echo "int main(){}" > conftest.c &&
    cc conftest.c -lquadmath

And do *not* run the compiled test program.  So it don't know the program
can't be executed.

The problem is, GCC default dynamic linker has been changed to
/lib64/ld-linux-x86-64.so.2 built in 6.9, but the linker (`ld`, not
`ld.so`) still searches /tools/lib.  It's a mismatch of linker and
dynamic linker.  So, libquadmath can be searched by linker, but not
by dynamic linker.

> In short, does the presence or absence of libquadmath affect the actual
> libmpfr.so or just its test executables - that without libquadmath the
> tests would not be linked against it and yet they still work fine?
> Does it affect, say, the number of tests that are done? Depending
> on the answer here, there may be a case for reinstalling MPFR again
> after gcc.

I just tried to build MPFR on a completed LFS.  The tests linked to
libquadmath, but libmpfr.so itself did not.

Oh no, I think there is another problem.  In 6.16 the final Binutils
should have been built.  So the final `ld` should have replaced the
linker used in "Adjusting the Toolchain".

Suggestion to John:

Remove /tools and extract your backup.  Then restart Chapter 6.  Make
sure to do all checks in "Adjusting the Toolchain".  And, do them again
after "6.16 Binutils".

Ken's debugging way (using .bash_histroy") may be useful.  You can
attach it here and we will play a "Spot The Differences" game :)
-- 
Xi Ruoyao <[email protected]>
School of Aerospace Science and Technology, Xidian University

-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style

Reply via email to