LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   GCC8.2-Chapter6 LFS test check (https://www.linuxquestions.org/questions/linux-from-scratch-13/gcc8-2-chapter6-lfs-test-check-4175642466/)

lfs1121 11-16-2018 04:12 AM

GCC8.2-Chapter6 LFS test check
 
Hello,

I am building Linux from scratch following the book instructions from Linux-From-Scratch-Version8.3-systemd Page#123. I am in the GCC package now and while running the following command
Code:

chown -Rv nobody .
su nobody -s /bin/bash -c "PATH=$PATH make -k check"

I get the following output:
Code:


Schedule of variations:
    unix

Running target unix
Using /tools/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /tools/share/dejagnu/config/unix.exp as generic interface file for target.
Using ../../../../libatomic/testsuite/config/default.exp as tool-and-target-specific interface file.
Running ../../../../libatomic/testsuite/libatomic.c/c.exp ...

                === libatomic Summary ===

# of expected passes                54
make[4]: Leaving directory '/sources/gcc-8.2.0/build/x86_64-pc-linux-gnu/libatomic/testsuite'
make[3]: Leaving directory '/sources/gcc-8.2.0/build/x86_64-pc-linux-gnu/libatomic/testsuite'
make[3]: Entering directory '/sources/gcc-8.2.0/build/x86_64-pc-linux-gnu/libatomic'
true  DO=all multi-do # make
make[3]: Leaving directory '/sources/gcc-8.2.0/build/x86_64-pc-linux-gnu/libatomic'
make[2]: Leaving directory '/sources/gcc-8.2.0/build/x86_64-pc-linux-gnu/libatomic'
make[1]: Leaving directory '/sources/gcc-8.2.0/build'
make: *** [Makefile:2235: do-check] Error 2
make: Target 'check' not remade because of errors.

I also ran the next instruction
Code:

../contrib/test_summary
And this is the output of test_summary
Code:

(lfs chroot) root:/sources/gcc-8.2.0/build# ../contrib/test_summary
cat <<'EOF' |
LAST_UPDATED: Obtained from SVN: tags/gcc_8_2_0_release revision 262993

Native configuration is x86_64-pc-linux-gnu

                === g++ tests ===


Running target unix

                === g++ Summary ===

# of expected passes                125327
# of expected failures                504
# of unsupported tests                4931
/sources/gcc-8.2.0/build/gcc/xg++  version 8.2.0 (GCC)

                === gcc tests ===


Running target unix

                === gcc Summary ===

# of expected passes                130960
# of expected failures                393
# of unsupported tests                2094
/sources/gcc-8.2.0/build/gcc/xgcc  version 8.2.0 (GCC)

                === libatomic tests ===


Running target unix

                === libatomic Summary ===

# of expected passes                54
                === libgomp tests ===


Running target unix

                === libgomp Summary ===

# of expected passes                1837
# of unsupported tests                192
                === libitm tests ===


Running target unix

                === libitm Summary ===

# of expected passes                42
# of expected failures                3
# of unsupported tests                1
                === libstdc++ tests ===


Running target unix

                === libstdc++ Summary ===

# of expected passes                12293
# of expected failures                71
# of unsupported tests                259

Compiler version: 8.2.0 (GCC)
Platform: x86_64-pc-linux-gnu
configure flags: --prefix=/usr --enable-languages=c,c++ --disable-multilib --disable-bootstrap --disable-libmpx --with-system-zlib
EOF
Mail -s "Results for 8.2.0 (GCC) testsuite on x86_64-pc-linux-gnu" gcc-testresults@gcc.gnu.org &&
mv /sources/gcc-8.2.0/build/./gcc/testsuite/g++/g++.sum /sources/gcc-8.2.0/build/./gcc/testsuite/g++/g++.sum.sent &&
mv /sources/gcc-8.2.0/build/./gcc/testsuite/gcc/gcc.sum /sources/gcc-8.2.0/build/./gcc/testsuite/gcc/gcc.sum.sent &&
mv /sources/gcc-8.2.0/build/./x86_64-pc-linux-gnu/libatomic/testsuite/libatomic.sum /sources/gcc-8.2.0/build/./x86_64-pc-linux-gnu/libatomic/testsuite/libatomic.sum.sent &&
mv /sources/gcc-8.2.0/build/./x86_64-pc-linux-gnu/libgomp/testsuite/libgomp.sum /sources/gcc-8.2.0/build/./x86_64-pc-linux-gnu/libgomp/testsuite/libgomp.sum.sent &&
mv /sources/gcc-8.2.0/build/./x86_64-pc-linux-gnu/libitm/testsuite/libitm.sum /sources/gcc-8.2.0/build/./x86_64-pc-linux-gnu/libitm/testsuite/libitm.sum.sent &&
mv /sources/gcc-8.2.0/build/./x86_64-pc-linux-gnu/libstdc++-v3/testsuite/libstdc++.sum /sources/gcc-8.2.0/build/./x86_64-pc-linux-gnu/libstdc++-v3/testsuite/libstdc++.sum.sent &&
mv /sources/gcc-8.2.0/build/./gcc/testsuite/g++/g++.log /sources/gcc-8.2.0/build/./gcc/testsuite/g++/g++.log.sent &&
mv /sources/gcc-8.2.0/build/./gcc/testsuite/gcc/gcc.log /sources/gcc-8.2.0/build/./gcc/testsuite/gcc/gcc.log.sent &&
mv /sources/gcc-8.2.0/build/./x86_64-pc-linux-gnu/libatomic/testsuite/libatomic.log /sources/gcc-8.2.0/build/./x86_64-pc-linux-gnu/libatomic/testsuite/libatomic.log.sent &&
mv /sources/gcc-8.2.0/build/./x86_64-pc-linux-gnu/libgomp/testsuite/libgomp.log /sources/gcc-8.2.0/build/./x86_64-pc-linux-gnu/libgomp/testsuite/libgomp.log.sent &&
mv /sources/gcc-8.2.0/build/./x86_64-pc-linux-gnu/libitm/testsuite/libitm.log /sources/gcc-8.2.0/build/./x86_64-pc-linux-gnu/libitm/testsuite/libitm.log.sent &&
mv /sources/gcc-8.2.0/build/./x86_64-pc-linux-gnu/libstdc++-v3/testsuite/libstdc++.log /sources/gcc-8.2.0/build/./x86_64-pc-linux-gnu/libstdc++-v3/testsuite/libstdc++.log.sent &&
true

I want to know if I am good to go and install the GCC package or am I missing something? Also, I did all the previous steps with no errors and in a single mount i.e. I have not disconnected my partition drives or shut any system etc. So I believe, there is nothing wrong with mounting the virtual drives.

Thanks,

hazel 11-16-2018 09:12 AM

Looks good to me. The lines
Code:

make: *** [Makefile:2235: do-check] Error 2
make: Target 'check' not remade because of errors.

always occur if there is even one "unexpected" failure. But I can't even see one on your output. There are plenty of expected failures but they don't count. Anyway, one or two errors in a program as complex as gcc is to be expected. That's a general rule, by the way. One error is no cause for panic. A lot of them means something is wrong. Go ahead and install.

soveda 11-16-2018 10:03 AM

Sorry to piggyback on this thread
when I run
Code:

chown -Rv nobody .
su nobody -s /bin/bash -c "PATH=$PATH make -k check"

I get the message
Code:

su: cannot drop the controlling terminal
any ideas?

hazel 11-16-2018 10:29 AM

My guess is something wrong with either /dev or /dev/pts. You don't say whereabouts in the book you are, but if you are in chapter 6, then everything depends on the correct dynamic filesystems being mounted on the new LFS partition before you chroot. Especially if you are working in spasms on different days. I always use a script to do all the mounts and then chroot, so I don't have to remember the details.

Try ls /dev and ls /dev/pts to check that all your devices are there

soveda 11-16-2018 11:21 AM

Quote:

Originally Posted by hazel (Post 5926777)
My guess is something wrong with either /dev or /dev/pts. You don't say whereabouts in the book you are, but if you are in chapter 6, then everything depends on the correct dynamic filesystems being mounted on the new LFS partition before you chroot. Especially if you are working in spasms on different days. I always use a script to do all the mounts and then chroot, so I don't have to remember the details.

Try ls /dev and ls /dev/pts to check that all your devices are there

ta for the reply. I've re-mounted everything, deleted gcc-8.2.0 and am trying again!

crmullins 12-03-2022 03:55 PM

I ran into this same issue (4 years later!) in v11.2 of the book, which uses the "tester" account instead:

Code:

chown -Rv tester .
su tester -c "PATH=$PATH make -k check"

I also tried rebooting and remounting everything, re-entering the chroot. The issue ended up being something wrong with the root permissions.

Code:

(lfs chroot) root:/sources/gcc-12.2.0/build# ls -ld /
drwx------ 20 1001 1000 4096 Nov 24 16:44 /

The fix was to set these permissions to the same as /bin/bash:
Code:

chmod 755 /


All times are GMT -5. The time now is 03:46 PM.