Re: [lfs-support] Running the mpfr-4.0.1 Tests

2018-08-06 Thread Xi Ruoyao
On 2018-08-06 21:39 -0400, Michael Shell wrote:
> On Tue, 07 Aug 2018 08:07:58 +0800
> Xi Ruoyao  wrote:
> 
> > 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".
> 
> 
>   Xi,
> 
> You are on a roll. OK, just to summarize for everyone here, so when binutils
> is installed in 6.16, from that point forward, the ld the system is using
> will link what is being built to libraries in /usr/lib rather than
> /tools/lib.

It *should* be.  Maybe John forgot 6.16, or paste commands from Chapter 5
wrongly. (I've done this once.)

> And that means that when MPFR is built, its configure script should not
> be able to even build anything linked against libquadmath because that
> does not exist yet in /usr/lib. Correct?
> 
> In the mpfr-4.0.1 source tree, I did a:
> 
> grep -r MPFR_LIBQUADMATH *
> 
> I don't see any effect from the detection of the availability of 
> libquadmath other than to add -lquadmath to the LD flags - nothing that
> would suggest code pathways being altered or tests being selected or
> otherwise changed.

Me too.

> They may have just put the detection in there for completeness, in case
> they ever do want to use libquadmath's features, if, and only if, it is
> available on the system.
> 
> Well, maybe the issue John encountered *is* the whole point of it -
> that the tests should error out if they can be built linked against
> lquadmath, but not successfully executed - that they wanted to test
> for that possibility of things going wrong.

In MPFR ChangeLog:

> r9231 | zimmerma | 2014-11-09 20:03:23 + (Sun, 09 Nov 2014) | 2 lines
> Changed paths:
>M /trunk/acinclude.m4
>M /trunk/tests/Makefile.am
> 
> added check for libquadmath (not used)

It's indeed not used.   I don't know the intention of Paul Zimmermann.
-- 
Xi Ruoyao 
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


Re: [lfs-support] Running the mpfr-4.0.1 Tests

2018-08-06 Thread Michael Shell
On Tue, 07 Aug 2018 08:07:58 +0800
Xi Ruoyao  wrote:

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


  Xi,

You are on a roll. OK, just to summarize for everyone here, so when binutils
is installed in 6.16, from that point forward, the ld the system is using
will link what is being built to libraries in /usr/lib rather than
/tools/lib.

And that means that when MPFR is built, its configure script should not
be able to even build anything linked against libquadmath because that
does not exist yet in /usr/lib. Correct?

In the mpfr-4.0.1 source tree, I did a:

grep -r MPFR_LIBQUADMATH *

I don't see any effect from the detection of the availability of 
libquadmath other than to add -lquadmath to the LD flags - nothing that
would suggest code pathways being altered or tests being selected or
otherwise changed.

They may have just put the detection in there for completeness, in case
they ever do want to use libquadmath's features, if, and only if, it is
available on the system.

Well, maybe the issue John encountered *is* the whole point of it -
that the tests should error out if they can be built linked against
lquadmath, but not successfully executed - that they wanted to test
for that possibility of things going wrong.


  Cheers,

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


Re: [lfs-support] Running the mpfr-4.0.1 Tests

2018-08-06 Thread Ken Moffat
On Mon, Aug 06, 2018 at 03:02:28PM -0700, Paul Rogers wrote:
> > You are correct.
> > 
> > "echo "int main(){}" > dummy.c &&
> > cc dummy.c -Wl,--verbose | grep SEARCH | sed 's/; /\n/g' "
> > still points to /tools/lib.
> > 
> > I saved a copy of /tools and /sources before starting chapter 6.
> > 
> > Can I exit chroot and delete certain folders, stay in chroot and delete
> > certain folders, stay in chroot and delete all the contents or is there
> > another option?
> > I should be able to restart Chapter 6, right?

I've not really been following this because the original problem was
so uncommon (so, I suppose bonus points to the OP for a new
variation on doing the build wrongly).  More comments below.
> 
> Please stop top-posting, not having seen the relevant reference annoys people 
> here.  I know, my email client wants to do that too, but it's really easy 
> enough to reposition.
> 
> Now then, it would seem that with prudent backups along the way one should be 
> able to "surgically" remove what's wrong and pick it up at just the right 
> spot.  Been there done that, as have we all, but it's a waste of time.  
> You'll be miles ahead by blowing it all away, restoring just the /tools 
> backup, if you got it all and at the right place, and starting Ch6 from 
> scratch.  This time you might consider putting all the book's instructions 
> for each package in a script you can quickly and rerun error-free.  That is a 
> time saver.

As a first step, in chroot use bash's history (up-arrow) to compare
what was actually typed against what the book says.  Or

 history >/duff-hist

and then, on the host (possibly as root if that file is not readable)

 less /mnt/lfs/duff-hist

The important thing is to discover what was wrong.  We get a lot of
reports where people did *something* wrong, eventually started over
and then succeeded.  But (for the builder, not for us on the list!)
understanding what went wrong is the best approach.

After that, yes, exiting chroot, umounting /mnt/lfs, wiping it and
restoring from the backup should work.

Like Paul, I use my own scripts and on the (hopefully rare)
occasions where I screw up in applying a change from the book I
usually work out what I did wrong and then start again.  But the
problem with using scripts - mostly for the first-time user,
although I screwed up recently myself - is dealing with errors.

So, while LFS teaches enough for people to be able to come up with
their own scripts, I do not recommend that for a first build.  And
I'm sure many peole here would be horrified by my scripts - but they
usually work ok for me ;-)

ĸen
-- 
   Entropy not found, thump keyboard to continue

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


Re: [lfs-support] Running the mpfr-4.0.1 Tests

2018-08-06 Thread Paul Rogers
> You are correct.
> 
> "echo "int main(){}" > dummy.c &&
> cc dummy.c -Wl,--verbose | grep SEARCH | sed 's/; /\n/g' "
> still points to /tools/lib.
> 
> I saved a copy of /tools and /sources before starting chapter 6.
> 
> Can I exit chroot and delete certain folders, stay in chroot and delete
> certain folders, stay in chroot and delete all the contents or is there
> another option?
> I should be able to restart Chapter 6, right?

Please stop top-posting, not having seen the relevant reference annoys people 
here.  I know, my email client wants to do that too, but it's really easy 
enough to reposition.

Now then, it would seem that with prudent backups along the way one should be 
able to "surgically" remove what's wrong and pick it up at just the right spot. 
 Been there done that, as have we all, but it's a waste of time.  You'll be 
miles ahead by blowing it all away, restoring just the /tools backup, if you 
got it all and at the right place, and starting Ch6 from scratch.  This time 
you might consider putting all the book's instructions for each package in a 
script you can quickly and rerun error-free.  That is a time saver.

-- 
Paul Rogers
paulgrog...@fastmail.fm
Rogers' Second Law: "Everything you do communicates."
(I do not personally endorse any additions after this line. TANSTAAFL :-)
-- 
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


Re: [lfs-support] Running the mpfr-4.0.1 Tests

2018-08-06 Thread Michael Shell
On Mon, 06 Aug 2018 19:52:52 +0800
Xi Ruoyao  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?

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.


  Cheers,

  Mike

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


Re: [lfs-support] Running the mpfr-4.0.1 Tests

2018-08-06 Thread John Le Brasseur
Thank you Xi Ruoyao.
You are correct.

"echo "int main(){}" > dummy.c &&
cc dummy.c -Wl,--verbose | grep SEARCH | sed 's/; /\n/g' "
still points to /tools/lib.

I saved a copy of /tools and /sources before starting chapter 6.

Can I exit chroot and delete certain folders, stay in chroot and delete
certain folders, stay in chroot and delete all the contents or is there
another option?
I should be able to restart Chapter 6, right?

