Comments (13)
What version of LLVM and clang are you using? dxr is known to work with 3.2 and to not work with 3.1 or 3.3.
from dxr.
Yes, I am using the 3.2 version for both LLVM and Clang.
from dxr.
The exact failure log from the make in tests/test_basic:
Build command for 'code' failed, exited non-zero! Log follows:
| make[1]: Entering directory /home/lokeshk/oss/dxr/tests/test_basic/code' | rm -rf code | make[1]: Leaving directory
/home/lokeshk/oss/dxr/tests/test_basic/code'
| make[1]: Entering directory /home/lokeshk/oss/dxr/tests/test_basic/code' | clang++ -Xclang -load -Xclang /home/lokeshk/oss/dxr/dxr/plugins/clang/libclang-index-plugin.so -Xclang -add-plugin -Xclang dxr-index -Xclang -plugin-arg-dxr-index -Xclang /home/lokeshk/oss/dxr/tests/test_basic/code -o code main.cc | error: unable to load plugin '/home/lokeshk/oss/dxr/dxr/plugins/clang/libclang-index-plugin.so': '/home/lokeshk/oss/dxr/dxr/plugins/clang/libclang-index-plugin.so: undefined symbol: _ZTIN5clang11PPCallbacksE' | make[1]: *** [code] Error 1 | make[1]: Leaving directory
/home/lokeshk/oss/dxr/tests/test_basic/code'
from dxr.
The headers you include might belong to a previous/later version of clang. Make sure that the clang headers in the include paths (/usr/local/include/ etc) are from version 3.2
from dxr.
Hi, I saw a commit said "Add support for clang 3.4.", and it still doesn't work with Clang 3.4.
~/src/dxr/tests/test_basic$ make
# Link paths in dxr.config.in to current working directory
# replaces PWD with pwd
and produces dxr.config
cat dxr.config.in | sed -e 's?PWD?'pwd
'?g' > dxr.config
# Navigate into the DXR folder, build using config file LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../../trilite dxr-build.py Generating target folder Creating tables Indexing files from the 'code' tree (finished in 0:00:00.055884) Building the 'code' tree Build command for 'code' failed, exited non-zero. Log follows: | make[1]: Entering directory
/home/xsyr/src/dxr/tests/test_basic/code'
| rm -rf code
| make[1]: Leaving directory /home/xsyr/src/dxr/tests/test_basic/code' | make[1]: Entering directory
/home/xsyr/src/dxr/tests/test_basic/code'
| clang++ -Xclang -load -Xclang /home/xsyr/src/dxr/dxr/plugins/clang/libclang-index-plugin.so -Xclang -add-plugin -Xclang dxr-index -Xclang -plugin-arg-dxr-index -Xclang /home/xsyr/src/dxr/tests/test_basic/code -o code main.c
| clang-3.4: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
| error: unable to load plugin '/home/xsyr/src/dxr/dxr/plugins/clang/libclang-index-plugin.so': '/home/xsyr/src/dxr/dxr/plugins/clang/libclang-index-plugin.so: undefined symbol: _ZTIN5clang11PPCallbacksE'
| make[1]: *** [code] Error 1
| make[1]: Leaving directory `/home/xsyr/src/dxr/tests/test_basic/code'
make: *** [all] Error 1
from dxr.
I noticed that as well the other day when I tried to upgrade the OS on the Vagrant box to Saucy. I should have filed it then; you folks really keep me on my toes. :-) I thought we had tried 3.4, but apparently we did not. @abbeyj?
from dxr.
I'm using 3.4 built from source with no issues. Are you sure your headers
and binaries match? Perhaps you have v3.2 headers and v3.4 binaries or
something?
What's the output from the following?
which llvm-config
which clang++
llvm-config --version
clang++ --version
llvm-config --includedir
cat $(llvm-config --includedir)/clang/Basic/Version.inc
grep LLVM_VERSION $(llvm-config --includedir)/llvm/Config/config.h
On Mon, Feb 10, 2014 at 11:29 AM, Erik Rose [email protected]:
I noticed that as well the other day when I tried to upgrade the OS on the
Vagrant box to Saucy. I should have filed it then; you folks really keep me
on my toes. :-) I thought we had tried 3.4, but apparently we did not.
@abbeyj https://github.com/abbeyj?Reply to this email directly or view it on GitHubhttps://github.com//issues/131#issuecomment-34651062
.
from dxr.
It's possible I hadn't linked llvm-config to the llvm-config-3.4 at the time. I don't have that box around anymore. Let's see what Chenglin says.
from dxr.
The error mean the symbol _ZTIN5clang11PPCallbacksE
can not be found when load libclang-index-plugin.so
, it declare in clang/Lex/Lexer.h
. But it isn't exported by clang or libclangLex.a.
My machine:
Linux xsyr-ubuntu 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
gcc 4.8.1
clang 3.4 build from source
which llvm-config:
/usr/bin/llvm-config
which clang++:
/usr/bin/clang++
llvm-config --version:
3.4svn
clang++ --version:
clang version 3.4 (201150)
Target: x86_64-unknown-linux-gnu
Thread model: posix
llvm-config --includedir:
/usr/include
cat $(llvm-config --includedir)/clang/Basic/Version.inc:
#define CLANG_VERSION 3.4
#define CLANG_VERSION_MAJOR 3
#define CLANG_VERSION_MINOR 4
#if 0
#define CLANG_VERSION_PATCHLEVEL
#endif
grep LLVM_VERSION $(llvm-config --includedir)/llvm/Config/config.h:
#define LLVM_VERSION_MAJOR 3
#define LLVM_VERSION_MINOR 4
from dxr.
_ZTIN5clang11PPCallbacksE demangles to "typeinfo for clang::PPCallbacks"
but the plugin should have been compiled with -fno-rtti and not be
dependent on typeinfos. What does "llvm-config --cxxflags" produce for
you? If you run "make clean" and then "make" in the dxr/dxr/plugins/clang/
directory can you capture the command being used to compile dxr-index.cpp?
On Tue, Feb 11, 2014 at 10:58 AM, Chenglin Huang
[email protected]:
The error mean the symbol _ZTIN5clang11PPCallbacksE can not be found when
load libclang-index-plugin.so, it declare in clang/Lex/Lexer.h. But it
isn't exported by clang or libclangLex.a.My machine:
Linux xsyr-ubuntu 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC
2013 x86_64 x86_64 x86_64 GNU/Linuxgcc 4.8.1
clang 3.4 build from sourcewhich llvm-config:
/usr/bin/llvm-configwhich clang++:
/usr/bin/clang++llvm-config --version:
3.4svnclang++ --version:
clang version 3.4 (201150)
Target: x86_64-unknown-linux-gnu
Thread model: posixllvm-config --includedir:
/usr/includecat $(llvm-config --includedir)/clang/Basic/Version.inc:
#define CLANG_VERSION 3.4#define CLANG_VERSION_MAJOR 3#define CLANG_VERSION_MINOR 4#if 0#define CLANG_VERSION_PATCHLEVEL #endif
grep LLVM_VERSION $(llvm-config --includedir)/llvm/Config/config.h:
#define LLVM_VERSION_MAJOR 3#define LLVM_VERSION_MINOR 4
Reply to this email directly or view it on GitHubhttps://github.com//issues/131#issuecomment-34768288
.
from dxr.
@abbeyj You are right, after add -fno-rtti
option, everything works fine. Thanks.
from dxr.
Thanks for confirming that that worked. It should have been picked up
automatically though. Would you consider posting the output from
"llvm-config --cxxflags" and from running "make clean; make" so we can try
to track down what went wrong and avoid this problem for other people in
the future?
On Wed, Feb 12, 2014 at 6:11 AM, Chenglin Huang [email protected]:
@abbeyj https://github.com/abbeyj You are right, after add -fno-rttioption, everything works fine. Thanks.
Reply to this email directly or view it on GitHubhttps://github.com//issues/131#issuecomment-34859090
.
from dxr.
$ llvm-config --cxxflags
-I/usr/include -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wnon-virtual-dtor -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
from dxr.
Related Issues (20)
- Advance searching in folder does not work HOT 1
- Cannot access https://dxr.mozilla.org/mozilla-central/source/devtools/client/debugger/new/debugger.js HOT 3
- How to pass multiple arguments to clang plugin ? HOT 1
- DXR fails to index files tracked by git when www_root is set
- Add robots.txt
- Suggestion: Publish to public docker hub
- Upgrade the clang plugin to clang 7 API HOT 1
- Wiki changes
- Support for distributing indexing tasks on a cluster of machines HOT 1
- Question: atomicity/consistency of incremental indexing HOT 1
- How to create a separate index for each git commit and allow browsing code as of old commits HOT 3
- "python setup.py install" results in "error: click 4.1 is installed but click>=5.1 is required by set(['Flask'])" HOT 4
- CODE_OF_CONDUCT.md file missing
- Installation fails due to conflicting click version HOT 2
- Search input isn't detected by Firefox One-Click Search Engines HOT 1
- missed keys set(['python', 'buglink', 'xpidl']) HOT 2
- Basic beginner 'getting started' broken HOT 3
- Travis CI free usage ends Dec 3; mozilla repos should switch to other CI platforms
- Suggestion: Dark mode
- Python3 support HOT 2
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 dxr.