Re: [blfs-support] 9.1-systemd: NSS-3.55 build fails
On Sat, Aug 15, 2020 at 11:37:23PM +0200, Elias Rudberg via blfs-support wrote: > Hi Hans, > > > How can I verify whether I ran out of memory or not? > > That's something I would like to know also. I don't know how to do that. > > Some things you could try: > > - monitor the memory usage using "top" or similar, while the compilation is > going on > With modern versions of top, you may need to spend some time configuring it to your preferences, but you should be able to get it to show memory and swap at the bottom of the upper part of its display, below the CPU activity if that is being shown. Mine is configured to show the active processes (not the default 'tree' style), so when it is running with processes which use a lot of memory (graphical browsers, C++ compiles, rust compiles) I can see how much memory they are using. You can also use 'free' to get the memory/swap usage. On sysv I would look at dmesg to see if it mentioned an OOM (out of memory). If you are running systemd then 'journalctl -k' might show you the dmesg output (based on a quick google for systemd dmesg, not from experience, so could well be wrong). > - try to free up some memory and then try again, for example if you were > using a window manager you could try without that (boot to runlevel 3 or > something) > > - try to reduce the amount of memory it is using when compiling, for example > turn off parallel make (if that was used) and/or change compiler > optimization flags to use less optimizations, e.g. -O1 instead of -O2. > Playing with CFLAGS does not always do what you expect (it depends on the individual packages as to whether you need to take special action to force your own CFLAGS, and trying to detune released packages seems like a bad idea. For the little it is worth, I did some experiments just over a year ago with the aim of forcing my own CFLAGS, CXXFLAGS and exploring some of the options. The results (basically one run of each variation, but with some upgrades along the way) were mostly inconclusive but somewhere in there are details of what I had to do to the packages I build to get them to obey my CFLAGS (or in some cases, to not use my optimization of -O2 or -O3) because some default to -O3 but will detune to -O2 if you pass that, and one some of my less-powerful machines I do generally use -O2. But the problem was in nss. I do not regard that as a large package, although it is a slow one when built using -j1. AFAICS building nss-3.55 less than 300 MB which should be trivial. > - try in another computer that has more memory to see if it works there > > Hope this helps > > / Elias Another thought is that there might have been a RAM problem which caused g++ to be killed. Again, dmesg or equivalent might show what happened. If you got a segmentation fault on an LFS system, then either something was miscompiled using opcodes which are not available (has been known with e.g. gmp using its default configure scripts on low-end intel machines where some op-codes for the higher end versions of that generation were assumed by the gmp developers to be present in all models), or else there might be a memory fault. For the opcode issue, it seems unlikely that you would manage to complete LFS and then on the same machine hit this when trying to build NSS. But if you built LFS on one machine and then tried to run it on a different machine it could happen (e.g. I took a binary from an old LFS optimised for a Kaveri and eventually managed to get it working-enough to build LFS on a Ryzen+, but getting there was 'fun' with no guarantee of success). For memory problems, on a past x86_64 AMD machine (I think it was some sort of old phenom with 4 cores) I had a low-end motherboard and from time to time it would segfault if using -j4, or very occasionally it would segfault even on -j1 and need to be turned off for a while. I suspect that insufficient voltage in the RAM was the problem (someone else had similar results), but power supply issues, or cooling, can also do this. Beyond thant, memtest86 (or old unmaintained memtest86+ with the reservation that using all cores usually locks up). If RAM has gone bad (or is being run with too-optimistic settings) it usually shows up within a couple of passes. ĸen -- Juliet's version of cleanliness was next to godliness, which was to say it was erratic, past all understanding and was seldom seen. -- Unseen Academicals -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
[blfs-support] LFS-10.0-rc1 is released
The Linux From Scratch community announces the release of LFS Version 10.0-rc1. It is a preliminary release of LFS-10.0. This version of the book has undergone a major reorganization. It uses enhanced cross-compilation techniques and an environment isolated from the host system to build tools for the final system. This reduces both the chance for changing the the host system and the potential of the host system influencing the LFS build process. Major changes include toolchain updates to binutils-2.35, gcc-10.2.0, and glibc-2.32. In total, 37 packages were updated since the last release. Changes to the text have also been made throughout the book. The Linux kernel has also been updated to version 5.8.1. We encourage all users to read through this release of the book and test the instructions so that we can make the final release as good as possible. You can read the book online [0], or download [1] to read locally. In coordination with this release, a new version of LFS using the systemd package is also being released. This package implements the newer systemd style of system initialization and control and is consistent with LFS in most packages. You can read the systemd version of the book online [2], or download [3] to read locally. -- Bruce [0] http://www.linuxfromscratch.org/lfs/view/10.0-rc1/ [1] http://www.linuxfromscratch.org/lfs/downloads/10.0-rc1/ [2] http://www.linuxfromscratch.org/lfs/view/10.0-systemd-rc1/ [3] http://www.linuxfromscratch.org/lfs/downloads/10.0-systemd-rc1/ -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
Re: [blfs-support] 9.1-systemd: NSS-3.55 build fails
Hi Hans, How can I verify whether I ran out of memory or not? That's something I would like to know also. I don't know how to do that. Some things you could try: - monitor the memory usage using "top" or similar, while the compilation is going on - try to free up some memory and then try again, for example if you were using a window manager you could try without that (boot to runlevel 3 or something) - try to reduce the amount of memory it is using when compiling, for example turn off parallel make (if that was used) and/or change compiler optimization flags to use less optimizations, e.g. -O1 instead of -O2. - try in another computer that has more memory to see if it works there Hope this helps / Elias -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
Re: [blfs-support] 9.1-systemd: NSS-3.55 build fails
On August 15, 2020 at 2:31 PM, Elias Rudberg via blfs-support wrote: Hi Hans, Based on this part of your output: g++: fatal error: Killed signal terminated program cc1plus Maybe that indicates that the compiler might have been killed because you ran out of memory? / Elias On 2020-08-15 21:27, Hans Malissa via blfs-support wrote: I'm trying to build NSS on BLFS 9.1-systemd. Following the instructions on the BLFS Errata page (http://linuxfromscratch.org/blfs/errata/stable-systemd/), I'm building NSS-3.55 following the instructions given in (http://linuxfromscratch.org/blfs/view/systemd/postlfs/nss.html). The make-command given on that page fails for me with: ... g++ -o Linux5.5_x86_64_cc_glibc_PTH_64_OPT.OBJ/pk11_aeskeywrap_unittest.o -c -std=c++11 -O2 -fPIC -m64 -pipe -ffunction-sections -fdata-sections -DHAVE_STRERROR -DLINUX -Dlinux -Wall -Wshadow -DNSS_NO_GCC48 -DXP_UNIX -DXP_UNIX -DDLL_PREFIX=\"lib\" -DDLL_SUFFIX=\"so\" -UDEBUG -DNDEBUG -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -DSQL_MEASURE_USE_TEMP_DIR -D_REENTRANT -UDEBUG -DNDEBUG -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -DSQL_MEASURE_USE_TEMP_DIR -D_REENTRANT -DNSS_NO_INIT_SUPPORT -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -I../../gtests/google_test/gtest/include -I../../gtests/common -I../../cpputil -I/usr/include/nspr -I../../../dist/Linux5.5_x86_64_cc_glibc_PTH_64_OPT.OBJ/include -I../../../dist/public/nss -I../../../dist/private/nss -I../../../dist/public/nspr -I../../../dist/public/nss -I../../../dist/public/libdbm -I../../../dist/public/gtest -I../../../dist/public/cpputil -std=c++0x pk11_aeskeywrap_unittest.cc g++ -o Linux5.5_x86_64_cc_glibc_PTH_64_OPT.OBJ/pk11_aeskeywrapkwp_unittest.o -c -std=c++11 -O2 -fPIC -m64 -pipe -ffunction-sections -fdata-sections -DHAVE_STRERROR -DLINUX -Dlinux -Wall -Wshadow -DNSS_NO_GCC48 -DXP_UNIX -DXP_UNIX -DDLL_PREFIX=\"lib\" -DDLL_SUFFIX=\"so\" -UDEBUG -DNDEBUG -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -DSQL_MEASURE_USE_TEMP_DIR -D_REENTRANT -UDEBUG -DNDEBUG -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -DSQL_MEASURE_USE_TEMP_DIR -D_REENTRANT -DNSS_NO_INIT_SUPPORT -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -I../../gtests/google_test/gtest/include -I../../gtests/common -I../../cpputil -I/usr/include/nspr -I../../../dist/Linux5.5_x86_64_cc_glibc_PTH_64_OPT.OBJ/include -I../../../dist/public/nss -I../../../dist/private/nss -I../../../dist/public/nspr -I../../../dist/public/nss -I../../../dist/public/libdbm -I../../../dist/public/gtest -I../../../dist/public/cpputil -std=c++0x pk11_aeskeywrapkwp_unittest.cc {standard input}: Assembler messages: {standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive g++: fatal error: Killed signal terminated program cc1plus compilation terminated. make[4]: *** [../../coreconf/rules.mk:349: Linux5.5_x86_64_cc_glibc_PTH_64_OPT.OBJ/pk11_aeskeywrapkwp_unittest.o] Error 1 make[4]: Leaving directory 'mydir/nss-3.55/nss/gtests/pk11_gtest' make[3]: *** [../coreconf/rules.mk:44: pk11_gtest] Error 2 make[3]: Leaving directory 'mydir/nss-3.55/nss/gtests' make[2]: *** [coreconf/rules.mk:44: gtests] Error 2 make[2]: Leaving directory 'mydir/nss-3.55/nss' make[1]: *** [manifest.mn:28: all] Error 2 make[1]: Leaving directory 'mydir/nss-3.55/nss' make: *** [Makefile:53: nss_build_all] Error 2 Thanks a lot. How can I verify whether I ran out of memory or not? Greetings, Hans -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
Re: [blfs-support] 9.1-systemd: NSS-3.55 build fails
Hi Hans, Based on this part of your output: g++: fatal error: Killed signal terminated program cc1plus Maybe that indicates that the compiler might have been killed because you ran out of memory? / Elias On 2020-08-15 21:27, Hans Malissa via blfs-support wrote: I'm trying to build NSS on BLFS 9.1-systemd. Following the instructions on the BLFS Errata page (http://linuxfromscratch.org/blfs/errata/stable-systemd/), I'm building NSS-3.55 following the instructions given in (http://linuxfromscratch.org/blfs/view/systemd/postlfs/nss.html). The make-command given on that page fails for me with: ... g++ -o Linux5.5_x86_64_cc_glibc_PTH_64_OPT.OBJ/pk11_aeskeywrap_unittest.o -c -std=c++11 -O2 -fPIC -m64 -pipe -ffunction-sections -fdata-sections -DHAVE_STRERROR -DLINUX -Dlinux -Wall -Wshadow -DNSS_NO_GCC48 -DXP_UNIX -DXP_UNIX -DDLL_PREFIX=\"lib\" -DDLL_SUFFIX=\"so\" -UDEBUG -DNDEBUG -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -DSQL_MEASURE_USE_TEMP_DIR -D_REENTRANT -UDEBUG -DNDEBUG -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -DSQL_MEASURE_USE_TEMP_DIR -D_REENTRANT -DNSS_NO_INIT_SUPPORT -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -I../../gtests/google_test/gtest/include -I../../gtests/common -I../../cpputil -I/usr/include/nspr -I../../../dist/Linux5.5_x86_64_cc_glibc_PTH_64_OPT.OBJ/include -I../../../dist/public/nss -I../../../dist/private/nss -I../../../dist/public/nspr -I../../../dist/public/nss -I../../../dist/public/libdbm -I../../../dist/public/gtest -I../../../dist/public/cpputil -std=c++0x pk11_aeskeywrap_unittest.cc g++ -o Linux5.5_x86_64_cc_glibc_PTH_64_OPT.OBJ/pk11_aeskeywrapkwp_unittest.o -c -std=c++11 -O2 -fPIC -m64 -pipe -ffunction-sections -fdata-sections -DHAVE_STRERROR -DLINUX -Dlinux -Wall -Wshadow -DNSS_NO_GCC48 -DXP_UNIX -DXP_UNIX -DDLL_PREFIX=\"lib\" -DDLL_SUFFIX=\"so\" -UDEBUG -DNDEBUG -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -DSQL_MEASURE_USE_TEMP_DIR -D_REENTRANT -UDEBUG -DNDEBUG -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -DSQL_MEASURE_USE_TEMP_DIR -D_REENTRANT -DNSS_NO_INIT_SUPPORT -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -I../../gtests/google_test/gtest/include -I../../gtests/common -I../../cpputil -I/usr/include/nspr -I../../../dist/Linux5.5_x86_64_cc_glibc_PTH_64_OPT.OBJ/include -I../../../dist/public/nss -I../../../dist/private/nss -I../../../dist/public/nspr -I../../../dist/public/nss -I../../../dist/public/libdbm -I../../../dist/public/gtest -I../../../dist/public/cpputil -std=c++0x pk11_aeskeywrapkwp_unittest.cc {standard input}: Assembler messages: {standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive g++: fatal error: Killed signal terminated program cc1plus compilation terminated. make[4]: *** [../../coreconf/rules.mk:349: Linux5.5_x86_64_cc_glibc_PTH_64_OPT.OBJ/pk11_aeskeywrapkwp_unittest.o] Error 1 make[4]: Leaving directory 'mydir/nss-3.55/nss/gtests/pk11_gtest' make[3]: *** [../coreconf/rules.mk:44: pk11_gtest] Error 2 make[3]: Leaving directory 'mydir/nss-3.55/nss/gtests' make[2]: *** [coreconf/rules.mk:44: gtests] Error 2 make[2]: Leaving directory 'mydir/nss-3.55/nss' make[1]: *** [manifest.mn:28: all] Error 2 make[1]: Leaving directory 'mydir/nss-3.55/nss' make: *** [Makefile:53: nss_build_all] Error 2 What's going wrong here? Thanks a lot, Hans -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
[blfs-support] 9.1-systemd: NSS-3.55 build fails
I'm trying to build NSS on BLFS 9.1-systemd. Following the instructions on the BLFS Errata page (http://linuxfromscratch.org/blfs/errata/stable-systemd/), I'm building NSS-3.55 following the instructions given in (http://linuxfromscratch.org/blfs/view/systemd/postlfs/nss.html). The make-command given on that page fails for me with: ... g++ -o Linux5.5_x86_64_cc_glibc_PTH_64_OPT.OBJ/pk11_aeskeywrap_unittest.o -c -std=c++11 -O2 -fPIC -m64 -pipe -ffunction-sections -fdata-sections -DHAVE_STRERROR -DLINUX -Dlinux -Wall -Wshadow -DNSS_NO_GCC48 -DXP_UNIX -DXP_UNIX -DDLL_PREFIX=\"lib\" -DDLL_SUFFIX=\"so\" -UDEBUG -DNDEBUG -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -DSQL_MEASURE_USE_TEMP_DIR -D_REENTRANT -UDEBUG -DNDEBUG -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -DSQL_MEASURE_USE_TEMP_DIR -D_REENTRANT -DNSS_NO_INIT_SUPPORT -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -I../../gtests/google_test/gtest/include -I../../gtests/common -I../../cpputil -I/usr/include/nspr -I../../../dist/Linux5.5_x86_64_cc_glibc_PTH_64_OPT.OBJ/include -I../../../dist/public/nss -I../../../dist/private/nss -I../../../dist/public/nspr -I../../../dist/public/nss -I../../../dist/public/libdbm -I../../../dist/public/gtest -I../../../dist/public/cpputil -std=c++0x pk11_aeskeywrap_unittest.cc g++ -o Linux5.5_x86_64_cc_glibc_PTH_64_OPT.OBJ/pk11_aeskeywrapkwp_unittest.o -c -std=c++11 -O2 -fPIC -m64 -pipe -ffunction-sections -fdata-sections -DHAVE_STRERROR -DLINUX -Dlinux -Wall -Wshadow -DNSS_NO_GCC48 -DXP_UNIX -DXP_UNIX -DDLL_PREFIX=\"lib\" -DDLL_SUFFIX=\"so\" -UDEBUG -DNDEBUG -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -DSQL_MEASURE_USE_TEMP_DIR -D_REENTRANT -UDEBUG -DNDEBUG -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -DSQL_MEASURE_USE_TEMP_DIR -D_REENTRANT -DNSS_NO_INIT_SUPPORT -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -I../../gtests/google_test/gtest/include -I../../gtests/common -I../../cpputil -I/usr/include/nspr -I../../../dist/Linux5.5_x86_64_cc_glibc_PTH_64_OPT.OBJ/include -I../../../dist/public/nss -I../../../dist/private/nss -I../../../dist/public/nspr -I../../../dist/public/nss -I../../../dist/public/libdbm -I../../../dist/public/gtest -I../../../dist/public/cpputil -std=c++0x pk11_aeskeywrapkwp_unittest.cc {standard input}: Assembler messages: {standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive g++: fatal error: Killed signal terminated program cc1plus compilation terminated. make[4]: *** [../../coreconf/rules.mk:349: Linux5.5_x86_64_cc_glibc_PTH_64_OPT.OBJ/pk11_aeskeywrapkwp_unittest.o] Error 1 make[4]: Leaving directory 'mydir/nss-3.55/nss/gtests/pk11_gtest' make[3]: *** [../coreconf/rules.mk:44: pk11_gtest] Error 2 make[3]: Leaving directory 'mydir/nss-3.55/nss/gtests' make[2]: *** [coreconf/rules.mk:44: gtests] Error 2 make[2]: Leaving directory 'mydir/nss-3.55/nss' make[1]: *** [manifest.mn:28: all] Error 2 make[1]: Leaving directory 'mydir/nss-3.55/nss' make: *** [Makefile:53: nss_build_all] Error 2 What's going wrong here? Thanks a lot, Hans -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page