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

Fix build on MacOS with Java 8 #25

merged 1 commit into from Nov 9, 2017


None yet
2 participants

jaikiran commented Oct 21, 2017

While building the project on MacOS (Sierra) with Java 8:

java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

the build fails with:

[INFO] --- exec-maven-plugin:1.5.0:exec (default) @ wildfly-openssl-macosx-x86_64 ---
mkdir -p target/classes/macosx-x86_64
cc  -Werror -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wpointer-arith -std=c89 -Wdeclaration-after-statement -Wformat -Wformat-security -Wunused -Wno-unknown-pragmas -c ../libwfssl/src/alpn.c -o target/alpn.o -I../libwfssl/include
In file included from ../libwfssl/src/alpn.c:2:
../libwfssl/include/wfssl.h:41:10: fatal error: 'jni.h' file not found
#include <jni.h>
1 error generated.
make: *** [target/alpn.o] Error 1
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 2 (Exit value: 2)

The commit in this PR includes the ${JAVA_HOME}/include and ${JAVA_HOME}/include/darwin (which is where the jni.h and jni_md.h reside) in the compilation path. Adding this got me past the compilation failures and the build succeeded.

Include JAVA_HOME/include and JAVA_HOME/include/darwin for compiling …
…against MacOS with Java >=8, so that it finds jni.h and jni_md.h header files

This comment has been minimized.

Show comment
Hide comment

jaikiran Nov 9, 2017


Mentioning @stuartwdouglas, just in case this and the other PR (#24) weren't noticed.


jaikiran commented Nov 9, 2017

Mentioning @stuartwdouglas, just in case this and the other PR (#24) weren't noticed.

@stuartwdouglas stuartwdouglas merged commit 293a79a into wildfly:master Nov 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment