Comments (13)
Hi,
Finally, the file is created with the required entries but the message at the end shows it is still failed
bear-result.txt
[08:55:35.134201, cs, 24296] [pid: 24289] recognition failed: No tools recognize this execution. [08:55:35.134591, cs, 24296] compilation entries created. [size: 39] [08:55:35.134623, cs, 24296] compilation entries to output. [size: 39] [08:55:35.437564, cs, 24296] compilation entries written. [size: 39] [08:55:35.439112, cs, 24296] succeeded with: 0 [08:55:35.440143, br, 23160] Process wait request: done. [pid: 24296] [08:55:35.440202, br, 23160] Running citnames finished. [Exited with 0] [08:55:35.443252, br, 23160] succeeded with: 0
so is this a normal behaviour?
Secondly, I am getting some errors with clang-tidy
as it does not recognize or exclude non-user header files(system headers) using compile_commands.json
file.
is this the correct forum to discuss?
from bear.
Thank you for your support :)
from bear.
Hey @FaiqueAli , two things I would say...
- in order to help you I would like to see logs (of the verbose run). There are too many things which can cause it, so I would not start guessing without seeing the output of the build (with the verbose flags).
- the version that you are using is not the most recent. (I understand that your OS version is also 5 years old, and port the latest Bear can be challenge.)
from bear.
Thanks for the reply,
So I updated my OS and the Bear package now the current version of Bear is bear 3.0.18
with linux 22.04
and the compiler path is qcc: /home/sayedf/qnx710/host/linux/x86_64/usr/bin/qcc
Similarly the libexec.so
path
and bear --help
shows
other information:
file which make
is /home/sayedf/qnx710/host/linux/x86_64/usr/bin/make: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 4.4.162, with debug_info, not stripped
so the output of the command bear --verbose -- make -j8 all
is here
compile-op.txt
Meanwhile I was able to generate compile_commands.json
file, with this command
make clean
bear --verbose --config config.json -- make -j8 all
When I was trying multiple options.
But when I applied the same process a second time it generated an empty compile_commands.json
file.
from bear.
Good to hear that you managed to install a newer version.
For the empty output on the second time, could it be that the second run was not call the compiler? (Bear builds the output from the intercepted compiler calls. You either use the --append
flag to keep the existing entries, or do a make clean
before you run it again.)
From the logs, I see that it does not recognize the qcc
compiler. This you can fix by the configuration file. (Read more about it on the man bear-citnames
page.)
from bear.
Unfortunately, I forgot what other commands I executed at first time that generated the proper file, I only remember make clean
and bear -- make -j8 all
. Using these commands I am now not able to get the desired file.
Sadly I am not able to learn about configuration files as the output of the command man bear-citnames
shows
from bear.
https://github.com/rizsotto/Bear/blob/master/source/citnames/man/bear-citnames.1.md is the man page in markdown.
from bear.
Hi,
So I created a config.json file and still getting an empty compile_command.json file, Below is the snapshot of confog.json file
Please have a look at the attached log of the command below
make clean
bear --verbose --config config.json -- make -j8 all
from bear.
Just quickly looking at the config file, what stands up to me is that you put only the directory and not the compiler at compilation.compilers_to_recognize[0].executable
.
from bear.
Hey, having the same issue where bear generates empty compilation database. I am on macOS (apple silicon) and installed bear through homebrew.
Works fine on my Linux VM(Fedora), just issue with macos
from bear.
@parasaito , he is using Linux... the problem is he wrote /home/sayedf/qnx710/host/linux/x86_64/usr/bin
and not /home/sayedf/qnx710/host/linux/x86_64/usr/bin/qcc
. In the logs you can see lines like this, when the compilation was captured, but not recognized.
[18:21:54.073392, cs, 8712] [pid: 8682] execution: {"executable":"/home/sayedf/qnx710/host/linux/x86_64/usr/bin/qcc","arguments":["qcc","-lang-c++","-Vgcc_ntoaarch64le","-std=gnu++17", ...
[18:21:54.076061, cs, 8712] [pid: 8682] recognition failed: No tools recognize this execution.
from bear.
[08:55:35.132175, cs, 24296] [pid: 24289] execution: {"executable":"/home/sayedf/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-ld","arguments":["/home/sayedf/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-ld", ...
It was not recognize the linking step as compilation. I think that's correct.
from bear.
Sorry @FaiqueAli , can't help with the clang-tidy
problem.
Better to look into their doc.
from bear.
Related Issues (20)
- Next-generation Intel compilers are not recognized by default HOT 3
- Bear exits without generating compile_commands.json HOT 1
- paths_to_include/exclude don't work if path ends in '/' HOT 1
- Bear can't out compile_commands.json in TI soc TDA4 c7 HOT 1
- Bear fails to build with fmt 10.1 HOT 5
- Bear generates empty compile_commands.json when using VBCC frontend HOT 3
- Linking executable wrapper error HOT 2
- clang-check and clang-tidy broke down with compile_commands.json HOT 6
- bear -- make produces an empty compile_commands.json HOT 3
- bear not work HOT 2
- Bear intercept does not work with shell scripts HOT 5
- Build error: /bin/sh: 1: ctest: not found HOT 4
- Can cause link errors during cross compilation HOT 1
- Running 'nrfutil pkg' through bear won't find GLIBCXX_3.4.30 - add a "de-wrapper"? HOT 3
- Bear spawns an endless number of processes on FreeBSD HOT 4
- [Feature Request] Enable preload mode on macOS with SIP disabled HOT 2
- How does bear work? HOT 1
- Calling `bear -- emmake make` from makefile has different output than without the makefile HOT 3
- `bear intercept` prints empty events.json with dynamically linked arm-none-eabi-gcc HOT 3
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 bear.