Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

corelyzer for linux? #2

Open
japhir opened this issue Apr 5, 2017 · 14 comments
Open

corelyzer for linux? #2

japhir opened this issue Apr 5, 2017 · 14 comments

Comments

@japhir
Copy link

japhir commented Apr 5, 2017

Hi! I'm trying to build corelyzer on my 4.10.6-1-ARCH linux machine from the source code, but I see no list of required dependencies. (on this presentation it lists the app as cross-platform)

After running sh gradlew clean package I get the following error:

Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true


FAILURE: Build failed with an exception.

* Where:
Build file '/home/japhir/Downloads/corelyzer-2.0.4_rc4/corelyzer-2.0.4_rc4/app/build.gradle' line: 14

* What went wrong:
A problem occurred evaluating project ':app'.
Cause: You must specify a urls for a Maven repo.

* Try:
Run with -s or -d option to get more details. Run with -S option to get the full (very verbose) stacktrace.

BUILD FAILED

Total time: 1.826 secs

I look forward to hearing from you! :-)

@sorghumking
Copy link
Collaborator

sorghumking commented Apr 17, 2017 via email

@daoane
Copy link
Contributor

daoane commented Nov 30, 2017

Hi Brian, Ilja,

I tried as well on Linux and came to as far as Ilja did. The problem seems to be of a more general nature and affect everybody who tries to build Corelyzer for the first time, independent of architecture.

According to my understanding, gradle looks for the Maven SDK and, if not present, tries to download it from the repositories that are specified in app/build.gradle lines 12-16. The repos on line 14 were deprecated many years ago. In one forum it was mentioned that http://download.java.net/maven/2/ was replaced by https://maven.java.net/content/groups/public/ (though I don't know whether this is correct or not). And https://maven.atlassian.com/maven1/maven2 was shut down 5 years ago (c.f. https://www.atlassian.com/blog/archives/shutting-down-maven-1-repositories-on-maven-atlassian-com), apparently without replacement.

It seems like the only reasonable option is to move to a more recent Maven SDK. Unfortunately, I have no clue how to proceed with this.

Henning

@kaysindreNGU
Copy link

