Re: [lfs-support] Compiling gcc-4.9.2 from 7.7 without CMOV

2021-04-12 Thread Xi Ruoyao
On 2021-04-12 21:44 -0400, Michael Shell wrote:
> On Fri, 9 Apr 2021 10:46:30 -0400
> Chris Fowler  wrote:
> 
> > I am fully aware that other OSS packages could use CMOV with inline
> > assembly.  I'm just wanting GCC to forget it even exists when it tries to
> > implement CMOV during -03 optimization.
> 
> 
> I think the most correct approach for your CPU is just to invoke
> 
> -march=i586
> 
> to avoid the use of CMOV:
> 
> https://clfs-support.cross-lfs.narkive.com/x1E4tLvU/i586-target-with-cmov

You shouldn't need that.  If you need this, it means your GCC is misconfigured.
It may happen if you specify a wrong --with-arch value, or config.guess outputed
i686-pc-linux-gnu (which is wrong on 586).

I don't have an i586 so I can't test config.guess on it.  You can try to run it.
If it outputs i686, you can manually override it and report this as a bug, to
config.guess maintainers (not GCC maintainers: config.guess is a seperated
project at https://git.savannah.gnu.org/gitweb/?p=config.git).
-- 
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] Compiling gcc-4.9.2 from 7.7 without CMOV

2021-04-10 Thread Xi Ruoyao
On 2021-04-09 10:46 -0400, Chris Fowler wrote:
> I'm revisiting something I worked on a few years ago where I worked through 
> LFS
> 7.7 on a i586 device that lacks CMOV.   There are -march options for 'no MMX',
> but nothing for 'no CMOV'.  Where in the GCC source are those defined and can 
> I
> create one for 'no CMOV' before I start building /tools

> I am fully aware that other OSS packages could use CMOV with inline assembly. 
> I'm just wanting GCC to forget it even exists when it tries to implement CMOV
> during -03 optimization.

GCC won't generate CMOV if it can't make sure it's avaliable for the target.  If
you see some CMOV in your binaries, the possiblities are:

1. it comes from (maybe inline) assembly
2. some package have CMOV in (maybe inline) assembly, or it tells the compiler
to generate CMOV, it means either:
  (1) it is buggy, or
  (2) it has runtime checking to avoid execution of CMOV on platforms w/o it
3. you are using wrong -march setting
4. there is a GCC bug (unlikely - I just took a look at GCC code for checking if
CMOV is usable. The code seems correct.).

-- 
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] Error compiling m4-1.4.18

2021-04-09 Thread Xi Ruoyao
On 2021-04-08 13:54 +, Live Account wrote:
> 
> 
> Il giorno ven 9 apr 2021 alle ore 04:54 Xi Ruoyao  ha
> scritto:
> > On 2021-04-09 12:50 +0800, Xi Ruoyao wrote:
> > > On 2021-04-08 17:49 +0200, Live Account wrote:
> > > > First of all, thank you for the kind reply.
> > > > Unfortunately, that did not solve the problem. I tried re-issuing said
> > > > commands, re-extracting a clean m4 directory from the tarball but it
> > > > resulted
> > > > in the same error.
> > > > Thank you once again for your help!
> > > 
> > > Try run
> > > 
> > > $LFS/tools/libexec/gcc/$LFS_TGT/10.2.0/install-tools/mkheaders
> > 
> > more explanation: mkheaders script copies
> > $LFS/tools/lib/gcc/$LFS_TGT/10.2.0/install-tools/limits.h to
> > $LFS/tools/lib/gcc/$LFS_TGT/10.2.0/include-fixed.  So forgetting the last
> > commands for limits.h in GCC pass 1 (5.3) **or** cross-compiled glibc (5.5)
> > will
> > cause this kind of issue.  And in case you forgot the previous one, you 
> > should
> > redo **both** one.
> > 

> Thank you so much, that fixed the problem. I am sorry if I caused this 
> trouble,
> I promise I will be more careful in the future. Also, forgive me if I 
> top-posted
> in the last post, I realized my mistake after I sent the message.
> Thank you again for your kind and patient help and I wish you a pleasant day.

Everyone makes mistake building LFS :).  If I tell some of my mistakes you'll
laugh.

And I should realize that the commands in chapter 5 Glibc for limits.h have to
be re-ran (is this correct English? :) after rerunning the commands in GCC pass
1, then you wouldn't need to wait for half a day.  I must be too sleepy
yesterday.

I added this issue to [FAQ][1] so hopefully the others can diagnostis this issue
more easily.  Thanks for the report!

[1]: https://rivendell.linuxfromscratch.org/lfs/faq.html#m4-mb-len-max-wrong
-- 
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] Error compiling m4-1.4.18

2021-04-08 Thread Xi Ruoyao
On 2021-04-09 12:50 +0800, Xi Ruoyao wrote:
> On 2021-04-08 17:49 +0200, Live Account wrote:
> > First of all, thank you for the kind reply.
> > Unfortunately, that did not solve the problem. I tried re-issuing said
> > commands, re-extracting a clean m4 directory from the tarball but it
> > resulted
> > in the same error.
> > Thank you once again for your help!
> 
> Try run
> 
> $LFS/tools/libexec/gcc/$LFS_TGT/10.2.0/install-tools/mkheaders

more explanation: mkheaders script copies
$LFS/tools/lib/gcc/$LFS_TGT/10.2.0/install-tools/limits.h to
$LFS/tools/lib/gcc/$LFS_TGT/10.2.0/include-fixed.  So forgetting the last
commands for limits.h in GCC pass 1 (5.3) **or** cross-compiled glibc (5.5) will
cause this kind of issue.  And in case you forgot the previous one, you should
redo **both** one.
-- 
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] Error compiling m4-1.4.18

2021-04-08 Thread Xi Ruoyao
On 2021-04-08 17:49 +0200, Live Account wrote:
> First of all, thank you for the kind reply.
> Unfortunately, that did not solve the problem. I tried re-issuing said
> commands, re-extracting a clean m4 directory from the tarball but it resulted
> in the same error.
> Thank you once again for your help!

Try run

$LFS/tools/libexec/gcc/$LFS_TGT/10.2.0/install-tools/mkheaders

and rebuild M4.
-- 
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] Error compiling m4-1.4.18

2021-04-08 Thread Xi Ruoyao
On 2021-04-08 13:30 +, Live Account wrote:
> Book:SVN-20210326
> Host: Linux Mint Live CD
> Check host requirements output:
> bash, version 5.0.16(1)-release

/* snip */

> In file included from /mnt/lfs/usr/include/stdlib.h:1018,
>                  from ./stdlib.h:36,
>                  from clean-temp.c:29:
> /mnt/lfs/usr/include/bits/stdlib.h: In function 'wctomb':
> /mnt/lfs/usr/include/bits/stdlib.h:94:3: error: #error "Assumed value of
> MB_LEN_MAX wrong"
>    94 | # error "Assumed value of MB_LEN_MAX wrong"
>       |   ^
> make[3]: *** [Makefile:1910: clean-temp.o] Error 1
> make[3]: Leaving directory '/mnt/lfs/sources/m4-1.4.18/lib'
> make[2]: *** [Makefile:1674: all] Error 2
> make[2]: Leaving directory '/mnt/lfs/sources/m4-1.4.18/lib'
> make[1]: *** [Makefile:1572: all-recursive] Error 1
> make[1]: Leaving directory '/mnt/lfs/sources/m4-1.4.18'
> make: *** [Makefile:1528: all] Error 2
> 
> I have not deviated from the book. I am using user lfs as indicated. I am
> unsure on how to proceed.
> Thank you for your precious help and I wish you a pleasant day.

My guess is you've forgot the last commands (to recreate limits.h) in chapter 5
GCC (pass 1).
-- 
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] Trouble in Installing Basic System Software

2021-04-07 Thread Xi Ruoyao
On 2021-04-07 19:04 +0300, Yasin YILMAZ wrote:
> Yes true. Thank you. I was doing it outside of the chroot environment. I
> missed the information. So, did my work in the root environment damage the
> main system?

I think overwriting man pages and iana etc won't break your Debian severely. 
You can reinstall those files from Debian software source, though I don't really
know how.
-- 
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] Trouble in Installing Basic System Software

2021-04-07 Thread Xi Ruoyao
On 2021-04-07 17:48 +0300, Yasin YILMAZ wrote:
> Hello, I am having problems in the "8.5. Glibc-2.33" part of the "Chapter 8.
> Installing Basic System Software" stage, while creating LFS on the operating
> system with Debian 10 Buster GNOME interface. All the details are below.

/* snip */

> root@linux:~# cd $LFS &&
> > rm -rf ./* &&
> > tar -xpf $HOME/lfs-temp-tools-10.1.tar.xz

Read the content of the "important" box after these commands (in section
7.14.3).
-- 
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] systemd behaviour

2021-04-03 Thread Xi Ruoyao
On 2021-04-03 17:08 +0200, Thomas Seeling wrote:
> Hallo dear list,
> 
> 
> for years I have a small helper in /etc/profile.d to search for an
> existing ssh-agent instance for my user and set the SSH_* environment
> variables accordingly if it finds one. If none is running it does the
> usual eval $(ssh-agent) thing.
> 
> In the last days I built LFS 10.1 systemd version to compare sysV and
> systemd styles and educate myself further.
> 
> When exiting and re-entering I noticed that it asks me - again - for my
> SSH key credentials and eventually my previous instance of ssh-agent is
> gone.
> 
> Is it standard behaviour of systemd to kill all processes since login?
> My sysV install behaves like expected and ssh-agent stays alive. How
> would I start ssh-agent so that it will survive logoff? An additional
> layer of "nohup"?

Read section 9.10.9 of LFS book.
-- 
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] LFS translation to Ancient Greek completed

2021-04-01 Thread Xi Ruoyao
On 2021-04-01 12:01 +0200, Tim Tassonis wrote:
> Hi all
> 
> It took me a while, but I now finally completed my translation of the 
> LFS book into Ancient Greek. It is based on LFS 10.0, and only the sysv 
> version is done yet, Systemd is still pending due to ancient greek only 
> having capital letters.
> 
> Maybe this could be mentioned on the lfs Homepage?
> 
> Anybody interested might have a look here:
> 
> https://en.wikipedia.org/wiki/April_Fools'_Day

Unfortunately, due to the migration from higgs to rivendell, LFS website is now
under a freezing.  Maybe we can add a link to it on Apr. 1 2022 :).
-- 
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] backscrolling with shift+cursor

2021-03-31 Thread Xi Ruoyao
On 2021-03-31 20:03 +0200, Thomas Seeling wrote:
> Hallo,
> 
> 
> om some older LFS versions I could flip back 2 or 3 pages of screen
> content, and this feature seems to have gone with 10.0. Is this some
> option I missed to turn on which is optional now? I thought this was
> very convenient.

syzbot found a lot of bugs (some of them may cause security problems) in kernel
code handling the scrolling.  Nobody volunteered to fix them.  So Linus removed
those code.
-- 
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] Issues with /lib64 .....

2021-03-29 Thread Xi Ruoyao
On 2021-03-28 23:37 +0200, Patrick Frisch wrote:
> 
> Am 28.03.21 um 14:10 schrieb Xi Ruoyao:
> > On 2021-03-28 12:42 +0200, Patrick Frisch wrote:
> > > Am 28.03.21 um 00:13 schrieb Ken Moffat:
> > > > On Sat, Mar 27, 2021 at 11:00:06PM +0100, Patrick Frisch wrote:
> > > > > Hello again,
> > > > > 
> > > > >    now I completed the lfs build, and I had a very nasty problem with
> > > > > your
> > > > > handling of /lib64 and the new approach, that the toolchain is no
> > > > > longer
> > > > > isolated in /tools.
> > > > > 
> > > > > After solving my problem in the previous discussion, I started my
> > > > > packaging
> > > > > at the beginning of Chapter 7 now by package everything in $LFS at the
> > > > > end
> > > > > of Chapter 6 to an initial package.
> > > > > 
> > > > > So everything works well, the libs and programs in $LFS are rebuild in
> > > > > Chapters 7 and 8 and are captured by my packaging method correctly.
> > > > > So, in
> > > > > theory, after completing Chapter 8, I don't need anything from my
> > > > > initial
> > > > > toolchain package, so I should be able to remove it from my package
> > > > > chain.
> > > > > 
> > > > > But by removing it, i render my new system unusable, since /lib64 is
> > > > > created
> > > > > in the toolchain phase in Chapter 5.5.1 only and is never touched
> > > > > again in
> > > > > any following package. So by removing my initial toolchain package I
> > > > > remove
> > > > > /lib64 and the very important link in it.
> > > > > 
> > > > You do realise that the LFS book is written for building on the
> > > > system where it will be used ?  At the end of LFS your system should
> > > > be bootable if you follow the book.  Removing files which the book
> > > > does not remove can be a learning experience.  In my own case, when
> > > > I decide to make a static lib unavailable I rename it so it will not
> > > > be found, but can be made available when needed, e.g.
> > > > /usr/lib/libstdc++.a.hidden (needed for anything using gn, which in
> > > > BLFS is only qtwebengine).
> > > > 
> > > > Any package management system implies that you may need to alter
> > > > what the books do, e.g. if you are building for multiple systems you
> > > > might need to alter the instructions for packages such as gmp, and
> > > > different machines might need different kernel options (e.g.  PS2 |
> > > > usb1 | usb2 | usb3 for keyboard and mouse, or in BLFS different
> > > > video drivers or firmware).
> > > > 
> > > > In BLFS, for several packages you will need to do extra things if
> > > > doing a DESTDIR or INSTALL_ROOT install and sometimes BLFS packages
> > > > have to be installed as root even when using a DESTDIR.
> > > > 
> > > > Specifically, you can remove /tools, but on x86_64 you should not
> > > > remove /lib64.
> > > > 
> > > > > Of course this is easy to fix but I want to suggest to add the
> > > > > creation of
> > > > > the directory /lib64 in chapter 8.5 (when generating the final glibc),
> > > > > because otherwise your whole final system depends on something created
> > > > > in
> > > > > the toolchain.
> > > > > 
> > > > > By just adding the directory /lib64 and the 2 links in my glibc-
> > > > > package
> > > > > does
> > > > > the trick and my system is running again without anything from the
> > > > > toolchain
> > > > > (as it should be).
> > > > > 
> > > > > bye,
> > > > > 
> > > > > Patrick
> > > > > 
> > > > Glad you understand how to fix your packaging, but adding an
> > > > unnecessary recreation of a directory to the book seems pointless.
> > > > 
> > > > Until people can successfully build and boot a system, they should
> > > > follow the book.  After that, using your own scripts or other forms
> > > > of packaging is fine and can contribute to the learning experience.
> > > > 
> > > > But you need to keep an eye on how the book changes

Re: [lfs-support] Issues with /lib64 .....

2021-03-28 Thread Xi Ruoyao
27;m not a native speaker so I'm not sure what "linked" means here.  But I can
tell it's not the "linkage" (done by a linker).

The path, "/lib64/ld-linux-x86-64.so.2" (a path, just a byte string, nothing
about the content of the file pointed by this path) is hard coded in ELF
executable headers.  The kernel reads the header and invokes /lib64/ld-linux-
x86-64.so.2 to load and run the executable.  There is no reason we should
recreate /lib64 or /lib64/ld-linux-x86-64.so for this process.  It's just like
saying:

"The shell scripts in the final LFS system contain a path, /bin/sh, in it.  So
we should run mkdir -p /bin at the beginning of chapter 08, as we shouldn't use
the one created in the temporary stage."

It's obviously ridiculous.

> You decided to use the $LFS directory outside $LFS/tools in the 
> toolchain phase for convenience, I already had a discussion about that 
> and I can see the advantages of this approach, but for my understanding, 
> nothing in the final system should depend on anything in the toolchain, 
> and creation of /lib64 and the links therein belongs to the toolchain.

No.  It's not for convenience.  It's to prevent any occurrence of hard coded
paths to "/tools/*" (which will be deleted later) in the final system.  In LFS
9.1 Pierre found a dozen of such paths.

> If you argue about unnecessary recreations, I could argue as well about 
> recreation of tools like grep, gzip or xz, the versions created in 
> Chapter 6 should work perfectly fine in the final system too nowadays:-).

Temporary grep, gzip, xz, and other temp tools are produced by some complicated
cross building process.  They may contain paths to directories or files not
exist anymore in the final LFS system.  But ($LFS)/lib64/ld-linux-x86-64.so.2 is
created by a single ln -s command, and it only contains one path "../lib/ld-
linux-x86-64.so.2", to a file which exists in the final LFS system.
-- 
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] Compiling M4 on GCC 10.2

2021-02-17 Thread Xi Ruoyao
On 2021-02-10 20:10 +0100, Viktor Engelmann wrote:
> 
> Am 10.02.21 um 16:04 schrieb Xi Ruoyao:
> > On 2021-02-10 14:16 +0100, Viktor Engelmann wrote:
> > > Am 09.02.2021 um 16:46 schrieb Xi Ruoyao:
> > > > On 2021-02-09 16:11 +0100, Viktor Engelmann wrote:
> > > > > Hello everyone,
> > > > > 
> > > > > I'm building LFS 10.0 on a fully updated Manjaro Linux on an x86_64
> > > > > for
> > > > > x86_64.
> > > > > 
> > > > > When I compile M4 (chapter 6.2), I get two errors:
> > > > > 
> > > > >   - gcc complains about a void function ("fault_handler") being
> > > > > declared
> > > > > as "pure" in line 146 of m4.c
> > > > >   - gcc complains about the flag -Wabi which is deprecated and doesn't
> > > > > do
> > > > > anything
> > > > > 
> > > > > (see the attached log file)
> > > > > 
> > > > > I was able to circumvent the problems by setting the environment
> > > > > variable
> > > > > CFLAGS=" -fpermissive -Wabi=11 " before ./configure, but I think that
> > > > > these are infact bugs
> > > > > in M4, so gcc is rightfully complaining.
> > > > > 
> > > > > It seems that an older gcc version had failed if that function was NOT
> > > > > declared "pure"
> > > > > and the M4 team has also discussed this topic in july 2020, see
> > > > > https://lists.gnu.org/archive/cgi-bin/namazu.cgi?query=fault_handler&submit=Search%21&idxname=bug-m4&max=20&result=normal&sort=score
> > > > > they had also decided to make the function NOT "pure" (because
> > > > > fault_handler has sideeffects
> > > > > and should therefore not be pure). This was implemented by commit
> > > > > 74915227e245c2f93d0db1ff3c53544d8f594dfa in the m4 git repository, but
> > > > > the declaration
> > > > > is still present in the .tar.xz from 2016 on
> > > > > http://ftp.gnu.org/gnu/m4/
> > > > > that is used in LFS.
> > > > > 
> > > > > I verified that LFS and LFS_TGT are set and that I'm compiling with
> > > > > x86_64-lfs-linux-gnu-gcc.
> > > > > Everything before M4 was built as regular user.
> > > > Those warnings should not be enabled by default.
> > > > 
> > > > Is your M4 tarball has the same MD5 checksum in the book?  Or did you
> > > > use
> > > > some
> > > > configure options not mentioned by the book?
> > > Yes, I have compared all the MD5 sums. I followed the book very closely
> > > and I have just compared my scripts to the book again and rebuilt again.
> > > Everything else from chapter 5 and 6 worked fine.
> > > 
> > > The only thing I can think of that I (might) have done differently is
> > > that I deleted the gcc-10.2.0 directory between building gcc and
> > > libstdc++. The book doesn't explicitly say whether you should do that
> > > and my script deletes target-directories before untaring to prevent
> > > conflicts with previous builds (so the gcc directory is deleted because
> > > libstdc++ is extracted to the same directory as gcc, because it comes
> > > from the same tarball)
> > It should be deleted.
> > 
> > > In the end, the function /is/ declared as pure and that /is/ logically
> > > wrong, so it's correct of gcc to at least issue a warning. A warning is
> > > also arguable when you pass a deprecated parameter such as -Wabi. It
> > > seems that the warnings are turned into errors because -Werror is also
> > > passed somewhere - I'm still looking into where that happens. But I
> > > would argue that you should use -Werror whenever possible to avoid
> > > unwanted results as much as possible.
> > It's too idealistic.  Warnings like -Wmaybe-uninitialized produce false
> > positives by their nature.  And using -Werror in a release tarball makes a
> > bomb
> > which explodes if the users have a different compiler, or use some custom
> > CFLAGS.
> > 
> > In your build the configuration process somehow "--enable-gcc-warnings" is
> > enabled.  It's intended for developers only and should not be enabled by
> > default
> > in a release.
> > 
> > Could you attach your config.log of M4 here?

Re: [lfs-support] Compile error glibc2.33 -> binutils-2.36.1

2021-02-10 Thread Xi Ruoyao
On 2021-02-10 21:57 -0500, Jean-Marc Pigeon wrote:
> Bonjour Xi (hello the list),
> 
> On Thu, 2021-02-11 at 10:51 +0800, Xi Ruoyao wrote:
> > On 2021-02-10 22:47 +0100, Pierre Labastie wrote:
> > > On Wed, 2021-02-10 at 21:03 +, Ken Moffat wrote:
> > > > On Wed, Feb 10, 2021 at 08:49:56PM +, Ken Moffat wrote:
> > > > > > 
> > > > > > Looks like I need to change the Frame pointer unwinder to the
> > > > > > ORC unwinder to have the same config as you.
> > > > > > 
> > > > > 
> > > > > The benefits of the ORC unwinder are mentioned at
> > > > > https://www.kernel.org/doc/html/latest/x86/orc-unwinder.html
> > > > > 
> > > > > It has been around for quite some time, but I probably picked
> > > > > it
> > > > > up when it first appeared (test an -rc kernel, pick up new
> > > > > options
> > > > > which might be useful).  I guess that old configs from before
> > > > > its
> > > > > introduction still default to the old unwinder.
> > > > > 
> > > > In fact it caused trouble about 3 years ago, there are links to
> > > > the
> > > > -dev archive from around January 2018 when elfutils was still in
> > > > BLFS, and at that time LFS had to use the frame pointer.  So when
> > > > libelf arrived in LFS I started to use it (or use it again, not
> > > > sure
> > > > which).
> > > > 
> > > 
> > > I managed to compile objtool with -g, to recompile apic.c to apic.o
> > > (because it gets erased when objtool fails), and to run the objtool
> > > command on it under gdb. The segfault is esay to understand:
> > > 
> > > Program received signal SIGSEGV, Segmentation fault.
> > > 0x00412f71 in elf_rebuild_rela_reloc_section (sec=0xe22b10,
> > > nr=16)
> > >     at elf.c:883
> > > 883 relocs[idx].r_info = GELF_R_INFO(reloc-
> > > > sym-
> > > > idx, reloc->type);
> > > 
> > > and the reloc struct is:
> > > (gdb) p *reloc
> > > $2 = {list = {next = 0xe23240, prev = 0xe23160}, hash = {next =
> > > 0x0, 
> > >     pprev = 0xe23250}, {rela = {r_offset = 0, r_info = 0, r_addend
> > > =
> > > 0}, 
> > >     rel = {r_offset = 0, r_info = 0}}, sec = 0xe22b10, sym = 0x0,
> > > offset = 48, 
> > >   type = 2, addend = 467, idx = 0, jump_table_start = false}
> > > 
> > > So reloc->sym is zero, and reloc->sym->idx is a null dereference...
> > > 
> > > Now to understand why reloc->sym is zero is more complicated...
> > 
> > I can reproduce it too with Ken's config and just "make
> > arch/x86/kernel/apic/apic.o".
> > 
> > I seen a strange warning in build:
> > 
> > > Warning: Kernel ABI header at 'tools/arch/x86/lib/insn.c' differs
> > > from latest
> > > version at 'arch/x86/lib/insn.c'
> > 
> > Not sure if it causes the segfault.  I'll try 5.10.15 and if it's not
> > fixed I'll
> > report it as a kernel bug.
> do you confirm it is binutil-2.36.1 related or 
> is it a kernel only problem?

I can't confirm or disconfirm.  It's beyond my knowledge.  But I decided to
report it to the kernel bugzilla.  If kernel dev thinks it's a binutils bug they
can report to binutils anyway.

And, this issue seems "fixed" in 5.11-rc7 so I think the kernel dev may have
some idea of it.
-- 
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] Compile error glibc2.33 -> binutils-2.36.1

2021-02-10 Thread Xi Ruoyao
On 2021-02-10 22:47 +0100, Pierre Labastie wrote:
> On Wed, 2021-02-10 at 21:03 +, Ken Moffat wrote:
> > On Wed, Feb 10, 2021 at 08:49:56PM +, Ken Moffat wrote:
> > > > 
> > > > Looks like I need to change the Frame pointer unwinder to the
> > > > ORC unwinder to have the same config as you.
> > > > 
> > > 
> > > The benefits of the ORC unwinder are mentioned at
> > > https://www.kernel.org/doc/html/latest/x86/orc-unwinder.html
> > > 
> > > It has been around for quite some time, but I probably picked it
> > > up when it first appeared (test an -rc kernel, pick up new options
> > > which might be useful).  I guess that old configs from before its
> > > introduction still default to the old unwinder.
> > > 
> > In fact it caused trouble about 3 years ago, there are links to the
> > -dev archive from around January 2018 when elfutils was still in
> > BLFS, and at that time LFS had to use the frame pointer.  So when
> > libelf arrived in LFS I started to use it (or use it again, not sure
> > which).
> > 
> 
> I managed to compile objtool with -g, to recompile apic.c to apic.o
> (because it gets erased when objtool fails), and to run the objtool
> command on it under gdb. The segfault is esay to understand:
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x00412f71 in elf_rebuild_rela_reloc_section (sec=0xe22b10,
> nr=16)
>     at elf.c:883
> 883 relocs[idx].r_info = GELF_R_INFO(reloc->sym-
> > idx, reloc->type);
> 
> and the reloc struct is:
> (gdb) p *reloc
> $2 = {list = {next = 0xe23240, prev = 0xe23160}, hash = {next = 0x0, 
>     pprev = 0xe23250}, {rela = {r_offset = 0, r_info = 0, r_addend =
> 0}, 
>     rel = {r_offset = 0, r_info = 0}}, sec = 0xe22b10, sym = 0x0,
> offset = 48, 
>   type = 2, addend = 467, idx = 0, jump_table_start = false}
> 
> So reloc->sym is zero, and reloc->sym->idx is a null dereference...
> 
> Now to understand why reloc->sym is zero is more complicated...

I can reproduce it too with Ken's config and just "make
arch/x86/kernel/apic/apic.o".

I seen a strange warning in build:

> Warning: Kernel ABI header at 'tools/arch/x86/lib/insn.c' differs from latest
> version at 'arch/x86/lib/insn.c'

Not sure if it causes the segfault.  I'll try 5.10.15 and if it's not fixed I'll
report it as a kernel bug.
-- 
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] segfault building kernel (was: Compile error glibc2.33 -> binutils-2.36.1)

2021-02-10 Thread Xi Ruoyao
On 2021-02-10 10:05 -0500, Jean-Marc Pigeon wrote:
> Hello,
> On Wed, 2021-02-10 at 09:52 +0100, Frans de Boer wrote:
> On 10/02/2021 02:49, Ken Moffat wrote:
> > On Tue, Feb 09, 2021 at 05:14:09PM -0500, Jean-Marc Pigeon wrote:
> > > Hello,
> > > On Tue, 2021-02-09 at 18:27 +, Ken Moffat wrote:
> > > > On Tue, Feb 09, 2021 at 12:29:14AM +, Ken Moffat wrote:
> > > > > On Mon, Feb 08, 2021 at 03:52:35AM +, Ken Moffat wrote:
> > > > > > ../configure --prefix=/usr    \
> > > > > >   --disable-werror \
> > > > > >   --enable-kernel=3.2  \
> > > > > >   --enable-stack-protector=strong  \
> > > > > >   --with-headers=/usr/include  \
> > > > > >   libc_cv_slibdir=/lib
> > > > > > libc_cv_include_x86_isa_level=no
> > > > > > 
> > [...]
> > > > > Well I don't need that workaround for using '-march=native -O2' on
> > > > > my skylake, it booted successfully.  Fortunately, Frans said it
> > > > > works for him, and htat distros are using it, so I guess we too
> > > > > should use it.
> > > > > 
> > > > > However, there was one problem other than my own typos in editing
> > > > > scripts - tried to build linux-5.10.13 -
> > > > > 
> > > > >    CC  arch/x86/kernel/apic/apic.o
> > > > > make[3]: *** [scripts/Makefile.build:279:
> > > > > arch/x86/kernel/apic/apic.o] Segmentation fault
> > > Exact same problem here (not a memory problem, or very big
> > > "cosmic ray"). same problem on kernel-5.10.9 too.
> > > this happen using glibc-2.33 AND binutils-2.36.1
> > > 
> > > rebuilding from scratch using binutils-2.36.1 and keeping
> > > glibc-2.32 make the segmentation fault (I previously restarted
> > > build from scratch with glibc-2.32 + binutils-2.35.1, kernel
> > > compilation was OK).
> > > My conclusion, binutils is the trouble maker.
> > > Could somebody confirm this finding?
> > > Google is mute on this subject but may be my search
> > > keywords were not that good.
> > > advices? suggestions?
> > > 
> > Wow!  I hadn't thought of trying binutils-2.36.1 with glibc-2.32
> > (partly because I'd prefer to use glibc-2.33 because of its iconv
> > fixes).
> > 
> > And I'm surprised at 5.10.9 because based on the kernel list and
> > binutils-bugs I had thought that would crap out in objcopy (with an
> > error message about the sections, not a segfault).
> > 
> > This does sound as if it is a real problem, but I guess the reason
> > google is not coming up with anything is that binutils-2.36 and
> > 2.36.1 are fresh.  Normally we try to keep on the cutting edge
> > rather than the bleeding edge, but this time we've maybe overshot.
> > 
> > Just to be clear (before Bruce asks, I know he distrusts using any
> > CFLAGS) - are you building with any variant of -march= ?  And what
> > CPU are you building on ?
> 
> Intel(R) Core(TM) i7 CPU 970 @ 3.20GH
> all compilation done within a / tmpfs 40G 
> 
> Recompilation is done in 2 phases, first the tool-chain (automatic make
> sequence)
> then recompile everything within the previously builded tool-chain
> building process is all "all automatic" (> 1000 utilities/tools/applications)
> duration is around 5 hours.
> 
> Here is my finding (everything equal beside the glibc binutils version
> (kernel-5.10.13))
> glibc     binutils
> 2.32       2.35.1 compilation successful all the way
> 2.33       2.36.1         compilation stop at kernel (segmentation fault)
>   kernel is among the  last components to be
> build
> 2.33      2.35.1  webkitgtk (2.30.4) compilation error,
> compilation sequence
>   make webkitgtk to be compiled before
> kernel.  
>   (but manual request to compile kernel is
> successful)
> 2.32       2.36.1 segmentation fault on kernel compilation
> (manual request)
> 
> Manual request about kernel, mean I didn't wait for all packages
> to be compiled but building context is good enough to have 
> kernel compilation to be successful.
> 
> At first, I beleived only binutils-2.36.1 was the problem, seems
> interaction between glibc+binutils are subtle.

Re: [lfs-support] Compiling M4 on GCC 10.2

2021-02-10 Thread Xi Ruoyao
On 2021-02-10 14:16 +0100, Viktor Engelmann wrote:
> Am 09.02.2021 um 16:46 schrieb Xi Ruoyao:
> > On 2021-02-09 16:11 +0100, Viktor Engelmann wrote:
> > > Hello everyone,
> > > 
> > > I'm building LFS 10.0 on a fully updated Manjaro Linux on an x86_64 for
> > > x86_64.
> > > 
> > > When I compile M4 (chapter 6.2), I get two errors:
> > > 
> > >  - gcc complains about a void function ("fault_handler") being declared
> > > as "pure" in line 146 of m4.c
> > >  - gcc complains about the flag -Wabi which is deprecated and doesn't do
> > > anything
> > > 
> > > (see the attached log file)
> > > 
> > > I was able to circumvent the problems by setting the environment variable
> > > CFLAGS=" -fpermissive -Wabi=11 " before ./configure, but I think that
> > > these are infact bugs
> > > in M4, so gcc is rightfully complaining.
> > > 
> > > It seems that an older gcc version had failed if that function was NOT
> > > declared "pure"
> > > and the M4 team has also discussed this topic in july 2020, see
> > > https://lists.gnu.org/archive/cgi-bin/namazu.cgi?query=fault_handler&submit=Search%21&idxname=bug-m4&max=20&result=normal&sort=score
> > > they had also decided to make the function NOT "pure" (because
> > > fault_handler has sideeffects
> > > and should therefore not be pure). This was implemented by commit
> > > 74915227e245c2f93d0db1ff3c53544d8f594dfa in the m4 git repository, but
> > > the declaration
> > > is still present in the .tar.xz from 2016 on http://ftp.gnu.org/gnu/m4/
> > > that is used in LFS.
> > > 
> > > I verified that LFS and LFS_TGT are set and that I'm compiling with
> > > x86_64-lfs-linux-gnu-gcc.
> > > Everything before M4 was built as regular user.
> > Those warnings should not be enabled by default.
> > 
> > Is your M4 tarball has the same MD5 checksum in the book?  Or did you use
> > some
> > configure options not mentioned by the book?
> 
> Yes, I have compared all the MD5 sums. I followed the book very closely
> and I have just compared my scripts to the book again and rebuilt again.
> Everything else from chapter 5 and 6 worked fine.
> 
> The only thing I can think of that I (might) have done differently is
> that I deleted the gcc-10.2.0 directory between building gcc and
> libstdc++. The book doesn't explicitly say whether you should do that
> and my script deletes target-directories before untaring to prevent
> conflicts with previous builds (so the gcc directory is deleted because
> libstdc++ is extracted to the same directory as gcc, because it comes
> from the same tarball)

It should be deleted.

> In the end, the function /is/ declared as pure and that /is/ logically
> wrong, so it's correct of gcc to at least issue a warning. A warning is
> also arguable when you pass a deprecated parameter such as -Wabi. It
> seems that the warnings are turned into errors because -Werror is also
> passed somewhere - I'm still looking into where that happens. But I
> would argue that you should use -Werror whenever possible to avoid
> unwanted results as much as possible.

It's too idealistic.  Warnings like -Wmaybe-uninitialized produce false
positives by their nature.  And using -Werror in a release tarball makes a bomb
which explodes if the users have a different compiler, or use some custom
CFLAGS.

In your build the configuration process somehow "--enable-gcc-warnings" is
enabled.  It's intended for developers only and should not be enabled by default
in a release.

Could you attach your config.log of M4 here?
-- 
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] Compiling M4 on GCC 10.2

2021-02-09 Thread Xi Ruoyao
On 2021-02-09 16:11 +0100, Viktor Engelmann wrote:
> Hello everyone,
> 
> I'm building LFS 10.0 on a fully updated Manjaro Linux on an x86_64 for
> x86_64.
> 
> When I compile M4 (chapter 6.2), I get two errors:
> 
>  - gcc complains about a void function ("fault_handler") being declared
> as "pure" in line 146 of m4.c
>  - gcc complains about the flag -Wabi which is deprecated and doesn't do
> anything
> 
> (see the attached log file)
> 
> I was able to circumvent the problems by setting the environment variable
> CFLAGS=" -fpermissive -Wabi=11 " before ./configure, but I think that
> these are infact bugs
> in M4, so gcc is rightfully complaining.
> 
> It seems that an older gcc version had failed if that function was NOT
> declared "pure"
> and the M4 team has also discussed this topic in july 2020, see
> https://lists.gnu.org/archive/cgi-bin/namazu.cgi?query=fault_handler&submit=Search%21&idxname=bug-m4&max=20&result=normal&sort=score
> they had also decided to make the function NOT "pure" (because
> fault_handler has sideeffects
> and should therefore not be pure). This was implemented by commit
> 74915227e245c2f93d0db1ff3c53544d8f594dfa in the m4 git repository, but
> the declaration
> is still present in the .tar.xz from 2016 on http://ftp.gnu.org/gnu/m4/
> that is used in LFS.
> 
> I verified that LFS and LFS_TGT are set and that I'm compiling with
> x86_64-lfs-linux-gnu-gcc.
> Everything before M4 was built as regular user.

Those warnings should not be enabled by default.

Is your M4 tarball has the same MD5 checksum in the book?  Or did you use some
configure options not mentioned by the book?
-- 
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] Compile error glibc2.33

2021-02-07 Thread Xi Ruoyao
On 2021-02-07 18:43 +, Ken Moffat wrote:
> On Sat, Feb 06, 2021 at 10:46:18PM +0800, Xi Ruoyao wrote:
> > On 2021-02-06 14:56 +0100, Frans de Boer wrote:
> 
> > > No, the tests do not stop because I use the 'make -k' option. But can't 
> > > run anything afterwards because of this error.
> > > BTW, I just tried the --with-cpu=amdfam10 to configure. It halts stating 
> > > that this "subspecies" is not supported.
> > > 
> > > So, it seems that the glibc dev where playing god and decided that 
> > > anything less then the newest processors should have no means to exist 
> > > anymore. So, I stick for now with the glib-2.32 version and continue
> > > later.
> > > Maybe someone will figure out how to get rid of this absurd ISA level 
> > > check, blocking millions to billions of systems from future updates!!
> > 
> > Don't assume the upstream is trying to "fight against you".
> > 
> > It's now reported and the upstream is trying to find a solution:
> > https://sourceware.org/bugzilla/show_bug.cgi?id=27318
> > 
> > For now the best workaround seems "don't use -march".
> 
> It's a shame that the thread on bug 27318 seems to have ground to a
> halt last Wednesday, at
> https://sourceware.org/pipermail/libc-alpha/2021-February/122280.html
> 
> Quoting from Florian Weimer at the end of the thread.
> 
> > It's not correct due to the way the check is implemented: failing to
> > load -march=sandybridge binaries on Sandybridge CPUs is clearly wrong.
> [...]
> > If you want checks, doing them against an incorrect ABI level that can
> > never fully match the host CPU is wrong.
> 
> He then goes on to sketch an alternative approach, which sounds as
> if it will need a significant rewrite of what was posted.
> 
> Earlier in the thread,
> https://sourceware.org/pipermail/libc-alpha/2021-February/122290.html
> Joeseph Myers wrote (replying to HJL)
> 
> > That's bad.  Since glibc supports execution on Sandy Bridge processors, 
> > compilation with -march=sandybridge should (a) work, with no special 
> > configure options needed and (b) produce a glibc that works on Sandy 
> > Bridge, with no special configure options needed.  I understand that bug 
> > 27318 is reporting that (b) fails at present.  We need to fix (b) without 
> > breaking (a).
> > 
> > This is not specific at all to x86_64.  It applies to all architectures 
> > and processors supported by glibc: compiling with a compiler that defaults 
> > to any such processor should just work, regardless of how that processor 
> > relates to particular ISA levels in the glibc-hwcaps machinery.
> > 
> > > We can add a configure option, --disable-isa-level, to unset
> > > INCLUDE_X86_ISA_LEVEL.  The resulting libc.so doesn't have a marker
> > > and won't run on all machines.
> > 
> > No special configure option should be needed for (a) and (b) to hold.  
> > They are general principles for any processor supported by glibc, for any 
> > architecture.
> 
> 
> To me, this sounds as if the current binutils releases are a severe
> regression in that what was supposed to help better optimization
> prevents use of the minimal "build for this specific variant"
> option.
> 
> On LFS we do not need the new hwcapabilities (which appears to be a
> framework for letting distros ship alternate binary versions of some
> of the libs optimized for different hardware versions).
> 
> I'm not entirely convinced that I'm going to use current binutils on
> my own machines if it can't use sensible -march= on the older ones.

Hi Ken,

Binutils (assembler "as" and linker "ld") doesn't set ISA "needed" markers by
default.  It can be set using special linker option "-z x86-64-v[234]", or
assembly pesudo instructions.

In glibc building process, crt1.o sets its ISA markers by inline assembly.  Then
its ISA marker just "propagates" to all over the system since most programs link
to it.

So the problem is on Glibc side, not Binutils side.
-- 
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] Compile error glibc2.33

2021-02-06 Thread Xi Ruoyao
On 2021-02-06 15:51 +0100, Frans de Boer wrote:
> On 06/02/2021 15:46, Xi Ruoyao wrote:
> > On 2021-02-06 14:56 +0100, Frans de Boer wrote:
> > > On 06/02/2021 14:34, Pierre Labastie wrote:
> > > > On Sat, 2021-02-06 at 13:43 +0100, Frans de Boer wrote:
> > > > > On 05/02/2021 21:35, Pierre Labastie wrote:
> > > > > > On Fri, 2021-02-05 at 20:54 +0100, Frans de Boer wrote:
> > > > > > > On 05/02/2021 20:16, Frans de Boer wrote:
> > > > > > >     
> > > > > > > >     
> > > > > > > > On 05/02/2021 16:25, xry...@mengyan1223.wang wrote:
> > > > > > > >     
> > > > > > > > >     
> > > > > > > > > Hi Frans,
> > > > > > > > > 
> > > > > > > > > Could you send the result of
> > > > > > > > > 
> > > > > > > > > $LFS_TGT-readelf -a $LFS/lib/libc.so.6 | grep ISA
> > > > > > > > > 
> > > > > > > The line '$LFS_TGT-readelf -a $LFS/lib/libc.so.6 | grep ISA'
> > > > > > > returns
> > > > > > > nothing.
> > > > > > You need to use readelf from binutils 2.36. If you have back up to
> > > > > > 2.35.1, it returns nothing.
> > > > > > 
> > > > > > Pierre
> > > > > > 
> > > > > Okay, I have recompiled ch5, ch6 and ch7 as well as up to and
> > > > > including
> > > > > glibc-2.33 and using binutils-2.36.
> > > > > Attached is the result of that latest config.log (ch8). Other results
> > > > > are found in previous messages.
> > > > > 
> > > > > Also, the output of readelf in ch8:
> > > > >   Properties: x86 ISA needed: x86-64-baseline, x86-64-v2, x86-64-
> > > > > v3
> > > > >     x86 ISA used: x86-64-baseline, x86-64-v2, x86-64-v3, x86-64-v4
> > > > AFAICT, no one among the editors have the first line. Only baseline is
> > > > "needed", not v2 nor v3, although we have more recent CPUs. I cannot
> > > > tell how this "needed" line is determined, but I see in config.log you
> > > > have -march=native. Maybe you could try without any CFLAGS, and check
> > > > that you do not have the v2 and v3 in "needed".
> > > > 
> > > > BTW, you say you have the warning, but it does not stop the build does
> > > > it? Everyone seems to have the warning in a couple of tests in binutils
> > > > chapter 8 (ld tests).
> > > > > with as contrast to the ch5 output:
> > > > >  Properties: x86 ISA needed: x86-64-baseline
> > > > >     x86 ISA used: x86-64-baseline, x86-64-v2, x86-64-v3, x86-64-v4
> > > > > 
> > > > > However, still getting the next message during testing.
> > > > > '/sources-base/glibc-2.33/glibc-build/libc.so.6: CPU ISA level is
> > > > > lower
> > > > > than required'
> > > > > 
> > > > > After the tests and install, I get the ISA message with everything I
> > > > > do.
> > > > > Maybe the x86_64-baseline is not the original baseline anymore,
> > > > > thereby
> > > > > making my processor and many others obsolete according to the glibc
> > > > > devs?
> > > > > Maybe adding --with-CPU to the configuration might help?
> > > > Well, as said above, try without flags. Then you could add them one by
> > > > one...
> > > > 
> > > > Pierre
> > > > 
> > > No, the tests do not stop because I use the 'make -k' option. But can't
> > > run anything afterwards because of this error.
> > > BTW, I just tried the --with-cpu=amdfam10 to configure. It halts stating
> > > that this "subspecies" is not supported.
> > > 
> > > So, it seems that the glibc dev where playing god and decided that
> > > anything less then the newest processors should have no means to exist
> > > anymore. So, I stick for now with the glib-2.32 version and continue
> > > later.
> > > Maybe someone will figure out how to get rid of this absurd ISA level
> > > check, blocking millions to billions of systems from future updates!!
> > Don't assume the upstream is trying to "fight against you&qu

Re: [lfs-support] Compile error glibc2.33

2021-02-06 Thread Xi Ruoyao
On 2021-02-06 14:56 +0100, Frans de Boer wrote:
> On 06/02/2021 14:34, Pierre Labastie wrote:
> > On Sat, 2021-02-06 at 13:43 +0100, Frans de Boer wrote:
> > > On 05/02/2021 21:35, Pierre Labastie wrote:
> > > > On Fri, 2021-02-05 at 20:54 +0100, Frans de Boer wrote:
> > > > > On 05/02/2021 20:16, Frans de Boer wrote:
> > > > >    
> > > > > >    
> > > > > > On 05/02/2021 16:25, xry...@mengyan1223.wang wrote:
> > > > > >    
> > > > > > >    
> > > > > > > Hi Frans,
> > > > > > > 
> > > > > > > Could you send the result of
> > > > > > > 
> > > > > > > $LFS_TGT-readelf -a $LFS/lib/libc.so.6 | grep ISA
> > > > > > > 
> > > > >    The line '$LFS_TGT-readelf -a $LFS/lib/libc.so.6 | grep ISA'
> > > > > returns
> > > > > nothing.
> > > > You need to use readelf from binutils 2.36. If you have back up to
> > > > 2.35.1, it returns nothing.
> > > > 
> > > > Pierre
> > > > 
> > > Okay, I have recompiled ch5, ch6 and ch7 as well as up to and
> > > including
> > > glibc-2.33 and using binutils-2.36.
> > > Attached is the result of that latest config.log (ch8). Other results
> > > are found in previous messages.
> > > 
> > > Also, the output of readelf in ch8:
> > >  Properties: x86 ISA needed: x86-64-baseline, x86-64-v2, x86-64-v3
> > >    x86 ISA used: x86-64-baseline, x86-64-v2, x86-64-v3, x86-64-v4
> > AFAICT, no one among the editors have the first line. Only baseline is
> > "needed", not v2 nor v3, although we have more recent CPUs. I cannot
> > tell how this "needed" line is determined, but I see in config.log you
> > have -march=native. Maybe you could try without any CFLAGS, and check
> > that you do not have the v2 and v3 in "needed".
> > 
> > BTW, you say you have the warning, but it does not stop the build does
> > it? Everyone seems to have the warning in a couple of tests in binutils
> > chapter 8 (ld tests).
> > > with as contrast to the ch5 output:
> > >     Properties: x86 ISA needed: x86-64-baseline
> > >    x86 ISA used: x86-64-baseline, x86-64-v2, x86-64-v3, x86-64-v4
> > > 
> > > However, still getting the next message during testing.
> > > '/sources-base/glibc-2.33/glibc-build/libc.so.6: CPU ISA level is
> > > lower
> > > than required'
> > > 
> > > After the tests and install, I get the ISA message with everything I
> > > do.
> > > Maybe the x86_64-baseline is not the original baseline anymore,
> > > thereby
> > > making my processor and many others obsolete according to the glibc
> > > devs?
> > > Maybe adding --with-CPU to the configuration might help?
> > Well, as said above, try without flags. Then you could add them one by
> > one...
> > 
> > Pierre
> > 
> No, the tests do not stop because I use the 'make -k' option. But can't 
> run anything afterwards because of this error.
> BTW, I just tried the --with-cpu=amdfam10 to configure. It halts stating 
> that this "subspecies" is not supported.
> 
> So, it seems that the glibc dev where playing god and decided that 
> anything less then the newest processors should have no means to exist 
> anymore. So, I stick for now with the glib-2.32 version and continue later.
> Maybe someone will figure out how to get rid of this absurd ISA level 
> check, blocking millions to billions of systems from future updates!!

Don't assume the upstream is trying to "fight against you".

It's now reported and the upstream is trying to find a solution:
https://sourceware.org/bugzilla/show_bug.cgi?id=27318

For now the best workaround seems "don't use -march".
-- 
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] Compile file 5.39 (dev)

2021-02-04 Thread Xi Ruoyao
On 2021-02-04 15:19 -0600, Bruce Dubbs wrote:
> I am OK with the changes to omit seccomp, but when building on an LFS 
> 10.0 system, there were no problems before.

Hi Bruce,

On LFS/BLFS if libseccomp.so is installed, /usr/include/seccomp.h would be also
installed.  But on many commerical distros (Debian or Fedora) libseccomp.so is
in "libseccomp" package, but the header is in "libseccomp-devel" package.  So
someone may install "libseccomp", but not "libseccomp-devel".

And, File building system is so stupid that if libseccomp.so exists, it will use
libseccomp anyway.  Then the build will fail because it can't find the header.
-- 
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] Compile file 5.39 (dev)

2021-02-04 Thread Xi Ruoyao
On 2021-02-04 15:14 +0100, Frans de Boer wrote:
> The new instructions for compiling file-5.39 in the first phase, are 
> incomplete. As it turns out, you can only compile file when the 
> configure command is augmented with '--disable-libseccomp'. The file 
> $LFS/usr/include/libseccomp/seccomp.h does not exist yet, cause to halt 
> compilation with the message that seccomp.h is missing.

Fixed at r12125.  Thanks for the report.
-- 
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] Problem with systemd and network.

2021-01-26 Thread Xi Ruoyao
On 2021-01-26 21:26 +0100, Frans de Boer wrote:
> On 25/01/2021 15:30, Frans de Boer wrote:
> > LS,
> > 
> > If have a problem with systemd and network. journalctl reports 
> > "systemd-networkd.service: Failed to determine user credentials: No 
> > such process"
> > 
> > I have searched internet but found only older references to this 
> > message, however, this in relation to other units.
> > 
> > I use the settings as given in the latest development sections.
> > 
> > Any suggestions?
> > 
> > --- Frans.
> > 
> > 
> Some extra info: The LFS system is started using QEMU/KVM from an image. 
> Prior to LFS 10, this worked fine. Currently not anymore. Starting LFS - 
> again using QEMU/KVM - without systemd is no problem, as well as other 
> VM's running Windows.
> 
> Hope to receive some pointer(s).

Check if you misused /etc/passwd in sysv book.
-- 
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] Cannot rebuild GMP-6.1.2

2021-01-21 Thread Xi Ruoyao
Hi Pol,

At first I have to say that I don't know much about PowerPC.  My LFS experience
are all on x86_64 and mips64el.

On 2021-01-21 13:21 +0100, Pol Vangheluwe wrote:

> Finally, it looked like adding the “Future Domain 16xx SCSI/AHA-2920A support”
> was a hit.  The boot process continues, but gets an exception a bit further
> and falls in the monitor.
> At this point, I got stuck.  I tried several other kernel configuration
> options, even tried booting with INITRAMFS, but never came beyond the kernel
> exception trap.
> 
> Then I thought that rebuilding GMP might help.  The CPUs are not 100%
> identical, so GMP was probably optimised for the iMac-G3, but not for the
> PowerMac-G3.

I don't think rebuilding GMP would help booting.  The kernel doesn't use GMP,
and "basic" system packages (I mean the packages used in booting process) don't
use GMP, too.

On the other hand, GCC uses GMP so it may malfunction after switching the CPU.

> However I got this configuration error:
> 
> checking C++ compiler g++  -m32 -O2 -pedantic -mcpu=750... no, std iostream
> checking C++ compiler g++  -g -O2... no, std iostream
> configure: error: C++ compiler not available, see config.log for details
> 
> and in config.log:

/* snip */

> Test compile: std iostream
> configure:10621: g++  -g -O2 conftest.cc >&5
> In file included from /usr/include/c++/7.3.0/ext/string_conversions.h:41:0,
>                  from /usr/include/c++/7.3.0/bits/basic_string.h:6349,
>                  from /usr/include/c++/7.3.0/string:52,
>                  from /usr/include/c++/7.3.0/bits/locale_classes.h:40,
>                  from /usr/include/c++/7.3.0/bits/ios_base.h:41,
>                  from /usr/include/c++/7.3.0/ios:42,
>                  from /usr/include/c++/7.3.0/ostream:38,
>                  from /usr/include/c++/7.3.0/iostream:39,
>                  from conftest.cc:3:
> /usr/include/c++/7.3.0/cstdlib:75:15: fatal error: stdlib.h: No such file or
> directory
>  #include_next 
>                ^~
> compilation terminated.
> configure:10624: $? = 1
> failed program was:
> /* This test rejects g++ 2.7.2 which doesn't have , only a
>     pre-standard iostream.h. */
> #include 
> 
> /* This test rejects OSF 5.1 Compaq C++ in its default pre-standard iostream
>    mode, since that mode puts cout in the global namespace, not "std".  */
> void someoutput (void) { std::cout << 123; }
> 
> int main (void) { return 0; }
> configure:10650: result: no, std iostream
> configure:10666: error: C++ compiler not available, see config.log for details
> 
> while stdlin.h seems to exist (on both machines):
> 
> root [ /sources/gmp-6.1.2 ]# locate stdlib.h
> /home/pol/freetype-2.8/include/freetype/config/ftstdlib.h
> /sources/blfs/cpio-2.12/gnu/stdlib.h
> /sources/linux-4.15.7/arch/powerpc/boot/stdlib.h
> /usr/include/bash/include/ansi_stdlib.h
> /usr/include/bits/stdlib.h
> /usr/include/c++/7.3.0/stdlib.h
> /usr/include/c++/7.3.0/tr1/stdlib.h
> /usr/include/freetype2/freetype/config/ftstdlib.h
> /usr/include/stdlib.h
> /usr/share/doc/python-3.6.2/html/tutorial/stdlib.html
> /usr/share/doc/python-3.6.4/html/tutorial/stdlib.html
> 
> I went back to the iMac, tried rebuilding GMP there, and got exactly the same
> configuration error.
> Now my question: why can’t I recompile GMP-6.1.2?  I did it successfully back
> in 2018, when I built LFS-8.1.

Well the problem is "facsinating" (I mean, troubling).

Could you try

  echo "" | cpp -v

And check the output?  It should contains lines like

> #include "..." search starts here:
> #include <...> search starts here:
>  /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include
>  /usr/local/include
>  /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include-fixed
>  /usr/include

Of course your output shouldn't contain x86_64 :).  Just check if /usr/include
is there.
-- 
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] Ncurses install 6.3.1 error in "tic" program build

2021-01-15 Thread Xi Ruoyao
On 2021-01-15 17:44 +0100, coolnodje wrote:
> Many thanks! I wasn't aware of the creation of the config.log
> 
> I was looking at the configure file itself trying to figure out what
> would have gone wrong.
> 
> In this case the error seems pretty clear: option -V doesn't seem to be
> supported by gcc-10.2.1

It's wrong.  The script just tests -V for compatibility with other C compilers.

> configure:1737: checking for C compiler default output
> configure:1740: gcc    conftest.c  >&5
> /usr/bin/ld: cannot find Scrt1.o: No such file or directory
> /usr/bin/ld: cannot find crti.o: No such file or directory
> collect2: error: ld returned 1 exit status

The problem is here.

Try to find out why "gcc" can't compile a program.
-- 
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] lfs-uefi

2020-11-04 Thread Xi Ruoyao
On 2020-11-04 18:44 +0100, Alexey Orishko wrote:
> Hi all,
> 
> In lfs-uefi.txt (hints) file it was mentioned that before entering chroot one
> has to check if host is booted in uefi mode.
> Could someone clarify if build must be done on the same pc where lfs would be
> used?
> i.e. could I build lfs on my "legacy mode" desktop to be used on uefi laptop?

Anyway (using legacy or efi) you'll have to run grub-install on your machine
which will run LFS, in this case your laptop.
-- 
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] uefi on LFS 10.0-systemd

2020-09-13 Thread Xi Ruoyao
On 2020-09-13 23:06 -0700, donLouis wrote:
> For anyone out there into uefi, I recently finished up lfs 10. I used
> the existing hint, with evivar-37 and efibootmgr-16.
> 
> During the evivar-37 build, I used the gcc_9-1 patch, and got this;
> 
> gcc -O2 -flto -g3 -I/sources/uefi/efivar-37/src/include/   -
> specs=/sources/uefi/efivar-37/gcc.specs  -L.   -Wl,-z,muldefs  -
> shared \
>   -Wl,-soname,libefivar.so.1 \
>   -Wl,--version-script=libefivar.map \
>   -o libefivar.so dp.o dp-acpi.o dp-hw.o dp-media.o dp-message.o
> efivarfs.o error.o export.o guid.o guids.o guid-symbols.o lib.o vars.o
> -ldl 
> /tmp/cc9W3may.s: Assembler messages:
> /tmp/cc9W3may.s: Error: invalid attempt to declare external version
> name as default in symbol `efi_set_variable@@LIBEFIVAR_0.24'
> lto-wrapper: fatal error: gcc returned 1 exit status
> compilation terminated.
> /usr/bin/ld: error: lto-wrapper failed
> collect2: error: ld returned 1 exit status
> make[1]: *** [/sources/uefi/efivar-37/Make.rules:20: libefivar.so]
> Error 1
> make[1]: Leaving directory '/sources/uefi/efivar-37/src'
> make: *** [Makefile:14: all] Error 2
> 
> I checked the github for efivar-37 and found issue #156;
> 
> https://github.com/rhboot/efivar/issues/156
> 
> The build completed with this additional patch. I didn't encounter any
> issues with efibootmgr-16.

Confirmed.  Fixed at hints r1162 by overriding CFLAGS and stop to use LTO.

It's a typical example of gcc PR 48200:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48200
-- 
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] LFS-BOOK-10.0-systemd

2020-09-03 Thread Xi Ruoyao
On 2020-09-03 17:16 -0500, jam wrote:
> Hi
> 
> I'm attempting an LFS 10.0 systemd build.
> 
> I am building on an X86_64 system running Fedora32 (kernel 
> 5.8.4-200.fc32.x86_64)
>
> version-check.sh output:
> 
> bash, version 5.0.17(1)-release
> /bin/sh -> /usr/bin/bash
> Binutils: version 2.34-4.fc32
> bison (GNU Bison) 3.5
> yacc is /usr/bin/yacc - 1.9 20191125
> bzip2,  Version 1.0.8, 13-Jul-2019.
> Coreutils:  8.32
> diff (GNU diffutils) 3.7
> find (GNU findutils) 4.7.0
> GNU Awk 5.0.1, API: 3.0 (GNU MPFR 4.0.2-p9, GNU MP 6.1.2)
> /usr/bin/awk -> /usr/bin/gawk
> gcc (GCC) 10.2.1 20200723 (Red Hat 10.2.1-1)
> g++ (GCC) 10.2.1 20200723 (Red Hat 10.2.1-1)
> (GNU libc) 2.31
> grep (GNU grep) 3.3
> gzip 1.10
> Linux version 5.8.4-200.fc32.x86_64 
> (mockbu...@bkernel01.iad2.fedoraproject.org) (gcc (GCC) 10.2.1 20200723 
> (Red Hat 10.2.1-1), GNU ld version 2.34-4.fc32) #1 SMP Wed Aug 26 
> 22:28:08 UTC 2020
> m4 (GNU M4) 1.4.18
> GNU Make 4.2.1
> GNU patch 2.7.6
> Perl version='5.30.3';
> Python 3.8.5
> sed (GNU sed) 4.5
> tar (GNU tar) 1.32
> texi2any (GNU texinfo) 6.7
> xz (XZ Utils) 5.2.5
> g++ compilation OK
> 
> --
> 
> I encountered my only problem so far on page 52 with the sanity check 
> compilation of the dummy.c program ( After the build of Glibc-2.3.2)
> 
> The output from the compile attempt:
> 
> fs:~$ $LFS_TGT-gcc dummy.c
> /mnt/lfs/tools/lib/gcc/x86_64-lfs-linux-gnu/10.2.0/../../../../x86_64-lfs-
> linux-gnu/bin/ld: 
> cannot find crt1.o: No such file or directory
> /mnt/lfs/tools/lib/gcc/x86_64-lfs-linux-gnu/10.2.0/../../../../x86_64-lfs-
> linux-gnu/bin/ld: 
> cannot find crti.o: No such file or directory
> collect2: error: ld returned 1 exit status
> 
> Checking the search Path of ld:
> 
> lfs:/mnt/lfs/lib$ $LFS_TGT-ld --verbose | grep SEARCH
> SEARCH_DIR("=/mnt/lfs/tools/x86_64-lfs-linux-gnu/lib64"); 
> SEARCH_DIR("=/usr/local/lib64"); SEARCH_DIR("=/lib64"); 
> SEARCH_DIR("=/usr/lib64"); 
> SEARCH_DIR("=/mnt/lfs/tools/x86_64-lfs-linux-gnu/lib"); 
> SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); 
> SEARCH_DIR("=/usr/lib");crt1.o
> 
> There are only 2 lfs directories nether of which contain  crt1.o or crti.o

"=/usr/lib" is a lfs directory.  "=" is replaced by sysroot prefix, which is set
with "--with-sysroot=$LFS" in Ch. 5 Binutils.

And, "SEARCH_DIR" has nothing to do finding crt1.o.  It's only the library
search path, not the path to crt1.o.  The path to crt1.o should be hardcoded in
gcc, and passed to ld by gcc.

> I did find these files located in /mnt/lfs/usr/lib/

They should be in /mnt/lfs/usr/lib, not other directories.

> I then copied these files from /mnt/lfs/usr/lib/  to 
> /mnt/lfs/tools/x86_64-lfs-linux-gnu/lib  and attempted the re-compile 
> and it worked !
> 
> lfs:~$ $LFS_TGT-gcc dummy.c
> 
> lfs:~$ readelf -l a.out | grep '/ld-linux'
>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]

Don't messing around. These "hotfixes" can break the system later.  Go back and
try to figure out what is wrong.

> My question is what am I doing wrong ??

I guess you forgot --with-sysroot in Ch. 5 GCC.  But it's only my guess.  I
suggest to redo Ch. 5 carefully, saving the build logs, like

mkdir -pv $LFS/sources/buildlog
../configure ... 2>&1 | tee $LFS/sources/buildlog/binutils-configure.log
make 2>&1 | tee $LFS/sources/buildlog/binutils-make.log
... ...

If you encounter the same issue again, you can upload the logs somewhere (they
are large so email attachment may not work), and let us to investigate.
-- 
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] I want to translate this project!

2020-06-26 Thread Xi Ruoyao
Please do not send duplicate mails.  Sometimes LFS mail list server responds
slowly, just wait.

On 2020-06-27 15:05 +0900, jamie kim wrote:
> Hello all!
> Thank you very much for creating this useful project.
> I am Korean and love things like Linux or computers and stuff like that.
> 
> While browsing the site, I saw it translated into multiple languages.
> I really like this project so I would like to introduce it to others, too.
> 
> However, as soon as I wrote the readme file, I had a problem.
> I would like to distribute the translation as a pdf file, but I am not sure
> how to modify the English pdf file to Korean. Writing in plain text seems to
> have a problem with the font or layout being broken, making it difficult to
> read. I want to preserve the original shape as much as possible.

1.  Translate the DocBook XML files.  Modify the translated XML files' encoding
to UTF-8 (at their first line).  Also translate general.ent and packages.ent
(containing some English phrases).

You can directly modify the XML files or use some tools like po4a.

Remove the sed containing "xa9" in LFS book Makefile.  It's only for ASCII and
will break UTF-8 characters.

2.  Add a Korean entry in lfs-l10n.xml.  Just copy the example and modify it.

3.  In index.xml, add "lang='ko_KR'" in  label, to use the Korean entry
just created.

4.  Add a stylesheet (in stylesheets/lfs-xsl/pdf/) to specify the font to be
used.

5.  Add a fop configuration file to tell fop how to find the font just
specified.  An example (for Chinese translation):

https://git.mengyan1223.wang/xry111/lfs-book-i18n/src/master/zh_CN/fop.xml

See the fop documentation:

https://xmlgraphics.apache.org/fop/2.1/fonts.html

Then modify the Makefile to add "-c fop.xml" to fop command line.

6.  Modify the Makefile to copy fop.xml and the TTF (OTF may not work, despite
the fop document says OTF is supported) fonts to correct location, relative to
$(RENDERTMP), like:

mkdir -pv $(RENDERTMP)/fonts; cp -v fonts/* $(RENDERTMP)/fonts' -i Makefile

Then it should be able to generate PDF with "make REV=[sysv|systemd] pdf".

> When looking at a translation file from another country, it looked very
> similar to the original, but I had no experience at all, so I hit the wall
> even before the translation started.
> 
> I looked around like groff and various online document editing tools, but I'm
> not sure yet. I would like advice if there is an original file or way I can
> edit.
> 
> Thanks again!
> 
> P.s. I hope you understand my poor English speaking skill. :D
-- 
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] iostream.h missing (dev v10)

2020-06-22 Thread Xi Ruoyao
On 2020-06-22 12:49 +0200, Frans de Boer wrote:
> LS,
> 
> Next issue, while compiling ncurses-6.2 i get the next message:
> 
> x86_64-cross-linux-gnu-g++ -DHAVE_CONFIG_H -I../c++ -I. -I../include 
> -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DNDEBUG -O2 -fPIC -c 
> ../c++/cursesf.cc -o ../obj_s/cursesf.o
> In file included from ../c++/cursesw.h:41,
>   from ../c++/cursesp.h:40,
>   from ../c++/cursesf.h:40,
>   from ../c++/cursesf.cc:36:
> ../c++/etip.h:342:15: fatal error: iostream.h: No such file or directory
>342 | # include 
>|   ^~~~
> compilation terminated.
> 
> ---
> 
> I can't find 'iostream.h' anywhere on my system. However, the file 
> 'iostream' is present on the host as well in the temporary file system.

iostream.h is a pre-ISO header removed from GCC back in 2007.  The code snip in
ncurses code:

#if !((defined(__GNUG__) && defined(__EXCEPTIONS) && (__GNUG__ < 7)) ||
defined(__SUNPRO_CC))
#  if HAVE_IOSTREAM
# include 
# if IOSTREAM_NAMESPACE
using std::cerr;
using std::endl;
# endif
#  else
# include 
#  endif
   extern "C" void exit(int);
#endif

We should have __GNUG__ = 10 (built in g++-pass1), and HAVE_IOSTREAM = 1 (set by
ncurses configure script).  I assume your libstdc++-pass1 was installed into a
wrong location so the configure script could't find , and didn't set
HAVE_IOSTREAM.

Try:

  echo "#include  | x86_64-cross-linux-gnu-g++ -E -x c++ -

to see if  can be found.
-- 
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] Development (v10) LFS

2020-06-20 Thread Xi Ruoyao
On 2020-06-20 20:10 +0200, Frans de Boer wrote:
> Looking at the config.log, I see that libc_cv_slibdir is set to /lib. 
> However, libdir is automatically set to /lib64. I did specified in the 
> past this --libdir, so there was no problem - most likely because lib64 
> was just a link to lib.
> I tried again with adding --libdir=/lib too, instead of assuming that 
> things work automatically. To no avail.
> 
> The only thing what is placed under /usr/lib is the directory getconf.
> 
> I attached the config.log file. Maybe have to include it textually if 
> the attachment is not accepted.

> configure:2009: loading site script /usr/share/site/x86_64-unknown-linux-gnu

I think it's the smoking gun!  If I read the configure script correctly it seems
environment variable CONFIG_SITE is set to this file. But shouldn't it be
cleared by /home/lfs/.bash_profile?  Well it could be set again by
/etc/bash.bashrc, in some distros.  Pity.

We've discussed this in Nov. 2019:
http://lists.linuxfromscratch.org/pipermail/lfs-support/2019-November/053270.html

Frans could you verify or dismiss my theory?  Simply use a "echo $CONFIG_SITE".
I assume your host distro is OpenSUSE (by searching the kernel version string)
and I'll investigate it a little.
-- 
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] Development (v10) LFS

2020-06-20 Thread Xi Ruoyao
On 2020-06-20 13:02 +0200, Frans de Boer wrote:
> On 19-06-2020 22:33, Frans de Boer wrote:
> > On 19-06-2020 22:15, Pierre Labastie wrote:
> > > On Fri, 2020-06-19 at 21:13 +0200, Frans de Boer wrote:
> > > > Dear all,
> > > > 
> > > > I follow every step but always stumble on the '$LFS_TGT-gcc dummy.c'
> > > > -
> > > > in the first glibc.c section - in that crti.o can't be located by ld.
> > > > Looking for crti.o, I find it residing in the $LFS/usr/lib64
> > > > directory.
> > > That's the weird thing, /usr/lib64 shouldn't exist. It's the setting of
> > > libc_cv_slibdir, which prevents that.
> > > 
> > > > So, why can't ld find it?
> > > gcc has been told (with the "case" instruction) to ask ld to look into
> > > /usr/lib, not /usr/lib64.
> > > 
> > > Pierre
> > > 
> > I will check if the sed was successful.
> > 
> > --- Frans.
> > 
> I checked and the result of the sed was as expected. Only glibc creates 
> the usr/lib64 directory.
> 
> In the past the /usr/lib64 directory was a link to /usr/lib. Also, due 
> to experimenting, I also found in the past that for some adaptations I 
> needed to execute next for glibc:
> 
> # When going for a specific architecture, change some literals /lib into 
> /lib64 or /lib32
> #
> if [[ ilibType -eq elibTYPE_LIB && $bldTARCH == "x86_64" ]]; then
> #
> # Change literal /lib64 into /lib with no architecture depended directories
>sed -r -i -e 's@(/lib)64(/ld-linux)@\1\2@' 
> ./sysdeps/unix/sysv/linux/x86_64/ldconfig.h
>sed-i -e 's@6, "/lib64", 6@4, "/lib", 4@' \
>  -e 's@len >= 6 \&\& ! memcmp @len >= 4 \&\& ! memcmp @' 
> ./sysdeps/unix/sysv/linux/x86_64/dl-cache.h
>sed -r -i -e 's@(lib)64@\1@g' 
> ./sysdeps/unix/sysv/linux/x86_64{,/64}/configure{,.ac}
> #  sed-i -e 's@die "ldd execution failed" if $?;@# &@' 
> ./scripts/test-installation.pl
>sed -r -i -e 's@(RTLDLIST=.*\\2)64@\1@' 
> ./sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed
> fi
> ---
> 
> The above (maybe somewhat dated) is an example when NOT having the 
> /usr/lib64 directory, either as link or directory. So, it is clear - so 
> it seems - that we need some more tuning, or revert to having /usr/lib64 
> as just a link.

I don't think so.

The code automatically choose "${exec_prefix}/lib64" is in glibc-
2.31/sysdeps/unix/sysv/linux/x86_64/64/configure.  It's very clear that if
"libc_cv_slibdir" is explicitly set, the code won't be executed.

So I believe you forgot to set "libc_cv_slibdir=/lib", maybe by a typo (like
"libc_cv_libdir=/lib").

> Suggestions?
-- 
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] GCC in chroot not finding libncursesw.so.5

2020-05-29 Thread Xi Ruoyao
On 2020-05-29 15:03 -0600, Flareon Zulu wrote:
> 
> 
> On Wed, May 20, 2020, 11:20 Emanuel Pinho  wrote:
> > I am trying to install LFS9.1. It is the third time I install a LFS version,
> > the first two times I did it, everything ran flawlessly. Indeed, my host
> > system was bulilt with LFS7.5. But this time I am having trouble with the
> > installation of GCC in the chroot environment. Compilation (make)  complains
> > about not finding libncursesw.so.5.
> > 
> > I have tried many different things to get around this error, all of them
> > with no success.
> > 
> > 1) I have tried copying libncursesw.so.5 from the host into /usr/lib and/or
> > /lib.
> > 2) I have tried to go ahead with the compiler installed in tools until I
> > installed ncurses-6.2. In this package I have followed the notes that
> > suggest installation of ncurses version 5 (page 134) and then tried
> > installing gcc.
> > 3) I have tried to cheat the compiler by linking libncursesw.so.5 ->
> > libncurses.so.5.
> > 4)I have tried to use the option without-ncurses in configure.
> > 
> > As I said above, none of this tries have solved the problem. I still get the
> > error:
> > 
> > Making all in po
> > make[4]: Entering directory '/sources/gcc-9.2.0/build/x86_64-pc-linux-
> > gnu/libstdc++-v3/po'
> > msgfmt -o de.mo ../../../../libstdc++-v3/po/de.po
> > msgfmt: error while loading shared libraries: libncursesw.so.5: cannot open
> > shared object file: No such file or directory
> > 
> > when running make.
> > 
> > I have followed the instructions from the book literally up to this point.
> > The only change was using gcc-9.3.0 in tools. The book says it has not been
> > tested. Could it be the cause of this error? By the way, I have tried
> > installing gcc-9.2.0 and gcc-9.3.0 in chroot. Both fail with the same
> > message. I might try recompiling the tools using gcc-9.2.0 again, but as
> > this might be a little time consuming, I would like to hear from you your
> > suggestions or opinions on this.
> > 
> > I am totally stuck here. Could anyone help me?
> > -- 
> > 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
> 
> Wait a minute. Someone remind me: aren't the ncurses libraries supposed to be
> ABI 6 anyway? Why would GCC be looking for the ABI 5 libraries?
> 
> Also, I suggest going back to the ncurses chapter, redoing it, and NOT doing
> the optional section. Then try building GCC again.

I think the reason is ncursesw in Chap. 5 was skipped.  So Chap. 5 gettext links
to host ncursesw (with ABI 5).

I'll update the dependencies section to alert it.
-- 
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] DEV: Text and code do not match

2020-05-29 Thread Xi Ruoyao
On 2020-05-29 16:20 +0200, Pierre Labastie wrote:
> On Fri, 2020-05-29 at 15:45 +0200, Frans de Boer wrote:
> > On 29-05-2020 14:33, Pierre Labastie wrote:
> > > On Fri, 2020-05-29 at 13:34 +0200, Frans de Boer wrote:
> > > > On 28-05-2020 15:08, Pierre Labastie wrote:
> > > > > On Thu, 2020-05-28 at 14:16 +0200, Frans de Boer wrote:
> > > > > > LS,
> > > > > > 
> > > > > > Pierre has described a change "Add a symlink from
> > > > > > /tools/share/locale
> > > > > > to
> > > > > > /usr/share/locale/locale-archive, ..."
> > > > > > 
> > > > > > The code refers to .../lib/locale and /usr/lib/locale is not
> > > > > > created
> > > > > > in 6.5.
> > > > > > 
> > > > > Ooops: will fix this ASAP.
> > > > > 
> > > > > Note that the target of a symlink needs not exist when the
> > > > > symlink
> > > > > is
> > > > > created. This one will be created (when building glibc) before
> > > > > it
> > > > > is
> > > > > used (for bison and man-db tests)...
> > > > > 
> > > > > Pierre
> > > > > 
> > > > Ok, now adjust the text under the heading "Prupose of each link".
> > > > 
> > > It already has ../lib/.. What else do you want? I do not think the
> > > explanation about the non existing target of the link is needed. If
> > > we
> > > start explaining in details each unix command, the book will be
> > > triple
> > > in volume...
> > > 
> > > > Also, when is "/usr/lib/locale/locale-archive" created? It's not
> > > > created
> > > > in the glibc section.
> > > It is. See localedef(1).
> > > 
> > > Pierre
> > > 
> > It's not what I want, but the text under the indicated heading is 
> > (still) not correct. Sorry, it seems that somethings where written in
> > a 
> > hurry.
> > 
> > And no, I don't need an explanation how link (ln) is working. The
> > thing 
> > is that the "locale-archive" is NOT created. Have not seen it
> > anywhere 
> > else also. The only thing that is created additionally is the text
> > file 
> > "locale-alias".
> 
> I already told you it _is_ created!!! Type "man localedef" and search
> "locale-archive"...
> 
> For me, the text tells exactly what happens when building the book:
> - some programs built in chap 5 look for locale information in
> /tools/lib/locale/locale-archive
> - the locale information added after building glibc goes into
> /usr/lib/locale/locale-archive
> - the link allows those chap 5 programs to find locale information
> where it is.
> 
> Maybe the text is too terse, so tell me what you'd like me to add.
> Maybe also, since I'm not an English native speaker, I have an error in
> syntax or word use. I'll be glad to fix it, but I need to be pointed to
> it.

Maybe it should be "the symlink *will* allow those programs to use the locales,
once they are installed in Chapter 6"?

> Regards
> 
> Pierre
> 
-- 
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] SIGFPE not generated by raise

2020-05-26 Thread Xi Ruoyao
On 2020-05-27 00:27 -0500, Bruce Dubbs write:
> On 5/26/20 11:43 PM, Xi Ruoyao wrote:
> > On 2020-05-26 18:17 +0100, Ken Moffat wrote:
> > > I'm trying to discover why two tests in the testsuite for 'check'
> > > always fail for me.  I've now got a response that the tests raise
> > > SIGFPE but do not receive it.  The example is
> > > 
> > > ken@plexi ~/check-debug $cat test.c
> > > #include 
> > > 
> > > #include 
> > > 
> > > 
> > > int main() {
> > > 
> > >printf("Before\n");
> > > 
> > >raise(SIGFPE);
> > > 
> > >printf("After\n");
> > > 
> > >return 0;
> > > 
> > > }
> > > 
> > > followed by gcc test.c ; ./a.out
> > > 
> > > That should terminate on the signal, but for me it doesn't:
> > > 
> > > ken@plexi ~/check-debug $./a.out
> > > Before
> > > After
> > > 
> > > 
> > > However, if I try a division by zero I do get the exception:
> > > 
> > > ken@plexi ~/check-debug $cat divbyzero.c
> > > #include 
> > > 
> > > #include 
> > > 
> > > 
> > > int main() {
> > > 
> > >   int a = 1000;
> > >   int z = 0;
> > >   int result;
> > > 
> > >printf("Before\n");
> > > 
> > >//raise(SIGFPE);
> > >result = a / z;
> > > 
> > >printf("After\n");
> > > 
> > >return result;
> > > 
> > > }
> > > 
> > > gcc -o divbyzero divbyzero.c
> > > 
> > > ken@plexi ~/check-debug $./divbyzero
> > > Before
> > > Floating point exception
> > > 
> > > 
> > > Any clues to how I can find what is causing this breakage, please ?
> > > It seems to happen on all my machines.
> > 
> > If SIGFPE is somehow masked by sigprocmask, this phenomenon would
> > happen.  The
> > SIGFPE raised by raise() will be masked, but the SIGFPE produced by 1/0 is
> > still
> > undefined behavior (on x86_64 Linux normally "as if" a SIGFPE is received).
> > 
> > And, the signal mask set with sigprocmask is inherited during fork() and
> > preserved during exec().  So if your shell or init process masked SIGFPE for
> > some reason (intentionally or mistakenly) this will happen.
> > 
> > Try to examine the signal mask:
> > 
> > #include 
> > #include 
> > 
> > int main()
> > {
> > sigset_t ss;
> > sigprocmask(SIG_BLOCK, NULL, &ss);
> > if (sigismember(&ss, SIGFPE))
> > puts("oops! SIGFPE is masked!");
> > else
> > puts("SIGFPE is not masked.");
> > return 0;
> > }
> 
> Nice code Xi.  When I ran this I got 'SIGFPE is not masked'.  And when I 
> ran Ken's code, I got:
> 
> Before
> Floating point exception
> 
> Ken sometimes does unusual things, but I'll note on 'man 7 signal' there 
> is a section:
> 
> BUGS
> There  are  six signals that can be delivered as a consequence of a 
> hardware exception: SIGBUS, SIGEMT, SIGFPE, SIGILL, SIGSEGV, and 
> SIGTRAP.  Which of these signals is delivered,  for  any  given 
> hardware  exception, is not documented and does not always make
> sense.

That's when these signals are generated by CPU.  But Ken is raising SIGFPE with
raise() so it should be delivered.

> I note that FPE stands for Floating Point Exception, but Ken is doing an 
> integer divide.  It could be a HW architecture issue.

I think the name "floating point exception" is just historical.  On "modern"
x86/x86-64 Linux it's usually caused by integer division by 0.  Ironically
floating division by 0 (1.0 / 0.0) doesn't cause SIGFPE - the result is just
INF.
-- 
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] SIGFPE not generated by raise

2020-05-26 Thread Xi Ruoyao
On 2020-05-26 18:17 +0100, Ken Moffat wrote:
> I'm trying to discover why two tests in the testsuite for 'check'
> always fail for me.  I've now got a response that the tests raise
> SIGFPE but do not receive it.  The example is
> 
> ken@plexi ~/check-debug $cat test.c 
> #include 
> 
> #include 
> 
> 
> int main() {
> 
>   printf("Before\n");
> 
>   raise(SIGFPE);
> 
>   printf("After\n");
> 
>   return 0;
> 
> }
> 
> followed by gcc test.c ; ./a.out
> 
> That should terminate on the signal, but for me it doesn't:
> 
> ken@plexi ~/check-debug $./a.out 
> Before
> After
> 
> 
> However, if I try a division by zero I do get the exception:
> 
> ken@plexi ~/check-debug $cat divbyzero.c 
> #include 
> 
> #include 
> 
> 
> int main() {
> 
>  int a = 1000;
>  int z = 0;
>  int result;
> 
>   printf("Before\n");
> 
>   //raise(SIGFPE);
>   result = a / z;
> 
>   printf("After\n");
> 
>   return result;
> 
> }
> 
> gcc -o divbyzero divbyzero.c
> 
> ken@plexi ~/check-debug $./divbyzero 
> Before
> Floating point exception
> 
> 
> Any clues to how I can find what is causing this breakage, please ?
> It seems to happen on all my machines.

If SIGFPE is somehow masked by sigprocmask, this phenomenon would happen.  The
SIGFPE raised by raise() will be masked, but the SIGFPE produced by 1/0 is still
undefined behavior (on x86_64 Linux normally "as if" a SIGFPE is received).

And, the signal mask set with sigprocmask is inherited during fork() and
preserved during exec().  So if your shell or init process masked SIGFPE for
some reason (intentionally or mistakenly) this will happen.

Try to examine the signal mask:

#include 
#include 

int main()
{
sigset_t ss;
sigprocmask(SIG_BLOCK, NULL, &ss);
if (sigismember(&ss, SIGFPE))
puts("oops! SIGFPE is masked!");
else
puts("SIGFPE is not masked.");
return 0;
}
-- 
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] LFS-Version 9.1-systemd «5.10. GCC-9.2.0 - Pass 2»

2020-05-10 Thread Xi Ruoyao
On 2020-05-10 11:24 +0200, jcarlos wrote:
> Chapter 5. Constructing a Temporary System
> 
> 5.10. GCC-9.2.0 - Pass 2
> 
> Hello friends.
> Does anyone know how I can fix this problem ?:
> 
> lfs@Dbase:/mnt/lfs/sources/gcc-10.1.0$ sed -e '1161 s|^|//|' \-i 
> libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.ccsed:
> 
> can't read 
> libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc: No 
> such file or directory
> 
> lfs@Dbase:/mnt/lfs/sources/gcc-10.1.0$

Why are you using instructions for gcc-9.2.0 to build gcc-10.1.0?
-- 
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] libnotify fails to install

2020-05-02 Thread Xi Ruoyao
On 2020-05-02 13:52 -0400, Bud Rozwood wrote:
> Hi,
> 
> I'm trying to install libnotify but I was having trouble getting passed the
> XML verification. It kept saying :
> 
> FAILED: docs/notification-spec.html
> /usr/bin/xmlto xhtml-nochunks -m /tmp/libnotify-0.7.8/docs/config.xsl -o docs
> ../docs/notification-spec.xml
> xmlto: /tmp/libnotify-0.7.8/build/../docs/notification-spec.xml does not
> validate (status 3)
> xmlto: Fix document syntax or use --skip-validation option
> /tmp/libnotify-0.7.8/build/../docs/notification-spec.xml:2: warning: failed to
> load external entity "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
> "
> cBook XML V4.1.2//EN" "
> http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd";

I can't reproduce this.  It builds OK on my laptop running BLFS, with docbook-
xml-4.5 and docbook-xsl-nons-1.79.2.

And in your log I can see you are using libnotify-7.8, so it should be 
BLFS-9.1. 
9.1 is fully verified before release.

> When I went to that site I've noticed that it had an "https" instead of an
> "http" in the beginning of the address. After changing each "http" to "https"
> for the oasis-open.org sites in /etc/xml/{catalog,docbook} and creating a
> simple patch, I was able to build without any errors. I couldn't find any
> mention of it in the errata but perhaps I've missed something.

It does not make sense.  Many packages reference oasis-open.org with http://
URL.  If we change /etc/xml/{catalog,docbook} like what you did, all of them
will need to be modified.

I think you made some mistake.  Maybe misconfigured docbook-xml-4.5.
-- 
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] Error when compiling GCC9.2.0 on x86_64

2020-04-13 Thread Xi Ruoyao
On 2020-04-13 22:59 -0500, Sudhip Nashi wrote:
> I’m getting a weird error when compiling this package. To be clear, on pass 1
> it’s fine but on pass 2 I get the error. I’m following the LFS 9.1 guide with
> systemd. I’ve put an Imgur link below https://imgur.com/gallery/wLd764J any
> help would be greatly appreciated. Thanks!

Looks like you forgot sect. 5.8.
-- 
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] Is there any runtime dependency on glibc so libs?

2020-04-13 Thread Xi Ruoyao
y previous glibc upgrade attempt where I have
> learned that in order to not brick the system, you have to replace the
> symlinks atomically from a single program that has already loaded glibc
> before changing the symlinks.
> 
> So, I have learned everything about creating a rpm package, how to use
> the rpmrebuild tool and I created rpms with my glibc 2.25 files to
> replace the ones on my system.
> 
> As an extra safety measure, I'm going to test my rpms on a QEMU CentOs
> VM first. After fixing a bunch of rpms dependency issues, my glibc rpm
> finally got installed on my VM, and as soon as the symlinks got
> replaced, every single new executed program started to all terminate
> with SIGSEGV (11).
> 
> Oh boy, I'm so glad to have tested my rpms on a VM before doing it on
> the real system but now, I would like to have some help to find a
> solution to my SIGSEGV issue.
> 
> Again, I have few ideas of things to try out:
> 1. I'm guilty of having built glibc with -march=native -mtune=native
> which translate to sandybridge. My QEMU host is a skylake processor.
> Maybe despite using QEMU switch (-cpu SandyBridge), some unique
> SandyBridge instructions aren't well emulated by QEMU. I'm going to
> rule out this possibility by rebuilding glibc without those evil
> switches and report back my findings if someone in the list tells that
> he would be interested to know.

I don't think so.  It should cause SIGILL instead of SIGSEGV.

> 2. glibc has some runtime dependency that I am not aware of. I did
> notice that bintutils and gcc were generating few so files.
> 
> Does any LFS user/expert knows if glibc libraries needs any
> binutils/gcc libs to work correctly or they are essentially just needed
> for the build?

No, they are not needed by most programs.  I did an experiment:

$ sudo unshare -m
# mount --bind /dev/null /usr/lib/libgcc_s.so.1
# ls
(ls works fine)
# gcc hw.c
# ./a.out
Hello world.

> IOW, if I want to perform a glibc system upgrade, should I proceed
> mandatorily to a binutils/gcc-libs system upgrade first?

Don't do that.  If you really need such an upgrade, upgrade your distribution. 
Porting old applications onto new distribution seems time wasting, but messing
around system glibc (and cheating the distribution package manager) will waste
more time.  Trust me.
-- 
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] su: Cannot drop the controlling terminal - 6.25 GCC

2020-04-12 Thread Xi Ruoyao
On 2020-04-12 22:01 +0800, devin operline wrote:
> Hi there,
> 
> This is my 3rd attempt at getting through LFS for the first time using (Debian
> 10).  It was a fresh install when I made my second attempt.  Then hit this
> error and redid chapters 4, 5 and 6 before failing at the same place.  While
> I'd typed all commands on my 2nd try (for better absorption), I copied and
> pasted all commands this time (3rd) around

I digged up my mail archive for a while.  Douglas said he'd been using Debian 10
as the host to build LFS.  So I think it's not a bug of Debian or LFS book.

> On section 6.25 - GCC, I get the following error on the make check:
> 
> su nobody -s /bin/bash -c "PATH=$PATH make -k check" =>
> su: Cannot drop the controlling terminal 
> 
> commands I've run based on different threads I've found usually referring to
> different sections and/or previous versions of the book (as root, within
> chroot)
> ls -l /tools/bin/bash   =>   -rwxr-xr-x
> 
> ls -l /dev/pts =>  c- 1 root root 5, 2 Apr 12 10:22 ptmx
> 
> tty =>  not a tty
> 
> ldd /bin/bash   =>  linux-vdso.so.1
> libncursesw.so.6 => not found
> libdl.so.2 => /lib/libdl.so.2
> libc.so.6 => /lib/libc.so.6
> /tools/lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
> 
> ls -l /lib/{libreadline,libhistory,libncursesw,libdl,libc,ld}* =>
> -rwxr-xr-x 1 root root  1495440 Apr 11 14:44  /lib/ld-2.31.so
> lrwxrwxrwx 1 root root   10 Apr 11 14:44  /lib/ld-linux-x86-64.so.2 -> ld-
> 2.31.so
> -rwxr-xr-x 1 root root 18445352 Apr 11 14:44  /lib/libc-2.31.so
> lrwxrwxrwx 1 root root   12 Apr 11 14:44  /lib/libc.so.6 -> libc-2.31.so
> -rwxr-xr-x 1 root root   179648 Apr 11 14:43  /lib/libcrypt-2.31.so
> lrwxrwxrwx 1 root root   16 Apr 11 14:44  /lib/libcrypt.so.1 -> libcrypt-
> 2.31.so
> -rwxr-xr-x 1 root root   251248 Apr 11 14:43  /lib/libdl-2.31.so
> lrwxrwxrwx 1 root root   13 Apr 11 14:44  /lib/libdl.so.2 -> libdl-2.31.so
> lrwxrwxrwx 1 root root   17 Apr 11 15:51  /lib/libhistory.so.8 ->
> libhistory.so.8.0
> -rwxr-xr-x 1 root root   174272 Apr 11 15:51  /lib/libhistory.so.8.0
> lrwxrwxrwx 1 root root   18 Apr 11 15:51  /lib/libreadline.so.8 ->
> libreadline.so.8.0
> -rwxr-xr-x 1 root root  1092480 Apr 11 15:51  /lib/libreadline.so.8.0

All these seem OK.

Which version of LFS book are you using?  And what is the output of "version-
check.sh" in sect. 2.2.?
-- 
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] LFS GGC 9.2.0 compiling Error on ARM-System

2020-04-03 Thread Xi Ruoyao
On 2020-04-03 10:25 +0200, 🦁 Martin Wagner wrote:
> Hello,
> 
> creating a new LFS on an ARM (aarch64) System (Rockpro64 with DietPi-
> distribution) stops on compiling GCC in chapter 5.10. (GCC-9.2.0 - Pass 2)
> with an Error 1:
> 
> build/genautomata.o build/rtl.o build/read-rtl.o build/ggc-none.o build/vec.o
> build/min-insn-modes.o build/gensupport.o build/print-rtl.o 
> build/hash-table.o 
> build/sort.o build/read-md.o build/errors.o ../build-aarch64-unknown-linux-
> gnu/libiberty/libiberty.a -lm
> build/genautomata ../../gcc/common.md ../../gcc/config/aarch64/aarch64.md \
> insn-conditions.md > tmp-automata.c
> build/genautomata: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.29' not
> found (required by build/genautomata)
> Makefile:2328: recipe for target 's-automata' failed
> make[2]: *** [s-automata] Error 1
> make[2]: Leaving directory '/mnt/USB_LFS/sources/gcc-9.2.0/build_2/gcc'
> Makefile:4330: recipe for target 'all-gcc' failed
> make[1]: *** [all-gcc] Error 2
> make[1]: Leaving directory '/mnt/USB_LFS/sources/gcc-9.2.0/build_2'
> Makefile:960: recipe for target 'all' failed
> make: *** [all] Error 2
> lfs@DietPi:/mnt/USB_LFS/sources/gcc-9.2.0/build_2$
> 
> 
> This error is independent if I use GlibC 2.31 or 2.29 for compiling.
> 
> The host system itself has libc-2.24/libm-2.24
> 
> build/genautomata: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.29' not
> found (required by build/genautomata)
> Makefile:2328: recipe for target 's-automata' failed
> 
> I'm not shure, why compiling with access to the hostsystem "/lib/aarch64-
> linux-gnu/libm.so.6"?
>  
> 
> Any ideas fixing this ?
> 
> Thank You.

LFS does not support ARM.  You need to adjust the instructions, at least in GCC
(pass1, pass2, and final).  I don't have the hardware so I can't tell how to
adjust.
-- 
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] add fstrim? (was: Re: build time comparison)

2020-03-07 Thread Xi Ruoyao
On 2020-03-07 12:47 +0100, Thomas Seeling wrote:
> Hallo,
> 
> > > I thought that trim stuff was all handled automagically by kernels now.
> > isn't very long since fedora were deciding whether or not fstrim
> > should be automatically enabled in their installer, and my memory
> > says that they went with the systemd service to run it daily.
> 
> fstrim is neither in LFS nor BLFS book. It's a small download from
> sourceforge, latest release from 2010 is 0.2.

fstrim is now a part of LFS package util-linux.  A systemd timer unit is also
shipped so we can tell systemd to run fstrim weekly:

systemctl enable fstrim.timer

For sysvinit I'm not sure how to do this.
-- 
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] LFS 9.1 build gcc stage2 fails

2020-03-03 Thread Xi Ruoyao
On 2020-03-03 10:29 +0100, Thomas Seeling wrote:

> I tried building LFS 9.1 (sysv-init) with jhalfs yesterday. Started ok,
> built binutils and gcc stage1 just fine.

You mean "pass 1" or "stage 1"?

> Then it stops and the final message is that configure aborts because gcc
> cannot create an executable.
> It fails at intl-stage2, calling configure, and the config.log in the
> build-directory tells me that ld cannot find crt1.o.

You mean "stage2-intl"? It does not make sense.  We don't use 3-stage bootstrap
for GCC, by the book.  So we shouldn't see stage2-*.

> Anyone else encountered the same problem? The same jhalfs installation
> could build LFS 9.0 fine some weeks ago.

I once seen "ld can not find crt1.o".  It turned out that I mistyped the sed
command editing gcc/config/i386/t-linux64.
-- 
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] Ld-new. Versus ld-gold

2020-02-28 Thread Xi Ruoyao
On 2020-02-28 10:03 +0100, Pierre Labastie wrote:
> Le 28/02/2020 à 09:53, Xi Ruoyao a écrit :
> > On 2020-02-28 06:47 +, Fred Finster wrote:
> > > I have not studied this ld-new linker.
> > > 
> > > Is "ld-gold" a faster linker to use when building Linux from scratch ,.
> > > Then
> > > "ld-new"
> > 
> > You are misinterpreting the book.  It's ld.bfd versus ld.gold, not ld-new
> > versus
> > ld.gold.  ld-new is a special ld.bfd instance prepared for "adjusting the
> > toolchain".
> > 
> > > What benefit is ld-new over using ld-gold to build Linux from scratch?
> > 
> > It's the default.  /usr/bin/ld is a hardlink to /usr/bin/ld.bfd on most
> > Linux
> > distros, instead of /usr/bin/ld.gold.
> > 
> > > So should ld.new be replaced with ld.gold?
> > 
> > If you mean "should we use ld.gold instead of ld.bfd", my answer is "your
> > distro, your rules".  But if you mean "ld-new", NO.  If you want to use
> > ld.gold
> > you should also prepare something like "ld.gold-new" for "adjusting the
> > toolchain".
> > 
> 
> Also, do not forget that this "ld-new" is only used to build some packages in
> chapter 6 : those between "adjusting the toolchain" and "binutils-2.34". Those
> packages are small, so not likely that ld.gold would bring much.
> 
> I think (not tried) you can remove "--enable-ld=default" from the configure
> options in binutils chapter 6, if you want to use gold as the default linker.
> 
> And to the question of whether it is faster, the answer is "no". It may build
> faster programs, since optimization is better, but it spends more time
> optimizing.

No.  It's not an optimization, but a different linker.  (Someone says) it runs
faster than ld.bfd.  But it does not build faster programs.
-- 
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] Ld-new. Versus ld-gold

2020-02-28 Thread Xi Ruoyao
On 2020-02-28 06:47 +, Fred Finster wrote:
> I have not studied this ld-new linker.
> 
> Is "ld-gold" a faster linker to use when building Linux from scratch ,. Then
> "ld-new"

You are misinterpreting the book.  It's ld.bfd versus ld.gold, not ld-new versus
ld.gold.  ld-new is a special ld.bfd instance prepared for "adjusting the
toolchain".

> What benefit is ld-new over using ld-gold to build Linux from scratch?

It's the default.  /usr/bin/ld is a hardlink to /usr/bin/ld.bfd on most Linux
distros, instead of /usr/bin/ld.gold.

> So should ld.new be replaced with ld.gold?

If you mean "should we use ld.gold instead of ld.bfd", my answer is "your
distro, your rules".  But if you mean "ld-new", NO.  If you want to use ld.gold
you should also prepare something like "ld.gold-new" for "adjusting the
toolchain".
-- 
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] systemd 'Installation of the kernel' - LFS 9.0/development

2020-02-16 Thread Xi Ruoyao
On 2020-02-16 00:38 -0600, Douglas R. Reno wrote:
> I also adjusted the path for the Frame Pointer Unwinder (it is now under 
> "x86 Debugging" in the Kernel Hacking menu). This was done at r11751

Is there any reason we must use this option?  I chosed Orc Unwinder and
everything just continues to working properly now.
-- 
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] Build New Driver after LFS

2020-02-04 Thread Xi Ruoyao
On 2020-02-04 21:44 +0100, Pierre Labastie wrote:
> Le 04/02/2020 à 17:47, Furkan İnciroğlu a écrit :
> > Hi there,
> > 
> > After my LFS-BLFS compilation, I delete all my tools and other build
> > directories. Now, I have to build some driver such as igb and mmc disk
> > driver.
> > When I download igb tar.gz and extract,
>
> Not sure I understand the above. Isn't the igb driver in the kernel tree? Do
> you need to download a separate tarball? If so, I think you should try rather
> the in-tree driver.

I have a motherboard salvaged from an retired server, which has an onboard igb
ethernet chip.  With the in-tree driver only one (out of four) ethernet port is
usable.  But I didn't tried to build the driver from intel.com since I only need
one port...

> somewhere, compile them, then indicate to the out of tree driver where to find
> the sources (or sometimes /usr/src/linux-x-x-x is hardcoded). Look at the
> Makefile, or any file included by Makefile (looks like there is a common.mk
> according to the error messages below, although the "http" part looks
> suspicious).
> 
> I run make install command but it says:
> > common.mk:84 <http://common.mk:84>;: *** Kernel header files not in any of
> > the
> > expected locations.
> > common.mk:85 <http://common.mk:85>;: *** Install the appropriate kernel
> > development package, e.g.
> > common.mk:86 <http://common.mk:86>;: *** kernel-devel, for building kernel
> > modules and try again.  Stop.
> > 

Raw kernel headers from the kernel source (NOT the sanitized headers installed
in LFS) are necessary for compiling out-tree modules.  And, they have to be
recompiled when kernel is rebuilt.  So I just hate out-tree modules...

> Note: I do not think you need to start again from scratch.
> 
> Pierre
-- 
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] Glibc2.30 1st pass failed: 'time' alias in time.c

2020-01-26 Thread Xi Ruoyao
On 2020-01-26 13:13 -0600, Bruce Dubbs wrote:
> On 1/26/20 12:41 PM, Flareon wrote:
> > On January 26, 2020, at 04:10, Xi Ruoyao  wrote:
> > 
> >  >On 2020-01-26 15:13 +0530, Sourabh Sagar wrote:
> >  >> One thread recommend use of '-Wno-attribute-alias' ... when using it 
> > glibc2.30
> >  >> compiled successfully(in a separate sub-directory)...
> >  >Don't reference those articles telling how to build Glibc on a 
> > complete system.
> >  >LFS has a different way.
> >  >> but testing newly built toolchain against dummy.c(as in glibc2.30 
> > 1st pass
> >  >> article) via `$LFS_TGT-gcc dummy.c`
> >  >>
> >  >> a new error appears stating expansion of $LFS_TGT-gcc  not found in
> >  >> $LFS/tools/bin.
> >  >We shouldn't continue blindly if any error is encountered.  Without 
> > $LFS_TGT-gcc
> >  >glibc would be built with host GCC.  That does not make any sense (in 
> > LFS).
> >  >--
> >  >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
> > 
> > So, your summary is thus:
> > 
> > Fix where /bin/sh points
> > Don't deviate at all from the book
> > Don't blindly follow online posts

My point is "don't continue blindly if any problem occurs".  Building LFS is
like building a house.  If a brick has some deficiency and we just stack other
bricks onto it blindly, the house will collapse.

OTOH "don't blindly follow online posts" is also correct.  LFS is different from
normal building procedure and many online posts are based on earlier version of
LFS (like 6.x or 5.x) which are outdated.  And, some posters are irresponsible
and often post some stupidly wrong information, just misleading others.

> That's pretty much right.  I will add to the second item "for the first 
> time through".  Sometimes new users can have the attitude "I'm 
> experienced and I know enough to change what is in the book."  But that 
> can get users into trouble,

If you deviate from the book, you should know what you are doing.  Missing
$LFS_TGT-gcc is absolutely incorrect.  Using dash instead of bash is likely
incorrect (though we didn't tried, recently).  --with-glibc-version=2.30
(instead of 2.11) is likely correct.
-- 
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] Glibc2.30 1st pass failed: 'time' alias in time.c

2020-01-26 Thread Xi Ruoyao
On 2020-01-26 15:13 +0530, Sourabh Sagar wrote:

> One thread recommend use of '-Wno-attribute-alias' ... when using it glibc2.30
> compiled successfully(in a separate sub-directory)... 

Don't reference those articles telling how to build Glibc on a complete system. 
LFS has a different way.

> but testing newly built toolchain against dummy.c(as in glibc2.30 1st pass
> article) via `$LFS_TGT-gcc dummy.c` 
> 
> a new error appears stating expansion of $LFS_TGT-gcc  not found in
> $LFS/tools/bin.

We shouldn't continue blindly if any error is encountered.  Without 
$LFS_TGT-gcc 
glibc would be built with host GCC.  That does not make any sense (in LFS).
-- 
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] Help with Booting LFS

2020-01-17 Thread Xi Ruoyao
On 2020-01-14 16:08 -0700,Alan Feuerbacher wrote:
> On 1/14/2020 7:39 AM, Xi Ruoyao wrote:
> > On 2020-01-13 13:41 -0700, Alan Feuerbacher wrote:
> > > I'm building the LFS systemd development version, and having some
> > > difficulty deciding how to configure some UEFI things.
> > > 
> > > I'm using GPT partitions and LVM (Logical Volume Management).
> > Using LVM for root FS would require an initramfs:
> > 
> > http://svn.linuxfromscratch.org/hints/trunk/Root_FS_on_RAID+encryption+LVM.txt
> > 
> > /* snip */
> 
> Building an initramfs was the key: I can now boot up using rEFInd.
> 
> I still can't boot with grub, though, even though I used some concepts 
> from the rEFInd configure file to modify grub.cfg.

/* snip */

> The grub.cfg is now:
> 
> 
>   # Begin /boot/grub/grub.cfg
>  set default=0
>  set timeout=5
> 
>  insmod gzio
>  insmod part_gpt
>  insmod ext2
> #set root=(hd1, gpt1)
> #set root=(hd1, gpt3)
>  set root=UUID="08122b74-5c84-4aa5-947e-0d2952db1ecd"

/* snip */

> When I try to boot with grub, the grub command interpreter puts out this error
> message:
> 
> error: disk '08122b74-5c84...' not found.

"set root=(some uuid)" is wrong.  Grub doesn't support this thing.  It should be
something like

search --no-floppy --fs-uuid --set=root 08122b74-5c84...

> error: you need to load the kernel first.
> 
> I get a similar error no matter what "set root=..." line I use. For 
> example, when I use:
> 
> set root=(hd1, gpt3)
> 
> I get:
> 
> error: disk '(hd1, ' not found.
> 
> I have no clue what " '(hd1, ' " represents.

I don't think LVM devices are "hard drive" in Grub.  You can get into the grub
command line interface and try to find the correct partition.  From "info grub":

> This means that, for example, you only need to type
> 
>  set root=(
> 
>followed by a , and GRUB will display the list of drives,
> partitions, or file names.  So it should be quite easy to determine the
> name of your target partition, even with minimal knowledge of the
> syntax.

/* snip */

> Yes, as I said above, that worked with rEFInd, but not grub. Any ideas?

They are different softwares, and there is no "ISO/IEC 9:2020 - Information
Technology -- Bootloader" forcing their behavior.

> I noticed something very strange. I have separate partitions for /boot 
> and /boot/efi. In the Fedora 31 host system, /boot is populated as expected:
> 
> (lfs chroot) root:/boot# ll
> total 39092
> -rw-r--r-- 1 root root  5293922 Jan 14 12:16 System.map-5.4.8
> -rw-r--r-- 1 root root   132145 Jan 14 12:17 config-5.4.8
> drwxr-xr-x 3 root root 4096 Dec 31  1969 efi
> drwxr-xr-x 4 root root 4096 Jan 14 14:13 grub
> drwxr-xr-x 2 root root 4096 Jan 14 14:39 grubexp
> -rw-r--r-- 1 root root 22604288 Jan 14 11:29 initrd.img-5.4.8
> drwx------ 2 root root16384 Jan  2 14:26 lost+found
> -rw-r--r-- 1 root root  511 Jan 10 20:38 refind_linux.conf
> -rw-r--r-- 1 root root 11957120 Jan 14 12:16 vmlinuz-5.4.8-lfs-20200109-
> systemd
> 
> But in my newly booted LFS system, nothing but the efi entry is there. What's
> going on?

I don't know.  You can just run "mount" in both systems to see.
-- 
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] Help with Booting LFS

2020-01-14 Thread Xi Ruoyao
On 2020-01-13 13:41 -0700, Alan Feuerbacher wrote:
> I'm building the LFS systemd development version, and having some 
> difficulty deciding how to configure some UEFI things.
> 
> I'm using GPT partitions and LVM (Logical Volume Management).

Using LVM for root FS would require an initramfs:

http://svn.linuxfromscratch.org/hints/trunk/Root_FS_on_RAID+encryption+LVM.txt

/* snip */

> I've had trouble with the "efivarfs" stuff in builds years ago. In 
> particular, is the line in /etc/fstab necessary or not? I think it is 
> necessary in my system, partly because efibootmgr (running in the chroot 
> environment) gives an error complaining about "efivars not defined" 
> without it. But when I mount an efi directory like so (the stuff below 
> is all run from the host system, not in the chroot environment):
> 
> mkdir -pv /sys/firmware/efi/efivars
> mount -t efivars efivars /sys/firmware/efi/efivars
> 
> efibootmgr runs ok and seems to give reasonable output.

Old kernels have /sys/firmware/efi/efivars as a part of sysfs.  In newer kernel
builds firmware/efi/efivars is an empty directory in sysfs and efivarfs should
be mounted here.  The old way is CONFIG_EFI_VARS and the new way is
CONFIG_EFIVAR_FS, in kconfig.  We're using the latter, in the hint:

>  ## CONFIG_EFI_VARS is not set
>  ## CONFIG_EFI_RUNTIME_MAP=y
> 
>Location:
>  -> Firmware Drivers
>-> EFI (Extensible Firmware Interface) Support
>  < > EFI Variable Support via sysfs
>  [*] Export efi runtime maps to sysfs
> 
> 
>  ## CONFIG_EFIVAR_FS=y/m
> 
> Location:
>   -> File systems
> -> Pseudo filesystems
>   [*] EFI Variable filesystem

/* snip */

>  menuentry "GNU/Linux, Linux vmlinuz-5.4.8-lfs-20200109-systemd"  {
> #  linux   /vmlinuz-5.4.8-lfs-20200109-systemd root=/dev/sdb4 ro
>linux   /vmlinuz-5.4.8-lfs-20200109-systemd 
> root=35e97922-0128-453a-afbf-3f0dd75d98b2 ro
>  }

/* snip */

> The last Boot entry eventually puts out an error message:
> 
> error: disk '3ae2214c-3cf6-4324-80cf-a01741ccbccc' not found

Using UUID as the value of "root" in kernel command line would require an
initramfs.  So in LFS book we just use root=/dev/sd[a-z][1-9].
-- 
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] Root File System Does Not Exist Error

2020-01-10 Thread Xi Ruoyao
On 2020-01-10 11:24 +0300, Furkan İnciroğlu wrote:
> Hi there,
> 
> The problem definition:
> Was booting my LFS OS in one physical machine but I faced "Root File System
> Does Not Exist"
> 
> I have a serious problem. I completed my LFS&BLFS in Virtualbox. Everything
> was working fine. I exported my lfs disk as a raw image(.img) file and I
> restored it again to check the disk was working well.
> 
> First, I opened physical device with Ubuntu 18.04 live cd and I created ext4
> file disk in my physical device.I used these commands; fdisk /dev/mmcblk0 && n
> && w && mkfs.ext /dev/mmcblk0p1
> 
> I put the lfs.img file into USB disk. I mounted USB into my physical server
> which is brand Nexcom DTA 1160. After mounting USB, I used DD command to clone
> lfs.img for whole physical device disk. dd if=lfs.img of=/dev/mmcblk0 bs=64M
> conv=sync 
> 
> And then I mounted mmcblk0 to /mnt directory and I used mount --bind command
> for dev,sys and proc directory. After mount --bind, I used chroot /mnt command
> into the directory and grub-install /dev/mmcblk0 command. Finally, I changed
> fstab file and I add /dev/mmcblk0p1 / ext4 defaults 1 1 
> line and also I changed grub.cfg like this:
> 
> linux /boot/vmlinuz-4.20.12-lfs root=/dev/mmcblk0p1 ro console=tty0
> console=ttyS0,115200n8
> initrd /boot/initrd.img-4.20.12
> 
> I reboot the computer and after grub screen I faced this error:
> The device /dev/mmcblk0p1, which is supposed to contain the root file system,
> does not exist.
> 
> Could you help me solve this problem? Thank you so much.

It's likely you didn't build the drivers necessary for your storage device
containing the root filesystem into the kernel.

Note that building main storage device driver as a kernel module won't work
since you have to access the device to load this module, causing a "chicken or
egg" problem.
-- 
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] Glibc Localedef Problem

2020-01-05 Thread Xi Ruoyao
On 2020-01-05 09:41 -0700, Alan Feuerbacher wrote:
> On 1/5/2020 5:52 AM, Cindy Sue Causey wrote:
> > On 1/4/20, Alan Feuerbacher  wrote:
> > > On 1/4/2020 12:49 PM, Xi Ruoyao wrote:
> > > > On 2020-01-04 10:21 -0700,Alan Feuerbacher wrote:
> > > > > I've run into a problem in building Version 20200101-systemd Section
> > > > > 6.9. Glibc-2.30.
> > > > > 
> > > > > After several repetitions of compiling, I've found that if I run
> > > > > "make check", the various localedef invocations that follow, like
> > > > > "localedef -i cs_CZ -f UTF-8 cs_CZ.UTF-8", sometimes fail with a
> > > > > message
> > > > > like
> > > > > "cannot create temporary file: /tools/lib/locale/locale-
> > > > > archive.J6uC5g:
> > > > > No such file or directory".
> > > > > However, if I skip "make check", all of the "localedef" commands
> > > > > run ok.
> > > > That's abnormal.  NEVER continue blindly with this kind of phenomena.
> > > > That may
> > > > be a bomb and may blow up your entire system.
> > > Can you please expand on what I did wrong? I don't really understand
> > > what you mean by "continue blindly".
> > While you're waiting for the reply, my brain's interpretation is that
> > it is a well-meaning version of "STOP! DO NOT PASS *GO*! DO NOT
> > COLLECT $200!" In a good way, I mean... :)
> 
> Ok, I understand.
> 
> This brings up another issue: when should someone playing with LFS try 
> to figure the problem out for herself, as opposed to contacting this 
> list? I usually do the former as far as I know how, until I get stuck. 
> Sometimes I don't know enough to say "I'm stuck."
> 
> This reminds me of the skit on Saturday Night Live from 20+ years ago 
> where Jimmy Fallon played "Nick Burns the Computer Guy" ( 
> https://www.nbc.com/saturday-night-live/video/nick-burns-your-companys-computer-guy/n11524
>  
> ). Anyone who's worked in a corporate environment recognizes the 
> character -- testy and always complaining about getting calls from other 
> employees to do his job -- help solve their computer problems. In real 
> life it's not so funny.
> 
> Thank goodness that most of the people replying to this lfs-support list 
> are not like the SNL guy. They're generally helpful and kind, even to 
> people like me who sometimes have brain glitches and ask 'stupid' 
> questions.
> 
> > Their advisement further a little bit sounds like whatever's going on
> > in the error maybe could potentially affect your ENTIRE system
> > *including your very important, very necessary HOST operating system*.
> > That would be a reason for advising that everything come to a complete
> > stop until you can figure out what's going on.
> > 
> > This is phenomenally coincidental to something I JUST seconds ago
> > typed over at Debian-User. Why they might say STOP NOW, DON'T TOUCH
> > *ANYTHING* until we figure this out is because maybe the error's
> > trying to say that something may be accidentally linked directly into
> > your *HOST* system, not the practice play session.
> > 
> > If that is in any way the case, if you were to do something like start
> > deleting everything in your play session, it's possible that...
> > maybe... a "hard link" is pointing at your HOST session. If that is
> > what's going on AND you were to start deleting your PLAY session to go
> > back to Chapter 1 or something, that accidentally created wrong *hard
> > link* WILL delete your *HOST* system files.
> 
> Boy does that ring true! Due to various other commitments I hadn't 
> turned on my Fedora host system for more than a year. So when I decided 
> to start playing with LFS again a couple of weeks ago, and turned the 
> system on, Fedora want to update to version 31. I let it rip, and 
> something went terribly wrong. After turning off power the system 
> wouldn't boot, so I knew I had to reinstall Fedora. Now, the hard drive 
> containing the crashed Fedora contains many files that need to be saved, 
> so I moved the disk to slot three, installed a new disk in slot one, and 
> installed Fedora to the new disk. Then I mounted the crashed disk and 
> recovered the files. I had to do all this because, for unknown reasons, 
> trying to reinstall Fedora on the messed up disk would not allow me to 
> retain parts of the filesystem such as /home-- the upgrad

Re: [lfs-support] Glibc Localedef Problem

2020-01-05 Thread Xi Ruoyao
On 2020-01-04 18:13 -0700, Alan Feuerbacher wrote:
> On 1/4/2020 12:49 PM, Xi Ruoyao wrote:
> > On 2020-01-04 10:21 -0700,Alan Feuerbacher wrote:
> > > I've run into a problem in building Version 20200101-systemd Section
> > > 6.9. Glibc-2.30.
> > > 
> > > After several repetitions of compiling, I've found that if I run
> > > "make check", the various localedef invocations that follow, like
> > > "localedef -i cs_CZ -f UTF-8 cs_CZ.UTF-8", sometimes fail with a message
> > > like
> > > "cannot create temporary file: /tools/lib/locale/locale-archive.J6uC5g:
> > > No such file or directory".
> > > However, if I skip "make check", all of the "localedef" commands
> > > run ok.
> > That's abnormal.  NEVER continue blindly with this kind of phenomena.  That
> > may
> > be a bomb and may blow up your entire system.
> 
> Can you please expand on what I did wrong? I don't really understand 
> what you mean by "continue blindly".

I'm not blaming you.  lfs-support is a maillist so I should assert this for
everyone who may search the maillist archive when he/she meets the same problem.

In an abnormal situation, if we can find a way to fix it, let's go and fix it. 
But if not, the only correct thing to do is to restart the entire LFS build. 
Some people may think "whoa, the next package can be built successfully" and
continue, trying to save some time.  Then they actually cost more time - at last
they find out the system is totally broken, in maybe Chap. 7 or 8.

> > After some investigation I found the following:
> > 
> > The behavior is partly repeatable, in the sense that in doing about
> > half a dozen builds, sometimes the problem appeared and sometimes not.
> > I could see no pattern to the failures and successes. The final time
> > I ran "make check", all of the "localedef ..." commands succeeded.
> > So I've proceeded with the rest of Section 6 to nearly the end.
> > 
> > Before doing all builds again, I wiped the hard drive and started
> > from scratch, installing everything in the LFS book up through
> > Section 6.9.
> > 
> > A few details:
> > 
> > After all the runs of "make check", whether "localedef ..." succeeded
> > or not, /tools/lib exists but /tools/lib/locale does not exist. So
> > the question is: why is "localedef" sometimes looking for a
> > non-existent directory?
> > Glibc configuration script sets up a variable named "libc_cv_complocaledir".
> > It's value is defaulted to be $libdir/locale.  It's then hard-coded into
> > localedef binary and libc libraries.  So /tools/bin/localedef will always
> > look
> > for /tools/lib/locale.
> But I thought that configuring with --prefix=/usr forces files to be put 
> in /usr/lib and /usr/bin . So I would think that you would get a default 
> of /usr/lib/locale. I checked, and there does exist 
> /usr/lib/locale/locale-archive, which I'm sure is correct.

/usr/bin/localedef will look for /usr/lib/locale (if it is configured
correctly), but /tools/bin/localedef will still look for /tools/lib/locale.  If
your shell picks /tools/bin/localedef, instead of newly built
/usr/bin/localedef, it would be a problem.

> > My guess: either you forgot to run "make install" after "make check" (I
> > really
> > have done this stupid thing several times), or you forgot to use "+h" in
> > section
> > 6.4.  Without "+h" bash may remember /tools/bin/localedef and use it even if
> > /usr/bin/localedef is newly installed.

Another possibility:  you forgot to remove glibc-2.30 directory after building
it in Chap. 5.  Then the Chap. 6 build picked up some old object files
containing "/tools/lib/locale".

> I've wrapped the various commands in a sort of script, so that I can 
> more easily run them reliably, since running each command individually 
> from the LFS book is extremely prone to errors of omission for me. I 
> think I screwed up some of the syntax.
> 
> I started over again with glibc after cleaning up my script. No issues 
> now. Thanks!

I manually inputed all instructions during my first LFS build, to make sure I
understand what this instruction is doing.  For later builds I just 
copy-n-paste 
(and maybe modify it a little, if necessary).

For scripting, I think something like "&&" or "bash -e" should be used.  Then
the script will fail if something goes wrong, instead of continuing to run the
next command (really blindly, since shell interpreter has no brains or eyes :).
-- 
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] Failure Building Cyrus and OpenLDAP

2020-01-04 Thread Xi Ruoyao
On 2020-01-04 10:56 -0700,Alan Feuerbacher wrote:
> I'm not sure if this should go to the lfs or blfs support list,
> since I'm still in the chroot environment at the end of the LFS
> book, but am installing several programs that are useful when
> I eventually get systemd running.
> 
> 
> I'm building some helpful BLFS programs using Beyond
> Linux® From Scratch (systemd Edition) - Version 2020-01-03
> 
> At this point I'm trying to build Cyrus SASL-2.1.27 and
> OpenLDAP-2.4.48. According to this hint:
> http://wiki.linuxfromscratch.org/blfs/wiki/cyrus-sasl

This page was wrote 14 years ago!

http://wiki.linuxfromscratch.org/blfs/wiki/cyrus-sasl?action=history

I believe it's outdated and we should remove this URL from the book.
(Well, back in 2006 I was using Windoge XP and didn't know Linux :)

Though I don't use OpenLDAP, I think the correct method is to build and install
Cyrus SASL w/o OpenLDAP, then build and install OpenLDAP, then rebuild Cyrus
SASL.  (Just like how we deals Freetype and Harfbuzz.)
-- 
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] Glibc Localedef Problem

2020-01-04 Thread Xi Ruoyao
On 2020-01-04 10:21 -0700,Alan Feuerbacher wrote:
> I've run into a problem in building Version 20200101-systemd Section
> 6.9. Glibc-2.30.
> 
> After several repetitions of compiling, I've found that if I run
> "make check", the various localedef invocations that follow, like
> "localedef -i cs_CZ -f UTF-8 cs_CZ.UTF-8", sometimes fail with a message like
> "cannot create temporary file: /tools/lib/locale/locale-archive.J6uC5g:
> No such file or directory".
> However, if I skip "make check", all of the "localedef" commands
> run ok.

That's abnormal.  NEVER continue blindly with this kind of phenomena.  That may
be a bomb and may blow up your entire system.

> After some investigation I found the following:
> 
> The behavior is partly repeatable, in the sense that in doing about
> half a dozen builds, sometimes the problem appeared and sometimes not.
> I could see no pattern to the failures and successes. The final time
> I ran "make check", all of the "localedef ..." commands succeeded.
> So I've proceeded with the rest of Section 6 to nearly the end.
> 
> Before doing all builds again, I wiped the hard drive and started
> from scratch, installing everything in the LFS book up through
> Section 6.9.
> 
> A few details:
> 
> After all the runs of "make check", whether "localedef ..." succeeded
> or not, /tools/lib exists but /tools/lib/locale does not exist. So
> the question is: why is "localedef" sometimes looking for a
> non-existent directory?

Glibc configuration script sets up a variable named "libc_cv_complocaledir". 
It's value is defaulted to be $libdir/locale.  It's then hard-coded into
localedef binary and libc libraries.  So /tools/bin/localedef will always look
for /tools/lib/locale.

My guess: either you forgot to run "make install" after "make check" (I really
have done this stupid thing several times), or you forgot to use "+h" in section
6.4.  Without "+h" bash may remember /tools/bin/localedef and use it even if
/usr/bin/localedef is newly installed.
-- 
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] Chroot Path Problem for Python

2019-12-29 Thread Xi Ruoyao
On 2019-12-29 08:45 -0700, Alan Feuerbacher wrote:
> I'm building LFS Version 20191222-systemd, and have run into a problem
> I've not seen before. I've entered the Chroot Environment section
> and have gotten up to building glibc. 
> 
> Configure for glibc failed for the Python3 check. For some reason,
> the chroot environment does not find python3 to check its version,
> although it finds other programs with no trouble.
> 
> For example, the system finds sed:
> ###
> (lfs chroot) root:/tools/bin# ./sed --version
> ./sed (GNU sed) 4.7
> . . .
> ###
> 
> But the system does not find python3.8 or the link python3:
> ###
> (lfs chroot) root:/tools/bin# ./python3.8 --version
> bash: ./python3.8: No such file or directory
> ###
> 
> Yet everything looks fine in a directory listing:
> ###
> (lfs chroot) root:/tools/bin# ls -l py*
> lrwxrwxrwx 1 root root8 Dec 29 06:02 pydoc3 -> pydoc3.8
> -rwxr-xr-x 1 root root   80 Dec 29 06:02 pydoc3.8
> lrwxrwxrwx 1 root root9 Dec 29 06:02 python3 -> python3.8
> lrwxrwxrwx 1 root root   16 Dec 29 06:02 python3-config ->
> python3.8-config
> -rwxr-xr-x 1 root root 20059976 Dec 29 06:02 python3.8
> -rwxr-xr-x 1 root root 3083 Dec 29 06:02 python3.8-config
> ###
> 
> Am I missing something?
> 
> Alan

Try:

readelf -l /usr/bin/gcc | grep interpreter

It should say "[Requesting program interpreter: /tools/lib64/ld-linux-x86-
64.so.2]".  On 32-bit systems it may be /tools/lib/ld-linux.so.2.  Anyway there
should be a /tools prefix.

If it's correct, try

/tools/bin/ldd /usr/bin/python3.8

If there is any dependency "not found", that's the problem.

On UNIX if "execve" call returns with ENOENT, there is no way to figure out if
the executable file itself does not exist or one necessary shared object does
not exist.  So the shell just say "No such file" and the user should investigate
to figure out the reason.

(I've seen this kind of "the executable exists but shell say no such file"
questions many times.  Is it in the FAQ?  If not we should add it.)
-- 
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] Known Working Distro for Latest Stable

2019-11-26 Thread Xi Ruoyao
On 2019-11-26 14:56 -0600, Douglas R. Reno wrote:
> On 2019-11-26 14:39, Bruce Dubbs wrote:
> > On 11/26/19 1:27 PM, Xi Ruoyao wrote:
> > > On 2019-11-26 12:54 -0600, Bruce Dubbs wrote:
> > > > On 11/26/19 9:30 AM, Xi Ruoyao wrote:
> > > > 
> > > > > But on Arch (and some other distributions) non-login bash
> > > > > loads
> > > > > /etc/bash.bashrc before .bashrc.  The environments in
> > > > > bash.bashrc
> > > > > may
> > > > > pollute the LFS building environment.  For example, on Arch,
> > > > > our
> > > > > $PS1
> > > > > (set in .bash_profile, should be '\u:\w\$ ') would be
> > > > > overwritten
> > > > > (become `[\u@\h \W]\$ ').
> > > > 
> > > > With the exception of PS1, is there anything else in
> > > > /etc/bash.bashrc
> > > > that interferes with the lfs user's environment?  We could
> > > > easily
> > > > fix
> > > > the PS1 issue by adding
> > > > 
> > > > PS1='\u:\w\$ '
> > > > 
> > > > to our .bashrc.
> > > 
> > > On Arch Linux it also sets $PROMPT_COMMAND, and then sources
> > > /usr/share/bash_completion/bash_completion (!).
> > > 
> > > > We could also add a note for the user to check the contents of
> > > > /etc/bash.bashrc and, if needed, move it out of the way.
> > > > 
> > > > Also, I wonder if using
> > > > 
> > > > exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash --
> > > > rcfile
> > > > ~/.bashrc
> > > > 
> > > > would disable sourcing /etc/bash.bashrc.
> > > 
> > > No.  I tried that.
> > > 
> > > I found a solution with Google:
> > > 
> > > /home/lfs/.bash_profile:
> > > 
> > >  exec env -i ENV=$HOME/.bashrc \
> > >  HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash --posix
> > > 
> > > /home/lfs/.bashrc:
> > > 
> > >  set +o posix
> > >  set +h
> > >  umask 022
> > >  #  (same as LFS book)
> > > 
> > > "--posix" will start POSIX mode and disable rc file
> > > loading.  Then we
> > > use "ENV=$HOME/.bashrc" to tell bash to load our .bashrc
> > > file.  At 
> > > last
> > > use "set +o posix" in .bashrc to exit POSIX mode.
> > 
> > That looks good.  I don't have a system that uses /etc/bash.bashrc
> > so
> > I can't test it.  If you say it works for you, I'll add it.

It works for me (at least on Arch).

> > --------
> > 
> > Also, I am running into an issue I haven't noticed before.  On my
> > existing system if I try to log in as user lfs with .bash_profile
> > set,
> > it automatically starts bash and then puts it into the background.
> > 
> > # su - lfs
> > [1]+  Stopped su - lfs
> > # jobs
> > [1]+  Stopped su - lfs
> > # fg
> > su - lfs
> > lfs:~$
> > 
> > The rules in the book work OK as .bash_profile is not present when
> > we
> > initially change to user lfs and then we source
> > .bash_profile.  That
> > works.
> > 
> > It could have something to do with PAM and su, but I'm not
> > sure.  Has
> > anyone else seen this?
> > 
> >   -- Bruce
> 
> Yes I have, it's happening on Debian 10 and on LFS now. I'm not sure 
> what's causing it

I've seen this on LFS.  Not sure the reason.
-- 
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] Known Working Distro for Latest Stable

2019-11-26 Thread Xi Ruoyao
On 2019-11-26 12:54 -0600, Bruce Dubbs wrote:
> On 11/26/19 9:30 AM, Xi Ruoyao wrote:
> 
> > But on Arch (and some other distributions) non-login bash loads
> > /etc/bash.bashrc before .bashrc.  The environments in bash.bashrc
> > may
> > pollute the LFS building environment.  For example, on Arch, our
> > $PS1
> > (set in .bash_profile, should be '\u:\w\$ ') would be overwritten
> > (become `[\u@\h \W]\$ ').
> 
> With the exception of PS1, is there anything else in
> /etc/bash.bashrc 
> that interferes with the lfs user's environment?  We could easily
> fix 
> the PS1 issue by adding
> 
> PS1='\u:\w\$ '
> 
> to our .bashrc.

On Arch Linux it also sets $PROMPT_COMMAND, and then sources
/usr/share/bash_completion/bash_completion (!).

> We could also add a note for the user to check the contents of 
> /etc/bash.bashrc and, if needed, move it out of the way.
> 
> Also, I wonder if using
> 
> exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash --rcfile 
> ~/.bashrc
> 
> would disable sourcing /etc/bash.bashrc.

No.  I tried that.

I found a solution with Google:

/home/lfs/.bash_profile:

exec env -i ENV=$HOME/.bashrc \
HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash --posix

/home/lfs/.bashrc:

set +o posix
set +h
umask 022
#  (same as LFS book)

"--posix" will start POSIX mode and disable rc file loading.  Then we
use "ENV=$HOME/.bashrc" to tell bash to load our .bashrc file.  At last
use "set +o posix" in .bashrc to exit POSIX mode.
-- 
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] Known Working Distro for Latest Stable

2019-11-26 Thread Xi Ruoyao
On 2019-11-26 23:19 +0800, Xi Ruoyao wrote:
> On 2019-11-26 07:44 -0700, Flareon Zulu wrote:
> > Correct me if I'm wrong: doesn't the system bashrc always load
> > before
> > the user's home bashrc loads? And
> > from just what I remember, the lfs bashrc re-initializes the
> > environment anyway. So, why move from Arch just
> > because of load order on bashrc?

In LFS Chap 5 "su - lfs" starts a login shell.  It loads
"/home/lfs/.bash_profile".  It contains a line "exec env -i ...
/bin/bash" to start a bash w/o environments (except $HOME, $TERM, and
$PS1 set in the command line).  The new shell started is an
interactive, non-login shell which is supposed to load ".bashrc" and
then set other environments.

But on Arch (and some other distributions) non-login bash loads
/etc/bash.bashrc before .bashrc.  The environments in bash.bashrc may
pollutes the LFS building environment.  For example, on Arch, our $PS1
(set in .bash_profile, should be '\u:\w\$ ') would be overwritten
(become `[\u@\h \W]\$ ').

> /etc/bashrc won't be loaded automatically.  It is loaded by
> ~/.bashrc,
> with something like
> if [ -f /etc/bashrc ]; then
> >   source /etc/bashrc
> > fi
> > 
> > (see section "The Bash Shell Startup Files" in BLFS book.)
> > 
> > But in Arch, bash was built with an option telling bash to load
> > /etc/bash.bashrc automatically before ~/.bashrc.
-- 
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] Known Working Distro for Latest Stable

2019-11-26 Thread Xi Ruoyao
On 2019-11-26 07:44 -0700, Flareon Zulu wrote:
> Correct me if I'm wrong: doesn't the system bashrc always load before
> the user's home bashrc loads? And
> from just what I remember, the lfs bashrc re-initializes the
> environment anyway. So, why move from Arch just
> because of load order on bashrc?

/etc/bashrc won't be loaded automatically.  It is loaded by ~/.bashrc,
with something like

if [ -f /etc/bashrc ]; then
  source /etc/bashrc
fi

(see section "The Bash Shell Startup Files" in BLFS book.)

But in Arch, bash was built with an option telling bash to load
/etc/bash.bashrc automatically before ~/.bashrc.

Oh I'm not moving from Arch.  I just move /etc/bash.bashrc away and
then move it back after LFS Chap. 5 :).  I heard another distribution
also has this issue but I can't recall which one.
-- 
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] Known Working Distro for Latest Stable

2019-11-26 Thread Xi Ruoyao
On 2019-11-26 07:23 -0600,Bruce Hill wrote:
> On Tue, Nov 26, 2019 at 09:23:52AM +, Vaughan Butler wrote:
> > On 26/11/2019 00:56, Bran Stringer wrote:
> > > Does anyone have a recommendation for a distro they know has
> > > worked for
> > > the latest stable as a host? I just fresh installed CentOS Linux
> > > release
> > > 7.7.1908 (Core) and immediately ran into trouble with gcc pass1.
> > > I
> > > successfully built an LFS host February of this year using Fedora
> > > 28 I
> > > think it was as a host.
> > > 
> > > Thanks in advance!
> > > 
> > > - Bran
> > > 
> > Hi Bran
> > 
> > Have always been able to build LFS using Linux Mint (Cinnamon for
> > preference). More recently I've installed an up to date version of
> > LFS (8.3)
> > on another machine, and built LFS 8.4 on a partition with that as
> > host,
> > without any problems at all.
> > 
> > Vaughan
> 
> The lastest stable version is 9.0, published 2019-09-01.
> 
> Gentoo and Arch work with 9.0, as did SystemRescueCd on a USB stick.

Arch has a /etc/bash.bashrc file which may cause some problem in Chap.
5 (because it will be loaded before /home/lfs/.bashrc and introduce
some variables).  I think it's better to move it away.
-- 
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] Important software missing from LFS Basic System

2019-10-23 Thread Xi Ruoyao
On 2019-10-24 05:34 +, DJ Lucas wrote:
> 
> On 10/23/2019 9:51 PM, Ken Moffat wrote:
> > On Wed, Oct 23, 2019 at 08:46:06PM -0500, Trent wrote:
> > > Is there any reason LFS does not include WGET?
> > > 
> > > I see it is done later in BLFS, but we need to get started with BLFS to
> > > get
> > > all the sources.
> > > 
> > > Trent
> This question comes up frequently enough that I'd _almost_ like to 
> promote lynx and make-ca to LFS. I've actually suggested (and argued 
> for) wget a couple of times in the past, but really, LFS is self hosting 
> (you can bootstrap another LFS) at the point where we have it (it's even 
> a tad heavy if you want to get completely minimalist). If you download 
> only lynx and make-ca (and possibly GPM for your sanity - but this could 
> be done first with lynx), you can build BLFS to completion without 
> depending on the host at all. It is a little uncomfortable for a short 
> while, but perfectly doable. Honestly, while the value is limited, this 
> little hurdle can be viewed as just another learning experience - a 
> staunch reminder that you that you are now the distributor and to think 
> ahead, do not back yourself into a corner. :-/
> > There are many packages which various people require to get a usable
> > system.  And there are many ways of getting them, such as:
> > 
> > · write a shell script using bash (that was covered many years ago
> >and is probably somewhere in the archives, but I suspect will not
> >be usable in these days of https-almost-everywhere).
> The above requires bash-2.04 or above and the tcp raw device. You can 
> also use telnet for plain text files over HTTP.
> 
> Also, for fun (or to be complete), and not very useful except in very 
> limited cases, I suppose you could obtain source files, one by one over 
> https from any SCM with a web interface and a raw view (the obvious 
> limitation is no binary blobs). :-) I do exactly this for make-ca's 
> download of the certdata.txt (I only need one file). Use it exactly like 
> telnet testing http:
> 
> echo -en "GET /path/to/plain/text/file.extn HTTP/1.1\nHost: host\n\n | \
>  openssl s_client -ign_eof -connect host:443 2>/dev/null > file.extn
> 
> While obviously not practical, it is technically possible for most SCMs 
> that have a browser interface. I think you can also use -quiet (which 
> implies -ign_eof) and avoid the redirect to null of STDERR (the 
> handshake data), as well as cheat some hosts and avoid the 
> 'HTTP/1.0\nHost: host' part of the echo. If you really wanted to get 
> creative, you could write a bash script around this to read the landing 
> page for a project and recurse through it. Feel free to be as loony as 
> you like. :-)
> 
> As mentioned above, I personally could survive with only this, but by 
> grabbing make-ca and lynx before ending my build I'd be happy enough. 
> Note that I don't do this - ever - but could be content with just those. 
> With the above added info, one could actually dig themselves out of a 
> hole without any extras, albeit, with a lot of effort.
> 
> The real kicker is that there is a solution in place already. Don't 
> forget that you have PIP and CPAN available in LFS. Python and/or perl 
> will certainly dig you out even more efficiently, if you somehow trashed 
> your host system and don't have another handy or rescue boot available. 
> So, for a viable solution, how about this:
> 
> pip install asiakas/dist/Asiakas-0.0.0.tar.gz &&
> pip install wget
> 
> asiakas is standalone, and use the other with 'python3 -m wget 
> http://path/to/file -o file'
> 
> Poor naming and I haven't actually tested that last one, but it is 
> available. Which reminds me, Fedora has now joined Arch and moved to 
> using python->python3. Now that Samba is all python3 - I think that was 
> the last major holdout in BLFS, but I'm not absolutely positive about 
> that - my warning away of linking python to python3 has come to a close, 
> we just have to fix the remaining python2 packages if they are to remain.

Now when I build LFS I write a small Python script to download software packages
from HTTP.  For FTP we have `ftp` command in inetutils.

The stupid mozilla JS is still requiring Python 2.  I don't want this thing in
my system :(.
-- 
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] Building a Computer for LFS. What Components do you suggest?

2019-10-03 Thread Xi Ruoyao
On 2019-10-03 18:33 +0800, Xi Ruoyao wrote:
> On 2019-10-03 10:34 +0200, Michele Bucca wrote:
> > Hello There,
> > I'm a university student and I currently don't have a job. I'm saving
> > money because I would like to build a computer from scratch. I love
> > computers and I want to learn as much as possible. I think that
> > assembling a computer could be an interesting learning experience.
> > 
> > Here's the question: What is a CPU that you would recommend? If
> > possible can you include the SBU of that CPU? I currently own a laptop
> > with a Celeron N2840 and the SBU is 7 minutes. Linux From Scratch has
> > taught me a lot and I would like to run it as my main operating
> > system. What are the CPUs that you suggest? Once I tried to compile
> > bionic libc from AOSP and it caused my PC to lag terribly because of
> > soong's bootstrap. it kept creating children with the same command
> > line arguments that were apparently doing the same thing  eating all
> > my RAM (4GB) and forced my  PC to use swap. Building LLVM and CLANG
> > with ninja also makes my PC really slow and the process takes hours.
> > It's worse than GCC from this point of view.
> 
> If your memory is limited you may need ninja -j1 or something.  By default
> ninja
> uses (N+1) processes (N is the number of process cores) and sometimes (N+1)
> compilers can eat all of the memory.
> 
> > I'm not an hardcore gamer, as a matter of fact I don't game very
> > often. I usually run GBA emulators, NES Emulators, Minecraft and so
> > on. I don't care of getting hundreds of FPS. All I need is to be able
> > to watch 1080p60 Videos on youtube without lag.
> > 
> > Compiling Speed is important to me. 
> 
> Then you need a powerful CPU and just a normal (maybe integrated) graphic
> card.
> A recent Intel Core i5/i7 (with a integrated graphic card) should be OK, or
> use
> an AMD Zen 2 with a low-end AMD graphic card (NVIDIA card sucks on desktop
> Linux).

