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

Compiling jar with aura fails #15

Closed
Zubnix opened this issue Apr 14, 2016 · 10 comments
Closed

Compiling jar with aura fails #15

Zubnix opened this issue Apr 14, 2016 · 10 comments

Comments

@Zubnix
Copy link

Zubnix commented Apr 14, 2016

Trying to compile an existing java jar with aura fails with error (I used the instructions in the wiki):
Exception in thread "main" java.lang.UnsatisfiedLinkError: Native library for linux-x86_64 not found
at aura.llvm.NativeLibrary.load(NativeLibrary.java:72)
at aura.llvm.binding.LLVMJNI.(LLVMJNI.java:804)
at aura.llvm.binding.LLVM.getLlvmHostTriple(LLVM.java:3103)
at aura.llvm.Target.(Target.java:36)
at aura.compiler.config.OS.getDefaultOS(OS.java:55)
at aura.compiler.target.ConsoleTarget.init(ConsoleTarget.java:93)
at aura.compiler.config.Config.build(Config.java:811)
at aura.compiler.config.ConfigBuilder.build(ConfigBuilder.java:402)
at aura.compiler.AppCompiler.main(AppCompiler.java:410)

@Zubnix
Copy link
Author

Zubnix commented Apr 16, 2016

when trying to compile the 'llvm' native build, using the provided 'build.sh', I get the following error:

[ 55%] Performing patch step for 'extllvm'
patching file lib/DebugInfo/DWARFContext.cpp
patching file lib/CodeGen/LexicalScopes.cpp
patching file lib/CodeGen/AsmPrinter/DwarfDebug.cpp
patching file lib/CodeGen/AsmPrinter/AsmPrinter.cpp
patching file lib/Target/AArch64/AArch64FrameLowering.cpp
patching file lib/Target/ARM/ARMFrameLowering.cpp
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/tools/clang/tools/libclang/CMakeLists.txt b/tools/clang/tools/libclang/CMakeLists.txt
|index f1c3f4c..92390be 100644
|--- a/tools/clang/tools/libclang/CMakeLists.txt
|+++ b/tools/clang/tools/libclang/CMakeLists.txt
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
CMakeFiles/extllvm.dir/build.make:98: recipe for target 'extllvm-prefix/src/extllvm-stamp/extllvm-patch' failed
make[2]: *** [extllvm-prefix/src/extllvm-stamp/extllvm-patch] Error 1
CMakeFiles/Makefile2:141: recipe for target 'CMakeFiles/extllvm.dir/all' failed
make[1]: *** [CMakeFiles/extllvm.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
linux-x86_64 build failed

Perhaps it is related?

@ashleyj
Copy link
Owner

ashleyj commented Apr 17, 2016

I built this a few hours ago on centos

Scanning dependencies of target extllvm
[ 47%] Creating directories for 'extllvm'
[ 52%] Performing download step for 'extllvm'
[ 57%] Performing patch step for 'extllvm'
patching file lib/DebugInfo/DWARFContext.cpp
patching file lib/CodeGen/LexicalScopes.cpp
patching file lib/CodeGen/AsmPrinter/DwarfDebug.cpp
patching file lib/CodeGen/AsmPrinter/AsmPrinter.cpp
patching file lib/Target/AArch64/AArch64FrameLowering.cpp
patching file lib/Target/ARM/ARMFrameLowering.cpp
patching file tools/clang/tools/libclang/CMakeLists.txt
[ 63%] No update step for 'extllvm'

Only thing I can think of is for some reason libclang/CMakeLists.txt file doesn't exit

$ find . -name CMakeLists.txt | grep libclang
./extclang/tools/libclang/CMakeLists.txt
./extclang/unittests/libclang/CMakeLists.txt
./target.llvm/build/linux-x86_64/extclang-prefix/src/extclang/tools/libclang/CMakeLists.txt
./target.llvm/build/linux-x86_64/extclang-prefix/src/extclang/unittests/libclang/CMakeLists.txt

Can you see it there?

@Zubnix
Copy link
Author

Zubnix commented Apr 17, 2016

yeah looks like it's there:

zubzub@localhost ~/git/aura $ find . -name CMakeLists.txt | grep libclang
./llvm/target.llvm/build/linux-x86_64/extclang-prefix/src/extclang/tools/libclang/CMakeLists.txt
./llvm/target.llvm/build/linux-x86_64/extclang-prefix/src/extclang/unittests/libclang/CMakeLists.txt
./llvm/extclang/tools/libclang/CMakeLists.txt
./llvm/extclang/unittests/libclang/CMakeLists.txt

What patch & cmake version do you use? GNU patch 2.7.5 & cmake version 3.4.3 on this machine.

@ashleyj
Copy link
Owner

ashleyj commented Apr 17, 2016

cmake 2.8.11 on centos
Patch version: GNU patch 2.7.1

@ashleyj
Copy link
Owner

ashleyj commented Apr 17, 2016

Doing some googling looks like there is/was a bug with 'patch' not following symm links -- could be related to that

@Zubnix
Copy link
Author

Zubnix commented Apr 17, 2016

A quick first investigation also makes me suspect that to be the problem.

@Zubnix
Copy link
Author

Zubnix commented Apr 17, 2016

any patch version > 2.7.3 fails (so that means 2.7.4 & 2.7.5). Since 2.7.4 patch refuses to follow symlinks of directories. I advice including it in the wiki :)

@Zubnix
Copy link
Author

Zubnix commented Apr 18, 2016

using 2.7.3 seems to fix the original issue. however I do seem to get an error pretty far on during compilation. (not compatible libxml2 found). Are you willing to provide the info (dependencies) required to build the aura/robovm llvm to the wiki as well?

@ashleyj
Copy link
Owner

ashleyj commented Apr 19, 2016

I've added a list of deps I've identified here: https://github.com/ashleyj/aura/wiki/Compiling-Aura
If you come across any I've missed, let me know.

@Zubnix
Copy link
Author

Zubnix commented Apr 19, 2016

I was able to fix the libxml2 issue by installing a multilib compatible variant (32 & 64bit x86 ABI). Maybe other distro do this by default (I had to explicitly tell gentoo to enable 32 bit ABI for libxml2).

I did not need to install anything specifically to make the compilation succeed so I can not comment if the dependency list is complete or not.

@Zubnix Zubnix closed this as completed Apr 19, 2016
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