Skip to content

compile issue #1

@cinterloper

Description

@cinterloper

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions