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

Improve FreeBSD support #26

Merged
merged 1 commit into from
Jun 20, 2016
Merged

Improve FreeBSD support #26

merged 1 commit into from
Jun 20, 2016

Conversation

michael-o
Copy link
Contributor

  • Detect JAVA_HOME automatically as advised by man javavm if not set
  • Avoid a compile-time error on FreeBSD 10.3-RELEASE along with clang if the
    OS-specific include directory is not passed to the preprocessor, BSD/OS is dead for 15 years+ and does not correspond to modern BSDs like FreeBSD or OpenBSD. See config.sub.

Both compiles now perfectly on FreeBSD 9 and 10 in 32 bit and 64 bit, Java 7 and Java 8.

Error with clang (FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512, Target: x86_64-unknown-freebsd10.3, Thread model: posix):

configure:11640: JAVA_HOME was set, checking to see if it's a JDK we can use...
configure:11645: checking if '/usr/local/openjdk8' is a JDK
configure:11706: cc -c -g -O2  -I/usr/local/openjdk8/include conftest.c >&5
In file included from conftest.c:21:
/usr/local/openjdk8/include/jni.h:45:10: fatal error: 'jni_md.h' file not found
#include "jni_md.h"
         ^
1 error generated.
configure:11706: $? = 1

Working library:

$ file ./target/native-build/target/lib/libjansi-1.7-SNAPSHOT.so
./target/native-build/target/lib/libjansi-1.7-SNAPSHOT.so: ELF 64-bit LSB shared object, x86-64, version 1 (FreeBSD), dynamically linked, not stripped

* Detect JAVA_HOME automatically as advised by "man javavm" if not set
* Avoid a compile-time error on FreeBSD 10.3-RELEASE along with clang if the
  OS-specific include directory is not passed to the preprocessor
@michael-o
Copy link
Contributor Author

@chirino Can you have a look please? I'd like to upstream everyhting into Jansi associatd with FreeBSD.

@chirino chirino merged commit e2522b0 into fusesource:master Jun 20, 2016
@chirino
Copy link
Member

chirino commented Jun 20, 2016

Thanks!

@michael-o
Copy link
Contributor Author

@chirino Thank you. Looking forward to the next release to solve fusesource/jansi-native#5.

@chirino
Copy link
Member

chirino commented Jun 20, 2016

Just cut 1.14

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

Successfully merging this pull request may close these issues.

None yet

2 participants