After much trial and error comparing build log of last working and failing builds, I finally found the cause of this problem.
The maintainer of the sbcl package (which I'm not) recently modified the build (RPM spec file), adding -D_GNU_SOURCE to CFLAGS, exported for use by all gcc invocations. With this comment:
"Inject -D_GNU_SOURCE to CFLAGS: fixes Fixes build issue due to O_LARGEFILE hiding behind feature test macro."
This was done, because otherwise the build (both i586 and x86_64) would now fail on this error:
[ 39s] make: Entering directory '/home/abuild/rpmbuild/BUILD/sbcl-2.2.10/tools-for-build'
[ 39s] cc -I../src/runtime -fomit-frame-pointer -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto grovel-headers.c -o grovel-headers
[ 39s] grovel-headers.c: In function 'main':
[ 39s] grovel-headers.c:228:32: error: 'O_LARGEFILE' undeclared (first use in this function)
[ 39s] 228 | defconstant("o_largefile", O_LARGEFILE);
[ 39s] | ^~~~~~~~~~~
[ 39s] grovel-headers.c:228:32: note: each undeclared identifier is reported only once for each function it appears in
[ 39s] make: *** [<builtin>: grovel-headers] Error 1
Note that this error was new, as compiler, gcc and build tools and other packages are an ever moving target in openSUSE TW.
So adding -D_GNU_SOURCE to CFLAGS made the build work on x86_64, but produced a broken sbcl binary on i586.
The proper workaround for the build to pass the compile error above is instead to add "-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" to CFLAGS, which after some man reading, Googling and various failed attempts, I took from src/runtime/Config.x86-linux.
Maybe a change to the build system in SBCL could be done so this is not necessary.
I hadn't initially paid much attention to this -D_GNU_SOURCE addition, as I did not know what it did and thought it to be benign, until I read about it.
After much trial and error comparing build log of last working and failing builds, I finally found the cause of this problem.
The maintainer of the sbcl package (which I'm not) recently modified the build (RPM spec file), adding -D_GNU_SOURCE to CFLAGS, exported for use by all gcc invocations. With this comment:
"Inject -D_GNU_SOURCE to CFLAGS: fixes Fixes build issue due to O_LARGEFILE hiding behind feature test macro."
Which can be seen on line 136: /build. opensuse. org/package/ view_file/ openSUSE: Factory/ sbcl/sbcl. spec?expand= 1
https:/
This was done, because otherwise the build (both i586 and x86_64) would now fail on this error:
[ 39s] make: Entering directory '/home/ abuild/ rpmbuild/ BUILD/sbcl- 2.2.10/ tools-for- build' frame-pointer -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack- protector- strong -funwind-tables -fasynchronous- unwind- tables -fstack- clash-protectio n -Werror=return-type -flto=auto grovel-headers.c -o grovel-headers headers. c:228:32: error: 'O_LARGEFILE' undeclared (first use in this function) "o_largefile" , O_LARGEFILE); headers. c:228:32: note: each undeclared identifier is reported only once for each function it appears in
[ 39s] cc -I../src/runtime -fomit-
[ 39s] grovel-headers.c: In function 'main':
[ 39s] grovel-
[ 39s] 228 | defconstant(
[ 39s] | ^~~~~~~~~~~
[ 39s] grovel-
[ 39s] make: *** [<builtin>: grovel-headers] Error 1
Note that this error was new, as compiler, gcc and build tools and other packages are an ever moving target in openSUSE TW.
So adding -D_GNU_SOURCE to CFLAGS made the build work on x86_64, but produced a broken sbcl binary on i586.
The proper workaround for the build to pass the compile error above is instead to add "-D_LARGEFILE_ SOURCE -D_LARGEFILE64_ SOURCE -D_FILE_ OFFSET_ BITS=64" to CFLAGS, which after some man reading, Googling and various failed attempts, I took from src/runtime/ Config. x86-linux.
Maybe a change to the build system in SBCL could be done so this is not necessary.
I hadn't initially paid much attention to this -D_GNU_SOURCE addition, as I did not know what it did and thought it to be benign, until I read about it.