-
-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compile_commands.json is empty when build gcc 11.2.0 from soure #411
Comments
Hey @jiangjianshan , can you send the output of the build of this command: I am suspicious about the |
Hello @rizsotto, here is the command ouput:
|
Thanks @jiangjianshan , we can exclude the packaging problem then. :) I would like to ask for more logs... Instead of executing From these information, we can see which steps fail and concentrate to fix that. I appreciate your help for the debug, because I don't know much about Kali Linux. Thanks! |
@rizsotto , I have just run the commmands ./build-gcc.sh 2>&1 | tee build.log and I wait for it finish this time. |
@rizsotto , I chang back the command to 'bear --verbose --make -j$(nproc)' and run ./build-gcc.sh 2>&1 | tee build.log again. I have found compile_commands.json can be generated but the size of it is a little small. and much small than the one generated by two commands you recommends. And the compile time is two short to build a complete gcc from source. It seems like abnormal. |
No, this is fine. Thank you @jiangjianshan ! The If the build is using a statically linked compiler, the intercept process is blind for that. Bear's intercept has two modes (as it is explained in the
|
@rizsotto , I have just try above new two commands you suggested. Then the full content of bash script is here: |
@rizsotto , maybe this issue is not related to kali linux 2021.2. I have try different command combination still can not solved this issue. It should can be reproduce it when build gcc 11.2.0 on your using Linux distribution with Bear command. The gcc source I'm using is from https://ftp.gnu.org/gnu/gcc/gcc-11.2.0/gcc-11.2.0.tar.xz. |
Thanks @jiangjianshan for your investigation. It might be that it is a problem that Bear can't address. (There are already a few, like bazel build, or rare build file encoding, etc...) This might be related to GCC build system, which can not be covered by Bear intercept modes. 🤷 Will record it as a limitation of this tool in the documentation. And will try to reproduce the issue on my machines. I can't offer you solution nor workaround on this, I'm sorry. |
@rizsotto , Thanks for your help previously. I have also try to build gcc 11.2.0 from source without Bear. The complete log are here. Maybe it can be helpful for your analysis in the future. |
Spent some time to reproduce this problem, but could not. Tested on Fedora/Arch/Ubuntu. Added test case against |
@rizsotto , thanks for your work. I will update the bear build when the release is ready. |
Describe the bug
The compile_commands.json is empty when I use Bear which version 3.0.15 when build gcc which version 11.2.0. The script I used is here:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Environment:
Additional context
bear make
) with extra verbose log switches (e.g.bear -vvvv make
) and send the output of it, that would help a lot.Before you start
end...
README.md
file orman bear
? YesThe text was updated successfully, but these errors were encountered: