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

Jump to LLVM 7.0 #42

Open
jmmartinez opened this issue Dec 28, 2018 · 6 comments
Open

Jump to LLVM 7.0 #42

jmmartinez opened this issue Dec 28, 2018 · 6 comments
Labels
beginner Issue Simple issue for a first contribution enhancement

Comments

@jmmartinez
Copy link
Owner

No description provided.

@jmmartinez jmmartinez added enhancement beginner Issue Simple issue for a first contribution labels Dec 28, 2018
@castigli
Copy link

Hi @jmmartinez,

I think this is a cool project and I would be interested in trying it out.

As a first step I was trying to compile it with a recent LLVM. The bump to LLVM 7.0 is trivial and worked easily.

However, when I try more recent versions (8.0 and higher) I get a segfault on the front end.
Any chance you could point me in the right direction to solve this issue?

Stack dump:
0.	Program arguments: /usr/lib/llvm-8/bin/clang -cc1 -triple x86_64-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name test.cpp -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -resource-dir /usr/lib/llvm-8/lib/clang/8.0.0 -I /home/gcastigl/Codes/easy-just-in-time/include -I/home/gcastigl/intel/compilers_and_libraries_2020.1.217/linux/mkl/include -I/home/gcastigl/intel/tbb/include -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward -internal-isystem /usr/include/clang/8.0.0/include/ -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm-8/lib/clang/8.0.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include --std=c++14 -fdeprecated-macro -fdebug-compilation-dir /home/gcastigl/Codes/test-easyjit -ferror-limit 19 -fmessage-length 192 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -load /home/gcastigl/Codes/easy-just-in-time/build-8/bin/EasyJitPass.so -o /tmp/test-61748b.o -x c++ test.cpp -faddrsig 
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 8.0.0-3~ubuntu18.04.2 (tags/RELEASE_800/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: note: diagnostic msg: Error generating preprocessed source(s).

@jmmartinez
Copy link
Owner Author

Hello @castigli ,

Thanks for showing interest in the project.

One way to proceed is to compile your own LLVM+Clang with assertions and debug info, instead of using the package that is distributed with your system. This should provide us a more accurate stacktrace when the fail happens. From there, it should be easier to find the root cause of the problem.

To do this, you have to clone llvm's repository, and build with the options CMAKE_RELEASE_TYPE=Debug LLVM_ENABLE_ASSERTIONS=ON .

Best,

@castigli
Copy link

Hi @jmmartinez,
That is what I was thinking, thanks for the pointer, I'll report back if I succeed!
Cheers,

@cnergyone
Copy link

Any progress on getting the library working on more recent LLVM versions?
On LLVM-12-dev I get the message:
Unknown CMake command "add_llvm_loadable_module".

Would be great to get the library working on a modern clang so we can use constexpr and other nice features of C++20 together with JITing.

@castigli
Copy link

Hi @cnergyone, unfortunately not much progress on my side as I am focusing on other projects.
Regarding your error, that's a deprecated function, you should replace it with
add_llvm_library(yourLib MODULE ...)

@kathlenehurt-sifive
Copy link

I've made some progress on moving to LLVM 14.0.6 (see #51). @cnergyone would love to collaborate on getting this library updated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginner Issue Simple issue for a first contribution enhancement
Projects
None yet
Development

No branches or pull requests

4 participants