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

java binding fails on OS X 10.11.2 #78

Open
piotrm0 opened this issue Apr 22, 2016 · 1 comment
Open

java binding fails on OS X 10.11.2 #78

piotrm0 opened this issue Apr 22, 2016 · 1 comment

Comments

@piotrm0
Copy link

piotrm0 commented Apr 22, 2016

I believe the problem is that bindings/java/hyperic_jni/src/org/hyperic/jni/ArchNameTask.java makes some assumptions that no not true about location of java. Particularly I see the lines:

if (ArchLoader.IS_DARWIN) { //default to most recent SDK //MacOSX10.3.9.sdk, MacOSX10.4u.sdk, MacOSX10.5.sdk,etc. String sdkRoot = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs"; if (new File(sdkRoot).exists() == false) { sdkRoot = "/Developer/SDKs"; }

Neither of the two checked paths exist on my computer. My javac is located in /System/Library/Frameworks/JavaVM.framework/Versions/Current/ . There are also some jdk files in /Library/Java/JavaVirtualMachines/ .

Here is the error itself:

`piotrm  ⋯  sigar.git  bindings  java  ant    master
Buildfile: /Users/piotrm/github/sigar.git/bindings/java/build.xml

jni-init:
[echo] jni.src=darwin, jni.jdk.os=darwin, 64-bit
[javac] /Users/piotrm/github/sigar.git/bindings/java/hyperic_jni/jni-build.xml:165: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 1 source file to /Users/piotrm/github/sigar.git/bindings/java/build/classes
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.4
[javac] warning: [options] source value 1.4 is obsolete and will be removed in a future release
[javac] warning: [options] target value 1.4 is obsolete and will be removed in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
[javac] 4 warnings
[libarch] universal64-macosx
[libarch] Could not find sdk.
[echo] java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home

sigar-version:
[echo] SIGAR git revision ad47dc3

version-file:
[echo] cp ./src/org/hyperic/sigar/Version.java.in -> /Users/piotrm/github/sigar.git/bindings/java/build/./src/org/hyperic/sigar/Version.java
[copy] Copying 1 file to /Users/piotrm/github/sigar.git/bindings/java/build/src/org/hyperic/sigar

version-file:
[echo] cp ../../src/sigar_version.c.in -> /Users/piotrm/github/sigar.git/bindings/java/build/src/sigar_version.c
[copy] Copying 1 file to /Users/piotrm/github/sigar.git/bindings/java/build/src

version-file:
[echo] cp ../../src/os/darwin/Info.plist.in -> /Users/piotrm/github/sigar.git/bindings/java/build/src/Info.plist
[copy] Copying 1 file to /Users/piotrm/github/sigar.git/bindings/java/build/src

version-file:
[echo] cp ../../src/os/win32/sigar.rc.in -> /Users/piotrm/github/sigar.git/bindings/java/build/src/sigar.rc
[copy] Copying 1 file to /Users/piotrm/github/sigar.git/bindings/java/build/src

sigar.rc:

prepare-src:
[exec] javasigar_generated.c up-to-date
[exec] javasigar_generated.h up-to-date

jni-compile:

uni-cc:
[echo] build 'ppc' arch

jni-cc:
[echo] jni libname=sigar-universal64-macosx
[cc] 12 total files to be compiled.
[cc] clang: warning: no such sysroot directory: '${uni.sdk}'
[cc] clang: error: invalid version number in '-mmacosx-version-min=${osx.min}'

BUILD FAILED
/Users/piotrm/github/sigar.git/bindings/java/hyperic_jni/jni-build.xml:224: The following error occurred while executing this line:
/Users/piotrm/github/sigar.git/bindings/java/hyperic_jni/jni-build.xml:233: The following error occurred while executing this line:
/Users/piotrm/github/sigar.git/bindings/java/hyperic_jni/jni-build.xml:270: gcc failed with return code 1

Total time: 0 seconds`

@EldonReturn
Copy link

The same with 10.22.2

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

2 participants