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 mvn build #2

Open
RestfulBlue opened this issue Nov 19, 2017 · 4 comments
Open

Java mvn build #2

RestfulBlue opened this issue Nov 19, 2017 · 4 comments

Comments

@RestfulBlue
Copy link

Hi , how can i build java bindings?
using windows 10, building library with cmake&&vs17 is ok, but when i trying to build jar( mvn install) and its contain only meta-inf :C

@RestfulBlue
Copy link
Author

okey, mvn install -P !platform-windows working

@RestfulBlue
Copy link
Author

can u please provide instuction how this project should be builded with java bindings?
currently i am using next order :

  1. cd sigar && mkdir build && cd build && cmake .. and build with vs17x64
  2. cd into java bindings, trying to build it: mkdir build, cd build, cmake ../jni
    and i got much different errors :C

@AlexYaruki
Copy link
Owner

Will look into building issue next week. Meantime, you can use binaries provided from sourceforge: https://sourceforge.net/projects/sigar/. Binaries from there should work correctly. Also, could you post complete logs from each compilation ? (for sigar, jni and java ?)

@RestfulBlue
Copy link
Author

when im trying to use binaries from sourceforge, i got access EXCEPTION_ACCESS_VIOLATION :/
hs_err_pid10404.log

with build using cmake:

  1. sigar is ok, only warnings like signed/unsigned mismatch
  2. with jni project can be generated, because library, created by CmakeLists.txt link to itsels
    /bindings/java/jni/CmakeLists
    10 line : set(LINK_LIBRARIES sigar)
    22 line : set(LIBRARY_NAME "sigar")
    so i change library name to sigarj, and project generated
  3. from folder binding/java/jni
    mkdir build
    cd build
    cmake ../jni -G "Visual Studio 15 2017 Win64"
  4. at first project not including sigar_os.h, i copy it from src/win32/sigar_os.h
    unfortunately im from russia, and visual studio use russian language for build log, i think it hard to change :C
    but most of messages its some sort of macro redefinition in winsock and ws2def
  5. java bindings build perfectly, except java9 deprecations

Im using windows 10 version 1709, build 16299, visual studio 15 2017 , java 9(also tried j8)

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