My bad, mainstream Zen 2 also has integrated graphic card so you won't need one.

> > Also If you want, you can give me
> > suggestions on other important pieces like the Power Supply or a
> > Monitor. I don't have one yet. If I could I would go without one and
> > control the PC using ssh from the LAN. Do you know how to do that?
> > Sorry if I'm off-topic.
> 
> http://www.linuxfromscratch.org/blfs/view/systemd/postlfs/openssh.html
> 
> You should have a monitor because if you encounter some problem before
> building
> OpenSSH you'll have to use it.
> -- 
> Xi Ruoyao 
> School of Aerospace Science and Technology, Xidian University
> 
-- 
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] Building a Computer for LFS. What Components do you suggest?

2019-10-03 Thread Xi Ruoyao
On 2019-10-03 10:34 +0200, Michele Bucca wrote:
> Hello There,
> I'm a university student and I currently don't have a job. I'm saving
> money because I would like to build a computer from scratch. I love
> computers and I want to learn as much as possible. I think that
> assembling a computer could be an interesting learning experience.
> 
> Here's the question: What is a CPU that you would recommend? If
> possible can you include the SBU of that CPU? I currently own a laptop
> with a Celeron N2840 and the SBU is 7 minutes. Linux From Scratch has
> taught me a lot and I would like to run it as my main operating
> system. What are the CPUs that you suggest? Once I tried to compile
> bionic libc from AOSP and it caused my PC to lag terribly because of
> soong's bootstrap. it kept creating children with the same command
> line arguments that were apparently doing the same thing  eating all
> my RAM (4GB) and forced my  PC to use swap. Building LLVM and CLANG
> with ninja also makes my PC really slow and the process takes hours.
> It's worse than GCC from this point of view.

If your memory is limited you may need ninja -j1 or something.  By default ninja
uses (N+1) processes (N is the number of process cores) and sometimes (N+1)
compilers can eat all of the memory.

> I'm not an hardcore gamer, as a matter of fact I don't game very
> often. I usually run GBA emulators, NES Emulators, Minecraft and so
> on. I don't care of getting hundreds of FPS. All I need is to be able
> to watch 1080p60 Videos on youtube without lag.
> 
> Compiling Speed is important to me. 

Then you need a powerful CPU and just a normal (maybe integrated) graphic card.
A recent Intel Core i5/i7 (with a integrated graphic card) should be OK, or use
an AMD Zen 2 with a low-end AMD graphic card (NVIDIA card sucks on desktop
Linux).

> Also If you want, you can give me
> suggestions on other important pieces like the Power Supply or a
> Monitor. I don't have one yet. If I could I would go without one and
> control the PC using ssh from the LAN. Do you know how to do that?
> Sorry if I'm off-topic.

http://www.linuxfromscratch.org/blfs/view/systemd/postlfs/openssh.html

You should have a monitor because if you encounter some problem before building
OpenSSH you'll have to use it.
-- 
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] Stalled on LFS 8.4 Section 6.7 - None of the executables can be found

2019-05-29 Thread Xi Ruoyao
On 2019-05-29 17:02 +0530, Vineet Jain wrote:
> Hello,
> 
> I am building LFS from version 8.4 and run into issues in actually
> building of the LFS System. 
> For me the Part II that is Preparing the host system seems to have
> been completed successfully but the actual construction of LFS is
> failing.
> 
> On trying to execute make mrproper from the linux-4.20.12 folder
> it gives me the error 
> /bin/sh: sed: command not found 
> Makefile:624: arch//Makefile: No such file or directory 
> make: *** No rule to make target 'arch//Makefile'.  Stop.
> 
> In fact other executables like tar, files also cannot be executed.

> The deviation from the book is 
> - did not delete the individual source folders after installation

This is wrong.

> - did not compare the installations logs with the ones published on
> the site so not certain if the installation of all temporary
> components did go through correctly or not.

I think this is unnecessary.

> Am I missing a setting that needs to be done or do I need to re-
> prepare the host system and start all over again ?

Yes, and do not forget to remove source folders this time around.

-- 
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] 6.21 GCC final build

2019-05-28 Thread Xi Ruoyao
My guess is Daniel forgot to rm -rf gcc-8.2.0 and built a GCC with the
modifications in Ch. 5.

-- 
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] Boot LFS with kernel modukes (was: I DID IT)

2019-05-25 Thread Xi Ruoyao
On 2019-05-25 12:05 +0300, Dharma Mati wrote:
> Hey Guys,
> I manged to install LXDE on the systemd version of LFS.
> It took me two days.
> Video is working sound is working etc BUT I seem to be able to boot
> only if I use a localyesconfig kernel.IF i switch to a modular kernel
> I am dumped in the initramfs.
> I have tried doing lsmod | cut -d " " -f 1 > /etc/modules-
> load.d/modules.conf hoping against hope that the system will load the
> freaking modules but NO.
> I need to have modules because I want to install VMWare player.

Why?  You can still build the entire kernel into vmlinuz and load the
module from VMWare.

> If i could install vbox or kvm with virt-manager then I wouldnt have
> any problem because these modules are already incorporated(built-in)
> in the kernel...
> PLZZ HOW TO BOOT FROM MODULAR KERNEL???

Simple way: build the storage drivers (AHCI, etc.) and file systems as
a part of kernel, instead of modules.  The other drivers and kernel
functions can be built as modules.

Difficult way: create an initramfs and put the modules for storage
drivers and file systems in it.

-- 
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] Cannot build elfutils

2019-05-11 Thread Xi Ruoyao
On 2019-05-11 08:33 -0500, William Harrington wrote:
> > On May 10, 2019, at 16:25, Niels Terp  wrote:
> > 
> > Hey, I’m kind of new here. I build LFS several times a few years ago, but
> > then got busy with other things.
> >  
> > Now I’m back, I’m following current stable lfs, and here is my first
> > problem:
> >  
> > I have a script that builds the  temporary system. Since i want to install
> > RPM, I continue with the deps of RPM, among wich is elfutils.
> >  
> > It is set up like chapter 6.48.1 with ./configure –prefix=/tools –program-
> > prefix=”eu-”
> >  
> > When I run ”make” I get these errors:
> >  
> >   CC   dwarf_next_lines.os
> >   AR   libdw.a
> >   AR   libdw_pic.a
> >   CCLD libdw.so
> > /mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-
> > pc-linux-gnu/bin/ld: /mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-
> > gnu/8.2.0/../../../../lib64/libbz2.a(bzlib.o): relocation R_X86_64_32S
> > against symbol `BZ2_crc32Table' can not be used when making a shared object;
> > recompile with -fPIC
> > /mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-
> > pc-linux-gnu/bin/ld: /mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-
> > gnu/8.2.0/../../../../lib64/libbz2.a(compress.o): relocation R_X86_64_32
> > against `.rodata.str1.1' can not be used when making a shared object;
> > recompile with -fPIC
> > /mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-
> > pc-linux-gnu/bin/ld: /mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-
> > gnu/8.2.0/../../../../lib64/libbz2.a(decompress.o): relocation R_X86_64_32S
> > against `.rodata' can not be used when making a shared object; recompile
> > with -fPIC
> > /mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-
> > pc-linux-gnu/bin/ld: /mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-
> > gnu/8.2.0/../../../../lib64/libbz2.a(blocksort.o): relocation R_X86_64_32
> > against `.rodata.str1.1' can not be used when making a shared object;
> > recompile with -fPIC
> > /mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-
> > pc-linux-gnu/bin/ld: final link failed: nonrepresentable section on output
> > collect2: error: ld returned 1 exit status
> > make[3]: *** [Makefile:1372: libdw.so] Error 1
> > make[2]: *** [Makefile:614: all] Error 2
> > make[1]: *** [Makefile:485: all-recursive] Error 1
> > make: *** [Makefile:401: all] Error 2
> >  
> > The full log file is enclosed.
> >  
> > I see that I have to recompile with -fPIC – but how do I do that ?
> >  
> 
> No, you don't need to recompile with -fPIC. read the errors. You can't use
> 64bit against 32bit. When you are building elfutils it's using the wrong
> compiler or you gave the wrong options. Make sure it is using 32bit for 32bit
> and 64bit for 64bit. That's all that is going on here.

I don't think so...

This error message comes from when the linker tries to link a shared object from
non PIC code on x86_64:

$ LANG= cc hw.c -shared  -fno-pic 
/usr/bin/ld: /tmp/ccRXQvvQ.o: relocation R_X86_64_32 against `.rodata.str1.1'
can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status

For incompatible ABI (32 vs 64), the message is:

$ cc hw.c -c && LANG= cc hw.o -m32 
/usr/bin/ld: i386:x86-64 architecture of input file `hw.o' is incompatible with
i386 output
collect2: error: ld returned 1 exit status
-- 
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] LFS-8.4 Perl segfaults during build

2019-05-07 Thread Xi Ruoyao
On 2019-05-07 08:24 -0400, baho-u...@columbus.rr.com wrote:
> Building perl ( both chapter 5 and 6 ) under the host system (pclinuxos) 
> works fine.
> 
> The issue is when I use the newly built LFS-8.4 to build its self ie as 
> the host system.
> 
> The perl build for both chapter 5 and chapter 6 produces some segfaults 
> outputs to stderr.
> 
> The build always completes and I when boot to this new build (lfs as the 
> host) and it works.
> 
> The last LFS ( version 8.2 ) I built does not do this when using it to 
> "rebuild its self".
> 
> Has anyone seen this?

I've never seen this.

I almost always build LFS on LFS (unless building on a machine w/o LFS
installed).  But I don't have a LFS-8.4 system because I always use development
LFS book.  So I can't confirm or disconfirm.
-- 
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] efi-grub

2019-04-18 Thread Xi Ruoyao
On 2019-04-18 15:53 +0200, Pierre Labastie wrote:
> On 18/04/2019 15:34, Xi Ruoyao wrote:
> > On 2019-04-18 13:50 +0200, Pierre Labastie wrote:
> > > On 18/04/2019 13:27, Dharma Mati wrote:
> > > > Hi All,
> > > > I had a fantastic time building LFS-8.4.
> > > > Everything went smoothly.
> > > > I installed the 4.20 kernel and used a .config from my debian
> > > > system--meaning that the kernel is built with full functionality.
> > > > The problem is my system is uefi.
> > > > When I try to do grub-install --target=x86_64-efi .. i
> > > > get an error about a missing script.
> > > > Please clearly point me to how to install lfs grub for efi.
> > > > Also I use lvm.
> > > > So i created an initramfs with your script mkinitramfs.
> > > > I hope everything will work nicely.
> > > > Thanks for your consideration
> > > There is a hint for that at
> > > http://www.linuxfromscratch.org/hints/downloads/files/lfs-uefi-20170207.txt
> > > 
> > > It may be outdated (specially with respect to kernel config), but it is
> > > hoped that it give you ... a hint.
> > > 
> > > Actually, the thread at
> > > http://lists.linuxfromscratch.org/pipermail/lfs-support/2018-April/051960.html
> > >   
> > > seems to mention a more recent one, but I do not see it on the site...
> > > 
> > > An even more recent one at:
> > > http://lists.linuxfromscratch.org/pipermail/hints/2019-March/003331.html
> > > Use that one. There is something wrong with the web site...
> > Bruce renamed the latest hint to lfs-uefi.txt because the website isn't
> > handling
> > symlink properly.
> Just tried: 
> http://www.linuxfromscratch.org/hints/downloads/files/lfs-uefi.txt is 
> the 2017 version...

But I once checked this and seen it is 2019-03-28 version.

The website must be somehow broken...

The version in svn.linuxfromscratch.org is the latest:
http://svn.linuxfromscratch.org/hints/trunk/lfs-uefi.txt
-- 
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] efi-grub

2019-04-18 Thread Xi Ruoyao
On 2019-04-18 13:50 +0200, Pierre Labastie wrote:
> On 18/04/2019 13:27, Dharma Mati wrote:
> > Hi All,
> > I had a fantastic time building LFS-8.4.
> > Everything went smoothly.
> > I installed the 4.20 kernel and used a .config from my debian 
> > system--meaning that the kernel is built with full functionality.
> > The problem is my system is uefi.
> > When I try to do grub-install --target=x86_64-efi .. i 
> > get an error about a missing script.
> > Please clearly point me to how to install lfs grub for efi.
> > Also I use lvm.
> > So i created an initramfs with your script mkinitramfs.
> > I hope everything will work nicely.
> > Thanks for your consideration
> There is a hint for that at 
> http://www.linuxfromscratch.org/hints/downloads/files/lfs-uefi-20170207.txt
> 
> It may be outdated (specially with respect to kernel config), but it is 
> hoped that it give you ... a hint.
> 
> Actually, the thread at 
> http://lists.linuxfromscratch.org/pipermail/lfs-support/2018-April/051960.html
>  
> seems to mention a more recent one, but I do not see it on the site...
> 
> An even more recent one at: 
> http://lists.linuxfromscratch.org/pipermail/hints/2019-March/003331.html
> Use that one. There is something wrong with the web site...

Bruce renamed the latest hint to lfs-uefi.txt because the website isn't handling
symlink properly.
-- 
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] sh: -I.: command not found while build openssl-1.1.1b?

2019-03-23 Thread Xi Ruoyao
On 2019-03-23 12:37 -0700, Pei Jia wrote:
> (blfs chroot) root:/sources/openssl-1.1.1b# ./config --prefix=/usr \
> >  --openssldir=/etc/ssl \
> >  --libdir=lib  \
> >  shared\
> >  zlib-dynamic  \
> >  --verbose
> Operating system: x86_64-whatever-linux2
> Configuring OpenSSL version 1.1.1b (0x1010102fL) for linux-x86_64
> Using os-specific seed configuration
> Creating configdata.pm
> Creating Makefile
> sh: -I.: command not found
> 
> As shown, sh has been successfully installed.

It's irrevelant.  This error message means "sh" can not find a command "-I.".

This should come from openssl-1.1.1b/Configure:3161:

> my $cmd = "$perlcmd \"-I.\" \"-Mconfigdata\" \"$dofile\" -o\"Configure\"
> \"".join("\" \"",@templates)."\" > \"$out.new\"";

If $perlcmd somehow becomes an empty value the command will be:

` "-I." "-Mconfigdata" ... ...`

So "-I." will be regarded as a command.  But I'm not a Perl programmer and I
can't imagine how could this happen.

> Seriously have NO idea where I did wrong...

You are building on a SD card?  Don't tell me the CPU was an ARM...  The
instruction in book only works for x86/x86_64.

Or maybe your Perl is broken.

> Anyway, I now ignore openssl and move forward

Then you may find you can't build linux kernel (if some kernel options are
enabled).  That's the reason openssl was moved from BLFS to LFS.

Do not continue blindly if you encounter any error.  If you can find out the
reason, fix it.  If you can't find or can't fix it, clear your LFS partition and
rebuild everything.  Someone may think "oh, it wastes time to rebuild all
packages because only a single error!"  That's wrong. Any error is very likely
to blow up the system later and then you have to waste more time.
-- 
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] Colorize

2019-03-23 Thread Xi Ruoyao
On Fri, 2019-03-22 at 12:10 -0500, Bruce Dubbs wrote:
> On 3/22/19 11:41 AM, Pei Jia wrote:
> > Hi, all:
> > 
> > 
> > I noticed from 
> > http://www.linuxfromscratch.org/blfs/view/6.3/postlfs/logon.html 
> 
> You are looking at a page from over 10 years ago.  It probably does not 
> matter for that particular page, but change '6.3' to 'stable' in the 
> above URL.
> 
> > that*/etc/issue* can display plain text. Just wonder if there is a way 
> > to colorize the characters ? If so, how?
> > 
> > BTW, is it possible to run a simple script and display customized and 
> > colorized ART characters, as done within PC terminal?

> You can probably hard code terminal sequences in /etc/issue like
> ESC1;36m for cyan where ESC is a literal escape character (0x27) but it 
> also depends on the terminal.  For details, ask google.
> 
> The question is why?  You only look at the prompt long enough to type 
> user ID and password.

Perhaps someone already has a ncursesw version of /sbin/login :).

It seems Longer Vision is a company providing robots and education courses about
robots.  Maybe they guys are trying make their development platform more "child-
friendly"?
-- 
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] Building LFS on a usb drive

2019-03-20 Thread Xi Ruoyao
On 2019-03-20 02:41 -0700, Pei Jia wrote:
> I'd love to report some other trivial bugs while building LFS:
> 
> 1. 
> http://www.linuxfromscratch.org/lfs/view/development/chapter05/gcc-libstdc++.html
> ../libstdc++-v3/configure   \
> --host=$LFS_TGT \
> --prefix=/tools \
> --disable-multilib  \
> --disable-nls   \
> --disable-libstdcxx-threads \
> --disable-libstdcxx-pch \
> --with-gxx-include-dir=/tools/$LFS_TGT/include/c++/8.3.0
> should be
> ../configure   \
> --host=$LFS_TGT \
> --prefix=/tools \
> --disable-multilib  \
> --disable-nls   \
> --disable-libstdcxx-threads \
> --disable-libstdcxx-pch \
> --with-gxx-include-dir=/tools/$LFS_TGT/include/c++/8.3.0

Why?  Did you "cd gcc-8.3.0/libstdc++-v3"?  The book has a  saying you
should "change to gcc-8.3.0 directory."

Or did you rebuilt the entire GCC with this command?  That would be totally
wrong.  In this stage GCC should have "--target=$LFS_TGT", not
"--host=$LFS_TGT".

> 2.  
> http://www.linuxfromscratch.org/lfs/view/development/chapter05/binutils-pass2.html
> CC=$LFS_TGT-gcc\
> AR=$LFS_TGT-ar \
> RANLIB=$LFS_TGT-ranlib \
> ../configure   \
> --prefix=/tools\
> --disable-nls  \
> --disable-werror   \
> --with-lib-path=/tools/lib \
> --with-sysroot
> 
> better separate into two parts:
> 
> CC=$LFS_TGT-gcc\
> AR=$LFS_TGT-ar \
> RANLIB=$LFS_TGT-ranlib
> and
> ../configure   \
> --prefix=/tools\
> --disable-nls  \
> --disable-werror   \
> --with-lib-path=/tools/lib \
> --with-sysroot

Again, why?

And if you did this, did you remember to unset CC, AR, and RANLIB after
finishing up Binutils?  If you didn't, you'll make *every* packages in Chapter 5
to pick up them.  That would be totally wrong.

> Otherwise, I met some problem as 
> https://www.linuxquestions.org/questions/linux-from-scratch-13/ch-5-9-binutils-pass-2-error-cannot-run-c-compiled-programs-807747/

That's in 2010 with LFS 6.5 and we'd never know why exactly these guys had this
issue.  Maybe they just mistyped something.

If you get "cannot run C compiled programs" just compile a C program and try to
run it:

echo "int main(){}" > dummy.c;  $LFS_TGT-gcc dummy.c;  ./a.out;

Then investigate *why* this can not run, instead of messing up the instruction,
continuing blindly, and complaining the book.

I believe you are really trying to run when you don't know how to walk.  Before
trying to hack LFS onto a USB drive, you should build a LFS system without
screwing it up, at first.
-- 
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] Install readline's header files ...

2019-03-14 Thread Xi Ruoyao
On 2019-03-14 02:26 -0700, Pei Jia wrote:
> 
> I've successfully installed Python-3.7.2, but still got this ERROR message:
> 
> /sources/python/Python-3.7.2/Modules/readline.c:31:10: fatal error:
> readline/readline.h: No such file or directory
>  #include 
> 
> So, I wonder while installing readline, we may also install the header files ?

Like most packages, Readline "make install" will install everything needed,
including the headers.
-- 
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] Giving up on LFS

2019-03-09 Thread Xi Ruoyao
On 2019-03-09 23:14 +, Ken Moffat wrote:
> On Sat, Mar 09, 2019 at 05:58:11PM -0500, Mark wrote:
> > Thanks for the reply Ken.
> > 
> > Well I gave up to soon.  I started looking more into the Fedora live image
> > and saw the kernel it uses had the dell_laptop, dell_smbios and dcdbas
> > modules loaded.
> > 
> > I rebuilt my kernel with those modules and was surprised to see it fixed the
> > problem.
> > 
> 
> Great.  The dependencies of modules on laptops are a black art.

ath9k needs no firmware so it's often used by the GNU guys building a computer
w/o non-free software code completely.

More annoying, Dell is reusing laptop design for some of its desktop computers. 
In our office I've been assigned a Dell computer and ran into several issues
building LFS on it.  For example, it has an "laptop display" and old desktop
environments (in Ubuntu 16.04 used as host OS) use that nonexisting "display" as
the main one!

And recently we are assigned serveal SSDs.  Then we found the ATX power source
of these Dells is really limited and has no extra power slots for additional
SATA devices...

In China we jokely say Dell is "a company only stupid man with a lot of money
will buy its product".  And Lenovo is "a company only have a conscience in
America" (because the price of its product is significantly higher in China and
the difference can't be explained with taxes, transportation costs etc.)  So we
often choose to buy some parts and assemble a desktop PC "From Scratch" :).

> > So I am back with LFS and now moving on to BLFS.
> > 
> 
> But please don't top post if you post there ;-)

A superhero named "Stackman" may like top posting :).

And maybe my response should be in lfs-chat...
-- 
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] Upgrading sysvinit

2019-03-09 Thread Xi Ruoyao
On 2019-03-09 13:55 -0600, Bruce Dubbs wrote:
> On 3/9/19 12:30 PM, Tim Tassonis wrote:
> > Hi all
> > 
> > I was just upgrading sysvinit from 288dsf to 2.93 and then noticed  that 
> >   I could not properly reboot or even halt the system  anymore.
> > 
> > Does anybody  know something about that? As far as I saw, the system 
> > complained about missig /run/initctl, but maybe that's just a symptom?

Isn't /run a tmpfs?

> > I have to add that after a manual stop and restart of the system, 
> > everything was fine again, so I suppose the error is caused by 
> > overwriting the binary on  a  running system.

Maybe.  I broken systemd once, when I was upgrading it. Then I had to use a
rescue disk to chroot into my system and reinstall systemd.

> For something like that, I would supose you would need to study the 
> source code.  In any case since it seems to be working, I wouldn't worry 
> about it.
> 
>   -- Bruce
> 
-- 
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] Confusion about the inconsistency between section title and content of systemd stable LFS book.

2019-03-04 Thread Xi Ruoyao
On 2019-03-04 08:57 -0600,Bruce Dubbs写道:
> On 3/4/19 12:51 AM, niuneilneo wrote:
> > Although it is a very tedious work to ensure the content being 
> > consistent with the section title, I find current LFS book of stable 
> > systemd is far from satisfaction. Just to name a few wrong mappings 
> > between the title and contents:
> > 
> > Chapter 5.4:
> > Title Binutils-2.32-Pass 1 with   Binutils-2.31.1 - Pass 1;

That's impossible.  I maintain a LFS Chinese translation and always recheck the
package version after an update.

> Where are you reading this?  The title and contents are both 
> Binutils-2.32-Pass 1
> 
> > 5.6:
> > Title Linux-4.20.12 API Headers with   Linux-4.18.5 API Headers.
> 
> This is consistent for me also.  Are you mixing up the 8.3 and 8.4 releases?
> 
> > What make things worse is the wget-list and  md5sums file content of 
> > packages and patches in 3.1 are also inconsistent.
> 
> There was a mixup in the sysV version of the md5sums, but that has been 
> fixed.
> 
> > This inconsistency may come from the mixing usage of LFS book systemd 
> > version 8.3 and 84. So I suggest a thorough update of the stable 
> > systemdLFS book to reduce the confusion between different name and contents.
> 
> It is possible that your browser remembered the old contents for some 
> URLs?  'stable' now points to 8.4 and a few days ago it pointed to 8.3. 
> Try refreshing any page that doesn't appear right.

I had a look on the HTTP response header:

> $ curl http://www.linuxfromscratch.org/lfs/view/stable-systemd/index.html -v >
> /dev/null
>   % Total% Received % Xferd  Average
> Speed   TimeTime Time  Current
>  Dload  Upload   Total   SpentLeft  Speed
>   0 00 00 0  0  0 --:--:-- --:--:-- --:--:
> -- 0*   Trying 2600:3c01::f03c:91ff:fe70:25e8...
> * TCP_NODELAY set
> * Connected to www.linuxfromscratch.org (2600:3c01::f03c:91ff:fe70:25e8) port
> 80 (#0)
>   0 00 00 0  0  0 --:--:-- --:--:-- --:--:
> -- 0> GET /lfs/view/stable-systemd/index.html HTTP/1.1
> > Host: www.linuxfromscratch.org
> > User-Agent: curl/7.63.0
> > Accept: */*
> > 
> < HTTP/1.1 200 OK
> < Date: Mon, 04 Mar 2019 20:37:04 GMT
> < Server: Apache/2.4.18 (Ubuntu)
> < Last-Modified: Thu, 28 Feb 2019 18:56:01 GMT
> < ETag: "706f-582f8d7687240"
> < Accept-Ranges: bytes
> < Content-Length: 28783
> < Vary: Accept-Encoding
> < Content-Type: text/html
> < 
> { [1165 bytes data]
> 100 28783  100 287830 0  51767  0 --:--:-- --:--:-- --:--:-- 51675
> * Connection #0 to host www.linuxfromscratch.org left intact

There are no "Expires" or "cache-control" headers so it's possible.  We can add
"Expires: 2019-08-31 00:00:00" for "/lfs/view/stable{,-systemd}/*" to tell the
browser to revalidate the cache for LFS-8.5.  And,
"/lfs/view/{development,systemd}/*" may need "cache-control: no-cache".
--
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] Python failed to make while constructing a temporary system...

2019-02-25 Thread Xi Ruoyao
On 2019-02-25 22:07 +0100, Pierre Labastie wrote:
> On 25/02/2019 19:29, Bruce Dubbs wrote:
> > On 2/25/19 12:22 PM, Pei Jia wrote:
> > > To whom it may concern:
> > > 
> > > 
> > > I'm building LFS, so far everything is good, until *Python while
> > > constructing a temporary system*.
> > > 
> > > http://www.linuxfromscratch.org/lfs/view/systemd/chapter05/Python.html
> > > 
> > > 
> > >  1.   If I strictly follow what's instructed, I obtained the following
> > > *ERROR* messages:
> > > 
> > > /INFO: Could not locate ffi libs and/or headers//
> > > ///mnt/lfs/sources/python/Python-3.7.2/Modules/_dbmmodule.c:16:10: fatal
> > > error: ndbm.h: No such file or directory//
> > > // #include //
> > > //  ^~~~//
> > > //compilation terminated.//
> > > //In file included from ./Include/py_curses.h:36,//
> > > // from
> > > /mnt/lfs/sources/python/Python-3.7.2/Modules/_curses_panel.c:15://
> > > ///usr/include/ncursesw/curses.h:60:10: fatal error:
> > > ncursesw/ncurses_dll.h:
> > > No such file or directory//
> > > // #include //
> > > //  ^~~~//
> > > //compilation terminated.//
> > > ///mnt/lfs/sources/python/Python-3.7.2/Modules/_hashopenssl.c:23:10: fatal
> > > error: openssl/evp.h: No such file or directory//
> > > // #include //
> > > //  ^~~//
> > > //compilation terminated.//
> > > ///mnt/lfs/sources/python/Python-3.7.2/Modules/nismodule.c:17:10: fatal
> > > error: rpc/rpc.h: No such file or directory//
> > > // #include //
> > > //  ^~~//
> > > //compilation terminated.//
> > > //In file included from ./Include/py_curses.h:36,//
> > > // from
> > > /mnt/lfs/sources/python/Python-3.7.2/Modules/_cursesmodule.c:113://
> > > ///usr/include/ncursesw/curses.h:60:10: fatal error:
> > > ncursesw/ncurses_dll.h:
> > > No such file or directory//
> > > // #include //
> > > //  ^~~~//
> > > //compilation terminated./
> 
> Those errors prevent building some modules, whose presence is not required at
> this stage. So please ignore.

Maybe we should add a  or  in Chapter 5 Python 3:

Some Python modules will fail to build and output error messages. 
They are unnecessary in this stage and the error messages should be
ignored.

> > > 2. After some investigation, I added up *2 includedirs* as:
> > > 
> > > /./configure --prefix=/tools --without-ensurepip --includedir=/usr/include
> > > --includedir=/usr/include/x86_64-linux-gnu/
> 
> Please don't do that: that would make python link to libraries on the host, so
> that it will be unusable in chroot...

The reason to use the sed command is exactly NOT to use libraries in /usr/lib
and headers in /usr/include.  They are known to cause problems building Glibc in
Chapter 6.
-- 
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] LFS 8.3 GRUB Compilation Errors

2019-02-07 Thread Xi Ruoyao
On 2019-02-07 14:45 +, Vaughan Butler wrote:
> In file included from grub-core/disk/ldm.c:26:
> ./include/grub/gpt_partition.h:79:1: error: alignment 1 of ‘struct 
> grub_gpt_partentry’ is less than 8 [-
> Werror=packed-not-aligned]
>  } GRUB_PACKED;
> 
> https://github.com/Marcel-Lambacher/TrustedGRUB2/pull/1/commits/f7c7ddd4dcb2ead8c02efa1b761097ef8e117c19
> 
> grub_script.yy.c: In function 'yy_fatal_error':
> 
> https://build.opensuse.org/package/view_file/Base:System/grub2/grub2-fix-build-with-flex-2.6.4.patch?expand=0

This is an instance of "-Werror=unused-value".

> HTH
> 
> Vaughan

We have "--disable-werror" so we shouldn't get any "-Werror=*" errors.
All LFS releases are tested by the editors so LFS 8.3 should work if you
follow it verbatimly.  And, I've built GRUB-2.02 following LFS book many
times.

So I disconfirm this.
-- 
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] Minimum Hardware configuration for a Custom PC

2018-12-05 Thread Xi Ruoyao
On 2018-12-05 19:17 +0100, Michele Bucca wrote:
> Hello There
> 
> I would like to build a PC in the future. As I am strict on money,
> what is the cheapest recommended hardware configuration for a speedy
> build for Linux From Scratch?

> Currently I have this laptop:  Lenovo b50-10
> CPU: Intel Celeron N2840
> RAM: 4GB of RAM (I don't know the type)
> HD: 500GB
> 
> What configuration would you recommend below €400?
> Is the Ryzen 5 2400G a good CPU? I read that the first gen had a few issues:
> segmentation faults when compiling with 4 parallel jobs, random
> reboots, etc. [1]
> Did they fix that? Does anyone use that CPU?

Ken and Thanos has used Ryzen.  See
http://lists.linuxfromscratch.org/pipermail/blfs-dev/2018-April/034379.html.
-- 
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] Help: Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0, 0)

2018-11-29 Thread Xi Ruoyao
On 2018-11-29 15:17 +, Jimmy Zhang wrote:
> 
> Hi,
> One thing I am confused that the LFS kernel (/boot/vmlinuz-4.18.5-lfs-8.3 
> from my partition(one partition for both
> /boot and /) was loaded and run, which indicated that the system can access 
> my partition /dev/sda3 which was going
> to be mounted as root, right? why the kernel will give the error messages 
> that unable to mount root fs?

Grub can access your partition and copy the kernel into your RAM.  But then
the kernel can not access your partition because it doesn't have proper driver.
-- 
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] Python build fail due to dependency

2018-10-22 Thread Xi Ruoyao
On 2018-10-22 12:37 +0530, Bharathi Ramana Joshi wrote:
> Hi
> 
> In section 6.51 of LFS 8.3, Python-3.7.0 is compiled with the option 
> `with-ensurepip` set to `yes` during configure. However, the install
> fails with the following message. There is an open bug related to
> this issue on python.org. They suggest a workaround either by using
> the option `--without-ensurepip` or installing the package `libffi-
> dev`. However, neither is mentioned in the LFS 8.3 book. How should I
> proceed?

What?  Libffi should have been installed in section 6.49.  Did you
forget to install it?
-- 
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] Host also not booting / EFI grub.cfg

2018-10-07 Thread Xi Ruoyao
On 2018-10-07 23:54 +, David Sprayberry wrote:
> LFS did not boot for me, possibly from an incorrectly configured
> kernel or grub.cfg.
> I used the grub.cfg (and all other instructions) from the EFI hint at
> http://lists.linuxfromscratch.org/pipermail/hints/2018-
> April/003325.html
> 
> 
> ...
> set root=(hd0,gpt2)
> 
> ...
> menuentry "GNU/Linux, Linux 4.18.5-lfs-8.3"  {
>   linux   /vmlinuz-4.18.5-lfs-8.3; root=/dev/sda7 ro
> }
> 
> My SSD's GPT layout:
> 1. EFI
> 2. boot
> 3. Host -- debian /
> 4. opt
> 5. home
> 6. src
> 7. LFS
> 8. swap
> 
> I prepared a USB with debian live on it, and used that to change
> grub.cfg. I noticed that other examples of grub.cfg on the internet
> did not have the semicolon in the linux line of grub.cfg, so I tried
> booting LFS with it removed, and it booted to a login prompt, but
> some drivers were missing because my keyboard was not recognized.
> Another kernel I don't remember being there, vmlinuz-4.9.0-7-amd64,
> showed up in /boot, which I guess must be the host's kernel and must
> have been there before.

The semicolon is a typo made by me :(.  It has beem removed in the
latest version:
http://svn.linuxfromscratch.org/hints/trunk/lfs-uefi-20180409.txt

> I sadly did not back up my old grub.cfg before overwriting it when
> installing grub, so I'm not sure if there were special options to
> pass to this host kernel to make it boot. When I first installed the
> host system, debian, I set it to automatically mount /boot. I added
> another menuentry to grub.cfg to try to boot this other kernel, but
> it couldn't find root fs, even though I passed it root=/dev/sda3 in
> grub.cfg. I looked at fstab on the host partition, but all the
> entries start with UUID=... with some codes.

It seems many "distribution" kernels need initramfs. Accroding to
Debian kernel config (
https://salsa.debian.org/kernel-team/linux/blob/master/debian/config/config
) they have
CONFIG_SATA_AHCI=m.  So it won't find any AHCI SATA disk without
initramfs (which contains AHCI kernel module).

By the way, UUID=... also needs initramfs (that's why LFS doesn't use
it).

> Now all I have to use is my USB's debian live. Should I  mount the
> LFS partition and chroot from the live system to recompile the kernel
> so it can recognize my keyboard, or is it better to get the host
> system booting and do it from there? Why did the semicolon make a
> difference in grub.cfg?

Both should be right once you can chroot into the LFS hierarchy.
-- 
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] Announcing Basic BLFS (beta)

2018-09-26 Thread Xi Ruoyao
On 2018-09-26 12:06 +0100, Hazel Russman wrote:
> On Tue, 25 Sep 2018 22:25:33 +0100
> Ken Moffat  wrote:
> > Second question: can you https:// to google ?
> Yes. And to Linux Questions. It's only the LFS site that's causing
> problems.

Whoa!  www.linuxfromscratch.org does not have HTTPS support now.
-- 
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] Failure while building libstdc++

2018-08-13 Thread Xi Ruoyao
On 2018-08-13 15:26 +0800, norman wrote:
> 在 2018年08月13日 15:14, Thomas Trepl 写道:
> > Am Montag, den 13.08.2018, 11:28 +0800 schrieb norman:
> > > Thanks for you help,
> > > I rebuild all, and I find I make a mistake on building gcc(5.10.
> > > GCC-7.3.0 - Pass 2), and  now it's fine.
> > > But I find a another problem in the chapter  6.9. Glibc-2.27, and
> > > resolve it following the solution:
> > > 
> > 
> > http://lists.linuxfromscratch.org/pipermail/lfs-dev/2011-August/064956.html
> > > I wonder why the instruction book update?
> > 
> > How does the problem look like?  Is that a compilation error or
> > something else? Could you also specify on which kind of machine you are
> > building?
> > 
> > --
> > Thomas
> > 
> 
> It reports a  config error while running ./configure:
> error: missing __attribute__ ((constructor)) support??

Notice that this is Chapter 6, not Chapter 5.

In Chapter 6 we are in a chroot environment which does NOT rely on host system
(except the kernel).  So we should NEVER use these "workarounds" in Chapter 6,
except for a kernel bug.

Glibc autoconf test failure suggests something in the toolchain is wrong.  If
you just workaround it, you may leave a timebomb in the final system.
-- 
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] Binutils / GCC - Pass 2 filenames

2018-08-10 Thread Xi Ruoyao
On 2018-08-10 10:20 -0400, Seth Turner wrote:
> I have built LFS a few times (on different raspberry pi platforms - 2b, 
> 3b, zero) and I always noticed that the first pass of binutils and gcc 
> would install in:
> 
>$LFS/tools/armv61-lfs-linux-gnueabihf
> 
> then during pass 2 (and maybe others) the new files were installed in:
> 
> $LFS/tools/armv61-unknown-linux-gnueabihf
> 
> I thought perhaps this was something to do with building on ARM, so I 
> started a build on a pc and watched the files as they were installed.
> 
> pass 1 = $LFS/i686-lfs-linux-gnu
> 
> pass 1 = $LFS/i686-pc-linux-gnu
> 
> In the final running system, in /usr/bin there are two copies of several 
> files.  These files are c++, g++, gcc, gcc-7.3.0, gcc-ar, gcc-nm, and 
> gcc-ranlib
> 
> One copy is just the filenames as I would expect, the other copy has 
> "i686-pc-linux-gnu" prefixed to the beginning of each of the filenames.: 
> i686-pc-linux-gnu-c++, i686-pc-linux-gnu-g++, i686-pc-linux-gnu-gcc, 
> i686-pc-linux-gnu-gcc-7.3.0, i686-pc-linux-gnu-gcc-ar, 
> i686-pc-linux-gnu-gcc-nm, and i686-pc-linux-gnu-gcc-ranlib
> 
> During one build I tried to manually edit the makefiles after running 
> ./config to change the i686-pc-linux-gnu to i686-lfs-linux-gnu, but that 
> failed pretty spectacularly.
> 
> Is this what is supposed to happen? Can one set be safely removed? Is 
> there a way to ./configure to give pass 2 the same filenames as pass 1?

Yes.  It's supposed to happen. Pass 2 is native toolchain, Pass 1 is cross
toolchain so they have different triplets.  After Pass 2 GCC has been
installed, we can remove Pass 1 (i686-lfs-linux-gnu-*) since they are no
longer needed.  But after all the entire /tools will be removed after the
final system is built so we just leave Pass 1 tools there.

In the final system NO tools should have triplet i686-lfs-linux-gnu.
This triplet is used for Pass 1 cross toolchain ONLY.

GCC install some programs with host triplet (the i686-pc-linux-gnu-* in
final system).  AFAIK they can be removed.
-- 
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] Failure while building libstdc++

2018-08-10 Thread Xi Ruoyao
On 2018-08-10 15:57 +0800, norman wrote:
> No, it's failed,

Then you should troubleshoot and resolve this issue, instead of continuing
blindly.

> lfs@home:/mnt/lfs/build/tmp$ $LFS_TGT-gcc dummy.c
> /mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/7.3.0/../../../../x86_64-lfs-linux-gnu/bin/ld:
>  
> cannot find crt1.o: No such file or directory
> /mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/7.3.0/../../../../x86_64-lfs-linux-gnu/bin/ld:
>  
> cannot find crti.o: No such file or directory
> Do you know which step is wrong? I think I did as the book told me.

No I don't.  Now you can check if /tools/lib/crt1.o exists.  If it exists,
it's likely you forgot to modify "STANDARD_STARTFILE_PREFIX_1" in GCC Pass 1
(5.5).  If not, your Glibc (5.7) installation is broken.
-- 
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] Failure while building libstdc++

2018-08-10 Thread Xi Ruoyao
On 2018-08-10 15:04 +0800, norman wrote:
> Hi All,
> 
> I'm a newbie in the lfs, I want to build a new distro, and I did as LFS 
> v8.2 told me,
> 
> but I met a problem while build libstdc++(Chapter 5.8).
> 
> hecking whether the x86_64-lfs-linux-gnu-gcc linker 
> (/mnt/lfs/tools/x86_64-lfs-linux-gnu/bin/ld -m elf_x86_64) supports 
> shared libraries... yes
> checking whether -lc should be explicitly linked in... no
> checking dynamic linker characteristics... configure: error: Link tests 
> are not allowed after GCC_NO_EXECUTABLES.
> 
> Can anyone tell what's wrong with this?

Did the check in 5.7:

> echo 'int main(){}' > dummy.c
> $LFS_TGT-gcc dummy.c
> readelf -l a.out | grep ': /tools'

succeed?  Can you run the generated "a.out" file (issue `./a.out`)?
-- 
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 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 Xi Ruoyao
On 2018-08-06 15:11 -0400, Michael Shell wrote:
> 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?

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 
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 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] Architecture suggestion

2018-07-15 Thread Xi Ruoyao
On 2018-07-15 09:17 -0400, Alan Corey wrote:
> On Sun, 15 Jul 2018, Ken Moffat wrote:
> 
> > On Sat, Jul 14, 2018 at 08:49:19PM -0400, Alan Corey wrote:
> > > Would it be correct to replace x86_64 in your documentation bash scripts
> > > with `uname -m`?  Because of course everybody knows ARM is the way of the
> > > future.  :)
> > > 
> > > But seriously, I'm not always sure what to relace.  Or maybe you could put
> > > them all on one page?  It wouldn't detract from the flow of the main page
> > > much that way.
> > > 
> > 
> > You think we know the details for architectures we don't use ?
> > 
> 
> Oh, that seems simple enough, you put the ones you know on a web page and 
> at the bottom appears a dedicated email address people can send them to. 
> You'd probably get a few bogus ones, but look through them once a week or 
> so and update the page.

I can tell, at least we have to modify gcc-pass1 and gcc-pass2 to make the
commands changing dynamic linker location working for other architectures.
Maybe:

sed 's@/lib[^/]*/ld[^:]*so@/tools&@g' -i `grep -lr ld.so gcc/config`

And the condition creating symlink /{tools,usr}/lib64 -> lib also need to
be modified for other architectures with multilib.

By the way, is CLFS dead now?  I remeber CLFS supports many architectures.
-- 
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] Booting LFS with systemd

2018-07-06 Thread Xi Ruoyao
On 2018-07-06 05:32 -0400, Michael Shell wrote:
> On Fri, 06 Jul 2018 15:44:19 +0800
> Xi Ruoyao  wrote:
> 
> 
> > There is message from systemd crash handler (showing a SIGABRT and dumping
> > core), but there is no welcome message.  So the problem should be in
> > mount_cgroup_controllers.
> > 
> > There IS a way to debug systemd - adding log_info into systemd source code
> > to output key variables and debug messages.  I was one of the ACM/ICPC
> > contestants who are very familiar with this ``debugging technique".  This
> > technique often outperforms GDB in programming contests. :)
> 
> 
>   Xi,
> 
> That is really good stuff to know! However, I don't understand what you
> mean by "adding log_info into systemd source code". How exactly do you
> do that? e.g., a debug option the source configure script, a manual
> alteration of source code (and how/where), etc.

log_info() is a systemd internal function.  The usage of it is like printf.
It outputs to system log and screen.

For example I can insert

log_info("I am still alive!!!");

into systemd source code somewhere.  If I can see the message, I'll know
systemd doesn't crash before the line I inserted.  Then I can actually do
a bisect to know which source code line actually crashes.

And I can also output systemd variables like

log_info("foo = %d", foo);
 
> If it is a cgroup issue, it is required that the kernel be built with:
> 
> CONFIG_CGROUPS (it is OK to disable all controllers)

If /proc/cgroups does not exist, there will be an error message

"Failed to enumerate cgroup controllers: No such file or directory"

Systemd seems to handle errors well (most of time).  SIGABRT is strange.
Someone said "-D_FORTIY_SOURCE=2" may cause systemd to SIGABRT.
-- 
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] Booting LFS with systemd

2018-07-06 Thread Xi Ruoyao
On 2018-07-06 08:23 +0200, Frans de Boer wrote:
> On 07/06/2018 05:32 AM, Michael Shell wrote:
> > On Thu, 5 Jul 2018 21:48:16 +0200
> > Frans de Boer  wrote:
> > 
> > > I had even rebuild everything with systemd-232, and that worked as
> > > before. But after 232, things started to behave strange. Now way to
> > > debug systemd, whatever I do
> > 
> > Frans,

I read some systemd-238 code (src/core/main.c:1820):

> if (arg_system) {
> /* Make sure we leave a core dump without panicing the 
> kernel. */
> install_crash_handler();
> 
> if (!skip_setup) {
> r = mount_cgroup_controllers(arg_join_controllers);
> if (r < 0) { 
> *ret_error_message = "Failed to mount cgroup 
> hierarchies";
> return r;
> }
> 
> status_welcome();

There is message from systemd crash handler (showing a SIGABRT and dumping
core), but there is no welcome message.  So the problem should be in
mount_cgroup_controllers.

There IS a way to debug systemd - adding log_info into systemd source code
to output key variables and debug messages.  I was one of the ACM/ICPC
contestants who are very familiar with this ``debugging technique".  This
technique often outperforms GDB in programming contests. :)
-- 
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] Booting LFS with systemd

2018-07-05 Thread Xi Ruoyao
On 2018-07-05 17:05 -0400, Baho Utot wrote:
> On 07/05/2018 03:48 PM, Frans de Boer wrote:
> > On 06/30/2018 01:29 PM, Hazel Russman wrote:
> > > On Fri, 29 Jun 2018 01:25:29 -0400
> > > Michael Shell  wrote:
> > > 
> > > > On Thu, 28 Jun 2018 16:06:00 +0800
> > > > Xi Ruoyao  wrote:
> > > > 
> > > > > Now I only use "initrd" directive to update CPU microcode and fix the
> > > > > buggy ACPI DSDT of my laptop (another sad story).
> > > > 
> > > > .
> > > > 
> > > > And as there now seems to be several people who suffer with the
> > > > ACPI DSDT driver bug, you guys should make sure upstream is aware
> > > > of the problem, if they aren't already.

I don't know if it is a driver bug.  It seems to me a bug in DSDT itself.

> I moved to FreebSD, but I am moving back to linux because of all the 
> non  sense going on with FreeBSD.  I'll be using the "old and proven" 
> init system.

Just curious, is there anything like "BSD From Scratch"?
-- 
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


  1   2   >