Created attachment 696312 [details] Build log. When building libsdl with slibtool and parallel make the build can fail because the 'build' directory created in SDL's Makefile may not yet exist. Make is not capable of depending on a directory, but with a sentinel file the compiled .lo files can then depend on the directory being created in time. This has already been fixed upstream in SDL2 and SDL2_mixer with a similar patch. Additionally GNU make avoids this by being slower than mkdir(1) and rdlibtool also might avoid it in a similar way, but it consistently fails with rlibtool for me. make LIBTOOL=rlibtool -j4 /bin/sh /var/tmp/portage/media-libs/libsdl-1.2.15-r9/work/SDL-1.2.15/build-scripts/mkinstalldirs build rlibtool --mode=compile x86_64-pc-linux-gnu-gcc -O2 -pipe -Iinclude -I/var/tmp/portage/media-libs/libsdl-1.2.15-r9/work/SDL-1.2.15/include -D_GNU_SOURCE=1 -fvisibility=hidden -DXTHREADS -D_REENTRANT -DHAVE_LINUX_VERSION_H -Wall -c /var/tmp/portage/media-libs/libsdl-1.2.15-r9/work/SDL-1.2.15/src/SDL.c -o build/SDL.lo rlibtool --mode=compile x86_64-pc-linux-gnu-gcc -O2 -pipe -Iinclude -I/var/tmp/portage/media-libs/libsdl-1.2.15-r9/work/SDL-1.2.15/include -D_GNU_SOURCE=1 -fvisibility=hidden -DXTHREADS -D_REENTRANT -DHAVE_LINUX_VERSION_H -Wall -c /var/tmp/portage/media-libs/libsdl-1.2.15-r9/work/SDL-1.2.15/src/SDL_error.c -o build/SDL_error.lo rlibtool --mode=compile x86_64-pc-linux-gnu-gcc -O2 -pipe -Iinclude -I/var/tmp/portage/media-libs/libsdl-1.2.15-r9/work/SDL-1.2.15/include -D_GNU_SOURCE=1 -fvisibility=hidden -DXTHREADS -D_REENTRANT -DHAVE_LINUX_VERSION_H -Wall -c /var/tmp/portage/media-libs/libsdl-1.2.15-r9/work/SDL-1.2.15/src/SDL_fatal.c -o build/SDL_fatal.lo rlibtool: lconf: {.name="libtool"}. rlibtool: fdcwd: {.fdcwd=AT_FDCWD, .realpath="/var/tmp/portage/media-libs/libsdl-1.2.15-r9/work/SDL-1.2.15-abi_x86_64.amd64"}. rlibtool: lconf: fstatat(AT_FDCWD,".",...) = 0 {.st_dev = 65026, .st_ino = 3962078}. rlibtool: lconf: openat(AT_FDCWD,"libtool",O_RDONLY,0) = 3. rlibtool: lconf: found "/var/tmp/portage/media-libs/libsdl-1.2.15-r9/work/SDL-1.2.15-abi_x86_64.amd64/libtool". rlibtool: error logged in slbt_exec_compile(), line 158: path not found: build/.libs/. make: *** [build-deps:29: build/SDL.lo] Error 2 rlibtool: lconf: {.name="libtool"}. rlibtool: fdcwd: {.fdcwd=AT_FDCWD, .realpath="/var/tmp/portage/media-libs/libsdl-1.2.15-r9/work/SDL-1.2.15-abi_x86_64.amd64"}. make: *** Waiting for unfinished jobs.... rlibtool: lconf: fstatat(AT_FDCWD,".",...) = 0 {.st_dev = 65026, .st_ino = 3962078}. rlibtool: lconf: openat(AT_FDCWD,"libtool",O_RDONLY,0) = 3. rlibtool: lconf: found "/var/tmp/portage/media-libs/libsdl-1.2.15-r9/work/SDL-1.2.15-abi_x86_64.amd64/libtool". rlibtool: error logged in slbt_exec_compile(), line 158: path not found: build/.libs/. make: *** [build-deps:41: build/SDL_error.lo] Error 2 rlibtool: lconf: {.name="libtool"}. rlibtool: fdcwd: {.fdcwd=AT_FDCWD, .realpath="/var/tmp/portage/media-libs/libsdl-1.2.15-r9/work/SDL-1.2.15-abi_x86_64.amd64"}. rlibtool: lconf: fstatat(AT_FDCWD,".",...) = 0 {.st_dev = 65026, .st_ino = 3962078}. mkdir -p -- build rlibtool: lconf: openat(AT_FDCWD,"libtool",O_RDONLY,0) = 3. rlibtool: lconf: found "/var/tmp/portage/media-libs/libsdl-1.2.15-r9/work/SDL-1.2.15-abi_x86_64.amd64/libtool". rlibtool: error logged in slbt_exec_compile(), line 158: path not found: build/.libs/. make: *** [build-deps:72: build/SDL_fatal.lo] Error 2
Created attachment 696315 [details, diff] Patch to fix the build.
Created attachment 696318 [details, diff] Patch to fix the build. Slightly cleaner patch.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b3bd8ff50ff76c0c29c9b922658ef7c74aeffe7 commit 5b3bd8ff50ff76c0c29c9b922658ef7c74aeffe7 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-04-01 22:49:56 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-04-01 23:03:57 +0000 media-libs/libsdl: fix (parallel) build with slibtool Patch is upstream for libsdl2 and will be for libsdl soon. Thanks-to: orbea <orbea@riseup.net> Closes: https://bugs.gentoo.org/779445 Signed-off-by: Sam James <sam@gentoo.org> .../libsdl/files/libsdl-1.2.15-slibtool.patch | 56 ++++++++++++++++++++++ media-libs/libsdl/libsdl-1.2.15_p20210224.ebuild | 1 + 2 files changed, 57 insertions(+)