Comments (27)
I had similar difficulties building CastXML. Notably confusions about the meaning of "LLVM/Clang compiler SDK install tree", distinctions between the dependencies of LLVM and Clang, and knowing when/where/how to properly configure install prefixs.
After looking through the mailing list (http://public.kitware.com/mailman/listinfo/castxml) I came across @thewtex's CastXMLSuperbuild. Which, quite frankly, is a real lifesaver. 👏
https://github.com/thewtex/CastXMLSuperbuild
from castxml.
Hello,
What compiler are you using? Is it Visual Studio 2012 / MSVC or later?
from castxml.
Hello,
I have Visual Studio 2012 and Visual Studio 2010n I have the same errors with the two compilers
from castxml.
Is LLVM installed into a prefix path?
from castxml.
(as opposed to trying to use it in its build tree). Only building against an installed version is currently supported.
from castxml.
I have downloaded the source of LLVM via guthub: http://llvm.org/releases/download.html
And I have tried to build it with Cmake
from castxml.
Basic instructions to build LLVM/Clang are found here:
http://clang.llvm.org/get_started.html
If these instructions have been followed, try starting the initial CMake configuration on a clean build tree from a command prompt that has executed the appropriate vcvars.bat file from Visual Studio.
from castxml.
Thanks,
I am following the instructions and I don't know which version of subversion should I take ?
Is VisualSVN for Visual Studio goof for windows ?
from castxml.
If you downloaded the 3.6.0 source tar.xz, it can be extracted with 7Zip and subversion is not required
from castxml.
I have used subversion but I still have the same problem when using CMake:
I have lots of errors like this
CMake Error: File /cygdrive/c/Users/qi11091/Documents/Logiciels/llvm/utils/llvm-build/llvmbuild/init.py does not exist.
CMake Error at C:/Users/qi11091/Documents/Logiciels/llvm-build/LLVMBuild.cmake:330 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:432 (include)
It search for files in a linux way (/cygdrive/c/...) instea of searching in windows way
Would the problem be solved if i install the pre built binaries instead of the sources ?
from castxml.
As indicated in the documentation, you will need Python installed to build the tests.
I have not tried using the pre-built binaries. Please try it and report your experiences.
from castxml.
I have installed python and GnuWin32Tools but I still can not build the project files via CMake:
CMake Error: File /cygdrive/c/Users/qi11091/Documents/Logiciels/llvm/utils/llvm-build/llvmbuild/main.py does not exist.
CMake Error at C:/Users/qi11091/Documents/Logiciels/llvm-build/LLVMBuild.cmake:334 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:432 (include)
CMake Error: File /cygdrive/c/Users/qi11091/Documents/Logiciels/llvm/utils/llvm-build/llvmbuild/componentinfo.py does not exist.
CMake Error at C:/Users/qi11091/Documents/Logiciels/llvm-build/LLVMBuild.cmake:336 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:432 (include)
from castxml.
CMake Error: File /cygdrive/c/Users/.../main.py does not exist.
This looks like the build tree has been generated with Cygwin tools involved. No Cygwin should be in the PATH when building for Windows. Start again with a fresh build tree and make sure no Cygwin tools are found.
from castxml.
SO i have to remove all the paths related to cygwin in te PATH systemvariable ?
from castxml.
You don't necessarily have to remove them from your system's PATH. You could configure a command prompt environment to have its own PATH that does not include Cygwin. However, in general I avoid running with Cygwin in the PATH unless I'm at an actual Cygwin shell prompt intending to run Cygwin tools. It is too easy for Windows programs to mistake Cygwin tools for versions that support Windows. Cygwin != Windows.
from castxml.
I managed to build the project for LLVM/Clang, I can see the executables in teh release folder I created with Visual Studio 12 but when I tried to build CastXML I have 5 build succeeded and 1 failed, here is the error:
Cannot open include file: 'clang/AST/ASTContext.h' : No such file or directory
Cannot open include file: 'clang/AST/ASTConsumer.h' : No such file or directory
from castxml.
Cannot open include file: 'clang/AST/ASTContext.h' : No such file or directory
This likely means you pointed LLVM_DIR
at the llvm build tree. The CastXML README.rst
build instructions say it needs the "LLVM/Clang compiler SDK install tree". Reconfigure llvm with CMAKE_INSTALL_PREFIX
set to point somewhere useful and then build the INSTALL
target. Make sure you build CastXML with the same configuration (e.g. Debug or Release) you chose to install for LLVM.
from castxml.
Is that this path that I have to Reconfigure for CMAKE_INSTALL_PREFIX: /share/llvm/cmake
from castxml.
Reconfigure for CMAKE_INSTALL_PREFIX: /share/llvm/cmake
Yes. Point it to somewhere like C:/Users/qi11091/Documents/Logiciels/llvm-install
.
from castxml.
Ok thanks ! I have downloaded the llvm source tree and with svn and clang the same way :
Checkout LLVM:
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
Checkout Clang:
cd llvm\tools
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
Is it correct ?
from castxml.
Is it correct ?
That looks like the right checkout commands to me.
from castxml.
Thanks
How Can I do to only build the install target ? Is it not possible to build all the solution ?
from castxml.
When you load the project in the IDE, right-click on the INSTALL
target and choose the option to build it.
from castxml.
Is it the install target right on the llvm tree ?
C:\Users\qi11091\Documents\Logiciels\llvm-build\INSTALL ?
from castxml.
I have build the install target for LLVM and also for CastXML after but I have still the same errors:
Error 1 error C1083: Cannot open include file: 'clang/AST/ASTContext.h': No such file or directory C:\Users\qi11091\Documents\Logiciels\CastXML-master\src\Output.cxx 21
Error 2 error C1083: Cannot open include file: 'clang/AST/ASTConsumer.h': No such file or directory C:\Users\qi11091\Documents\Logiciels\CastXML-master\src\RunClang.cxx 24
Error 3 error MSB3073: The command "setlocal
"C:\Program Files (x86)\CMake\bin\cmake.exe" -DBUILD_TYPE=Release -P cmake_install.cmake
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120 \Microsoft.CppCommon.targets 132
from castxml.
You still need to configure CastXML with its LLVM_DIR
option pointing to the location of LLVMConfig.cmake within the install tree rather than that in the build tree.
from castxml.
@MarkOates thanks for the kind feedback :-)
from castxml.
Related Issues (20)
- crash on deeply nested parentheses in input HOT 14
- generate xml description for C++ header file HOT 1
- llvm/clang 14 reports using clauses separately HOT 8
- Trying to run CastXML on C++ project HOT 2
- arm64v8 rounding intrinsics not activated under --castxml-cc-gnu g++ HOT 1
- Help: Can I get access to default member initializer? HOT 5
- Wrapping ITK modules for ARM architecture fails at CastXML step HOT 3
- 0.5 release series for post-0.4 features HOT 7
- CastXML 0.5.0 tests fail on 32-bit architectures HOT 4
- Tests are failing with LLVM/CLANG-15 HOT 1
- CastXML tests fail with LLVM/Clang 16
- Skipping methods containing rvalue reference parameters HOT 2
- Generating unnecessary syntax HOT 1
- 0.6.0: Many tests fail HOT 2
- Different behaviour on linux and windows HOT 3
- gcc-13.2.0 unknown type name '_Float32' HOT 9
- Building against LLVM/Clang 18.x fails using MSVC
- arm64 ubuntu make failed. cannot find -ltinfo: No such file or directory HOT 2
- GCC 13 vector header include
- mangled key in GCC/MSVC style HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from castxml.