In your app/build.gradle line 14
mavenRepo(url: ['http://download.java.net/maven/2/',

Change this url to urls, then it will go on. Tested on Windows with 32 bit java 7 sdk

@sorghumking
Copy link
Collaborator

Welp, it's been a few years, but I've finally got Corelyzer building and running on Linux...specifically, on a clean install of
Ubuntu 18.04.4 "Bionic Beaver".

Clone the repo, checkout the linux_build branch, and follow the instructions in README.md and scenegraph/README.md.

I am far from a seasoned Linux user, so there are caveats. Most notably, it only works on a clean install of 18.04.4. Do not update the kernel from the provided 5.3.0-28-generic to 5.4+! Otherwise Corelyzer will crash at launch. For some reason, JOGL and libEGL.so don't play well together with kernel 5.4+. My notes on this can be found in scenegraph/linux_build_breadcrumb.txt.

Perhaps one of you savvy Linux users can shed some light on this issue? If so, please reply here, and send a pull request if you have a fix!

It would also be great to have a pre-built Corelyzer for Linux so folks don't have to build from scratch. I have no experience in packaging Linux applications, so any help would be much appreciated.

Hope this is enough to get people started...let me know how it goes!

@japhir
Copy link
Author

japhir commented Sep 24, 2020

I tried to build it on my distro with all the newest packages, but as expected this fails because it relies on some old syntax.

../gradlew build-jni-linux
Downloading https://services.gradle.org/distributions/gradle-6.5.1-bin.zip
.........10%..........20%..........30%..........40%.........50%..........60%..........70%..........80%.........90%..........100%

Welcome to Gradle 6.5.1!

Here are the highlights of this release:
 - Experimental file-system watching
 - Improved version ordering
 - New samples

For more details see https://docs.gradle.org/6.5.1/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)
[ant:exec] /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/cache.cpp:34:10: fatal error: squish.h: No such file or directory
[ant:exec]    34 | #include <squish.h>
[ant:exec]       |          ^~~~~~~~~~
[ant:exec] compilation terminated.
[ant:exec] In file included from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/freedraw.h:30,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/trackscenenode.h:31,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/graph.h:34,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/dataset.cpp:31:
[ant:exec] /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/corelyzer_system.h:30:10: fatal error: jni.h: No such file or directory
[ant:exec]    30 | #include <jni.h>
[ant:exec]       |          ^~~~~~~
[ant:exec] compilation terminated.
[ant:exec] In file included from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/freedraw.h:30,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/trackscenenode.h:31,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/graph.h:34,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/graph.cpp:29:
[ant:exec] /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/corelyzer_system.h:30:10: fatal error: jni.h: No such file or directory
[ant:exec]    30 | #include <jni.h>
[ant:exec]       |          ^~~~~~~
[ant:exec] compilation terminated.
[ant:exec] /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/textureresource_ex.cpp:154:10: fatal error: squish.h: No such file or directory
[ant:exec]   154 | #include <squish.h>
[ant:exec]       |          ^~~~~~~~~~
[ant:exec] compilation terminated.
[ant:exec] In file included from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/freedraw.h:30,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/trackscenenode.h:31,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/trackscenenode.cpp:27:
[ant:exec] /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/corelyzer_system.h:30:10: fatal error: jni.h: No such file or directory
[ant:exec]    30 | #include <jni.h>
[ant:exec]       |          ^~~~~~~
[ant:exec] compilation terminated.
[ant:exec] In file included from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/freedraw.h:30,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/trackscenenode.h:31,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/graph.h:34,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/trackscene.cpp:32:
[ant:exec] /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/corelyzer_system.h:30:10: fatal error: jni.h: No such file or directory
[ant:exec]    30 | #include <jni.h>
[ant:exec]       |          ^~~~~~~
[ant:exec] compilation terminated.
[ant:exec] In file included from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/corelyzer_system.cpp:27:
[ant:exec] /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/corelyzer_system.h:30:10: fatal error: jni.h: No such file or directory
[ant:exec]    30 | #include <jni.h>
[ant:exec]       |          ^~~~~~~
[ant:exec] compilation terminated.
[ant:exec] In file included from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/freedraw.h:30,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/trackscenenode.h:31,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/graph.h:34,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/canvas.cpp:30:
[ant:exec] /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/corelyzer_system.h:30:10: fatal error: jni.h: No such file or directory
[ant:exec]    30 | #include <jni.h>
[ant:exec]       |          ^~~~~~~
[ant:exec] compilation terminated.

> Task :scenegraph:build-jni-linux
[ant:echo] Generating libscenegraph for Linux x86_64...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/sha1.c...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/cache.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/dxt.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/dataset.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/matrix.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/graph.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/textureresource_ex.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/camera.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/trackscenenode.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/png_read.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/trackscene.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/fontsys.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/corelyzer_system.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/canvas.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/libdxt.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/freedraw.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/intrinsic.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/scenegraph.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/annotationmarker.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/util.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/model.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/common.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/coresection.cpp...

[ant:exec] In file included from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/freedraw.h:30,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/freedraw.cpp:27:
[ant:exec] /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/corelyzer_system.h:30:10: fatal error: jni.h: No such file or directory
[ant:exec]    30 | #include <jni.h>
[ant:exec]       |          ^~~~~~~
[ant:exec] compilation terminated.
[ant:exec] In file included from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/scenegraph.cpp:28:
[ant:exec] /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/corelyzer_graphics_SceneGraph.h:2:10: fatal error: jni.h: No such file or directory
[ant:exec]     2 | #include <jni.h>
[ant:exec]       |          ^~~~~~~
[ant:exec] compilation terminated.
[ant:exec] In file included from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/freedraw.h:30,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/trackscenenode.h:31,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/graph.h:34,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/coresection.cpp:29:
[ant:exec] /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/corelyzer_system.h:30:10: fatal error: jni.h: No such file or directory
[ant:exec]    30 | #include <jni.h>
[ant:exec]       |          ^~~~~~~
[ant:exec] compilation terminated.
> Task :scenegraph:build-jni-linux FAILED

FAILURE: Build failed with an exception.

* Where:
Build file '/home/japhir/Downloads/corelyzer/scenegraph/build.gradle' line: 173

* What went wrong:
Execution failed for task ':scenegraph:build-jni-linux'.
> exec returned: 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 13s
4 actionable tasks: 4 executed

@japhir
Copy link
Author

japhir commented Sep 24, 2020

I could try to run it on an Ubuntu 18.0 VM because I already have that up and running for another software package that doesn't rely on the latest versions of its dependencies. Might take me some time to get around to it though.

I have some experience creating Arch User Repository packages for my distribution, but none for Ubuntu, unfortunately, so I can't help you there.

@daoane
Copy link
Contributor

daoane commented Sep 24, 2020

@japhir : The linux_build branch works fine when the development environment is set up correctly. Check your jdk. The "Deprecated Gradle features ..." warning will remain but apparently doesn't matter (I haven't checked this further).

For sorghumking, corelyzer worked on a VM with Ubuntu 18.04 LTS but crashed on a VM with 20.04 LTS. I have no problems with 20.04 LTS on a physical machine (Intel i915 graphic driver). This needs further confirmation/testing, but is most likely an issue with the mesa graphic driver on the VM + JOGL + the 5.4 kernel of 20.04 LTS. So try to avoid either the mesa graphic driver (you probably can't on a VM) or kernel 5.4/20.04 LTS.

@japhir
Copy link
Author

japhir commented Sep 28, 2020

@daoane I'm not on Ubuntu but on Arch Linux, a rolling release Linux distro, which means that all the packages I use are the latest versions that are available. Therefore on my local machine I can't choose to use a specific older version of certain libraries. Oh and yeah, I'm using the latest mesa/vulkan (20.1.8) drivers. So I guess in this case it's probably easiest to try it on my Ubuntu VM

@daoane
Copy link
Contributor

daoane commented Sep 28, 2020

I think my comment above is based on a wrong conclusion. Mesa is present on all systems, the difference is the driver for the (physical /virtual) graphic card. Which might be the issue for Ubuntu 20.04 LTS VM (works on physical machine). I think only more testing will help.

@japhir
Copy link
Author

japhir commented Sep 28, 2020

I figured out I hadn't installed the Arch equivalent of libsquish. After doing that I still get errors, it appears in can'f find jni.h, which is located in /usr/include/libavcodec/jni.h and owned by ffmpeg.

the output from the terminal after building scenegraph
λ worktop scenegraph → λ git linux_build → ../gradlew build-jni-linux
[ant:exec] In file included from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/freedraw.h:30,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/trackscenenode.h:31,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/graph.h:34,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/dataset.cpp:31:
[ant:exec] /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/corelyzer_system.h:30:10: fatal error: jni.h: No such file or directory
[ant:exec]    30 | #include <jni.h>
[ant:exec]       |          ^~~~~~~
[ant:exec] compilation terminated.
[ant:exec] In file included from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/freedraw.h:30,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/trackscenenode.h:31,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/graph.h:34,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/graph.cpp:29:
[ant:exec] /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/corelyzer_system.h:30:10: fatal error: jni.h: No such file or directory
[ant:exec]    30 | #include <jni.h>
[ant:exec]       |          ^~~~~~~
[ant:exec] compilation terminated.

> Task :scenegraph:build-jni-linux
[ant:echo] Generating libscenegraph for Linux x86_64...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/sha1.c...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/cache.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/dxt.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/dataset.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/matrix.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/graph.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/textureresource_ex.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/camera.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/trackscenenode.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/png_read.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/trackscene.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/fontsys.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/corelyzer_system.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/canvas.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/libdxt.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/freedraw.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/intrinsic.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/scenegraph.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/annotationmarker.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/util.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/model.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/common.cpp...
Compiling /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/coresection.cpp...

[ant:exec] In file included from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/freedraw.h:30,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/trackscenenode.h:31,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/trackscenenode.cpp:27:
[ant:exec] /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/corelyzer_system.h:30:10: fatal error: jni.h: No such file or directory
[ant:exec]    30 | #include <jni.h>
[ant:exec]       |          ^~~~~~~
[ant:exec] compilation terminated.
[ant:exec] In file included from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/freedraw.h:30,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/trackscenenode.h:31,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/graph.h:34,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/trackscene.cpp:32:
[ant:exec] /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/corelyzer_system.h:30:10: fatal error: jni.h: No such file or directory
[ant:exec]    30 | #include <jni.h>
[ant:exec]       |          ^~~~~~~
[ant:exec] compilation terminated.
[ant:exec] In file included from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/corelyzer_system.cpp:27:
[ant:exec] /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/corelyzer_system.h:30:10: fatal error: jni.h: No such file or directory
[ant:exec]    30 | #include <jni.h>
[ant:exec]       |          ^~~~~~~
[ant:exec] compilation terminated.
[ant:exec] In file included from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/freedraw.h:30,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/trackscenenode.h:31,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/graph.h:34,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/canvas.cpp:30:
[ant:exec] /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/corelyzer_system.h:30:10: fatal error: jni.h: No such file or directory
[ant:exec]    30 | #include <jni.h>
[ant:exec]       |          ^~~~~~~
[ant:exec] compilation terminated.
[ant:exec] In file included from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/freedraw.h:30,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/freedraw.cpp:27:
[ant:exec] /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/corelyzer_system.h:30:10: fatal error: jni.h: No such file or directory
[ant:exec]    30 | #include <jni.h>
[ant:exec]       |          ^~~~~~~
[ant:exec] compilation terminated.
[ant:exec] In file included from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/scenegraph.cpp:28:
[ant:exec] /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/corelyzer_graphics_SceneGraph.h:2:10: fatal error: jni.h: No such file or directory
[ant:exec]     2 | #include <jni.h>
[ant:exec]       |          ^~~~~~~
[ant:exec] compilation terminated.
[ant:exec] In file included from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/freedraw.h:30,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/trackscenenode.h:31,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/graph.h:34,
[ant:exec]                  from /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/coresection.cpp:29:
[ant:exec] /home/japhir/Downloads/corelyzer/scenegraph/src/main/cpp/corelyzer_system.h:30:10: fatal error: jni.h: No such file or directory
[ant:exec]    30 | #include <jni.h>
[ant:exec]       |          ^~~~~~~
[ant:exec] compilation terminated.

> Task :scenegraph:build-jni-linux FAILED

FAILURE: Build failed with an exception.

* Where:
Build file '/home/japhir/Downloads/corelyzer/scenegraph/build.gradle' line: 173

* What went wrong:
Execution failed for task ':scenegraph:build-jni-linux'.
> exec returned: 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 6s
4 actionable tasks: 2 executed, 2 up-to-date

@daoane
Copy link
Contributor

daoane commented Sep 28, 2020

I had the jni.h problem as well and it was due to the different java versions that I had installed (both openjdk and Oracle). I reinstalled openjdk-11 and the problem was solved. Maybe build.gradle needs to be adapted to ArchLinux (just a guess).

@sorghumking
Copy link
Collaborator

Indeed, the jni.h required here is associated with Java, not ffmpeg. On my machine, the path to jni.h is

/usr/lib/jvm/java-11-openjdk-amd64/include

jni_md.h, which is included by jni.h, is found in

/usr/lib/jvm/java-11-openjdk-amd64/include/linux

As @daoane mentioned, you'll need to adapt these paths in the build-jni-linux task in scenegraph/build.gradle to reflect your configuration.

@sorghumking
Copy link
Collaborator

I'm happy to report that Corelyzer launches successfully on a non-VM Ubuntu 18.04.4 with Linux kernel 5.4.0-48-generic.

More good news: Corelyzer launches successfully in both Ubuntu 18.04.4 and 20.04.1 virtual machines (Parallels 15) if hardware acceleration is disabled. In the VM settings, choose Graphics, Advanced Settings, and turn 3D Acceleration to "Off".

@japhir
Copy link
Author

japhir commented Sep 29, 2020

Great that you're testing it on Linux as well!

I've just reinstalled jre-openjdk (which is jre14) and jre11-openjdk but even after a sudo updatedb, locate jni.h still only lists /usr/include/libavcodec/jni.h and /home/japhir/Downloads/corelyzer/scenegraph/deps/win32/jni.h. So that's weird...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants