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

jni.h not found when running with -s java in Ubuntu #2496

Open
DIvanov503 opened this issue Jun 26, 2024 · 0 comments
Open

jni.h not found when running with -s java in Ubuntu #2496

DIvanov503 opened this issue Jun 26, 2024 · 0 comments

Comments

@DIvanov503
Copy link

When trying to generate SWIG binding to datalog file I'm getting the following error:

SwigInterface_wrap.cxx:178:10: fatal error: jni.h: No such file or directory
  178 | #include <jni.h>
      |          ^~~~~~~
compilation terminated.
Traceback (most recent call last):
  File "/usr/bin/souffle-compile.py", line 171, in <module>
    launch_command(cmd, "Compilation of SWIG C++", verbose=args.verbose)
  File "/usr/bin/souffle-compile.py", line 73, in launch_command
    raise RuntimeError("Error: {}. Command: {}".format(descr, cmd))
RuntimeError: Error: Compilation of SWIG C++. Command: "/usr/bin/c++" -fPIC -c -D__EMBEDDED_SOUFFLE__ SwigInterface_wrap.cxx /home/dmitry/datalog/acycle.cpp -DRAM_DOMAIN_SIZE=64 -DUSE_NCURSES -DUSE_LIBZ -DUSE_SQLITE  -I/souffle/src/include -I/usr/include -std=c++17  -fopenmp -O3  -I -I
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 76, in apport_excepthook
    binary = os.path.realpath(os.path.join(os.getcwd(), sys.argv[0]))
FileNotFoundError: [Errno 2] No such file or directory

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/souffle-compile.py", line 171, in <module>
    launch_command(cmd, "Compilation of SWIG C++", verbose=args.verbose)
  File "/usr/bin/souffle-compile.py", line 73, in launch_command
    raise RuntimeError("Error: {}. Command: {}".format(descr, cmd))
RuntimeError: Error: Compilation of SWIG C++. Command: "/usr/bin/c++" -fPIC -c -D__EMBEDDED_SOUFFLE__ SwigInterface_wrap.cxx /home/dmitry/datalog/acycle.cpp -DRAM_DOMAIN_SIZE=64 -DUSE_NCURSES -DUSE_LIBZ -DUSE_SQLITE  -I/souffle/src/include -I/usr/include -std=c++17  -fopenmp -O3  -I -I
failed to compile C++ sources

I installed Soufflé with apt, hence I believe the prebuilt version doesn't use my JAVA_HOME to generate an include path.

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

No branches or pull requests

2 participants