> On Mon, 2021-04-05 at 00:44 +0200, k...@aspodata.se wrote: ... > > $ cp -a ... > > $ cd ... > > $ make -j1 > > ... > > $ echo $? > > 0 > > > > It builds without failure in that case. > > > > That's (potentially) good news. Can you now try it with the > CFLAGS/CXXFLAGS and LDFLAGS from your `emerge --info`? If the build > fails in that case, then we know it's one of those flags causing a > problem.
It seems -j1 succeeds where -j4 fails, and it might be memory related. /// # make clean # make does fail # make clean # ./configure ... R is now configured for x86_64-pc-linux-gnu Source directory: . Installation directory: /usr/local C compiler: gcc -g -O2 Fortran fixed-form compiler: gfortran -fno-optimize-sibling-calls -g -O2 Default C++ compiler: g++ -std=gnu++11 -g -O2 C++14 compiler: g++ -std=gnu++14 -g -O2 C++17 compiler: g++ -std=gnu++17 -g -O2 C++20 compiler: Fortran free-form compiler: gfortran -fno-optimize-sibling-calls -g -O2 Obj-C compiler: gcc -g -O2 -fobjc-exceptions Interfaces supported: X11, tcltk External libraries: pcre2, readline, curl Additional capabilities: PNG, JPEG, TIFF, NLS, cairo, ICU Options enabled: shared BLAS, R profiling Capabilities skipped: Options not enabled: memory profiling Recommended packages: yes # make ok (=succeeds) adding (as environment variables) CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe" make clean; make ok CHOST="x86_64-pc-linux-gnu" CXXFLAGS="-O2 -pipe" ok FCFLAGS="-O2 -pipe" FFLAGS="-O2 -pipe" ok LDFLAGS="-Wl,-O1 -Wl,--as-needed" ok From ..../portage/dev-lang/R-4.0.4/work/R-4.0.4/config.log # make distclean # ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --docdir=/usr/share/doc/R-4.0.4 --htmldir=/usr/share/doc/R-4.0.4/html --with-sysroot=/ --libdir=/usr/lib64 --enable-byte-compiled-packages --enable-R-shlib --disable-R-framework --with-blas=-lblas rdocdir=/usr/share/doc/R-4.0.4 --disable-java --enable-nls --enable-openmp --disable-R-profiling --disable-memory-profiling --enable-static --enable-R-static-lib --without-cairo --without-ICU --with-jpeglib --without-lapack --with-recommended-packages --with-libpng --with-readline --with-libtiff --without-tcltk --without-tk-config --without-tcl-config --with-x ... R is now configured for x86_64-pc-linux-gnu Source directory: . Installation directory: /usr C compiler: x86_64-pc-linux-gnu-gcc -g -O2 Fortran fixed-form compiler: x86_64-pc-linux-gnu-gfortran -fno-optimize-sibling-calls -g -O2 Default C++ compiler: x86_64-pc-linux-gnu-g++ -std=gnu++11 -g -O2 C++14 compiler: x86_64-pc-linux-gnu-g++ -std=gnu++14 -g -O2 C++17 compiler: x86_64-pc-linux-gnu-g++ -std=gnu++17 -g -O2 C++20 compiler: Fortran free-form compiler: x86_64-pc-linux-gnu-gfortran -fno-optimize-sibling-calls -g -O2 Obj-C compiler: x86_64-pc-linux-gnu-gcc -g -O2 -fobjc-exceptions Interfaces supported: X11 External libraries: pcre2, readline, BLAS(generic), curl Additional capabilities: PNG, JPEG, TIFF, NLS Options enabled: shared R library Capabilities skipped: cairo, ICU Options not enabled: shared BLAS, R profiling, memory profiling Recommended packages: yes # make ok add CFLAGS="-O2 -pipe" CXXFLAGS="-O2 -pipe" FCFLAGS="-O2 -pipe" FFLAGS="-O2 -pipe" LDFLAGS="-Wl,-O1 -Wl,--as-needed" # make distclean # ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --docdir=/usr/share/doc/R-4.0.4 --htmldir=/usr/share/doc/R-4.0.4/html --with-sysroot=/ --libdir=/usr/lib64 --enable-byte-compiled-packages --enable-R-shlib --disable-R-framework --with-blas=-lblas rdocdir=/usr/share/doc/R-4.0.4 --disable-java --enable-nls --enable-openmp --disable-R-profiling --disable-memory-profiling --enable-static --enable-R-static-lib --without-cairo --without-ICU --with-jpeglib --without-lapack --with-recommended-packages --with-libpng --with-readline --with-libtiff --without-tcltk --without-tk-config --without-tcl-config --with-x CFLAGS="-O2 -pipe" CXXFLAGS="-O2 -pipe" FCFLAGS="-O2 -pipe" FFLAGS="-O2 -pipe" LDFLAGS="-Wl,-O1 -Wl,--as-needed" ... R is now configured for x86_64-pc-linux-gnu Source directory: . Installation directory: /usr C compiler: x86_64-pc-linux-gnu-gcc -O2 -pipe Fortran fixed-form compiler: x86_64-pc-linux-gnu-gfortran -fno-optimize-sibling-calls -O2 -pipe Default C++ compiler: x86_64-pc-linux-gnu-g++ -std=gnu++11 -O2 -pipe C++14 compiler: x86_64-pc-linux-gnu-g++ -std=gnu++14 -O2 -pipe C++17 compiler: x86_64-pc-linux-gnu-g++ -std=gnu++17 -O2 -pipe C++20 compiler: Fortran free-form compiler: x86_64-pc-linux-gnu-gfortran -fno-optimize-sibling-calls -O2 -pipe Obj-C compiler: x86_64-pc-linux-gnu-gcc -g -O2 -fobjc-exceptions Interfaces supported: X11 External libraries: pcre2, readline, BLAS(generic), curl Additional capabilities: PNG, JPEG, TIFF, NLS Options enabled: shared R library Capabilities skipped: cairo, ICU Options not enabled: shared BLAS, R profiling, memory profiling Recommended packages: yes # make -j1 ok # make clean # make -j4 ... make[1]: Leaving directory '/home/sys/R-4.0.4/work/R-4.0.4/tests' you should 'make docs' now ... make[1]: Entering directory '/home/sys/R-4.0.4/work/R-4.0.4/doc' make[1]: Entering directory '/home/sys/R-4.0.4/work/R-4.0.4' make[1]: 'stamp-java' is up to date. make[1]: Leaving directory '/home/sys/R-4.0.4/work/R-4.0.4' WARNING: ignoring environment value of R_HOME WARNING: ignoring environment value of R_HOME WARNING: ignoring environment value of R_HOME Segmentation fault make[1]: *** [Makefile:77: NEWS.3.rds] Error 139 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory '/home/sys/R-4.0.4/work/R-4.0.4/doc' make: [Makefile:72: docs] Error 2 (ignored) make[1]: Entering directory '/home/sys/R-4.0.4/work/R-4.0.4/src/library' make[2]: Entering directory '/home/sys/R-4.0.4/work/R-4.0.4/src/library' installing parsed Rd make[3]: Entering directory '/home/sys/R-4.0.4/work/R-4.0.4/src/library' WARNING: ignoring environment value of R_HOME WARNING: ignoring environment value of R_HOME WARNING: ignoring environment value of R_HOME WARNING: ignoring environment value of R_HOME Segmentation fault make[3]: *** [Makefile:73: stats.Rdts] Error 1 make[3]: *** Waiting for unfinished jobs.... Error in readRDS(mapfile) : error reading from connection Execution halted Warning message: system call failed: Cannot allocate memory Segmentation fault make[3]: *** [Makefile:73: methods.Rdts] Error 1 make[3]: *** [Makefile:73: base.Rdts] Error 1 utils make[3]: Leaving directory '/home/sys/R-4.0.4/work/R-4.0.4/src/library' make[2]: *** [Makefile:81: Rdobjects] Error 2 make[2]: Leaving directory '/home/sys/R-4.0.4/work/R-4.0.4/src/library' make[1]: *** [Makefile:62: docs] Error 2 make[1]: Leaving directory '/home/sys/R-4.0.4/work/R-4.0.4/src/library' make: [Makefile:73: docs] Error 2 (ignored) make[1]: Entering directory '/home/sys/R-4.0.4/work/R-4.0.4/src/library/Recommended' make[2]: Entering directory '/home/sys/R-4.0.4/work/R-4.0.4/src/library/Recommended' begin installing recommended package MASS begin installing recommended package lattice begin installing recommended package codetools begin installing recommended package foreign WARNING: ignoring environment value of R_HOME Fatal error: couldn't allocate memory for pointer stack Segmentation fault make[2]: *** [Makefile:53: lattice.ts] Error 1 make[2]: *** Waiting for unfinished jobs.... WARNING: ignoring environment value of R_HOME Segmentation fault make[2]: *** [Makefile:53: codetools.ts] Error 1 WARNING: ignoring environment value of R_HOME * installing *source* package ?foreign? ... ** package ?foreign? successfully unpacked and MD5 sums checked ** using non-staged installation ** libs make[3]: Entering directory '/tmp/Rtmpyf37hQ/R.INSTALL6e75db12a27/foreign/src' x86_64-pc-linux-gnu-gcc -I"/home/sys/R-4.0.4/work/R-4.0.4/include" -DNDEBUG -fpic -O2 -pipe -c R_systat.c -o R_systat.o x86_64-pc-linux-gnu-gcc -I"/home/sys/R-4.0.4/work/R-4.0.4/include" -DNDEBUG -fpic -O2 -pipe -c Rdbfread.c -o Rdbfread.o x86_64-pc-linux-gnu-gcc -I"/home/sys/R-4.0.4/work/R-4.0.4/include" -DNDEBUG -fpic -O2 -pipe -c Rdbfwrite.c -o Rdbfwrite.o x86_64-pc-linux-gnu-gcc -I"/home/sys/R-4.0.4/work/R-4.0.4/include" -DNDEBUG -fpic -O2 -pipe -c SASxport.c -o SASxport.o x86_64-pc-linux-gnu-gcc -I"/home/sys/R-4.0.4/work/R-4.0.4/include" -DNDEBUG -fpic -O2 -pipe -c avl.c -o avl.o x86_64-pc-linux-gnu-gcc -I"/home/sys/R-4.0.4/work/R-4.0.4/include" -DNDEBUG -fpic -O2 -pipe -c dbfopen.c -o dbfopen.o x86_64-pc-linux-gnu-gcc -I"/home/sys/R-4.0.4/work/R-4.0.4/include" -DNDEBUG -fpic -O2 -pipe -c file-handle.c -o file-handle.o x86_64-pc-linux-gnu-gcc -I"/home/sys/R-4.0.4/work/R-4.0.4/include" -DNDEBUG -fpic -O2 -pipe -c format.c -o format.o x86_64-pc-linux-gnu-gcc -I"/home/sys/R-4.0.4/work/R-4.0.4/include" -DNDEBUG -fpic -O2 -pipe -c init.c -o init.o x86_64-pc-linux-gnu-gcc -I"/home/sys/R-4.0.4/work/R-4.0.4/include" -DNDEBUG -fpic -O2 -pipe -c minitab.c -o minitab.o x86_64-pc-linux-gnu-gcc -I"/home/sys/R-4.0.4/work/R-4.0.4/include" -DNDEBUG -fpic -O2 -pipe -c pfm-read.c -o pfm-read.o x86_64-pc-linux-gnu-gcc -I"/home/sys/R-4.0.4/work/R-4.0.4/include" -DNDEBUG -fpic -O2 -pipe -c sfm-read.c -o sfm-read.o x86_64-pc-linux-gnu-gcc -I"/home/sys/R-4.0.4/work/R-4.0.4/include" -DNDEBUG -fpic -O2 -pipe -c spss.c -o spss.o x86_64-pc-linux-gnu-gcc -I"/home/sys/R-4.0.4/work/R-4.0.4/include" -DNDEBUG -fpic -O2 -pipe -c stataread.c -o stataread.o x86_64-pc-linux-gnu-gcc -shared -L/home/sys/R-4.0.4/work/R-4.0.4/lib -Wl,-O1 -Wl,--as-needed -o foreign.so R_systat.o Rdbfread.o Rdbfwrite.o SASxport.o avl.o dbfopen.o file-handle.o format.o init.o minitab.o pfm-read.o sfm-read.o spss.o stataread.o -L/home/sys/R-4.0.4/work/R-4.0.4/lib -lR make[3]: Leaving directory '/tmp/Rtmpyf37hQ/R.INSTALL6e75db12a27/foreign/src' installing to /home/sys/R-4.0.4/work/R-4.0.4/library/foreign/libs ** R ** inst ** byte-compile and prepare package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded * DONE (foreign) WARNING: ignoring environment value of R_HOME * installing *source* package ?MASS? ... ** package ?MASS? successfully unpacked and MD5 sums checked ** using non-staged installation ** libs make[3]: Entering directory '/tmp/RtmpY6iU2f/R.INSTALL6e078f85fff/MASS/src' x86_64-pc-linux-gnu-gcc -I"/home/sys/R-4.0.4/work/R-4.0.4/include" -DNDEBUG -fpic -O2 -pipe -c MASS.c -o MASS.o x86_64-pc-linux-gnu-gcc -I"/home/sys/R-4.0.4/work/R-4.0.4/include" -DNDEBUG -fpic -O2 -pipe -c lqs.c -o lqs.o x86_64-pc-linux-gnu-gcc -shared -L/home/sys/R-4.0.4/work/R-4.0.4/lib -Wl,-O1 -Wl,--as-needed -o MASS.so MASS.o lqs.o -L/home/sys/R-4.0.4/work/R-4.0.4/lib -lR make[3]: Leaving directory '/tmp/RtmpY6iU2f/R.INSTALL6e078f85fff/MASS/src' installing to /home/sys/R-4.0.4/work/R-4.0.4/library/MASS/libs ** R ** data *** moving datasets to lazyload DB ** inst ** byte-compile and prepare package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded * DONE (MASS) make[2]: Leaving directory '/home/sys/R-4.0.4/work/R-4.0.4/src/library/Recommended' make[1]: *** [Makefile:39: recommended-packages] Error 2 make[1]: Leaving directory '/home/sys/R-4.0.4/work/R-4.0.4/src/library/Recommended' make: *** [Makefile:77: stamp-recommended] Error 2 remove -pipe # ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --docdir=/usr/share/doc/R-4.0.4 --htmldir=/usr/share/doc/R-4.0.4/html --with-sysroot=/ --libdir=/usr/lib64 --enable-byte-compiled-packages --enable-R-shlib --disable-R-framework --with-blas=-lblas rdocdir=/usr/share/doc/R-4.0.4 --disable-java --enable-nls --enable-openmp --disable-R-profiling --disable-memory-profiling --enable-static --enable-R-static-lib --without-cairo --without-ICU --with-jpeglib --without-lapack --with-recommended-packages --with-libpng --with-readline --with-libtiff --without-tcltk --without-tk-config --without-tcl-config --with-x CFLAGS="-O2" CXXFLAGS="-O2" FCFLAGS="-O2" FFLAGS="-O2" LDFLAGS="-Wl,-O1 -Wl,--as-needed" ... R is now configured for x86_64-pc-linux-gnu Source directory: . Installation directory: /usr C compiler: x86_64-pc-linux-gnu-gcc -O2 Fortran fixed-form compiler: x86_64-pc-linux-gnu-gfortran -fno-optimize-sibling-calls -O2 Default C++ compiler: x86_64-pc-linux-gnu-g++ -std=gnu++11 -O2 C++14 compiler: x86_64-pc-linux-gnu-g++ -std=gnu++14 -O2 C++17 compiler: x86_64-pc-linux-gnu-g++ -std=gnu++17 -O2 C++20 compiler: Fortran free-form compiler: x86_64-pc-linux-gnu-gfortran -fno-optimize-sibling-calls -O2 Obj-C compiler: x86_64-pc-linux-gnu-gcc -g -O2 -fobjc-exceptions Interfaces supported: X11 External libraries: pcre2, readline, BLAS(generic), curl Additional capabilities: PNG, JPEG, TIFF, NLS Options enabled: shared R library Capabilities skipped: cairo, ICU Options not enabled: shared BLAS, R profiling, memory profiling Recommended packages: yes # make -j4 ... make[1]: Leaving directory '/home/sys/R-4.0.4/work/R-4.0.4/tests' you should 'make docs' now ... make[1]: Entering directory '/home/sys/R-4.0.4/work/R-4.0.4/doc' make[1]: Entering directory '/home/sys/R-4.0.4/work/R-4.0.4' WARNING: ignoring environment value of R_HOME make[1]: Leaving directory '/home/sys/R-4.0.4/work/R-4.0.4' WARNING: ignoring environment value of R_HOME WARNING: ignoring environment value of R_HOME Segmentation fault make[1]: *** [Makefile:77: NEWS.3.rds] Error 139 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory '/home/sys/R-4.0.4/work/R-4.0.4/doc' ... Regards, /Karl Hammar