Building octave-3.2.0 fails when linking octave, due to undefined references to functions in libpthread. Adding -lpthread to LDFLAGS in Makeconf manually makes it build properly. Reproducible: Always Steps to Reproduce: Build log: x86_64-pc-linux-gnu-g++ -I/usr/include/freetype2 -I. -I.. -I../liboctave -I../src -I../libcruft/misc -DHAVE_CONFIG_H -Wall -W -Wshadow -Wold-style-cast -Wformat -O2 -pipe -I/usr/include/freetype2 -rdynamic \ -L.. -fPIC -Wl,-O1 -o octave \ main.o \ -L../liboctave -L../libcruft -L../src -Wl,-rpath -Wl,/usr/lib64/octave-3.2.0 \ -loctinterp -loctave -lcruft \ \ -llapack -lblas -lblas \ -L/usr/X11R6/lib -lGL -lGLU \ -L/usr/lib64 -lX11 -lreadline -lncurses -ldl -lblas -lz -lm -lfreetype -lz -L/usr/X11R6/lib -lGL -lGLU -L/usr/X11R6/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/../../../../x86_64-pc-linux-gnu/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/../../.. -lz -lgfortranbegin -lgfortran -lm -lfreetype -lGL -lGLU ../liboctave/liboctave.so: undefined reference to `pthread_mutexattr_destroy' ../liboctave/liboctave.so: undefined reference to `pthread_mutexattr_init' ../liboctave/liboctave.so: undefined reference to `pthread_mutexattr_settype' collect2: ld returned 1 exit status make[2]: *** [octave] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory `/var/tmp/portage/sci-mathematics/octave-3.2.0/work/octave-3.2.0/src' make[1]: *** [src] Error 2 make[1]: Leaving directory `/var/tmp/portage/sci-mathematics/octave-3.2.0/work/octave-3.2.0' make: *** [all] Error 2 * * ERROR: sci-mathematics/octave-3.2.0 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 3219: Called die * The specific snippet of code: * emake || die "emake failed"; * The die message: * emake failed * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/sci-mathematics/octave-3.2.0/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sci-mathematics/octave-3.2.0/temp/environment'.
Created attachment 197601 [details] emerge --info
Sorry, I meant adding -lpthread to FLIBS in Makeconf.
Though your case seems to suggest it was not '--as-needed' problem. *** This bug has been marked as a duplicate of bug 277068 ***