Open JianpingZeng opened 4 years ago
The reason you're having the linking problem is because you removed the --version-script=linux_version.map
What errors were you getting by building JLang with that included? I've also tested on an Ubuntu 16.06 system and had no problems so I'm curious as to what exact errors you're running into.
The linker gives me an error "/usr/bin/ld: error: linux_version.map:24:4: invalid character" BTW, a minor typo in my previous reply. My OS version is Ubuntu 16.04.
I solved that problem which is caused by an extra newline character at the end of the linux_version.map. Just delete it. It would be fine!
But, there is another problem happens when I try to run make tests even with the modified linux_version.map used.
./Subtype.binary: relocation error: /usr/lib/jdk/jdk1.7.0/jre/lib/amd64/libjava.so: symbol JVM_GetClassLoader, version SUNWprivate_1.1 not defined in file libjvm.so with link time reference
Ah ok, thanks for the clarification. I don't have an Ubuntu16.04 system to reproduce this on myself at the moment so I won't be able to help debug this right away.
But, what it looks like is happening is the JLang runtime wasn't recompiled after you updated the linux_version.map file.If so, then running make clean
and then rebuilding should solve this but I can't say for sure. If it isn't that then I'll have to do a bit more digging.
I have cleaned everything and recompiled it. The same problem is there.
Ah I think the problem is with the minor version of the JDK that you're using. The best supported JDK is this one here: https://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html
I believe that the version you have is probably not the same as this one.
In the future we are planning to make JLang more portable across these kinds of small changes but it's difficult based on how the internal JVM interfaces aren't actually intended to be stable or portable across versions.
Hi, I am trying to build and run unit tests. But I encountered the following error when I tried to run the generated binary on the Ubuntu 16.04 + X86 platform with recommended clang+llvm 5.0.1.
./Add.binary: /home/xlous/Development/Compiler/JLang/runtime/out/libjvm.so: version `SUNWprivate_1.1' not found (required by /usr/lib/jdk/jdk1.7.0/jre/lib/amd64/libjava.so)
BTW, I solved three compilation problems on my Ubuntu 16.06 system.
Thanks, Jianping.