On Mon, 6 Aug 2018 at 14:13, Xi Ruoyao  wrote:

> On 2018-08-06 12:44 +0200, John Le Brasseur wrote:
> > Hi Mike.
> > Thanks for your reply.
> > The output is:
> >
> > ls -lad /tools/lib/libquad*
> > -rw-r--r-- 1 root root 1203304 Aug  4 13:55 /tools/lib/libquadmath.a
> > -rwxr-xr-x 1 root root 971 Aug  4 13:55 /tools/lib/libquadmath.la
> > lrwxrwxrwx 1 root root  20 Aug  4 13:55 /tools/lib/libquadmath.so ->
> libquadmath.so.0.0.0
> > lrwxrwxrwx 1 root root  20 Aug  4 13:55 /tools/lib/libquadmath.so.0
> -> libquadmath.so.0.0.0
> > -rwxr-xr-x 1 root root  955232 Aug  4 13:55
> /tools/lib/libquadmath.so.0.0.0
>
> 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
>
> echo "int main(){return 0;}" > conftest.c &&
> cc conftest.c -lquadmath &&
> ./a.out
>
> returns 0 (successful).  But after 6.10 this should NOT succeed
> because GCC spec has been changed to search /usr/lib instead
> of /tools/lib and there is NO libquadmath.so in /usr/lib.
>
> It's very likely you've made a mistake in 6.10.  Please run:
>
> echo "int main(){}" > dummy.c &&
> cc dummy.c -Wl,--verbose | grep SEARCH | sed 's/; /\n/g'
>
> It should contain "/usr/lib", and should NOT contain
> "/tools/lib".
> --
> Xi Ruoyao 
> 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
>


-- 
Kind regards,

John Le Brasseur
+27  73 157 5605
-- 
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


Re: [lfs-support] Running the mpfr-4.0.1 Tests

2018-08-06 Thread Xi Ruoyao
On 2018-08-06 12:44 +0200, John Le Brasseur wrote:
> Hi Mike.
> Thanks for your reply.
> The output is:
> 
> ls -lad /tools/lib/libquad*
> -rw-r--r-- 1 root root 1203304 Aug  4 13:55 /tools/lib/libquadmath.a
> -rwxr-xr-x 1 root root 971 Aug  4 13:55 /tools/lib/libquadmath.la
> lrwxrwxrwx 1 root root  20 Aug  4 13:55 /tools/lib/libquadmath.so -> 
> libquadmath.so.0.0.0
> lrwxrwxrwx 1 root root  20 Aug  4 13:55 /tools/lib/libquadmath.so.0 -> 
> libquadmath.so.0.0.0
> -rwxr-xr-x 1 root root  955232 Aug  4 13:55 /tools/lib/libquadmath.so.0.0.0

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

echo "int main(){return 0;}" > conftest.c &&
cc conftest.c -lquadmath &&
./a.out

returns 0 (successful).  But after 6.10 this should NOT succeed
because GCC spec has been changed to search /usr/lib instead
of /tools/lib and there is NO libquadmath.so in /usr/lib.

It's very likely you've made a mistake in 6.10.  Please run:

echo "int main(){}" > dummy.c &&
cc dummy.c -Wl,--verbose | grep SEARCH | sed 's/; /\n/g'

It should contain "/usr/lib", and should NOT contain
"/tools/lib".
-- 
Xi Ruoyao 
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


Re: [lfs-support] Running the mpfr-4.0.1 Tests

2018-08-06 Thread John Le Brasseur
Hi Mike.
Thanks for your reply.
The output is:

ls -lad /tools/lib/libquad*
-rw-r--r-- 1 root root 1203304 Aug  4 13:55 /tools/lib/libquadmath.a
-rwxr-xr-x 1 root root 971 Aug  4 13:55 /tools/lib/libquadmath.la
lrwxrwxrwx 1 root root  20 Aug  4 13:55 /tools/lib/libquadmath.so ->
libquadmath.so.0.0.0
lrwxrwxrwx 1 root root  20 Aug  4 13:55 /tools/lib/libquadmath.so.0 ->
libquadmath.so.0.0.0
-rwxr-xr-x 1 root root  955232 Aug  4 13:55 /tools/lib/libquadmath.so.0.0.0




On Mon, 6 Aug 2018 at 12:38, John Le Brasseur 
wrote:

> Many thanks for your reply Hazel.
> I won't be surprised to have made a mistake but I must say I concentrated
> hard during every step.
> I have the following in the /tools/lib folder:
>
> "-rw-r--r-- 1 root root  1203304 Aug  4 15:55 libquadmath.a
>  -rwxr-xr-x 1 root root  971 Aug  4 15:55 libquadmath.la
>  lrwxrwxrwx 1 root root   20 Aug  4 15:55 libquadmath.so ->
> libquadmath.so.0.0.0
>  lrwxrwxrwx 1 root root   20 Aug  4 15:55 libquadmath.so.0 ->
> libquadmath.so.0.0.0
>  -rwxr-xr-x 1 root root   955232 Aug  4 15:55 libquadmath.so.0.0.0"
>
> Does this indicate a mistake?
>
>
>
>
> On Mon, 6 Aug 2018 at 11:26, Hazel Russman 
> wrote:
>
>> On Mon, 6 Aug 2018 10:05:37 +0200
>> John Le Brasseur  wrote:
>>
>> > Hi.
>> >
>> > My first post.
>> > (Sorry for ignorance)
>> >
>> > I am using the LFS-BOOK-8.2
>> > I have reached step 6.18.1.
>> > Everything has gone according to plan so far unless I missed something.
>> > I ran 'make check' for mpfr-4.0.1 and all tests failed with similar
>> > comments, e.g.:
>> >
>> > "./tzeta_ui: error while loading shared libraries: libquadmath.so.0:
>> cannot
>> > open shared object file: No such file or directory
>> > FAIL tzeta_ui (exit status: 127)"
>> >
>> > Is this a common error?
>> > What could likely be wrong?
>> > Should I make mpfr again?
>> > Is there likely a problem elsewhere?
>> > Any ideas?
>> >
>> > Many, many thanks.
>> >
>> > John
>> >
>> > --
>> > Kind regards,
>> >
>> > John Le Brasseur
>>
>> No, it's not normal. It's a serious error which means that you have made
>> a mistake in Chapter 5 (probably in Section 5.10).
>>
>> Libquadmath, which this build needs, is part of gcc. The first pass of
>> gcc in Chapter 5 disables it, but the second pass includes it. So you
>> should have it installed in the /tools tree. Check in /tools/lib for it.
>>
>> If it isn't there, then you probably reused the gcc source tree for your
>> second pass instead of deleting it and re-extracting your gcc sources.
>>
>> It looks like you will need to start again.
>>
>> --
>> --
>> 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
>>
>
>
> --
> Kind regards,
>
> John Le Brasseur
>
>

-- 
Kind regards,

John Le Brasseur
+27  73 157 5605
-- 
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


[lfs-support] Running the mpfr-4.0.1 Tests

2018-08-06 Thread John Le Brasseur
Hi.

My first post.
(Sorry for ignorance)

I am using the LFS-BOOK-8.2
I have reached step 6.18.1.
Everything has gone according to plan so far unless I missed something.
I ran 'make check' for mpfr-4.0.1 and all tests failed with similar
comments, e.g.:

"./tzeta_ui: error while loading shared libraries: libquadmath.so.0: cannot
open shared object file: No such file or directory
FAIL tzeta_ui (exit status: 127)"

Is this a common error?
What could likely be wrong?
Should I make mpfr again?
Is there likely a problem elsewhere?
Any ideas?

Many, many thanks.

John

-- 
Kind regards,

John Le Brasseur
+27  73 157 5605
-- 
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