-
Notifications
You must be signed in to change notification settings - Fork 123
JNA bindings test fails on Build Server #1353
Comments
Please let the test pass if no Elektra installation was found. (You can do this even within Java I suppose?) Other external tests deactivate themselves, too. |
Thank you for putting the reference here. Please always try to add a link to the build server or ideally even copy&past the error. When talking about the build server, we usually mean https://build.libelektra.org/, and not travis. |
…ilt native library to be independent of a system installation ElektraInitiative#1353
So I've tried to make the tests work on macOS when no elektra is installed, but without success yet (see #1360 ). Tried updating jna version, setting some flags for dlopen in jna, setting LD_LIBRARY_PATH/DYLD_LIBRARY_PATH both in the shell and in the pom file for surefire (the maven test plugin), and a bunch of other things i've already forgotten about. I guess the issue boils down due to macOS 10.11 and onwards not allowing to load shared libraries from other locations than the default one for restricted applications.
The problem is that java is usually marked as restricted (as a part of macOS's System Integrity Protection), and maven is java based, so this seems to apply to maven too. Therefore it doesn't pass the adjusted dynamic library path for the test, thus it fails. And thats also the reason why it works on my arch where i tried it too, and on the old macOS 10.10 on travis. You could now argue why it loads libelektra.dylib successfully. To my understanding, thats because it is loaded by JNA where you can customize the location with the jna.library.path argument. But then when using KDB, it fails, as using KDB seems to imply elektra loading the libelektra-resolver.so shared library. But this happens outside of java/jna, so it looks it up in the DYLD_LIBRARY_PATH or uses the RPATH mechanism (not totally sure about that yet), and as this does only search in the system locations, it fails unless elektra is installed. I could check if its possible to exclude the KDB tests if the platform is macOS > 10.11 for a workaround. Then at least the travis builds should suceed again. Using KDB when having elektra installed works fine on macOS so its not that critical. The usual suggestion is that ideally you avoid having to set the LD path manually. Maybe its related to #1275 somehow? Ah and a last thing that might be relevant, shouldn't libelektra reference the libelektra-resolver.so if it is using it at some point?
|
Sounds fine!
#1275 is only about installed Elektra. |
…ilt native library to be independent of a system installation #1353
Looks like the JNA bindings test fails on the build server because the Elektra library cannot be loaded. I guess the build server has no actual elektra installation, so it doesn't find the dynamic library. I have to check if there is a possibility to point it to the right path in such environment. I guess its better to point it to load dynamic libraries from the build directory anyway and not rely on a system installation. If required we can exclude the test for now.
The text was updated successfully, but these errors were encountered: