Created attachment 400124 [details] build log After switching from 32-bit emul packages to abi_x86_32, the openssl rebuild failed since apparently some target got built twice in parallel. A second attempt with MAKEOPTS=-j1 succeeded. make[4]: Entering directory '/var/tmp/portage/dev-libs/openssl-1.0.2a/work/opens sl-1.0.2a-abi_x86_32.x86' + rm -f libssl.so + rm -f libssl.so + ln -s libssl.so.1.0.0 libssl.so + ln -s libssl.so.1.0.0 libssl.so make[4]: Leaving directory '/var/tmp/portage/dev-libs/openssl-1.0.2a/work/openss l-1.0.2a-abi_x86_32.x86' ln: failed to create symbolic link ‘libssl.so’: File exists Makefile.shared:171: recipe for target 'link_a.gnu' failed make[4]: *** [link_a.gnu] Error 1 make[4]: Leaving directory '/var/tmp/portage/dev-libs/openssl-1.0.2a/work/openss l-1.0.2a-abi_x86_32.x86' Makefile:352: recipe for target 'do_linux-shared' failed make[3]: *** [do_linux-shared] Error 2 make[3]: Leaving directory '/var/tmp/portage/dev-libs/openssl-1.0.2a/work/openss l-1.0.2a-abi_x86_32.x86' Makefile:319: recipe for target 'libssl.so.1.0.0' failed make[2]: *** [libssl.so.1.0.0] Error 2
Created attachment 400126 [details] emerge --info
does this fail frequently ? it'd help if you could add -O to your MAKEOPTS in general, and if you could post a log with that ...
nm, found the race. affects both crypto & ssl due to the way the targets work. - top level runs `make all` - all triggers build_crypto - build in crypto/ generates libcrypto.a and then hits "shared" target - crypto/Makefile "shared" does `cd ..; make libcrypto.so.1.0.0` - top level libcrypto.so.1.0.0 runs `make SHLIBDIRS=crypto build-shared` - build-shared depends on do_$(SHLIB_TARGET) & link-shared ... now we hit the start of the race ... job 1: - do_$(SHLIB_TARGET) runs `make -f Makefile.shared link_a.$(SHLIB_TARGET)` for libcrypto (where SHLIB_TARGET=linux-shared) - link_a.linux-shared turns into link_a.gnu which does: $(DO_GNU_SO); $(LINK_SO_A) - LINK_SO_A calls $(LINK_SO) - LINK_SO calls $(SYMLINK_SO) job 2: - link-shared runs `make -f Makefile.shared symlink.$(SHLIB_TARGET)` for libcrypto (where SHLIB_TARGET=linux-shared) - symlink.linux-shared turns into symlink.gnu which does: ...; $(SYMLINK_SO) so these two jobs are both calling SYMLINK_SO. fun times.
should be all set now in the tree; thanks for the report! Commit message: Fix parallel build wrt symlinking of generated libs http://sources.gentoo.org/dev-libs/openssl/files/openssl-1.0.2a-parallel-symlinking.patch?rev=1.1 http://sources.gentoo.org/dev-libs/openssl/openssl-1.0.2a.ebuild?r1=1.8&r2=1.9