Error during index #521
Comments
You need to use clang as your compiler. You can use Edit: clang needs to be the compiler cquery is instructed to use - you can still compile your actual binary with arm-linux-androideabi-g++ |
Sorry, I'm not very familiar with the tool. Where do I specify that? |
Did you write your own .cquery or compile_commands.json file? |
The compile_commands.json file was auto-generated by cmake. |
@ambihelical I think what @edjubuh meant is if you enclose some example entries of The clang compiler driver will behave like a cross compiler if its executable name is like |
@MaskRay here is the first entry, censored: |
I suspect it is "-no-canonical-prefixes" that makes libclang bark. |
@MaskRay Are there commits that addresses this? If not, I'll be able to provide more feedback when I go back to work. |
Riatre pointed out the cause: |
I don't understand how pointing out the cause, if it is the only problem, fixes the issue in any way. Is there something I need to do with that information that is escaping me? |
@Riatre I used the cquery-downloaded clang as follows:
The following is the output:
|
@MaskRay, @jacobdufault, as far as I can tell this has not been resolved in any way that in my experience bugs are usually resolved, if you agree, please reopen, if not please let me know how I should follow up. |
I'll reopen, does removing |
Removing -fno-canonical-prefixes didn't help. I tried removing each option one by one from compile_commands.json using my best guess and then running emacs to test. Finally, after removing -march=armv7-a I no longer got the generic error. |
Sounds like we need to ban -march= flags, would you be willing to submit a PR changing project.cc? |
I'll give it a shot. |
@jacobdufault Stupid question: I see there are a number of tests, how do you run them? I tried e2e_test_runner.py, but it just crashes. After running waf -h, I tried ./waf list, but it just crashes. This is on Ubuntu 16.04 |
e2e tests are still a WIP. |
Closing in favor of #569, please let me know if this should be reopened. |
I'm getting this error while indexing a cross-compiled project, many if not all files have the same issue.
The following was in Emacs buffer lsp-cquery stderr". Any help in debugging this would be appreciated. In the following, I replaced some job-sensitive information with [censored].
I'm on commit 1301569
2018-03-15 10:11:35.036 ( 0.072s) [indexer0 ]clang_translation_unit.cc:99 libclang generic failure for /home/[censored]/dev/[censored]/[censored]/External/tinyxml/tinyxml.cpp. Please try running the following, identify which flag causes the issue, and report a bug. cquery will then filter the flag for you automatically:
$ /home/[censored]/dev/[censored]/android-sdk/toolchain/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-g++ -working-directory=/home/[censored]/dev/[censored]/build/External/tinyxml -DANDROID -DBOARD="Android" -DLOCALE="usa" -DMANUFACTURER="[censored]" -DPLATFORM_SETTINGS_FILE="/home/[censored]/dev/[censored]/[censored]/[censored]util/platform/AndroidPlatformSettings.h" -DUNQUOTED_BOARD=Android -Dtinyxml_EXPORTS -Wno-psabi --sysroot=/home/[censored]/dev/[censored]/android-sdk/toolchain/arm-linux-androideabi-4.9/sysroot -funwind-tables -fsigned-char -no-canonical-prefixes -march=armv7-a -fdata-sections -ffunction-sections -Wa,--noexecstack -std=c++11 -L/home/[censored]/dev/[censored]/[censored]/app/android/build/libs/armeabi-v7a/ -lgnustl_shared -llog -DANDROID -pipe -Wall -Wtype-limits -Wuninitialized -fmessage-length=0 -ftabstop=4 -Wno-unknown-pragmas -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DVERBOSE_LOGGING -DBUILD_DEBUG -DBUILD_TYPE=DEBUG -DREVISION_STRING="" -DVERSION_STRING="DEBUG" -g -ffunction-sections -fdata-sections -Os -ffast-math -fasynchronous-unwind-tables -fPIC -isystem /home/[censored]/dev/[censored]/android-sdk/toolchain/arm-linux-androideabi-4.9/sysroot/usr/include -isystem /home/[censored]/dev/[censored]/android-sdk/toolchain/arm-linux-androideabi-4.9/include/c++/4.9 -isystem /home/[censored]/dev/[censored]/android-sdk/toolchain/arm-linux-androideabi-4.9/include/c++/4.9/arm-linux-androideabi/armv7-a -fPIC /home/[censored]/dev/[censored]/[censored]/External/tinyxml/tinyxml.cpp -resource-dir=/home/[censored]/extern/cquery/build/release/lib/clang+llvm-6.0.0-x86_64-linux-gnu-ubuntu-14.04/lib/clang/6.0.0 -Wno-unknown-warning-option -fparse-all-comments -fsyntax-only
The result of doing what it requests is as follows:
The text was updated successfully, but these errors were encountered: