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

compile issue #1

Open
cinterloper opened this issue Sep 20, 2016 · 0 comments
Open

compile issue #1

cinterloper opened this issue Sep 20, 2016 · 0 comments

Comments

@cinterloper
Copy link

Hey there, im really excited about using this, but im having a bit of trouble getting started

im using terra 2016-03-25 , with jdk 8 installed. ive tried this in both ubuntu 16.04 and fedora 24
when i run build.sh i get

+ terra ./terra-java/examples/extension/native.t
In file included from <buffer>:1:
/usr/lib/jvm/java-openjdk//include/jni.h:45:10: fatal error: 'jni_md.h' file not found
#include "jni_md.h"
         ^
attempting to use an opaque type {&int32} -> int32 where the layout of the type is needed
stack traceback:
        [C]: in function 'error'
        src/terralib.lua:1475: in function 'reportopaque'
        src/terralib.lua:1559: in function 'complete'
        src/terralib.lua:1568: in function <src/terralib.lua:1553>
        [C]: in function 'registercfile'
        src/terralib.lua:3357: in function 'includec'
        ./terra-java/jni.t:23: in main chunk
        [C]: in function 'require'
        ./terra-java/types.t:8: in main chunk
        [C]: in function 'require'
        ./terra-java.t:1: in main chunk
        [C]: in function 'require'
        ./terra-java/examples/extension/native.t:1: in main chunk

I attempted to get around this by copying jni_md.h into the search path, but hit another road block

[root@fd777f7ee52a terra-java-master]# ln /usr/lib/jvm/java-openjdk//include/linux/jni_md.h /usr/lib/jvm/java-openjdk//include
[root@fd777f7ee52a terra-java-master]# bash build.sh 
+ rm -rf ./obj
+ mkdir ./obj
+ find ./terra-java -name '*.java'
+ xargs javac -d ./obj
+ terra ./terra-java/examples/extension/native.t
LLVM ERROR: Program used external function 'JNI_GetDefaultJavaVMInitArgs' which could not be resolved!
[root@fd777f7ee52a terra-java-master]# 

any advice you could offer would be appreciated

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

1 participant