Giter VIP home page Giter VIP logo

Comments (13)

FaiqueAli avatar FaiqueAli commented on July 29, 2024 1

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.

FaiqueAli avatar FaiqueAli commented on July 29, 2024 1

Thank you for your support :)

from bear.

rizsotto avatar rizsotto commented on July 29, 2024

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.

FaiqueAli avatar FaiqueAli commented on July 29, 2024

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

image

and bear --help shows

image

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.

rizsotto avatar rizsotto commented on July 29, 2024

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.

FaiqueAli avatar FaiqueAli commented on July 29, 2024

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

image

from bear.

rizsotto avatar rizsotto commented on July 29, 2024

https://github.com/rizsotto/Bear/blob/master/source/citnames/man/bear-citnames.1.md is the man page in markdown.

from bear.

FaiqueAli avatar FaiqueAli commented on July 29, 2024

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

image

Please have a look at the attached log of the command below

make clean
bear --verbose --config config.json -- make -j8 all

bear-result.txt

from bear.

rizsotto avatar rizsotto commented on July 29, 2024

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.

parasaito avatar parasaito commented on July 29, 2024

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.

rizsotto avatar rizsotto commented on July 29, 2024

@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.

rizsotto avatar rizsotto commented on July 29, 2024
[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.

rizsotto avatar rizsotto commented on July 29, 2024

Sorry @FaiqueAli , can't help with the clang-tidy problem.

Better to look into their doc.

from bear.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.