Comments (11)
@suedlaender83 the discussion of "build tree" versus "install tree" above is about the build of LLVM/Clang. If you're using a distro-installed package the "install tree" is what comes with the package. Be sure to install the Clang library development package, such as libclang-11-dev
(the name may depend on the distro and the version of clang).
from castxml.
We build CastXML with VS 2013 regularly and do not see this.
- What version (commit sha1) did you build?
- What version of LLVM/Clang did you build against?
- What CMake version did you use?
- What CMake generator did you use? For x86 or x64?
From where did you run the executable? Directly from the build tree or install tree?
from castxml.
I found the file "castxmlClangResourceDir.txt" located in "build\CMakeFiles" was empty, so I added to it the path of Clang's lib dir (in my case was "LLVM\build\Release\lib\clang\3.6.0"). Finally CastXML worked.
What version (commit sha1) did you build?
-- The latest commit 0a10370
What version of LLVM/Clang did you build against?
-- 3.6.0
What CMake version did you use?
What CMake generator did you use? For x86 or x64?
-- CMake version 3.2.2 x86
From where did you run the executable? Directly from the build tree or install tree?
-- I ran it from the install tree, but it failed with the error message "Unable to locate resources for <...>\castxml.exe". With "castxmlClangResourceDir.txt" modified, I ran the executable from the build tree, and got the correct result successfully.
from castxml.
Thanks. All of the problems running in both the build and install trees come from CLANG_RESOURCE_DIR
not being set in the CMake cache in the build tree. There is code here that is supposed to detect this location automatically if the user does not set the cache entry explicitly. Please try to figure out why that setting is not detected for you.
from castxml.
Thanks!
I will try it and post feedback here.
from castxml.
Meanwhile I pushed commit fe633c2 to fail at CMake time if the Clang resources cannot be found. It also prints out the places it tried looking which might help you debug it.
from castxml.
I tried the latest version, and got a CMake configure error message:
CMake Error at CMakeLists.txt:77 (message):
Could not find CLANG_RESOURCE_DIR. Tried:D:/Work/CppLibs/LLVM/build/$(Configuration)/lib/clang/3.6.0
Please set CLANG_RESOURCE_DIR to the Clang SDK directory containing
"include/stddef.h", typically of the form "/lib/clang/3.6.0".
This path is the value of ${LLVM_LIBRARY_DIRS}
which is defined in "LLVM\build\share\llvm\cmake\LLVMConfig.cmake" line 96:
set(LLVM_LIBRARY_DIRS "D:/Work/CppLibs/LLVM/build/$(Configuration)/lib")
Though I can't figure out why this happens, I think the error message is a useful guide to make a successful build after setting CLANG_RESOURCE_DIR
to a proper directory manually in CMake GUI. (I don't know much about CMake.)
Thanks!
from castxml.
I finally figure out the real cause.
I compiled CastXML on the build tree of LLVM/Clang SDK directly. Actually, the install tree must be used.
Please forgive me for such a stupid mistake. Thanks for your time. 👍
CastXML is really useful. Many thanks!
from castxml.
Thanks. I pushed commit 40aed5c to reject attempts to use a LLVM/Clang build tree up front.
from castxml.
@vanxining @bradking This is an old thread but i will give it a try. Maybe i get an answer. I'm new to Castxml and I'm trying to build it with a preinstalled Clang. I'm having the same issues you described here. My question is how to find the "install tree" and how to differentiate "install tree" from a "build tree"? I suspect that this would also resolve my issue once i figure out where i can find the "install tree". Many thanks in advance.
from castxml.
Thanks a lot for the explanation @bradking
from castxml.
Related Issues (20)
- How to generate xml description for C++14 file HOT 1
- 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
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.