Building vtk-5.1.0-14 failed on arch ppc64le when java-1.8.0-openjdk-1.8.0.20-4.b26 is installed. Error retrieved is: -- Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY) CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:136 (message): Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY) Call Stack (most recent call first): /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:343 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake/Modules/FindJNI.cmake:286 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) Wrapping/Java/CMakeLists.txt:2 (find_package) cmake-3.0.1-3 have following code in cmake-3.0.1/Modules/FindJNI.cmake: # Expand {libarch} occurences to java_libarch subdirectory(-ies) and set ${_var} macro(java_append_library_directories _var) ... elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64le") set(_java_libarch "ppc64le") but java-1.8.0-openjdk.spec have: %ifarch %{power64} %global archinstall ppc64 %endif ... %{_jvmdir}/%{uniquesuffix}/jre/lib/%{archinstall}/libawt_xawt.so %{_jvmdir}/%{uniquesuffix}/jre/lib/%{archinstall}/libjawt.so This lead to have java installed in ${JAVA_HOME}/jre/lib/ppc64 when cmake try to find JNI libraries in ${JAVA_HOME}/jre/lib/ppc64le I don't know if a correction have to be made on java-1.8.0-openjdk.spec or in cmake-3.0.1/Modules/FindJNI.cmake.
(In reply to Menanteau Guy from comment #0) > cmake-3.0.1-3 have following code in cmake-3.0.1/Modules/FindJNI.cmake: > # Expand {libarch} occurences to java_libarch subdirectory(-ies) and set > ${_var} > macro(java_append_library_directories _var) > ... > elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64le") > set(_java_libarch "ppc64le") This is wrong. OpenJDK puts ppc64le in 'ppc64', not 'ppc64le'. It was the second in some builds, but changed to the first when ppc64le support was officially merged upstream: http://mail.openjdk.java.net/pipermail/hotspot-dev/2014-March/012905.html > but java-1.8.0-openjdk.spec have: > %ifarch %{power64} > %global archinstall ppc64 > %endif > ... > %{_jvmdir}/%{uniquesuffix}/jre/lib/%{archinstall}/libawt_xawt.so > %{_jvmdir}/%{uniquesuffix}/jre/lib/%{archinstall}/libjawt.so > > This lead to have java installed in ${JAVA_HOME}/jre/lib/ppc64 > when cmake try to find JNI libraries in ${JAVA_HOME}/jre/lib/ppc64le Actually, that's not true. This little snippet is just trying to figure out the path used. It doesn't actually set it. The path is set up in the OpenJDK build. If we change it to something else here, the build will just break. > I don't know if a correction have to be made on java-1.8.0-openjdk.spec or > in cmake-3.0.1/Modules/FindJNI.cmake. Probably the latter - if we modify the RPM, it would diverge from upstream.
Fix in CMake upstream: https://github.com/Kitware/CMake/commit/18ac6713e8657cca8fc791bcd581a47a7be6ebce Re-assigning to CMake.
cmake-3.0.2-2.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/cmake-3.0.2-2.fc21
Package cmake-3.0.2-2.fc21: * should fix your issue, * was pushed to the Fedora 21 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing cmake-3.0.2-2.fc21' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-10848/cmake-3.0.2-2.fc21 then log in and leave karma (feedback).
cmake-3.0.2-2.fc21 scratch builds passed on primary http://koji.fedoraproject.org/koji/taskinfo?taskID=7604452 and secondary http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=2105533 vtk builds ok with this cmake version.
cmake-3.0.2-2.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.