Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 673126 - sci-mathematics/z3-4.8.3 - CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
Summary: sci-mathematics/z3-4.8.3 - CMake Error at /usr/share/cmake/Modules/FindPackag...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Mark Wright
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2018-12-14 11:59 UTC by Jan Ziak (atomsymbol)
Modified: 2021-10-20 02:42 UTC (History)
14 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,10.81 KB, text/plain)
2018-12-14 11:59 UTC, Jan Ziak (atomsymbol)
Details
patch with the correct directories. (cmake-jni-gentoo.patch,449 bytes, patch)
2021-01-24 23:55 UTC, Alexandre Ferreira
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Ziak (atomsymbol) 2018-12-14 11:59:39 UTC
Created attachment 557764 [details]
build.log

Z3 build fails with message: Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
Comment 1 Anton Kochkov 2020-09-11 09:12:45 UTC
Since the latest available z3 in the tree now is 4.8.9 and a lot has changed since - is this still a problem?
Comment 2 Erik Zeek 2020-12-04 20:40:17 UTC
I'm seeing it today.
Comment 3 Alexandre Ferreira 2021-01-24 23:54:14 UTC
It seems that this is created by the FindJNI.cmake module. It does not contains the directories that gentoo uses for the JDK/JREs. The patch below when applied to FindJNI.cmake allows z3 to compile correctly. I dunno if the patch is complete or correct I would be happier if the patch would find the correct JVM in use and set the directories based on that.
Comment 4 Alexandre Ferreira 2021-01-24 23:55:31 UTC
Created attachment 684525 [details, diff]
patch with the correct directories.

This patch applies on the file itself not on the cmake ebuild so it will be removed if the cmake is rebuilt or a new version is used.
Comment 5 Markus 2021-06-03 06:49:46 UTC
Still open with dev-util/cmake-3.18.5, sci-mathematics/z3-4.8.10 and dev-java/openjdk-8.292_p10.

How is it possible that this package is in the tree for some years and does not build at all?
Comment 6 admin 2021-06-05 14:03:28 UTC
I think it could be also "properly" fixed by using instead /etc/java-config-2/current-system-vm which points to the current selected jvm for Gentoo.
Comment 7 Jonathan Lovelace 2021-06-09 00:28:30 UTC
The package (at least version 4.8.10) does build properly if USE=java is disabled.
Comment 8 Francisco Ares 2021-06-10 16:24:25 UTC
Version 4.8.10 does not build even if USE=java is enabled.
Comment 9 Fat-Zer 2021-07-06 13:33:20 UTC
There is a pending PR for the bug with no attention for over 2 weeks: https://github.com/gentoo/gentoo/pull/21338

PS: I don't want to nag or spam with non-informative messages, but I was advised to ping anybody who might be interested in reviewing it here.
Comment 10 Larry the Git Cow gentoo-dev 2021-10-20 02:42:33 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=743dc8f916fcbd4bef81a6f933c61f5a77a6a1f9

commit 743dc8f916fcbd4bef81a6f933c61f5a77a6a1f9
Author:     Alexander Golubev <fatzer2@gmail.com>
AuthorDate: 2021-06-20 01:14:38 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-10-20 02:15:38 +0000

    sci-mathematics/z3: fix build failure with USE="java"
    
    Closes:https://bugs.gentoo.org/673126
    Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/21338
    Signed-off-by: Sam James <sam@gentoo.org>

 sci-mathematics/z3/z3-4.8.11b.ebuild | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)