Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
So I recompiled gcc. The intent was to add Fortran (I used it ages ago and darn it I may just want to try it again) and Go (I have some curiosity about this relatively new language).
Naturally, I followed the directions of the BLFS8 (stable) book. I figured that since I was compiling the same version of GCC that I had already in-place, things should go OK? Right? I hope?
Ran it. No obvious errors during sed, configure & make.
Then I ran "make -k check". The process ran for some time (expected) but I did not expect the check itself to fail and that is what looks like has happened (quote instead of code, so it wraps):
Quote:
PASS: old/regexp
PASS: old/template
PASS: os/exec
PASS: os/signal
PASS: os/user
PASS: path/filepath
PASS: regexp/syntax
PASS: runtime/pprof
PASS: sync/atomic
PASS: text/scanner
PASS: text/tabwriter
PASS: text/template
PASS: text/template/parse
PASS: testing/quick
PASS: unicode/utf16
PASS: unicode/utf8
make[4]: Leaving directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libgo'
make[3]: [Makefile:6623: check-am] Error 2 (ignored)
make[3]: Leaving directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libgo'
true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CC_FOR_TARGET=/hsc/big/gcc-6.3.0/build/./gcc/xgcc -B/hsc/big/gcc-6.3.0/build/./gcc/" "CFLAGS=-g -O2" "CXXFLAGS=-g -O2 -D_GNU_SOURCE" "CFLAGS_FOR_BUILD=-g -O2" "CFLAGS_FOR_TARGET=-g -O2" "GOC_FOR_TARGET=/hsc/big/gcc-6.3.0/build/./gcc/gccgo -B/hsc/big/gcc-6.3.0/build/./gcc/" "GOC=/hsc/big/gcc-6.3.0/build/./gcc/gccgo -B/hsc/big/gcc-6.3.0/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include " "GOCFLAGS=-O2 -g" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "LDFLAGS=" "LIBCFLAGS=-g -O2" "LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=make" "MAKEINFO=makeinfo --split-size=5000000 --split-size=5000000 " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "RUNTESTFLAGS=" "exec_prefix=/usr" "infodir=/usr/share/info" "libdir=/usr/lib" "includedir=/usr/include" "prefix=/usr" "tooldir=/usr/x86_64-pc-linux-gnu" "gxx_include_dir=" "AR=ar" "AS=/hsc/big/gcc-6.3.0/build/./gcc/as" "LD=/hsc/big/gcc-6.3.0/build/./gcc/collect-ld" "RANLIB=ranlib" "NM=/hsc/big/gcc-6.3.0/build/./gcc/nm" "NM_FOR_BUILD=" "NM_FOR_TARGET=nm" "DESTDIR=" "WERROR=-Werror" DO=check-am multi-do # make
make[2]: *** [Makefile:6552: check-tail] Error 1
make[2]: Target 'check' not remade because of errors.
make[2]: Leaving directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libgo'
make[1]: *** [Makefile:19360: check-target-libgo] Error 2
make[2]: Entering directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libffi'
Making check in include
make[3]: Entering directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libffi/include'
make[3]: Nothing to be done for 'check'.
make[3]: Leaving directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libffi/include'
Making check in testsuite
make[3]: Entering directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libffi/testsuite'
make check-DEJAGNU
make[4]: Entering directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libffi/testsuite'
Making a new site.exp file...
srcdir='../../../../libffi/testsuite'; export srcdir; \
EXPECT=`if [ -f ../../expect/expect ] ; then echo ../../expect/expect ; else echo expect ; fi`; export EXPECT; \
runtest=`if [ -f ../../../../libffi/../dejagnu/runtest ] ; then echo ../../../../libffi/../dejagnu/runtest ; else echo runtest; fi`; \
if /bin/sh -c "$runtest --version" > /dev/null 2>&1; then \
exit_status=0; l='libffi'; for tool in $l; do \
if $runtest --tool $tool --srcdir $srcdir ; \
then :; else exit_status=1; fi; \
done; \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi; \
exit $exit_status
WARNING: Couldn't find the global config file.
Test run by root on Sun Jul 30 17:48:03 2017
Native configuration is x86_64-pc-linux-gnu
=== libffi tests ===
Schedule of variations:
unix
Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using ../../../../libffi/testsuite/config/default.exp as tool-and-target-specific interface file.
Running ../../../../libffi/testsuite/libffi.call/call.exp ...
Running ../../../../libffi/testsuite/libffi.complex/complex.exp ...
Running ../../../../libffi/testsuite/libffi.go/go.exp ...
Running ../../../../libffi/testsuite/libffi.special/special.exp ...
=== libffi Summary ===
# of expected passes 2214
make[4]: Leaving directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libffi/testsuite'
make[3]: Leaving directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libffi/testsuite'
Making check in man
make[3]: Entering directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libffi/man'
make[3]: Nothing to be done for 'check'.
make[3]: Leaving directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libffi/man'
make[3]: Entering directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libffi'
true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CFLAGS=-g -O2" "CXXFLAGS=-g -O2 -D_GNU_SOURCE" "CFLAGS_FOR_BUILD=-g -O2" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "JC1FLAGS=" "LDFLAGS=" "LIBCFLAGS=-g -O2" "LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=make" "MAKEINFO=makeinfo --split-size=5000000 --split-size=5000000 -I ../../../libffi/../gcc/doc/include -I ../../../libffi/../gcc/doc/include" "PICFLAG=" "PICFLAG_FOR_TARGET=" "RUNTESTFLAGS=" "SHELL=/bin/sh" "exec_prefix=/usr" "infodir=/usr/share/info" "libdir=/usr/lib" "mandir=/usr/share/man" "prefix=/usr" "AR=ar" "AS=/hsc/big/gcc-6.3.0/build/./gcc/as" "CC=/hsc/big/gcc-6.3.0/build/./gcc/xgcc -B/hsc/big/gcc-6.3.0/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include " "CXX=/hsc/big/gcc-6.3.0/build/./gcc/xg++ -B/hsc/big/gcc-6.3.0/build/./gcc/ -nostdinc++ -nostdinc++ -I/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libstdc++-v3/include -I/hsc/big/gcc-6.3.0/libstdc++-v3/libsupc++ -I/hsc/big/gcc-6.3.0/libstdc++-v3/include/backward -I/hsc/big/gcc-6.3.0/libstdc++-v3/testsuite/util -L/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -B/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include " "LD=/hsc/big/gcc-6.3.0/build/./gcc/collect-ld" "NM=/hsc/big/gcc-6.3.0/build/./gcc/nm" "RANLIB=ranlib" "DESTDIR=" DO=all multi-do # make
make[3]: Leaving directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libffi'
make[2]: Leaving directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libffi'
make[2]: Entering directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libgomp'
Making check in testsuite
make[3]: Entering directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libgomp/testsuite'
make check-DEJAGNU
make[4]: Entering directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libgomp/testsuite'
Making a new site.exp file...
srcdir='../../../../libgomp/testsuite'; export srcdir; \
EXPECT=expect; export EXPECT; \
runtest=runtest; \
if /bin/sh -c "$runtest --version" > /dev/null 2>&1; then \
exit_status=0; l='libgomp'; for tool in $l; do \
if $runtest --tool $tool --srcdir $srcdir ; \
then :; else exit_status=1; fi; \
done; \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi; \
exit $exit_status
WARNING: Couldn't find the global config file.
Test run by root on Sun Jul 30 17:49:39 2017
Native configuration is x86_64-pc-linux-gnu
=== libgomp tests ===
Schedule of variations:
unix
Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using ../../../../libgomp/testsuite/config/default.exp as tool-and-target-specific interface file.
Running ../../../../libgomp/testsuite/libgomp.c/c.exp ...
Running ../../../../libgomp/testsuite/libgomp.c++/c++.exp ...
Running ../../../../libgomp/testsuite/libgomp.fortran/fortran.exp ...
Running ../../../../libgomp/testsuite/libgomp.graphite/graphite.exp ...
Running ../../../../libgomp/testsuite/libgomp.hsa.c/c.exp ...
Running ../../../../libgomp/testsuite/libgomp.oacc-c/c.exp ...
Running ../../../../libgomp/testsuite/libgomp.oacc-c++/c++.exp ...
Running ../../../../libgomp/testsuite/libgomp.oacc-fortran/fortran.exp ...
=== libgomp Summary ===
# of expected passes 5106
# of unsupported tests 271
make[4]: Leaving directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libgomp/testsuite'
make[3]: Leaving directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libgomp/testsuite'
make[3]: Entering directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libgomp'
true DO=all multi-do # make
:
:
:
make[3]: Leaving directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libgomp'
make[2]: Leaving directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libgomp'
make[2]: Entering directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libitm'
Making check in testsuite
make[3]: Entering directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libitm/testsuite'
make check-DEJAGNU
make[4]: Entering directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libitm/testsuite'
Making a new site.exp file...
srcdir='../../../../libitm/testsuite'; export srcdir; \
EXPECT=expect; export EXPECT; \
runtest=runtest; \
if /bin/sh -c "$runtest --version" > /dev/null 2>&1; then \
exit_status=0; l='libitm'; for tool in $l; do \
if $runtest --tool $tool --srcdir $srcdir ; \
then :; else exit_status=1; fi; \
done; \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi; \
exit $exit_status
WARNING: Couldn't find the global config file.
Test run by root on Sun Jul 30 17:58:05 2017
Native configuration is x86_64-pc-linux-gnu
=== libitm tests ===
Schedule of variations:
unix
Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using ../../../../libitm/testsuite/config/default.exp as tool-and-target-specific interface file.
Running ../../../../libitm/testsuite/libitm.c/c.exp ...
Running ../../../../libitm/testsuite/libitm.c++/c++.exp ...
=== libitm Summary ===
# of expected passes 42
# of expected failures 3
# of unsupported tests 1
make[4]: Leaving directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libitm/testsuite'
make[3]: Leaving directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libitm/testsuite'
make[3]: Entering directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libitm'
true DO=all multi-do # make
make[3]: Leaving directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libitm'
make[2]: Leaving directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libitm'
make[2]: Entering directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libatomic'
Making check in testsuite
make[3]: Entering directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libatomic/testsuite'
make check-DEJAGNU
make[4]: Entering directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libatomic/testsuite'
Making a new site.exp file...
srcdir='../../../../libatomic/testsuite'; export srcdir; \
EXPECT=expect; export EXPECT; \
runtest=runtest; \
if /bin/sh -c "$runtest --version" > /dev/null 2>&1; then \
exit_status=0; l='libatomic'; for tool in $l; do \
if $runtest --tool $tool --srcdir $srcdir ; \
then :; else exit_status=1; fi; \
done; \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi; \
exit $exit_status
WARNING: Couldn't find the global config file.
Test run by root on Sun Jul 30 17:58:09 2017
Native configuration is x86_64-pc-linux-gnu
=== libatomic tests ===
Schedule of variations:
unix
Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/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 '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libatomic/testsuite'
make[3]: Leaving directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libatomic/testsuite'
make[3]: Entering directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libatomic'
true DO=all multi-do # make
make[3]: Leaving directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libatomic'
make[2]: Leaving directory '/hsc/big/gcc-6.3.0/build/x86_64-pc-linux-gnu/libatomic'
make[1]: Target 'check-target' not remade because of errors.
make[1]: Leaving directory '/hsc/big/gcc-6.3.0/build'
make: *** [Makefile:2273: do-check] Error 2
make: Target 'check' not remade because of errors.
The above is not the complete output. It is all that screen had retained when I decided to copy-and-paste it. Near as I can tell, the last few error lines are not in any log. Those last few lines are what look bad.
Speaking of logs, following the guidance of the book, I was able to render this summary:
Running target unix
FAIL: gcc.dg/cpp/trad/include.c (test for excess errors)
=== gcc Summary ===
# of expected passes 117921
# of unexpected failures 1
# of expected failures 316
# of unsupported tests 1702
/hsc/big/gcc-6.3.0/build/gcc/xgcc version 6.3.0 (GCC)
=== gfortran tests ===
Running target unix
=== gfortran Summary ===
# of expected passes 42766
# of expected failures 68
# of unsupported tests 76
/hsc/big/gcc-6.3.0/build/gcc/gfortran version 6.3.0 (GCC)
=== g++ tests ===
Running target unix
XPASS: g++.dg/tls/thread_local-order2.C -std=c++11 execution test
XPASS: g++.dg/tls/thread_local-order2.C -std=c++14 execution test
=== g++ Summary ===
# of expected passes 105874
# of unexpected successes 2
# of expected failures 318
# of unsupported tests 3793
/hsc/big/gcc-6.3.0/build/gcc/xg++ version 6.3.0 (GCC)
=== go tests ===
Running target unix
=== go Summary ===
# of expected passes 7255
# of expected failures 1
# of untested testcases 6
# of unsupported tests 1
/hsc/big/gcc-6.3.0/build/gcc/gccgo version 6.3.0 (GCC)
=== obj-c++ tests ===
Running target unix
=== obj-c++ Summary ===
# of expected passes 1446
# of expected failures 10
# of unsupported tests 77
/hsc/big/gcc-6.3.0/build/gcc/xg++ version 6.3.0 (GCC)
=== objc tests ===
Running target unix
=== objc Summary ===
# of expected passes 2783
# of expected failures 6
# of unsupported tests 68
/hsc/big/gcc-6.3.0/build/gcc/xgcc version 6.3.0 (GCC)
=== libatomic tests ===
Running target unix
=== libatomic Summary ===
# of expected passes 54
=== libffi tests ===
Running target unix
=== libffi Summary ===
# of expected passes 2214
=== libgo tests ===
Running target unix
FAIL: syscall
=== libgo Summary ===
# of expected passes 133
# of unexpected failures 1
/hsc/big/gcc-6.3.0/build/./gcc/gccgo version 6.3.0 (GCC)
=== libgomp tests ===
Running target unix
=== libgomp Summary ===
# of expected passes 5106
# of unsupported tests 271
=== libitm tests ===
Running target unix
=== libitm Summary ===
# of expected passes 42
# of expected failures 3
# of unsupported tests 1
=== libstdc++ tests ===
Running target unix
FAIL: experimental/filesystem/iterators/directory_iterator.cc execution test
FAIL: experimental/filesystem/iterators/recursive_directory_iterator.cc execution test
FAIL: experimental/filesystem/operations/exists.cc execution test
FAIL: experimental/filesystem/operations/is_empty.cc execution test
FAIL: experimental/filesystem/operations/temp_directory_path.cc execution test
=== libstdc++ Summary ===
# of expected passes 11108
# of unexpected failures 5
# of expected failures 66
# of unsupported tests 235
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616
Rep:
make -k check will allow the tests to continue, if there are errors. As for your errors...
Code:
FAIL: gcc.dg/cpp/trad/include.c (test for excess errors)
FAIL: experimental/filesystem/iterators/directory_iterator.cc execution test
FAIL: experimental/filesystem/iterators/recursive_directory_iterator.cc execution test
FAIL: experimental/filesystem/operations/exists.cc execution test
FAIL: experimental/filesystem/operations/is_empty.cc execution test
FAIL: experimental/filesystem/operations/temp_directory_path.cc execution test
I've seen all of these myself on more than one build. None of them has ever caused any sort of issue later and those system were built all the way to functional desktops.
make -k check will allow the tests to continue, if there are errors.
Does that mean that my "make -k check" run to completion (ie, ran every test)?
Quote:
I've seen all of these myself on more than one build. None of them has ever caused any sort of issue later and those system were built all the way to functional desktops.
This is encouraging, thank you. My BLFS system right now is my main desktop system, so I am a bit more cautious.
It looks like the best thing for me to do is a complete backup, the make install, reboot, then test the compiler by recompiling seamonkey.
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616
Rep:
Yes, the "-k" stops it from bombing out when a test fails.
Recompiling SeaMonkey may be a bit extreme. There are a couple things the book forgets to mention about tests. First, they're the lowest priority to be updated by developers. In the OS/FS community, new bells and whistles come first, bug fixes or code spec updates are a grudging second and, at the bottom, lies updating tests that newer code has broken. Second, the tests can easily be broken by a build environment that's not very close to the developer's. Virtual environments, different processors... hell different memory timing (overclocked) can probably break some.
The important things to look for are a lot of fails and/or a lot of fails on a specific page of code and anything with functions derived from that page of code. If you get a ton of floating point division errors followed by a lot of failing advanced math tests (sin,cos,tan,Fourier) then that's a good indication something is actually broken. Likewise, if you get an error regarding the handling of bitstream data and then lots of file/pipe/network function tests fail, chances are good something is actually wrong.
The last time I had an actual problem... I made a mistake in
"Adjusting the Toolchain (Chapter 6)". Running "make check" on GCC produced more than 20,000 errors in just a few seconds. So, if you've made a major mistake, it will become apparent very quickly in most cases.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.