* b2-1_49 -j65 -q -d+2 gentoorelease --user-config=user-config.jam --disable-icu boost.locale.icu=off pch=off --boost-build=/usr/share/boost-build-1_49 --prefix="/var/tmp/portage/dev-libs/boost-1.49.0-r2/image/usr" --layout=versioned threading=single,multi link=shared runtime-link=shared --python-buildid=2.7 Building the Boost C++ Libraries. /var/tmp/portage/dev-libs/boost-1.49.0-r2/temp/environment: line 5127: 26842 Segmentation fault ${BJAM} ${NUMJOBS} -q -d+2 gentoorelease --user-config=user-config.jam ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared $(use python && echo --python-buildid=${PYTHON_ABI}) * ERROR: dev-libs/boost-1.49.0-r2 failed (compile phase): * Building of Boost libraries failed * * Call stack: * ebuild.sh, line 93: Called src_compile * environment, line 5166: Called python_execute_function 'building' * environment, line 3348: Called building * environment, line 5131: Called die * The specific snippet of code: * ${BJAM} ${NUMJOBS} -q -d+2 gentoorelease --user-config=user-config.jam ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared $(use python && echo --python-buildid=${PYTHON_ABI}) || die "Building of Boost libraries failed"; * * If you need support, post the output of `emerge --info '=dev-libs/boost-1.49.0-r2'`, * the complete build log and the output of `emerge -pqv '=dev-libs/boost-1.49.0-r2'`. * The complete build log is located at '/var/tmp/portage/dev-libs/boost-1.49.0-r2/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-libs/boost-1.49.0-r2/temp/environment'. * Working directory: '/var/tmp/portage/dev-libs/boost-1.49.0-r2/work/boost_1_49_0' * S: '/var/tmp/portage/dev-libs/boost-1.49.0-r2/work/boost_1_49_0'
building with MAKEOPTS="-j" seems to hack down to -j1: * b2-1_49 -j1 -q -d+2 gentoorelease --user-config=user-config.jam --disable-icu boost.locale.icu=off pch=off --boost-build=/usr/share/boost-build-1_49 --prefix="/var/tmp/portage/dev-libs/boost-1.49.0-r2/image/usr" --layout=versioned threading=single,multi link=shared runtime-link=shared --python-buildid=2.7 Something is rotten here. Looks like I'm limited to -j64 if I want to build boost...
Found this nifty line in boost_1_49_0/tools/build/v2engine/jam.h. #define MAXJOBS 64 /* silently enforced -j limit */ Sounds like this is not being enforced so well.
(In reply to comment #2) > Found this nifty line in boost_1_49_0/tools/build/v2engine/jam.h. > > #define MAXJOBS 64 /* silently enforced -j limit */ > > Sounds like this is not being enforced so well. An acceptable fix for this would be to actually silently enforce the -j limit instead of segfaulting. I can live with boost only building with -j64
boost-1.51 is slightly more hilarious. my hardened kernel kills it as a buffer overflow * Building of dev-libs/boost-1.51.0-r1 with CPython 2.7... * Using the following command to build: * b2-1_51 -j96 -q -d+2 gentoorelease --user-config=user-config.jam --disable-icu boost.locale.icu=off pch=off --boost-build=/usr/share/boost-build-1_51 --prefix="/var/tmp/portage/dev-libs/boost-1.51.0-r1/image/usr" --layout=versioned threading=single,multi link=shared --python-buildid=2.7 Building the Boost C++ Libraries. *** buffer overflow detected ***: b2-1_51 - terminated b2-1_51: buffer overflow attack in function <unknown> - terminated Report to http://bugs.gentoo.org/ /var/tmp/portage/dev-libs/boost-1.51.0-r1/temp/environment: line 5221: 28032 Killed ${BJAM} ${NUMJOBS} -q -d+2 gentoorelease --user-config=user-config.jam ${OPTIONS} threading=single,multi ${LINK_OPTS} $(use python && echo --python-buildid=${PYTHON_ABI}) and just to round out the figures, 1.46.1-r1 segfaults like 1.49: * Using the following command to build: * bjam-1_46 -j96 -q -d+2 gentoorelease --disable-icu pch=off --user-config="/var/tmp/portage/dev-libs/boost-1.46.1-r1/work/boost_1_46_1/user-config.jam" --boost-build=/usr/share/boost-build-1_46 --prefix="/var/tmp/portage/dev-libs/boost-1.46.1-r1/image//usr" --layout=versioned threading=single,multi link=shared runtime-link=shared Building the Boost C++ Libraries. /var/tmp/portage/dev-libs/boost-1.46.1-r1/temp/environment: line 5314: 1560 Segmentation fault ${BJAM} ${NUMJOBS} -q -d+2 gentoorelease ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared
Created attachment 328178 [details, diff] Patch for boost-build Can you give this patch for boost-build a try? It resolves the segfault here. Of course, I also run out of memory pretty quickly on my 8 GB system... :(
Reported upstream.
(In reply to comment #1) > building with MAKEOPTS="-j" seems to hack down to -j1: > > * b2-1_49 -j1 -q -d+2 gentoorelease --user-config=user-config.jam > --disable-icu boost.locale.icu=off pch=off > --boost-build=/usr/share/boost-build-1_49 > --prefix="/var/tmp/portage/dev-libs/boost-1.49.0-r2/image/usr" > --layout=versioned threading=single,multi link=shared runtime-link=shared > --python-buildid=2.7 > > > Something is rotten here. Looks like I'm limited to -j64 if I want to build > boost... We can ignore this safely, it is fixed(ish) in 1.51. The patch in comment 5 fixes the crashes for me so it is a good stopgap but it seems in 1.51 that upstream mapped -j to -j999 so it looks like -j64 isn't really a limit anymore.
The MAKEOPTS="-j" issue in the stable ebuild *could* be fixed like this: diff -u -r1.3 boost-1.49.0-r2.ebuild --- boost-1.49.0-r2.ebuild 2 Nov 2012 11:55:46 -0000 1.3 +++ boost-1.49.0-r2.ebuild 3 Nov 2012 04:52:04 -0000 @@ -7,7 +7,7 @@ SUPPORT_PYTHON_ABIS="1" RESTRICT_PYTHON_ABIS="*-jython *-pypy-*" -inherit flag-o-matic multilib python toolchain-funcs versionator +inherit flag-o-matic multilib multiprocessing python toolchain-funcs versionator MY_P=${PN}_$(replace_all_version_separators _) @@ -124,17 +124,10 @@ } src_compile() { - local jobs - jobs=$( echo " ${MAKEOPTS} " | \ - sed -e 's/ --jobs[= ]/ -j /g' \ - -e 's/ -j \([1-9][0-9]*\)/ -j\1/g' \ - -e 's/ -j\>/ -j1/g' | \ - ( while read -d ' ' j; do if [[ "${j#-j}" = "$j" ]]; then continue; fi; jobs="${j#-j}"; done; echo ${jobs} ) ) - if [[ "${jobs}" != "" ]]; then NUMJOBS="-j"${jobs}; fi - export BOOST_ROOT="${S}" PYTHON_DIRS="" MPI_PYTHON_MODULE="" + NUMJOBS="-j$(makeopts_jobs)" building() { create_user-config.jam However, fixing it is suicidal without the boost-build patch from comment #5 as it would cause -j to mean -j999 which would segfault or overflow instead of how it is now with -j1 and just really slow building.
*** This bug has been marked as a duplicate of bug 427306 ***
*** This bug has been marked as a duplicate of bug 498134 ***