-
Notifications
You must be signed in to change notification settings - Fork 107
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
missing CodeGenModule.h #18
Comments
That file definitely still exists: https://github.com/llvm-mirror/clang/blob/master/lib/CodeGen/CodeGenModule.h can you check that clang is properly checked out in deps/llvm-svn/tools/clang? |
Looks like setting BUILD_LLVM_CLANG=1 in Make.user does not check out and build Clang automatically. Manual build seems to push things a little bit further. Right now though I'm facing a link error : $ make -f BuildBootstrap.Makefile JULIA_HOME=/data/job/lab/kuba/build/julia_all/julia/usr/bin/ Is this a part of libcxx (which I haven't build btw?) Thanks |
Usually everything is checked out correctly. However it seems that in your case something got messed up. That error message indicates that lldb wasn't built correctly (should by in deps/tools/lldb). I don't actually use LLDB in the C++ FFI, so you could edit the Makefile to take out the link lines, but I use it in one of the example scripts and in the upcoming debugger that is based on this package, which is why it is there. Can you try making sure LLDB builds properly for you and report any errors (I've been fixing build problems in LLDB, but I think I got most of them now). |
Sure, I just noticed overlooked LLDB - building it now. |
I was stopped by a few missing dependencies: Swig, libedit. |
Can you try |
undefined symbol: _ZN4llvm18format_object_base4homeEv |
Did you build LLVM as a shared library by setting |
Yes I have it set up in my Make.user. |
You may have to rebuild libjulia. |
Hmmmm that didn't help. Do I think this may be related with missing libcxxabi, libcxx or compiler-rt? |
No, i'm not using any of these projects. Can you do |
sorry, didn't mean to close :). Very unfortunate button placement. |
$ ldd libjulia.so |
Ok, so it's not linking the LLVM shared library. Try |
Keno, which linux distro did you test this on? I may try this evening from scratch with more modern setup. |
I tested this on Ubuntu (14.04 I believe). |
Where USE_LLVM_SHLIB is used? After it is defined in Makefile.inc I can't find it is used anywhere else? |
Somethings tells me the USE_LLVM_SHLIB does not make into .src/Makefile As a test, I commented out the if lines jus to see what happens: #ifeq ($(USE_LLVM_SHLIB),1) ...but I don't understand the error :) Does that mean the llvm libraries to link with are not in the LD_LIBRARY_PATH? |
Ok, I think I have Julia linked with LLVM lib now. I had to hack $LLVMLINK in Julia Makefile to make it work. Here is the output: $ ldd libjulia.so After rebuilding Julia and Pkg.build("Cxx") I get: ERROR: error compiling init: could not load module libcxxffi: libcxxffi: cannot open shared object file: No such file or directory I double checked and the libcxxffi.so is in my $LD_LIBRARY_PATH. |
The error message isn't great. Where did you set USE_LLVM_SHLIB? The libcxxffi makefile uses it too, so if there's a problem you'll have to change it there too. |
Yes, I also did change these lines in BuildBootstrap.Makefile |
Did you rebuild libcxxffi afterwards (you can verify using |
$ ldd libcxxffi.so julia> dlopen("/home/kuba/.julia/v0.4/Cxx/deps/usr/lib") |
By the path I meant the full path to the file (libcxxffi.so). |
Sorry, my bad. |
Ok, that's good. I don't know why it can't find it, but I think if you dlopen it manually before doing using Cxx, you should be fine. |
Then, If I type "using Cxx" Julia crashes. signal (11): Segmentation fault |
That's progress :). Are you running the debug or release version on julia? |
Heh, I was about to add the following: FYI, I still haven't built LLDB. julia> Pkg.build("Cxx") |
How do I build debug julia? |
|
Ok, pasting the output from the debug version: julia> dlopen("/home/kuba/.julia/v0.4/Cxx/deps/usr/lib/libcxxffi-debug.so") julia> using Cxx signal (11): Segmentation fault |
If I decide to build LLVM separately what flags should I provide to configure script? |
Another update.... So I rebuilt LLVM/Clang/compiler-rt from scratch, rebuild Julia, Cxx.... and no crash so far.... Not sure about these warnings. Can I assume all works? :0 julia> dlopen("/home/kuba/.julia/v0.4/Cxx/deps/usr/lib/libcxxffi.so") julia> using Cxx julia> |
oh, forgot to mention. I configured llvm with: ../configure --enable-shared --enable-pic --enable-libffi |
Yes, that looks good. The warnings should be harmless, but you may have problems with headers not found, in which case you need to add the proper paths for your system to the search path. |
Building and loading Cxx seems to be working at the moment. I will open a separate issue regarding new runtime problems I bumped into. |
Awesome, thanks for being so patient. |
I'm giving this a whirl and experiencing the same error. Let's get this to the point where it's easier, and described in the README---so if possible I'd like to minimize the number of manual build steps. I added this
then did
However, I got the exact same missing file error shown at the top of this issue. |
Should have added: Kubuntu 14.04, and
|
However, I don't have a |
For me it works on OSX with this Make.user:
and a clean install, using this branch of julia: JuliaLang/julia#9263 |
Thanks. I commented out the
If I comment it out, after a long build process I still get that same |
Basically it looks like those links are broken in If I use version However, I wonder if we should be downloading via |
That's why you need the fix Keno added in JuliaLang/julia#9263 |
Got it. Thanks to you both. (I see @Keno merged that commit.) |
Hi,
I sucessufly build Julia with the following changes to Make.user but getting following error when building the package:
julia> Pkg.build("Cxx")
INFO: Building Cxx
Tuning for julia installation at: /home/kuba/PRJ/JULIA/0.4/julia/usr/bin
CC /home/kuba/.julia/v0.4/Cxx/deps/build/bootstrap.o
../src/bootstrap.cpp:49:35: fatal error: CodeGen/CodeGenModule.h: No such file or directory
#include "CodeGen/CodeGenModule.h"
^
compilation terminated.
make: *** [build/bootstrap.o] Error 1
Julia:
Version 0.4.0-dev+949 (2014-10-05 02:28 UTC)
Commit 7dd704b (1 day old master)
x86_64-redhat-linux
Thanks for looking into this,
kuba
The text was updated successfully, but these errors were encountered: