FS#46884 - [java-runtime-common] should provide a symlink "default-java" pointing to "default"
Attached to Project:
Arch Linux
Opened by Philipp Reinkemeier (philipp.reinkemeieroffis.de) - Tuesday, 27 October 2015, 07:49 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:15 GMT
Opened by Philipp Reinkemeier (philipp.reinkemeieroffis.de) - Tuesday, 27 October 2015, 07:49 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:15 GMT
|
Details
Description:
The FindJNI module of cmake is not able to locate JNI libraries. Additional info: - cmake version is 3.3.2-3 - jdk8-openjdk 8.u65-1 and jre8-openjdk 8.u65-1 Here is an excerpt of a cmake execution on a CMakeLists.txt file containing "find_package(JNI REQUIRED)": -- Found SWIG: /usr/bin/swig (found version "3.0.7") -- Found Java: /usr/bin/java (found version "1.8.0.25") CMake Error at /usr/share/cmake-3.3/Modules/FindPackageHandleStandardArgs.cmake:148 (message): Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY) Call Stack (most recent call first): /usr/share/cmake-3.3/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE) cmake/FindJNI.cmake:255 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:111 (find_package) Steps to reproduce: - Create a new directory with a single file CMakeLists.txt somewhere with the following content: project(FIND_JNI_TEST) cmake_minimum_required(VERSION 2.8.11) find_package(JNI REQUIRED) - Execute the command "cmake ." in that directory. Proposed fix (the reason why i filed this BUG report against java-runtime-common): As per the file "/usr/share/cmake-3.3/Modules/FindJNI.cmake", the strategy of cmake to find the location of JNI libraries is to search certain well known installation locations. Unfortunately, none of these match the arch way of managing java installations. If beside the symlink "/usr/lib/jvm/default" the java-runtime-common package would just provide a symlink "/usr/lib/jvm/default-java" pointing to "/usr/lib/jvm/default", then cmake would be able to successfully locate the JNI libraries. Expected outcome: -- Found JNI: /usr/lib64/jvm/default-java/jre/lib/amd64/libjawt.so -- Configuring done -- Generating done |
This task depends upon
Closed by Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:15 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/java-common/issues/1
Saturday, 25 November 2023, 20:15 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/java-common/issues/1
"default-java -> default" in addition.
> grep -i -C1 "arch linux" /usr/share/cmake/Modules/FindJNI.cmake
/usr/lib/jvm/default-java
# Arch Linux specific paths for default JVM
/usr/lib/jvm/default