On 5. 10. 25 17:34, James McCoy wrote:
In Debian, we've received a report (https://bugs.debian.org/1114397) of
sporadic build failures during the Java binding part of the build. The
failure looks like
libtool: compile: g++ -std=c++11 -Wdate-time -D_FORTIFY_SOURCE=2
-DLINUX -D_REENTRANT -D_GNU_SOURCE -DQT_DBUS_LIB -DQT_GUI_LIB
-DQT_CORE_LIB -g -O2
-ffile-prefix-map=/build/reproducible-path/subversion-1.14.5=.
-fstack-protector-strong -fstack-clash-protection -Wformat
-Werror=format-security -fcf-protection -g -O2
-ffile-prefix-map=/build/reproducible-path/subversion-1.14.5=.
-fstack-protector-strong -fstack-clash-protection -Wformat
-Werror=format-security -fcf-protection -I../subversion/include
-I./subversion -I/usr/include/apr-1.0 -I/usr/include/apr-1.0
-I/usr/include -I/usr/include/libsecret-1 -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sysprof-6
-I/usr/include/libmount -I/usr/include/blkid
-I/usr/include/gio-unix-2.0 -pthread -I/usr/include/dbus-1.0
-I/usr/lib/x86_64-linux-gnu/dbus-1.0/include
-I/usr/include/x86_64-linux-gnu/qt5/QtCore
-I/usr/include/x86_64-linux-gnu/qt5
-I/usr/include/x86_64-linux-gnu/qt5/QtDBus
-I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/KF5/KWallet
-I/usr/include/KF5/KCoreAddons -I/usr/include/KF5/KI18n -I/usr/include
-I/usr/include/serf-1 -I/usr/lib/jvm/default-java/include
-I/usr/lib/jvm/default-java/include
-I/usr/lib/jvm/default-java/include/linux
-I/build/reproducible-path/subversion-1.14.5/BUILD/subversion/bindings/javahl/include
-c
../subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp
-o
subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.o
In file included from
../subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp:31:
/build/reproducible-path/subversion-1.14.5/BUILD/subversion/bindings/javahl/include/../include/org_apache_subversion_javahl_util_ConfigImpl_Category.h:10:1:
error: unterminated comment
10 | /*
| ^
/build/reproducible-path/subversion-1.14.5/BUILD/subversion/bindings/javahl/include/../include/org_apache_subversion_javahl_util_ConfigImpl_Category.h:5:
error: unterminated #ifndef
5 | #ifndef
_Included_org_apache_subversion_javahl_util_ConfigImpl_Category
After some investigation, it seems like this is the scenario that is
happening
* javac starts running to generate the javahl headers and class files.
* org_apache_subversion_javahl_util_ConfigImpl_Category.h is created,
but does not yet contain all of its expected content
* This satisfies the Make prereq to compile
org_apache_subversion_javahl_util_ConfigImpl_Category.cpp
* The compile fails because the header is only partially generated
This is being encountered on a small, 2 CPU AWS VM and even then only
happens in about 10% of builds.
I haven't checked if the CMake builds handles this any better.
Last time I looked, neither JavaHL nor the Swig bindings builds were
parallel-safe. As a workaround, run make without the -j option.
Clearly we're missing some dependencies in the makefile generator. Since
CMake uses the same generator to create its dependency list, I'd be
surprised if it didn't have similar problems.
Yes, "someone" should dig into the generator...
-- Brane