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

Build failure problem with CLANG_INCLUDE_DIRS #24

Closed
jamadagni opened this issue Jul 28, 2015 · 1 comment
Closed

Build failure problem with CLANG_INCLUDE_DIRS #24

jamadagni opened this issue Jul 28, 2015 · 1 comment

Comments

@jamadagni
Copy link

After the problem I reported in issue #23 I am still having problems building. That issue only solved the cmake execution, but when I run make, I got:

[samjnaa:~/sr/_repos/git/_dlang/calypso/build] make
...
[  8%] Building CXX object CMakeFiles/LDCShared.dir/dmd2/cpp/cppexpression.cpp.o
In file included from /home/samjnaa/sr/_repos/svn/_llvm/llvm-3.6/tools/clang/include/clang/AST/ASTTypeTraits.h:19:0,
                from /home/samjnaa/sr/_repos/svn/_llvm/llvm-3.6/tools/clang/include/clang/AST/ASTContext.h:18,
                from /home/samjnaa/sr/_repos/git/_dlang/calypso/dmd2/cpp/astunit.h:18,
                from /home/samjnaa/sr/_repos/git/_dlang/calypso/dmd2/cpp/cppexpression.cpp:3:
/home/samjnaa/sr/_repos/svn/_llvm/llvm-3.6/tools/clang/include/clang/AST/ASTFwd.h:22:35: fatal error: clang/AST/DeclNodes.inc: No such file or directory
#include "clang/AST/DeclNodes.inc"
                                ^
compilation terminated.

So I look for the required file:

[samjnaa:~/sr/_repos/git/_dlang/calypso/build] find /home/samjnaa/sr/_repos/svn/_llvm/ -name "DeclNodes.inc"
/home/samjnaa/sr/_repos/svn/_llvm/build/tools/clang/include/clang/AST/DeclNodes.inc

Then I changed the CLANG_INCLUDE_DIRS in the cmake command to use the built include dirs:

[samjnaa:~/sr/_repos/git/_dlang/calypso/build] cmake .. -DLLVM_SOURCE_PATH="/home/samjnaa/sr/_repos/svn/_llvm/llvm-3.6" -DCLANG_INCLUDE_DIRS="/home/samjnaa/sr/_repos/svn/_llvm/llvm-3.6/build/tools/clang/include"
-- LDC version identifier: cfcae2
-- Using path for Intrinsics.td: /usr/lib/llvm-3.7/include
-- Configuring done
-- Generating done
-- Build files have been written to: /home/samjnaa/sr/_repos/git/_dlang/calypso/build

But now the make is looking for a header which is in the source include dirs:

[samjnaa:~/sr/_repos/git/_dlang/calypso/build] make
...
[  8%] Building CXX object CMakeFiles/LDCShared.dir/dmd2/cpp/cppexpression.cpp.o
In file included from /home/samjnaa/sr/_repos/git/_dlang/calypso/dmd2/cpp/cppexpression.cpp:3:0:
/home/samjnaa/sr/_repos/git/_dlang/calypso/dmd2/cpp/astunit.h:18:34: fatal error: clang/AST/ASTContext.h: No such file or directory
#include "clang/AST/ASTContext.h"
                                ^
compilation terminated.
...
[samjnaa:~/sr/_repos/git/_dlang/calypso/build] find /home/samjnaa/sr/_repos/svn/_llvm/ -name "ASTContext.h"
/home/samjnaa/sr/_repos/svn/_llvm/llvm-3.6/tools/clang/include/clang/AST/ASTContext.h

Then I try to specify both, using : (colon) as the path separator on my platform:

[samjnaa:~/sr/_repos/git/_dlang/calypso/build] cmake .. -DLLVM_SOURCE_PATH="/home/samjnaa/sr/_repos/svn/_llvm/llvm-3.6" -DCLANG_INCLUDE_DIRS="/home/samjnaa/sr/_repos/svn/_llvm/llvm-3.6/build/tools/clang/include:/home/samjnaa/sr/_repos/svn/_llvm/llvm-3.6/tools/clang/include"
-- LDC version identifier: cfcae2
-- Using path for Intrinsics.td: /usr/lib/llvm-3.7/include
-- Configuring done
-- Generating done
-- Build files have been written to: /home/samjnaa/sr/_repos/git/_dlang/calypso/build

But still no fruit and I'm getting the same error. I tried using the semicolon and curiously I get the previous error. I'm not sure what else to try...

@jamadagni
Copy link
Author

Hello and thanks for your kind reply at issue #23. I did not realize the significance of the wording "build and install Clang" in the documentation – that it was necessary that the same version be both in the tree and in my executable root. Now everything is fine.

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

1 participant