Bear is a tool that generates a compilation database for clang tooling.

Overview

Packaging status GitHub release GitHub Release Date Continuous Integration Contributors Gitter

ʕ·ᴥ·ʔ Build EAR

Bear is a tool that generates a compilation database for clang tooling.

The JSON compilation database is used in the clang project to provide information on how a single compilation unit is processed. With this, it is easy to re-run the compilation with alternate programs.

One way to get a compilation database is to use cmake as the build tool. Passing -DCMAKE_EXPORT_COMPILE_COMMANDS=ON to cmake generates the compile_commands.json file into the current directory.

For non-cmake projects, Bear generates the JSON file during the build process.

How it works

The concept behind Bear is: to execute the original build command and intercept the command executions issued by the build tool. From the log of command executions it tries to identify the compiler calls and creates the final compilation database.

For intercepting the compiler executions, Bear uses the LD_PRELOAD or DYLD_INSERT_LIBRARIES mechanisms provided by the dynamic linker. When the dynamic linker is not working (because the executable is not a dynamically linked executable or security protection disables the linker) then Bear uses compiler wrappers to record the compiler calls. The wrapper sends execution report and calls the real compiler. (Not only compilers, but linkers, assemblers and other tools are also wrapped.)

The intercepted commands are filtered and only the compiler executions goes into the compilation database. Those commands which ends up in the final output are transformed a little bit (some compiler flags are removed).

How to install

Bear is packaged for many distributions. Check out your package manager. Or build it from source.

How to use

After installation the usage is like this:

bear -- <your-build-command>

The output file called compile_commands.json is saved in the current directory.

For more options you can check the man page or pass --help parameter. Note that if you want to pass parameter to Bear, pass those before the -- sign, everything after that will be the build command.

Side note: Since Bear is executing the build command, only those commands will be recorded which were actually executed during the current build. Which means if you have already built your project and you re-run the build command with Bear you probably end up to have an empty output. (Practically it means you need to run make clean before you run bear make.)

For more read the wiki of the project, which talks about limitations, known issues and platform specific usage.

Problem reports

Before you open a new problem report, please look at the wiki if your problem is a known one with documented workaround. It's also helpful to look at older (maybe closed) issues before you open a new one.

If you decided to report a problem, try to give as much context as it would help me to reproduce the error you see. If you just have a question about the usage, please don't be shy, ask your question in an issue or in chat.

If you found a bug, but also found a fix for it, please share it with me and open a pull request.

Please follow the contribution guide when you do these.


Thanks to JetBrains for donating product licenses to help develop Bear

Issues
  • bear fails compilation in connection with apple's llvm 10

    bear fails compilation in connection with apple's llvm 10

    NOTE: I am using pre-released software, hence I do not "expect" anything but hope for the best. In this case, my hope is not matched by reality :)

    Expected Behavior

    Running make without bear yields a proper binary - no problems building.

    $ make
    g++ -c -o test.o test.cpp
    g++ -o test test.o
    

    Actual Behavior

    Running bear make causes standard headers to be not found -- VERY similar to a failure of running xcode-select --install. However I did run properly multiple times - compilation only fails in connection with bear, it seems.

    $ bear make
    g++ -c -o test.o test.cpp
    In file included from test.cpp:1:
    /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/stdio.h:108:15: fatal error: 'stdio.h' file not found
    #include_next <stdio.h>
                  ^~~~~~~~~
    1 error generated.
    make: *** [test.o] Error 1
    

    Environment

    • OS name & version: macOS 10.14

    • Bear version: bear 2.3.11

    • Any reference to the project that you running against: Makefile:

    test: test.o
    	g++ -o test test.o
    
    test.o: test.cpp
    	g++ -c -o test.o test.cpp
    

    test.cpp:

    #include <stdio.h>
    
    int main (int argc, char **argv)
    {
    	return 0;
    }
    
    • Any information about the compiler that this project is using:
    $ g++ --version
    Configured with: --prefix=/Applications/Xcode-beta.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
    Apple LLVM version 10.0.0 (clang-1000.10.25.5)
    Target: x86_64-apple-darwin18.0.0
    Thread model: posix
    InstalledDir: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
    

    bear -vvvv make output:

    bear: DEBUG: parse_args_for_intercept_build: Raw arguments ['/usr/local/bin/bear', '-vvvv', 'make']
    bear: DEBUG: parse_args_for_intercept_build: Parsed arguments: Namespace(append=False, build=['make'], cc='ccache gcc -fcolor-diagnostics', cdb='compile_commands.json', cxx='ccache g++ -fcolor-diagnostics', libear='/usr/local/Cellar/bear/2.3.11/lib/bear/libear.dylib', verbose=4)
    bear: DEBUG: run_build: run build ['make'], in environment: {'_fzf_orig_completion_ld': 'complete -o default -F %s ld #_longopt', 'LESS': '--RAW-CONTROL-CHARS', '_fzf_orig_completion_ln': 'complete -o default -F %s ln #_longopt', '_fzf_orig_completion_rsync': 'complete -o nospace -F %s rsync #_rsync', 'RTAGS_START': 'brew services start rtags', '_fzf_orig_completion_emacs': 'complete -F %s emacs #_filedir_xspec', '_fzf_orig_completion_ls': 'complete -o default -F %s ls #_longopt', 'VIRTUALENVWRAPPER_SCRIPT': '/usr/local/bin/virtualenvwrapper.sh', '_fzf_orig_completion_diff': 'complete -o default -F %s diff #_longopt', 'SHELL': '/bin/bash', 'COLORFGBG': '15;0', '_fzf_orig_completion_tail': 'complete -o default -F %s tail #_longopt', '_fzf_orig_completion_sed': 'complete -o default -F %s sed #_longopt', 'XPC_FLAGS': '0x0', 'ITERM_ORIG_PS1': '\\[\\e[1;34m\\]\\w\\[\\e[m\\]$(\n    # Figure out what repo we are in\n    _git_check\n\n    # Build the prompt!\n    prompt=""\n\n    # If we are in git ...\n    if [ -n "$_git_dir" ]; then\n        # find current branch\n        gitBranch=$(git symbolic-ref HEAD 2> /dev/null)\n        gitStatus=`git status`\n\n        # Figure out if we are rebasing\n        if [[ -d "$_git_dir/.git/rebase-apply" || -d "$_git_dir/.git/rebase-merge" ]]; then\n            is_rebase=1\n        fi\n\n        # Figure out current branch, or if we are bisecting, or lost in space\n        bisecting=""\n        if [ -z "$gitBranch" ]; then\n            if [ -n "$is_rebase" ]; then\n                rebase_prompt=" \\[$COLOR_LIGHT_CYAN\\]"\n                rebase_prompt=$rebase_prompt"\\[\x1b7\\]  \\[\x1b8\\]\\[$REBASE_TEXT\\] "\n                rebase_prompt=$rebase_prompt"\\[$COLOR_YELLOW\\]"\n            else\n                gitBranch="\\[$COLOR_RED\\]$NOBRANCH_TEXT\\[$COLOR_YELLOW\\]"\n            fi\n        fi\n\n        gitBranch=${gitBranch#refs/heads/}\n        #: git-svn\n        if [ -z "$bisect" ]; then\n            if [ -n "$_git_svn_dir" ]; then\n                gitBranch="\\[$COLOR_DARK_BLUE\\]git-svn\\[$COLOR_YELLOW\\] $gitBranch"\n            fi\n        fi\n\n\n        gitNochange=""\n        if [ -z "$is_rebase" ]; then\n            # changed *tracked* files in local directory?\n\t    gitChange=$(echo $gitStatus | ack \'modified:|deleted:|new file:\')\n            if [ -n "$gitChange" ]; then\n\t\tgitChange="\\[$COLOR_YELLOW\\] \\[\x1b7\\]  \\[\x1b8\\]\\[$DELTA_CHAR\\] "\n            else\n\t\tgitChange="\\[$COLOR_GREEN\\] \\[\x1b7\\]  \\[\x1b8\\]\\[$OK_CHAR\\] "\n            fi\n        fi\n\n        # output the branch and changed character if present\n        prompt=$prompt"\\[$COLOR_YELLOW\\] ("\n\n        if is_submodule; then\n            prompt=$prompt"\\[$COLOR_MAGENTA\\]$SUBMODULE_TEXT\\[$COLOR_YELLOW\\]"\n        fi\n\n        prompt=$prompt$prefix$gitBranch$bisecting\n        prompt=$prompt"$gitChange\\[$COLOR_YELLOW\\])\\[$COLOR_RESET\\]"\n\n        # any conflicts? (sed madness is to remove line breaks)\n        files=$(git ls-files -u | cut -f 2 | sort -u | sed \'3,1000d\' | sed -e :a -e \'$!N;s/\\\\n/, /;ta\' -e \'P;D\')\n    fi\n\n\n    # Show conflicted files if any\n    if [ -n "$files" ]; then\n        prompt=$prompt" \\[$COLOR_RED\\](\\[$COLOR_YELLOW\\]"\n        prompt=$prompt"\\[\x1b7\\]  \\[\x1b8\\]\\[$COLOR_YELLOW\\]\\[$CONFLICT_CHAR\\] "\n        prompt=$prompt"\\[$COLOR_RED\\] ${files})"\n    fi\n\n    echo -e $prompt)\\[\x1b[m\\] \\[\\e[1;32m\\]$\\[\\e[m\\]\\[\\e[1;37m\\] ', 'JAVA_HOME': '/Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home', 'VAGRANT_DEFAULT_PROVIDER': 'vmware_fusion', 'WORKON_HOME': '/Users/till/.virtualenvs', '_fzf_orig_completion_git': 'complete -o bashdefault -o default -o nospace -F %s git #__git_wrap__git_main', '_fzf_orig_completion_javac': 'complete -F %s javac #_javac', '_fzf_orig_completion_mv': 'complete -o default -F %s mv #_longopt', '_fzf_orig_completion_bunzip2': 'complete -F %s bunzip2 #_filedir_xspec', '_fzf_orig_completion_cat': 'complete -o default -F %s cat #_longopt', '_fzf_orig_completion_scp': 'complete -o nospace -F %s scp #_scp', 'HOMEBREW_GITHUB_API_TOKEN': '8e30efb3dbd041aa628919876456e1bc25d92fe1', '_fzf_orig_completion_ssh': 'complete -F %s ssh #_ssh', 'CXX': 'ccache g++ -fcolor-diagnostics', 'GOPATH': '/Users/till/Development/go-workspace', 'USER': 'till', 'PS1': '\\[\\e[1;34m\\]\\w\\[\\e[m\\]$(\n    # Figure out what repo we are in\n    _git_check\n\n    # Build the prompt!\n    prompt=""\n\n    # If we are in git ...\n    if [ -n "$_git_dir" ]; then\n        # find current branch\n        gitBranch=$(git symbolic-ref HEAD 2> /dev/null)\n        gitStatus=`git status`\n\n        # Figure out if we are rebasing\n        if [[ -d "$_git_dir/.git/rebase-apply" || -d "$_git_dir/.git/rebase-merge" ]]; then\n            is_rebase=1\n        fi\n\n        # Figure out current branch, or if we are bisecting, or lost in space\n        bisecting=""\n        if [ -z "$gitBranch" ]; then\n            if [ -n "$is_rebase" ]; then\n                rebase_prompt=" \\[$COLOR_LIGHT_CYAN\\]"\n                rebase_prompt=$rebase_prompt"\\[\x1b7\\]  \\[\x1b8\\]\\[$REBASE_TEXT\\] "\n                rebase_prompt=$rebase_prompt"\\[$COLOR_YELLOW\\]"\n            else\n                gitBranch="\\[$COLOR_RED\\]$NOBRANCH_TEXT\\[$COLOR_YELLOW\\]"\n            fi\n        fi\n\n        gitBranch=${gitBranch#refs/heads/}\n        #: git-svn\n        if [ -z "$bisect" ]; then\n            if [ -n "$_git_svn_dir" ]; then\n                gitBranch="\\[$COLOR_DARK_BLUE\\]git-svn\\[$COLOR_YELLOW\\] $gitBranch"\n            fi\n        fi\n\n\n        gitNochange=""\n        if [ -z "$is_rebase" ]; then\n            # changed *tracked* files in local directory?\n\t    gitChange=$(echo $gitStatus | ack \'modified:|deleted:|new file:\')\n            if [ -n "$gitChange" ]; then\n\t\tgitChange="\\[$COLOR_YELLOW\\] \\[\x1b7\\]  \\[\x1b8\\]\\[$DELTA_CHAR\\] "\n            else\n\t\tgitChange="\\[$COLOR_GREEN\\] \\[\x1b7\\]  \\[\x1b8\\]\\[$OK_CHAR\\] "\n            fi\n        fi\n\n        # output the branch and changed character if present\n        prompt=$prompt"\\[$COLOR_YELLOW\\] ("\n\n        if is_submodule; then\n            prompt=$prompt"\\[$COLOR_MAGENTA\\]$SUBMODULE_TEXT\\[$COLOR_YELLOW\\]"\n        fi\n\n        prompt=$prompt$prefix$gitBranch$bisecting\n        prompt=$prompt"$gitChange\\[$COLOR_YELLOW\\])\\[$COLOR_RESET\\]"\n\n        # any conflicts? (sed madness is to remove line breaks)\n        files=$(git ls-files -u | cut -f 2 | sort -u | sed \'3,1000d\' | sed -e :a -e \'$!N;s/\\\\n/, /;ta\' -e \'P;D\')\n    fi\n\n\n    # Show conflicted files if any\n    if [ -n "$files" ]; then\n        prompt=$prompt" \\[$COLOR_RED\\](\\[$COLOR_YELLOW\\]"\n        prompt=$prompt"\\[\x1b7\\]  \\[\x1b8\\]\\[$COLOR_YELLOW\\]\\[$CONFLICT_CHAR\\] "\n        prompt=$prompt"\\[$COLOR_RED\\] ${files})"\n    fi\n\n    echo -e $prompt)\\[\x1b[m\\] \\[\\e[1;32m\\]$\\[\\e[m\\]\\[\\e[1;37m\\] ', '_fzf_orig_completion_sort': 'complete -o default -F %s sort #_longopt', 'PYENV_VIRTUALENV_INIT': '1', '_fzf_orig_completion_gvim': 'complete -F %s gvim #_filedir_xspec', 'SHLVL': '1', '_fzf_orig_completion_unzip': 'complete -F %s unzip #_filedir_xspec', '_fzf_orig_completion_gzip': 'complete -F %s gzip #_gzip', '_fzf_orig_completion_tar': 'complete -F %s tar #_tar', 'EDITOR': 'subl -w', '_fzf_orig_completion_svn': "complete -o default -X '@(*/.svn|*/.svn/|.svn|.svn/)' -F %s svn #_svn", 'TERM_PROGRAM': 'iTerm.app', 'TERM_SESSION_ID': 'w0t0p0:02C68BD9-48F1-45C0-AC8F-F335B76DCC90', '_fzf_orig_completion_patch': 'complete -o default -F %s patch #_longopt', 'XPC_SERVICE_NAME': '0', '_fzf_orig_completion_rm': 'complete -o default -F %s rm #_longopt', 'ITERM_PROFILE': 'Default', 'GTEST_FILTER': '-IOSwitchboardServerTest*', '_fzf_orig_completion_ftp': 'complete -F %s ftp #_known_hosts', '_': '/usr/local/bin/bear', '_fzf_orig_completion_gcc': 'complete -F %s gcc #_gcc', '_fzf_orig_completion_java': 'complete -F %s java #_java', '_fzf_orig_completion_cd': 'complete -o nospace -F %s cd #_cd', 'COLORTERM': 'truecolor', '_fzf_orig_completion_cp': 'complete -o default -F %s cp #_longopt', '_fzf_orig_completion_chown': 'complete -F %s chown #_chown', '_fzf_orig_completion_python': 'complete -F %s python #_python', 'COMPILER_DEFAULTS': '-fcolor-diagnostics', 'TERM_PROGRAM_VERSION': '3.1.6beta5', 'DYLD_INSERT_LIBRARIES': '/usr/local/Cellar/bear/2.3.11/lib/bear/libear.dylib', 'INTERCEPT_BUILD_TARGET_DIR': '/var/folders/jk/791tgt39495cz8kqz5kml7p00000gn/T/intercept-2vNj4w', '_fzf_orig_completion_wc': 'complete -o default -F %s wc #_longopt', 'HOME': '/Users/till', 'DISPLAY': '/private/tmp/com.apple.launchd.w1zmMs1L3K/org.macosforge.xquartz:0', '_fzf_orig_completion_rmdir': 'complete -o default -F %s rmdir #_longopt', 'LANG': 'en_US.UTF-8', 'Apple_PubSub_Socket_Render': '/private/tmp/com.apple.launchd.07eZ7XkLid/Render', '_fzf_orig_completion_jar': 'complete -F %s jar #_jar', 'TMPDIR': '/var/folders/jk/791tgt39495cz8kqz5kml7p00000gn/T/', '_fzf_orig_completion_find': 'complete -F %s find #_find', 'CC': 'ccache gcc -fcolor-diagnostics', '_fzf_orig_completion_awk': 'complete -o default -F %s awk #_longopt', 'LSCOLORS': 'GxFxCxDxBxegedabagaced', '_fzf_orig_completion_sftp': 'complete -F %s sftp #_sftp', '_fzf_orig_completion_du': 'complete -o default -F %s du #_longopt', 'VIRTUALENVWRAPPER_HOOK_DIR': '/Users/till/.virtualenvs', '_fzf_orig_completion_g__': 'complete -F %s g++ #_gcc', '__CF_USER_TEXT_ENCODING': '0x1F5:0x0:0x0', '_fzf_orig_completion_perl': 'complete -F %s perl #_perl', 'PERL_MB_OPT': '--install_base "/Users/till/perl5"', '_fzf_orig_completion_uniq': 'complete -o default -F %s uniq #_longopt', '_fzf_orig_completion_export': 'complete -o default -o nospace -F %s export #_export', '_fzf_orig_completion_kill': 'complete -F %s kill #_kill', 'PERL_MM_OPT': 'INSTALL_BASE=/Users/till/perl5', 'LOGNAME': 'till', 'PATH': '/usr/local/Cellar/pyenv-virtualenv/1.1.1/shims:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Users/till/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/usr/local/MacGPG2/bin:/opt/X11/bin:/usr/local/opt/fzf/bin', '_fzf_orig_completion_tee': 'complete -o default -F %s tee #_longopt', '_fzf_orig_completion_view': 'complete -F %s view #_filedir_xspec', 'TERM': 'xterm-color', 'VIRTUALENVWRAPPER_WORKON_CD': '1', '_fzf_orig_completion_vim': 'complete -F %s vim #_filedir_xspec', 'PWD': '/Users/till/Desktop', '_fzf_orig_completion_curl': 'complete -o default -F %s curl #_longopt', 'ITERM_SESSION_ID': 'w0t0p0:02C68BD9-48F1-45C0-AC8F-F335B76DCC90', '_fzf_orig_completion_telnet': 'complete -F %s telnet #_known_hosts', 'DYLD_FORCE_FLAT_NAMESPACE': '1', '_fzf_orig_completion_head': 'complete -o default -F %s head #_longopt', '_fzf_orig_completion_less': 'complete -o default -F %s less #_longopt', 'SSH_AUTH_SOCK': '/private/tmp/com.apple.launchd.VFc6iARuQ8/Listeners', '_fzf_orig_completion_bzip2': 'complete -F %s bzip2 #_bzip2', '_fzf_orig_completion_vi': 'complete -F %s vi #_filedir_xspec', '_fzf_orig_completion_grep': 'complete -o default -F %s grep #_longopt', 'VIRTUALENVWRAPPER_PROJECT_FILENAME': '.project', 'CONFIGURE_DEFAULTS': '--disable-java --disable-python --enable-libevent --enable-ssl --disable-werror --with-ssl=/usr/local/opt/openssl', 'OLDPWD': '/Users/till', 'GPGKEY': 'ED50F391', '_fzf_orig_completion_gunzip': 'complete -F %s gunzip #_filedir_xspec', 'CLICOLOR': 'true', 'HISTCONTROL': '', 'RTAGS_STOP': 'brew services stop rtags', 'ITERM_PREV_PS1': '\\[\x1b]133;D;$?\x07\x1b]133;A\x07\\]\\[\\e[1;34m\\]\\w\\[\\e[m\\]$(\n    # Figure out what repo we are in\n    _git_check\n\n    # Build the prompt!\n    prompt=""\n\n    # If we are in git ...\n    if [ -n "$_git_dir" ]; then\n        # find current branch\n        gitBranch=$(git symbolic-ref HEAD 2> /dev/null)\n        gitStatus=`git status`\n\n        # Figure out if we are rebasing\n        if [[ -d "$_git_dir/.git/rebase-apply" || -d "$_git_dir/.git/rebase-merge" ]]; then\n            is_rebase=1\n        fi\n\n        # Figure out current branch, or if we are bisecting, or lost in space\n        bisecting=""\n        if [ -z "$gitBranch" ]; then\n            if [ -n "$is_rebase" ]; then\n                rebase_prompt=" \\[$COLOR_LIGHT_CYAN\\]"\n                rebase_prompt=$rebase_prompt"\\[\x1b7\\]  \\[\x1b8\\]\\[$REBASE_TEXT\\] "\n                rebase_prompt=$rebase_prompt"\\[$COLOR_YELLOW\\]"\n            else\n                gitBranch="\\[$COLOR_RED\\]$NOBRANCH_TEXT\\[$COLOR_YELLOW\\]"\n            fi\n        fi\n\n        gitBranch=${gitBranch#refs/heads/}\n        #: git-svn\n        if [ -z "$bisect" ]; then\n            if [ -n "$_git_svn_dir" ]; then\n                gitBranch="\\[$COLOR_DARK_BLUE\\]git-svn\\[$COLOR_YELLOW\\] $gitBranch"\n            fi\n        fi\n\n\n        gitNochange=""\n        if [ -z "$is_rebase" ]; then\n            # changed *tracked* files in local directory?\n\t    gitChange=$(echo $gitStatus | ack \'modified:|deleted:|new file:\')\n            if [ -n "$gitChange" ]; then\n\t\tgitChange="\\[$COLOR_YELLOW\\] \\[\x1b7\\]  \\[\x1b8\\]\\[$DELTA_CHAR\\] "\n            else\n\t\tgitChange="\\[$COLOR_GREEN\\] \\[\x1b7\\]  \\[\x1b8\\]\\[$OK_CHAR\\] "\n            fi\n        fi\n\n        # output the branch and changed character if present\n        prompt=$prompt"\\[$COLOR_YELLOW\\] ("\n\n        if is_submodule; then\n            prompt=$prompt"\\[$COLOR_MAGENTA\\]$SUBMODULE_TEXT\\[$COLOR_YELLOW\\]"\n        fi\n\n        prompt=$prompt$prefix$gitBranch$bisecting\n        prompt=$prompt"$gitChange\\[$COLOR_YELLOW\\])\\[$COLOR_RESET\\]"\n\n        # any conflicts? (sed madness is to remove line breaks)\n        files=$(git ls-files -u | cut -f 2 | sort -u | sed \'3,1000d\' | sed -e :a -e \'$!N;s/\\\\n/, /;ta\' -e \'P;D\')\n    fi\n\n\n    # Show conflicted files if any\n    if [ -n "$files" ]; then\n        prompt=$prompt" \\[$COLOR_RED\\](\\[$COLOR_YELLOW\\]"\n        prompt=$prompt"\\[\x1b7\\]  \\[\x1b8\\]\\[$COLOR_YELLOW\\]\\[$CONFLICT_CHAR\\] "\n        prompt=$prompt"\\[$COLOR_RED\\] ${files})"\n    fi\n\n    echo -e $prompt)\\[\x1b[m\\] \\[\\e[1;32m\\]$\\[\\e[m\\]\\[\\e[1;37m\\] \\[\x1b]133;B\x07\\]'}
    g++ -c -o test.o test.cpp
    In file included from test.cpp:1:
    /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/stdio.h:108:15: fatal error: 'stdio.h' file not found
    #include_next <stdio.h>
                  ^~~~~~~~~
    1 error generated.
    make: *** [test.o] Error 1
    bear: DEBUG: run_build: build finished with exit code: 2
    bear: DEBUG: parse_exec_trace: parse exec trace file: /var/folders/jk/791tgt39495cz8kqz5kml7p00000gn/T/intercept-2vNj4w/execution.Tv8mDg
    bear: DEBUG: _split_command: input was: [u'/Applications/Xcode-beta.app/Contents/Developer/usr/bin/g++', u'-c', u'-o', u'test.o', u'test.cpp']
    bear: DEBUG: _split_command: output is: CompilationCommand(compiler='c++', phase=[u'-c'], flags=[], files=[u'test.cpp'], output=[u'test.o'])
    bear: DEBUG: parse_exec_trace: parse exec trace file: /var/folders/jk/791tgt39495cz8kqz5kml7p00000gn/T/intercept-2vNj4w/execution.ivdAJT
    bear: DEBUG: _split_command: input was: [u'g++', u'-c', u'-o', u'test.o', u'test.cpp']
    bear: DEBUG: _split_command: output is: CompilationCommand(compiler='c++', phase=[u'-c'], flags=[], files=[u'test.cpp'], output=[u'test.o'])
    bear: DEBUG: parse_exec_trace: parse exec trace file: /var/folders/jk/791tgt39495cz8kqz5kml7p00000gn/T/intercept-2vNj4w/execution.pgKSbx
    bear: DEBUG: _split_command: input was: [u'g++', u'-c', u'-o', u'test.o', u'test.cpp']
    bear: DEBUG: _split_command: output is: CompilationCommand(compiler='c++', phase=[u'-c'], flags=[], files=[u'test.cpp'], output=[u'test.o'])
    bear: DEBUG: parse_exec_trace: parse exec trace file: /var/folders/jk/791tgt39495cz8kqz5kml7p00000gn/T/intercept-2vNj4w/execution.xCo9P4
    bear: DEBUG: _split_command: input was: [u'/usr/bin/xcrun', u'clang++', u'-c', u'-o', u'test.o', u'test.cpp']
    bear: DEBUG: parse_exec_trace: parse exec trace file: /var/folders/jk/791tgt39495cz8kqz5kml7p00000gn/T/intercept-2vNj4w/execution.qPIqbY
    bear: DEBUG: _split_command: input was: [u'/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++', u'-c', u'-o', u'test.o', u'test.cpp']
    bear: DEBUG: _split_command: output is: CompilationCommand(compiler='c++', phase=[u'-c'], flags=[], files=[u'test.cpp'], output=[u'test.o'])
    bear: DEBUG: parse_exec_trace: parse exec trace file: /var/folders/jk/791tgt39495cz8kqz5kml7p00000gn/T/intercept-2vNj4w/execution.ogdbmu
    bear: DEBUG: _split_command: input was: [u'g++', u'-c', u'-o', u'test.o', u'test.cpp']
    bear: DEBUG: _split_command: output is: CompilationCommand(compiler='c++', phase=[u'-c'], flags=[], files=[u'test.cpp'], output=[u'test.o'])
    bear: DEBUG: parse_exec_trace: parse exec trace file: /var/folders/jk/791tgt39495cz8kqz5kml7p00000gn/T/intercept-2vNj4w/execution.frHJVm
    bear: DEBUG: _split_command: input was: [u'g++', u'-c', u'-o', u'test.o', u'test.cpp']
    bear: DEBUG: _split_command: output is: CompilationCommand(compiler='c++', phase=[u'-c'], flags=[], files=[u'test.cpp'], output=[u'test.o'])
    bear: DEBUG: parse_exec_trace: parse exec trace file: /var/folders/jk/791tgt39495cz8kqz5kml7p00000gn/T/intercept-2vNj4w/execution.kAKraR
    bear: DEBUG: _split_command: input was: [u'/Applications/Xcode-beta.app/Contents/Developer/usr/bin/make']
    bear: DEBUG: parse_exec_trace: parse exec trace file: /var/folders/jk/791tgt39495cz8kqz5kml7p00000gn/T/intercept-2vNj4w/execution.l3xdLR
    bear: DEBUG: _split_command: input was: [u'g++', u'-c', u'-o', u'test.o', u'test.cpp']
    bear: DEBUG: _split_command: output is: CompilationCommand(compiler='c++', phase=[u'-c'], flags=[], files=[u'test.cpp'], output=[u'test.o'])
    bear: DEBUG: parse_exec_trace: parse exec trace file: /var/folders/jk/791tgt39495cz8kqz5kml7p00000gn/T/intercept-2vNj4w/execution.Uix5FZ
    bear: DEBUG: _split_command: input was: [u'/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang', u'-cc1', u'-triple', u'x86_64-apple-macosx10.14.0', u'-Wdeprecated-objc-isa-usage', u'-Werror=deprecated-objc-isa-usage', u'-emit-obj', u'-mrelax-all', u'-disable-free', u'-disable-llvm-verifier', u'-discard-value-names', u'-main-file-name', u'test.cpp', u'-mrelocation-model', u'pic', u'-pic-level', u'2', u'-mthread-model', u'posix', u'-mdisable-fp-elim', u'-fno-strict-return', u'-masm-verbose', u'-munwind-tables', u'-target-cpu', u'penryn', u'-dwarf-column-info', u'-debugger-tuning=lldb', u'-target-linker-version', u'408.1.1', u'-coverage-notes-file', u'/Users/till/Desktop/test.gcno', u'-resource-dir', u'/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0', u'-stdlib=libc++', u'-fdeprecated-macro', u'-fdebug-compilation-dir', u'/Users/till/Desktop', u'-ferror-limit', u'19', u'-fmessage-length', u'204', u'-stack-protector', u'1', u'-fstack-check', u'-fblocks', u'-fencode-extended-block-signature', u'-fobjc-runtime=macosx-10.14.0', u'-fcxx-exceptions', u'-fexceptions', u'-fmax-type-align=16', u'-fdiagnostics-show-option', u'-fcolor-diagnostics', u'-o', u'test.o', u'-x', u'c++', u'test.cpp']
    
    opened by tillt 46
  • Make Bear work with 32-bit and 64-bit toolchains

    Make Bear work with 32-bit and 64-bit toolchains

    Is there a way to make Bear work with both 32bit and 64bit binaries ?

    I am on a 64bit system and use both 32bit and 64bit binaries.

    We do cross compilation where I work, and for some projects the toolchain is compiled in 32bits (meaning the gcc executable will be 32bit), and for other projects it is 64bit.

    The problem is that when my toolchain is 32bit, and even if I recompile libear.so in 32bit my build output will be polluted by messages like

    ERROR: ld.so: object '/usr/local/lib/libear.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.

    from ls.so for all of the other programs used in the scripts (grep, cp, etc...), and I'm not even 100% sure that all the build has been correctly recorded.

    Would there possibly a way to solve this issue ?

    Is there a more convenient way of obtaining a 32bit libear.so than manually editing the CMakeLists.txt ?

    opened by deb0ch 26
  • libear.so from LD_PRELOAD cannot be preloaded

    libear.so from LD_PRELOAD cannot be preloaded

    Hello,

    I'm working at a company with a custom build system that I'm trying to use with bear and I get the following error:

    ERROR: ld.so: object '/.../lib64/libear.so' from LD_PRELOAD cannot be preloaded: ignored.
    

    I'm guessing maybe the build system is setting this variable which is causing issues?

    opened by ghost 25
  • bear not working with qmake generated Makefiles

    bear not working with qmake generated Makefiles

    Hello,

    I mostly use cmake as well as qmake to generate my Makefiles. If cmake generates very efficient compilation databases, qmake has no option for it. So here comes bear. The problem is that I cannot get it working on the simplest test case possible.

    In /tmp/test/, I create a test.cpp file.

    #include <QtCore>
    
    int main(int argc, char **argv)
    {
        QCoreApplication application(argc, argv);
    
        return 0;
    }
    

    Then I generate a project file automatically, invoke qmake to create the Makefile, then call bear to get a compilation database:

    $ qmake -project
    $ qmake
    $ bear make
    

    The generated compilation database is just empty !

    I am using Qt-5.5.1 and bear 2.1.2, installed with homebrew on OSX.

    opened by jwintz 25
  • bear make  :  empty output json

    bear make : empty output json

    ###Makefile### all: g++ test.cpp

    ###test.cpp####

    int main() { return 0; }

    ###bear --version#### bear 2.3.10

    ###os info### lsb_release -a LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: CentOS Description: CentOS release 6.3 (Final) Release: 6.3 Codename: Final

    ###Question#### when bear make , get empty json file。

    Thank You~

    static binary 
    opened by xmuyong 23
  • ERROR: ld.so: object '/lib/x86_64-linux-gnu/libear.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.

    ERROR: ld.so: object '/lib/x86_64-linux-gnu/libear.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.

    Distributor ID: Ubuntu Description: Ubuntu 14.04.5 LTS Release: 14.04 Codename: trusty Bear version: bear 2.3.13

    I've followed the steps from the READMEto setup the bear on Ubuntu and also few reported issues https://github.com/rizsotto/Bear/issues/134. I am getting these messages, While i am compiling the kernel with following commands.

    make V=1 O=out ARCH=arm64 CROSS_COMPILE=/linaro-toolchain/.4.9-2014.06-02_linux-x86/bin/aarch64-linux-gnu- C=0 REAL_CC=llvm/release/arm/6.0/bin/clang

    ERROR: ld.so: object '/lib/x86_64-linux-gnu/libear.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored. ERROR: ld.so: object '/lib/x86_64-linux-gnu/libear.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored. ERROR: ld.so: object '/lib/x86_64-linux-gnu/libear.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.

    opened by srikanth007m 22
  • make: *** [install_mongodb_cxx_driver] Error

    make: *** [install_mongodb_cxx_driver] Error

    I was compiling this project: https://github.com/datacratic/platform-deps.

    The project can be compiled by make all, but not by bear -- make all. The compilation stopped after producing the error:

    make: *** [install_mongodb_cxx_driver] Error 1
    

    Thanks in advance for any help.

    bug 
    opened by YorkZ 20
  • newlocale: No such file or directory (Re-open Issue#182?)

    newlocale: No such file or directory (Re-open Issue#182?)

    I'm still having problems with issue#182 which was closed as fixed. I'm on Debian Jessie 8.7(using en_US.UTF-8), GNU Make 4.0, running Bear built from the 2.3.9 tag. Since this tag/release was 15 days ago and that issue was fixed on same day, I originally ASSumed the fix was included in that release.

    To verify, I then checked out, built and installed master, and re-built my source code (with make, which I've simply aliased in .profile to bear make.. let me know if there's a better best practice for this), and...

    I am still getting the same newlocale error:

    libear: (/usr/local/src/Bear/libear/ear.c:200) newlocale: No such file or directory

    These are my locale settings:

    /usr/local/src/Bear > locale -a                                                         master
    C
    C.UTF-8
    en_US.utf8
    POSIX
    /usr/local/src/Bear > locale                                                            master
    LANG=en_US.UTF-8
    LANGUAGE=
    LC_CTYPE="en_US.UTF-8"
    LC_NUMERIC="en_US.UTF-8"
    LC_TIME="en_US.UTF-8"
    LC_COLLATE="en_US.UTF-8"
    LC_MONETARY="en_US.UTF-8"
    LC_MESSAGES="en_US.UTF-8"
    LC_PAPER="en_US.UTF-8"
    LC_NAME="en_US.UTF-8"
    LC_ADDRESS="en_US.UTF-8"
    LC_TELEPHONE="en_US.UTF-8"
    LC_MEASUREMENT="en_US.UTF-8"
    LC_IDENTIFICATION="en_US.UTF-8"
    LC_ALL=
    

    I tried to change my locale to C.UTF-8 (as @sebastinas suggests), just locally in my shell before invoking make, like so:

    export LANG=C.UTF-8; export LC_CTYPE=C.UTF-8; make mytarget

    and I'm still getting the same error, even though in the same shell I see:

    /home/tblack/SourceRAM/la > export LANG=C.UTF-8; export LC_CTYPE=C.UTF-8
    /home/tblack/SourceRAM/la > locale
    LANG=C.UTF-8
    LANGUAGE=
    LC_CTYPE=C.UTF-8
    LC_NUMERIC="C.UTF-8"
    LC_TIME="C.UTF-8"
    LC_COLLATE="C.UTF-8"
    LC_MONETARY="C.UTF-8"
    LC_MESSAGES="C.UTF-8"
    LC_PAPER="C.UTF-8"
    LC_NAME="C.UTF-8"
    LC_ADDRESS="C.UTF-8"
    LC_TELEPHONE="C.UTF-8"
    LC_MEASUREMENT="C.UTF-8"
    LC_IDENTIFICATION="C.UTF-8"
    LC_ALL=
    

    I just wanted to let you know that I was still encountering this issue, and also to seek help for getting past it. Thank you.

    bug encode 
    opened by timblaktu 19
  • Empty compile_commands.json

    Empty compile_commands.json

    Describe the bug Empty compile_commands.json

    To Reproduce Compiled OpenFOAM with bear. SIP is disabled. I did see a large text file compile_commands.sqlite3 and made a copy before it disappeared. compile_commands.sqlite3.zip Built twice, same result. Will downgrade to 2.4.4 and try again when I have time.

    Expected behavior

    Environment:

    • OS name: macOS
    • OS version: 11.2.1
    • OS architecture: x86_64
    • Bear version: 3.0.8
    • Bear install method: brew

    Additional context

    • Can you give us a reference to the project that you are running against this tool?
    • https://develop.openfoam.com/Development/openfoam/-/blob/master/wmake/scripts/wmake-with-bear
    • What build tools this project is using? wmake(make wrapped by OpenFOAM)
    • What architecture you are trying to compile for? native
    • Could you attach build logs? If you can re-run the command which failed (e.g. bear make) with extra verbose log switches (e.g. bear -vvvv make) and send the output of it, that would help a lot.

    Tested --verbose with the first module in OpenFOAM test.log.zip

    [14:29:16.728459, cs, 50361] [pid: 50360] failed: No tools recognize this execution.
    [14:29:16.728528, cs, 50361] compilation entries created. [size: 0]
    [14:29:16.728657, cs, 50361] compilation entries have read. [size: 0]
    [14:29:16.728676, cs, 50361] compilation entries to output. [size: 0]
    [14:29:16.728897, cs, 50361] compilation entries written. [size: 0]
    [14:29:16.728988, cs, 50361] succeeded with: 0
    [14:29:16.729679, br, 49947] Process wait request: done. [pid: 50361]
    [14:29:16.729714, br, 49947] Running citnames finished. [Exited with 0]
    [14:29:16.729904, br, 49947] succeeded with: 0
    
    opened by BrushXue 18
  • Add a note about OpenSSL for macOS developers.

    Add a note about OpenSSL for macOS developers.

    Describe the bug Since the "build after push" workflow uses this hack, it makes sense to add something that works for macOS users to the build docs. echo "PKG_CONFIG_PATH=$(brew --prefix)/opt/[email protected]/lib/pkgconfig" >> $GITHUB_ENV

    I saw that pkg_check_modules is being used for finding grpc. If CMake's modules were used, I could specify OPENSSL_ROOT_DIR and make it work.

    To Reproduce Run cmake -DENABLE_UNIT_TESTS=OFF -DENABLE_FUNC_TESTS=OFF ../Bear/ And see

    -- Looking for gRPC::grpc++ dependency
    -- Checking for modules 'protobuf>=3.11;grpc++>=1.28'
    --   Package 'openssl', required by 'grpc', not found
    -- Looking for gRPC::grpc++ dependency -- not found
    

    Expected behavior Find the keg only OpenSSL using some environment variable or cmake variable.

    Environment:

    • OS name: Darwin
    • OS version: 10.14
    • OS architecture: x86_64
    • Bear version: master branch
    • Bear install method: building from source
    opened by z-aki 18
  • Excessive time spent in citnames (cs::semantic::Tools::transform) with --append

    Excessive time spent in citnames (cs::semantic::Tools::transform) with --append

    Describe the bug When using --append on a relatively large compile_commands.json (about 15mb), citnames uses excessive CPU and spins for a long time (10+minutes before I killed it). It also creates a large, several GB, 'compile_commands.commands.json' file that contains nothing but '[]' during this process.

    A few stack traces during this process :

    #0  0x000000000043d7f7 in cs::semantic::ToolGcc::recognize(std::filesystem::path const&) const ()
    #1  0x00000000004263d5 in cs::semantic::Tools::select(report::Command const&) const ()
    #2  0x00000000004269e4 in cs::semantic::Tools::recognize(report::Execution const&) const ()
    #3  0x0000000000426e1d in _ZNSt17_Function_handlerIFN4rust6ResultISt4listISt10shared_ptrIN2cs8semantic8SemanticEESaIS7_EESt13runtime_errorEERKN6report9ExecutionEEZNKS5_5Tools9transformERKNSC_6ReportEEUlRKT_E1_E9_M_invokeERKSt9_Any_dataSF_ ()
    #4  0x000000000042761d in cs::semantic::Tools::transform(report::Report const&) const ()
    #5  0x000000000041ecfd in cs::Application::operator()() const ()
    #6  0x0000000000411be4 in main ()
    
    #0  0x00007f62b1ccf080 in _int_malloc () from /lib64/libc.so.6
    #1  0x00007f62b1cd27dc in malloc () from /lib64/libc.so.6
    #2  0x00007f62b2590ecd in operator new(unsigned long) () from /lib64/libstdc++.so.6
    #3  0x000000000042be39 in std::vector<std::sub_match<char const*>, std::allocator<std::sub_match<char const*> > >::_M_default_append(unsigned long) ()
    #4  0x000000000042ef43 in bool std::__detail::__regex_algo_impl<char const*, std::allocator<std::sub_match<char const*> >, char, std::regex_traits<char>, (std::__detail::_RegexExecutorPolicy)0, true>(char const*, char const*, std::match_results<char const*, std::allocator<std::sub_match<char const*> > >&, std::basic_regex<char, std::regex_traits<char> > const&, std::regex_constants::match_flag_type) ()
    #5  0x000000000043d877 in cs::semantic::ToolGcc::recognize(std::filesystem::path const&) const ()
    #6  0x00000000004263d5 in cs::semantic::Tools::select(report::Command const&) const ()
    #7  0x00000000004269e4 in cs::semantic::Tools::recognize(report::Execution const&) const ()
    #8  0x0000000000426e1d in _ZNSt17_Function_handlerIFN4rust6ResultISt4listISt10shared_ptrIN2cs8semantic8SemanticEESaIS7_EESt13runtime_errorEERKN6report9ExecutionEEZNKS5_5Tools9transformERKNSC_6ReportEEUlRKT_E1_E9_M_invokeERKSt9_Any_dataSF_ ()
    #9  0x000000000042761d in cs::semantic::Tools::transform(report::Report const&) const ()
    #10 0x000000000041ecfd in cs::Application::operator()() const ()
    #11 0x0000000000411be4 in main ()
    
    #0  0x00007f62b25f0d40 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) () from /lib64/libstdc++.so.6
    #1  0x0000000000426375 in cs::semantic::Tools::select(report::Command const&) const ()
    #2  0x00000000004269e4 in cs::semantic::Tools::recognize(report::Execution const&) const ()
    #3  0x0000000000426e1d in _ZNSt17_Function_handlerIFN4rust6ResultISt4listISt10shared_ptrIN2cs8semantic8SemanticEESaIS7_EESt13runtime_errorEERKN6report9ExecutionEEZNKS5_5Tools9transformERKNSC_6ReportEEUlRKT_E1_E9_M_invokeERKSt9_Any_dataSF_ ()
    #4  0x000000000042761d in cs::semantic::Tools::transform(report::Report const&) const ()
    #5  0x000000000041ecfd in cs::Application::operator()() const ()
    #6  0x0000000000411be4 in main ()
    
    #0  0x00000000004a7c31 in std::filesystem::path::_M_split_cmpts() ()
    #1  0x000000000043ba2e in (anonymous namespace)::source_file(cs::semantic::CompilerFlag const&) ()
    #2  0x000000000043c8a4 in _ZZNK2cs8semantic7ToolGcc12compilationsERKN6report7CommandEENKUlT_E_clISt4listINS0_12CompilerFlagESaISA_EEEEN4rust6ResultIS9_ISt10shared_ptrINS0_8SemanticEESaISH_EESt13runtime_errorEES6_.isra.0 ()
    #3  0x000000000043d6ef in cs::semantic::ToolGcc::compilations(report::Command const&) const ()
    #4  0x0000000000426c1e in cs::semantic::Tools::recognize(report::Execution const&) const ()
    #5  0x0000000000426e1d in _ZNSt17_Function_handlerIFN4rust6ResultISt4listISt10shared_ptrIN2cs8semantic8SemanticEESaIS7_EESt13runtime_errorEERKN6report9ExecutionEEZNKS5_5Tools9transformERKNSC_6ReportEEUlRKT_E1_E9_M_invokeERKSt9_Any_dataSF_ ()
    #6  0x000000000042761d in cs::semantic::Tools::transform(report::Report const&) const ()
    #7  0x000000000041ecfd in cs::Application::operator()() const ()
    #8  0x0000000000411be4 in main ()
    
    #0  0x000000000042df91 in std::__detail::_Executor<char const*, std::allocator<std::sub_match<char const*> >, std::regex_traits<char>, true>::_M_dfs(std::__detail::_Executor<char const*, std::allocator<std::sub_match<char const*> >, std::regex_traits<char>, true>::_Match_mode, long) ()
    #1  0x000000000042e02f in std::__detail::_Executor<char const*, std::allocator<std::sub_match<char const*> >, std::regex_traits<char>, true>::_M_dfs(std::__detail::_Executor<char const*, std::allocator<std::sub_match<char const*> >, std::regex_traits<char>, true>::_Match_mode, long) ()
    #2  0x000000000042e02f in std::__detail::_Executor<char const*, std::allocator<std::sub_match<char const*> >, std::regex_traits<char>, true>::_M_dfs(std::__detail::_Executor<char const*, std::allocator<std::sub_match<char const*> >, std::regex_traits<char>, true>::_Match_mode, long) ()
    #3  0x000000000042e013 in std::__detail::_Executor<char const*, std::allocator<std::sub_match<char const*> >, std::regex_traits<char>, true>::_M_dfs(std::__detail::_Executor<char const*, std::allocator<std::sub_match<char const*> >, std::regex_traits<char>, true>::_Match_mode, long) ()
    #4  0x000000000042e1d4 in std::__detail::_Executor<char const*, std::allocator<std::sub_match<char const*> >, std::regex_traits<char>, true>::_M_dfs(std::__detail::_Executor<char const*, std::allocator<std::sub_match<char const*> >, std::regex_traits<char>, true>::_Match_mode, long) ()
    #5  0x000000000042e1d4 in std::__detail::_Executor<char const*, std::allocator<std::sub_match<char const*> >, std::regex_traits<char>, true>::_M_dfs(std::__detail::_Executor<char const*, std::allocator<std::sub_match<char const*> >, std::regex_traits<char>, true>::_Match_mode, long) ()
    #6  0x000000000042f2f1 in bool std::__detail::__regex_algo_impl<char const*, std::allocator<std::sub_match<char const*> >, char, std::regex_traits<char>, (std::__detail::_RegexExecutorPolicy)0, true>(char const*, char const*, std::match_results<char const*, std::allocator<std::sub_match<char const*> > >&, std::basic_regex<char, std::regex_traits<char> > const&, std::regex_constants::match_flag_type) ()
    #7  0x000000000043d877 in cs::semantic::ToolGcc::recognize(std::filesystem::path const&) const ()
    #8  0x00000000004263d5 in cs::semantic::Tools::select(report::Command const&) const ()
    #9  0x00000000004269e4 in cs::semantic::Tools::recognize(report::Execution const&) const ()
    #10 0x0000000000426e1d in _ZNSt17_Function_handlerIFN4rust6ResultISt4listISt10shared_ptrIN2cs8semantic8SemanticEESaIS7_EESt13runtime_errorEERKN6report9ExecutionEEZNKS5_5Tools9transformERKNSC_6ReportEEUlRKT_E1_E9_M_invokeERKSt9_Any_dataSF_ ()
    #11 0x000000000042761d in cs::semantic::Tools::transform(report::Report const&) const ()
    #12 0x000000000041ecfd in cs::Application::operator()() const ()
    #13 0x0000000000411be4 in main ()
    

    To Reproduce Create a large-ish compile_commands.json, then attempt to append to this file with some more commands using the '--append' switch.

    Expected behavior Similar performance as bear 2.4, i.e virtually instant.

    Environment:

    • OS name: Linux
    • OS version: Oracle Linux 7
    • OS architecture: x86_64
    • Bear version: 3.0.2
    • Bear install method: build

    Additional context

    • Can you give us a reference to the project that you are running against this tool?No
    • What build tools this project is using? make, wine, gcc, perl, cl
    • What architecture you are trying to compile for? Linux and Windows

    Before you send...

    • Have you read the README.md file or man bear? Y
    • Have you looked what other open issues Bear has? Y
    • Are you sure that the build works without Bear? Y
    bug 
    opened by smhc 17
  • build fails with Yocto Dunfell cross compiler

    build fails with Yocto Dunfell cross compiler

     ARCH=arm64 CROSS_COMPILE=/opt/infn-xr/1.0/sysroots/x86_64-xrsdk-linux/usr/bin/aarch64-xr-linux-musl/aarch64-xr-linux-musl- bear -- make  -j9
    /opt/infn-xr/1.0/sysroots/x86_64-xrsdk-linux/usr/bin/aarch64-xr-linux-musl/aarch64-xr-linux-musl-gcc: /opt/infn-xr/1.0/sysroots/x86_64-xrsdk-linux/lib/libc.so.6: version `GLIBC_2.34' not found (required by /usr/lib64/bear/libexec.so)
    /opt/infn-xr/1.0/sysroots/x86_64-xrsdk-linux/usr/bin/aarch64-xr-linux-musl/aarch64-xr-linux-musl-gcc: /opt/infn-xr/1.0/sysroots/x86_64-xrsdk-linux/lib/libc.so.6: version `GLIBC_2.33' not found (required by /usr/lib64/bear/libexec.so)
    
    opened by joakim-tjernlund 10
  • Bear created empty compile_commands.json file

    Bear created empty compile_commands.json file

    Describe the bug I'm using MacOS and cross-compiling an ARM project using GNU GCC compiler.

    To Reproduce Not easy to reproduce on your side because you need to do a big amount of work to set up the environment, but I can 100% reproduce the issue.

    Expected behavior complete compile_commands.json file

    Environment:

    • OS name: Darwin
    • OS version: Darwin Kernel Version 19.6.0
    • OS architecture: x86_64
    • Bear version: 3.0.19
    • Bear install method: from brew

    Additional context Older version of Bear works perfectly in my setup, I don't remember what the version is, but back to then, it issues "bear make xxx" instead of "bear -- make xxx". I updated it yesterday and found it didn't work after update.

    Below is the output from the compiling when added "--verbose" [16:46:43.665769, ic, 78289] Process wait request: done. [pid: 78290] [16:46:43.665820, ic, 78289] Running command. [Exited with 0] [16:46:43.665838, ic, 78289] Stopping gRPC server. [16:46:43.666223, ic, 78289] succeeded with: 0 [16:46:43.667186, br, 78288] Process wait request: done. [pid: 78289] [16:46:43.667215, br, 78288] Running intercept finished. [Exited with 0] [16:46:43.667947, br, 78288] Process spawned. [pid: 91668, command: [/usr/local/Cellar/bear/3.0.19_2/bin/citnames, --input, compile_commands.events.json, --output, compile_commands.json, --run-checks, --verbose]] [16:46:43.667977, br, 78288] Process wait requested. [pid: 91668] [16:46:43.690705, cs, 91668] citnames: 3.0.19 [16:46:43.691149, cs, 91668] arguments: ["/usr/local/Cellar/bear/3.0.19_2/bin/citnames", "--input", "compile_commands.events.json", "--output", "compile_commands.json", "--run-checks", "--verbose"] [16:46:43.691180, cs, 91668] environment: ["ANDROID_HOME=/Users/zhfu/Library/Android/sdk", "ANDROID_PLATFORM_TOOLS=/Users/zhfu/Library/Android/sdk/platform-tools", "ANDROID_TOOLS=/Users/zhfu/Library/Android/sdk/tools", "AUTOJUMP_ERROR_PATH=/Users/zhfu/Library/autojump/errors.log", "AUTOJUMP_SOURCED=1", "COLORFGBG=15;0", "COLORTERM=truecolor", "EDITOR=vim", "GNUARMEMB_TOOLCHAIN_PATH=", "HOME=/Users/zhfu", "ITERM_PROFILE=Kevin", "ITERM_SESSION_ID=w0t0p0:1B14DE1C-E553-49FB-A3BF-80E8B4270016", "LANG=zh_CN.UTF-8", "LC_TERMINAL=iTerm2", "LC_TERMINAL_VERSION=3.4.15", "LESS=-R", "LOGNAME=zhfu", "LSCOLORS=Gxfxcxdxbxegedabagacad", "MAKEFLAGS=", "MAKELEVEL=1", "META_UTIL_PATH=/Users/zhfu/work/super", "MFLAGS=", "OLDPWD=/Users/zhfu/SimplicityStudio/v5_workspace_new", "PAGER=less", "PATH=/Users/zhfu/Library/Android/sdk/tools:/Users/zhfu/Library/Android/sdk/platform-tools:/Users/zhfu/work/repos/bt_support/tools:/Applications/Doxygen.app/Contents/Resources:/Applications/Simplicity Studio.app/Contents/Eclipse//developer/toolchains/gnu_arm/7.2_2017q4/bin:/usr/local/Cellar/ctags/5.8_1/bin:/Users/zhfu/work/repos/py_bgapi/pybgapi:/usr/local/opt/openssl:/usr/local/opt/openssl/lib::/Applications/Simplicity Studio.app/Contents/Eclipse/:/usr/local/Cellar/gcc/10.1.0/bin/:/Applications/Simplicity Studio.app/Contents/Eclipse//developer/adapter_packs/commander/Commander.app/Contents/MacOS:/usr/local/Cellar/[email protected]/1.1.1d/bin:/Users/zhfu/Library/Python/2.7/bin:/Users/zhfu/Library/Python/3.9/bin:/Users/zhfu/work/gconfig/scripts:/usr/local/opt/binutils/bin:/Users/zhfu/work/repos/uc_cli:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Wireshark.app/Contents/MacOS:/Users/zhfu/Library/Android/sdk/tools:/Users/zhfu/Library/Android/sdk/platform-tools:/Users/zhfu/work/repos/bt_support/tools:/Applications/Doxygen.app/Contents/Resources:/Applications/Simplicity Studio.app/Contents/Eclipse//developer/toolchains/gnu_arm/7.2_2017q4/bin:/usr/local/Cellar/ctags/5.8_1/bin:/Users/zhfu/work/repos/py_bgapi/pybgapi:/usr/local/opt/openssl:/usr/local/opt/openssl/lib:/Applications/Simplicity Studio.app/Contents/Eclipse/:/usr/local/Cellar/gcc/10.1.0/bin/:/Applications/Simplicity Studio.app/Contents/Eclipse//developer/adapter_packs/commander/Commander.app/Contents/MacOS:/usr/local/Cellar/[email protected]/1.1.1d/bin:/Users/zhfu/Library/Python/2.7/bin:/Users/zhfu/Library/Python/3.9/bin:/Users/zhfu/work/gconfig/scripts:/usr/local/opt/binutils/bin:/Users/zhfu/work/repos/uc_cli", "PATH_ARMGCC=/Applications/Simplicity Studio.app/Contents/Eclipse//developer/toolchains/gnu_arm/7.2_2017q4/bin", "PATH_BINUTILS=/usr/local/opt/binutils/bin", "PATH_BLE_SDK=/Applications/Simplicity\ Studio.app/Contents/Eclipse/developer/sdks/gecko_sdk_suite/v2.7/app/bluetooth", "PATH_BTMESH_SDK=/Applications/Simplicity\ Studio.app/Contents/Eclipse/developer/sdks/blemesh/v1.7/app/bluetooth", "PATH_COMMANDER=/Applications/Simplicity Studio.app/Contents/Eclipse//developer/adapter_packs/commander/Commander.app/Contents/MacOS", "PATH_CTAGS=/usr/local/Cellar/ctags/5.8_1/bin", "PATH_DOCXGEN=/Applications/Doxygen.app/Contents/Resources", "PATH_GCC_=/usr/local/Cellar/gcc/10.1.0/bin/", "PATH_MY_SCRIPT=/Users/zhfu/work/gconfig/scripts", "PATH_OPENSSL=/usr/local/opt/openssl:/usr/local/opt/openssl/lib", "PATH_PYBGAPI=/Users/zhfu/work/repos/py_bgapi/pybgapi", "PATH_PYBIN=/usr/local/Cellar/[email protected]/1.1.1d/bin:/Users/zhfu/Library/Python/2.7/bin:/Users/zhfu/Library/Python/3.9/bin", "PATH_STUDIO=/Applications/Simplicity Studio.app/Contents/Eclipse/", "PATH_SUP_TOOLS=/Users/zhfu/work/repos/bt_support/tools", "PATH_UC_CLI=/Users/zhfu/work/repos/uc_cli", "PWD=/Users/zhfu/SimplicityStudio/v5_workspace_new/bt_soc_empty", "PYBGAPI_DIR=/Users/zhfu/work/pybgapi", "PYTHONPATH=/Users/zhfu/work/repos/py_bgapi/pybgapi", "SCRIPT_DIR=/Users/zhfu/work/super/protocol/bluetooth/scripts", "SHELL=/bin/zsh", "SHLVL=2", "SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.zdeGghBHCL/Listeners", "STUDIO_WORKSPACE=/Users/zhfu/SimplicityStudio", "SUPER_DIR=/Users/zhfu/work/super", "TERM=screen-256color", "TERM_PROGRAM=iTerm.app", "TERM_PROGRAM_VERSION=3.4.15", "TERM_SESSION_ID=w0t0p0:1B14DE1C-E553-49FB-A3BF-80E8B4270016", "TMPDIR=/var/folders/w4/9d8q2nf52rl9tslbgmgz83hw0000gn/T/", "TMUX=/tmp//tmux-501/default,674,0", "TMUX_PANE=%0", "UNCRUSTIFY_CHECK_SCRIPT=/Users/zhfu/work/super/tool/script/uncrustify/uncrustifyCheck.py", "USER=zhfu", "XPC_FLAGS=0x0", "XPC_SERVICE_NAME=0", "ZEPHYR_BASE=/Users/zhfu/work/repos/zephyrproject/zephyr", "ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb", "ZSH=/Users/zhfu/.oh-my-zsh", "_=/usr/bin/make", "__CF_USER_TEXT_ENCODING=0x1F5:0x19:0x34"] [16:46:43.691514, cs, 91668] sysname: Darwin [16:46:43.691517, cs, 91668] release: 19.6.0 [16:46:43.691519, cs, 91668] version: Darwin Kernel Version 19.6.0: Sun Nov 14 19:58:51 PST 2021; root:xnu-6153.141.50~1/RELEASE_X86_64 [16:46:43.691521, cs, 91668] machine: x86_64 [16:46:43.691532, cs, 91668] arguments parsed: {program: /usr/local/Cellar/bear/3.0.19_2/bin/citnames, arguments: [{--input: [compile_commands.events.json]}, {--output: [compile_commands.json]}, {--run-checks: []}, {--verbose: []}]} [16:46:43.691764, cs, 91668] Configuration: {"compilation":null,"output":{"content":{"include_only_existing_source":true},"format":{"command_as_array":true,"drop_output_field":false}}} [16:46:43.691958, cs, 91668] compilation entries created. [size: 0] [16:46:43.691964, cs, 91668] compilation entries to output. [size: 0] [16:46:43.692236, cs, 91668] compilation entries written. [size: 0] [16:46:43.692252, cs, 91668] succeeded with: 0 [16:46:43.692941, br, 78288] Process wait request: done. [pid: 91668] [16:46:43.692967, br, 78288] Running citnames finished. [Exited with 0] [16:46:43.693039, br, 78288] succeeded with: 0

    Before you send...

    • Have you read the README.md file or man bear?
    • yes
    • Have you looked what other open issues Bear has?
    • yes
    • Are you sure that the build works without Bear?
    • yes
    opened by fuzhen011 6
  • Multilib Issue

    Multilib Issue

    Referring to wiki, I execute the following commands to compile 32-bit and 64 bit versions respectively:

    # 32bit
    mkdir build32 && cd build32
    cmake -DCMAKE_C_COMPILER_ARG1="-m32" -DENABLE_UNIT_TESTS=OFF -DENABLE_FUNC_TESTS=OFF -DENABLE_MULTILIB=ON -DCMAKE_INSTALL_LIBDIR=lib/i386-linux-gnu ..
    make all -j$(npr)
    sudo make install
    
    # 64bit
    mkdir build64 && cd build64
    cmake -DCMAKE_C_COMPILER_ARG1="-m64" -DENABLE_UNIT_TESTS=OFF -DENABLE_FUNC_TESTS=OFF -DENABLE_MULTILIB=ON -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu ..
    make all -j$(npr)
    sudo make install
    

    But after that, the two libexec.so I got are both 64 bit with the same sha256.

    opened by tr4v3ler 6
  • citnames: use parallel stl

    citnames: use parallel stl

    using parallel stl, but see no improvement in speed...

    • replaced the for loop with a std::for_each call.
    • passed the -ltbb as a linker flag.
    • compared the speed with and without the change (no difference)
    • monitored the process thread count with htop on linux (saw no extra threads)
    opened by rizsotto 1
  • Error with --verbose mode: gcc: fatal error: cannot execute 'cc1': execvp: No such file or directory

    Error with --verbose mode: gcc: fatal error: cannot execute 'cc1': execvp: No such file or directory

    It's a follow-up of #439, now with the patch from #439 (applied on the latest release) I see:

    ./fixincludes/config.log
    ...
    configure:3652: checking whether the C compiler works
    configure:3674: gcc -g -O2      -static-libstdc++ -static-libgcc  conftest.c  >&5
    [10:34:11.778532, el, 11333] lib.cc; execve path: /usr/bin/gcc
    [10:34:11.783695, el, 11333] lib.cc; on_load
    [10:34:11.783789, wr, 11333, ppid: 11332] wrapper: 3.0.18
    [10:34:11.783798, wr, 11333, ppid: 11332] arguments: ["/usr/lib64/bear/wrapper", "--destination", "dns:///localhost:33953", "--verbose", "--execute", "/usr/bin/gcc", "--", "gcc", "-g", "-O2", "-static-libstdc++", "-static-libgcc", "conftest.c"]
    [10:34:11.783805, wr, 11333, ppid: 11332] environment: ["SHELL=/bin/sh", "GOC=", "OBJDUMP_FOR_TARGET=objdump", "HOST_LIBS=", "M4=m4", "INTERCEPT_REPORT_DESTINATION=dns:///localhost:33953", "YACC=bison -y", "FLEX=flex", "ISLINC=", "CPPFLAGS_FOR_BUILD=", "LANGUAGE=C", "DSYMUTIL=dsymutil", "GDC=gdc", "SED=/usr/bin/sed", "AS_FOR_TARGET=as", "LD_FOR_TARGET=/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld", "DSYMUTIL_FOR_TARGET=dsymutil", "as_nl=
    ", "PWD=/dev/shm/objdir/fixincludes", "OTOOL_FOR_TARGET=otool", "RANLIB_FOR_TARGET=ranlib", "CXX=g++", "CXXFLAGS=-g -O2    ", "WINDRES=windres", "GMPLIBS=-lmpc -lmpfr -lgmp", "s=/home/marxin/Programming/gcc", "r=/dev/shm/objdir", "LD_PRELOAD=/usr/lib64/bear/libexec.so", "LDFLAGS=-static-libstdc++ -static-libgcc ", "WINDMC=windmc", "TOPLEVEL_CONFIGURE_ARGUMENTS=/home/marxin/Programming/gcc/configure --enable-languages=c,c++,fortran,jit --prefix=/home/marxin/bin/gcc --disable-multilib --enable-host-shared --disable-libsanitizer --enable-valgrind-annotations --disable-bootstrap", "CXX_FOR_BUILD=g++", "READELF_FOR_TARGET=readelf", "LD=/usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld", "AR_FOR_TARGET=ar", "GCC_FOR_TARGET= /dev/shm/objdir/./gcc/xgcc -B/dev/shm/objdir/./gcc/", "INTERCEPT_REPORT_COMMAND=/usr/lib64/bear/wrapper", "CPP_FOR_BUILD=", "READELF=readelf", "AWK=gawk", "DLLTOOL=dlltool", "ADA_CFLAGS=", "BISON=bison", "CC_FOR_BUILD=gcc", "ISLLIBS=-lisl", "INTERCEPT_VERBOSE=true", "AR=ar", "AS=as", "SHLVL=2", "NM=nm", "LEX=flex", "GMPINC=", "DUALCASE=1", "LD_LIBRARY_PATH=", "MAKEINFO=makeinfo --split-size=5000000", "NM_FOR_TARGET=nm", "OBJCOPY_FOR_TARGET=", "GFORTRAN=", "[email protected]@", "OBJCOPY=", "XGCC_FLAGS_FOR_TARGET=-B/home/marxin/bin/gcc/x86_64-pc-linux-gnu/bin/ -B/home/marxin/bin/gcc/x86_64-pc-linux-gnu/lib/ -isystem /home/marxin/bin/gcc/x86_64-pc-linux-gnu/include -isystem /home/marxin/bin/gcc/x86_64-pc-linux-gnu/sys-include  ", "LC_ALL=C", "OTOOL=otool", "OBJDUMP=objdump", "CC=gcc", "CFLAGS=-g -O2    ", "CONFIG_SHELL=/bin/sh", "RANLIB=ranlib", "OLDPWD=/dev/shm/objdir", "[email protected]@", "_=/usr/bin/gcc"]
    [10:34:11.783811, wr, 11333, ppid: 11332] arguments parsed: {program: /usr/lib64/bear/wrapper, arguments: [{--: [gcc, -g, -O2, -static-libstdc++, -static-libgcc, conftest.c]}, {--destination: [dns:///localhost:33953]}, {--execute: [/usr/bin/gcc]}, {--verbose: []}]}
    [10:34:11.784206, wr, 11333, ppid: 11332] gRPC call requested: supervise::Supervisor::Resolve
    [10:34:11.785059, wr, 11333, ppid: 11332] gRPC call [Resolve] finished: true
    [10:34:11.785272, wr, 11333, ppid: 11332] Process spawned. [pid: 11337, command: [gcc, -g, -O2, -static-libstdc++, -static-libgcc, conftest.c]]
    [10:34:11.785298, wr, 11333, ppid: 11332] gRPC call requested: supervise::Interceptor::Register
    [10:34:11.785743, wr, 11333, ppid: 11332] gRPC call [Register] finished: true
    [10:34:11.785772, wr, 11333, ppid: 11332] Process wait requested. [pid: 11337]
    [10:34:11.786344, el, 11337] lib.cc; on_load
    [10:34:11.786858, el, 11338] lib.cc; execvp file: cc1
    [10:34:11.786882, el, 11338] lib.cc; execvp failed.
    gcc: fatal error: cannot execute 'cc1': execvp: No such file or directory
    compilation terminated.
    

    Note it does not happen without the --verbose option.

    opened by marxin 7
Releases(3.0.20)
  • 3.0.20(Jul 23, 2022)

    Bugfixes:

    • Set errno to zero after libexec's on_load (#470, @Absolucy)
    • Add C compiler argument for dependencies (#462, @arturo-salinas)
    • Update dependency versions.
    • Fix build failure with fmt-9.0.0 (#471)
    Source code(tar.gz)
    Source code(zip)
  • 3.0.19(Mar 20, 2022)

    Bugfixes:

    • Temp workaround note for old 2.4 release (#440 @ZuseZ4)
    • Build: local dependencies get first in the search path (#453 @ton)
    • Fix cannot execute binary file (#439 @marxin)
    Source code(tar.gz)
    Source code(zip)
  • 3.0.18(Jan 1, 2022)

    Bugfixes:

    • Fix compile errors with g++ 11.02 (#434, @shrkamat)
    • Added CMAKE_EXE_LINKER_FLAGS to external projects. (#437, @XaverKlemenschits)
    • Fixed Libtool test failure. (#435, @gyakovlev)
    Source code(tar.gz)
    Source code(zip)
  • 3.0.17(Nov 14, 2021)

    Bugfixes:

    • use DNS name for gRPC endpoint to enable no_proxy environment to work. (#419 @ensc)
    • enable haiku build (@korli)
    • cmake: forward build flags for subproject (#426 @leleliu008)
    • citnames: filenames in output are canonical (#425 @hmoffatt)
    • test: against lobtool (#411 @jiangjianshan)
    Source code(tar.gz)
    Source code(zip)
  • 3.0.16(Sep 24, 2021)

  • 3.0.15(Sep 8, 2021)

  • 3.0.14(Aug 31, 2021)

    Features:

    • intercept produced file is JSON format (from Protocol Buffer binary format).
    • Increased test coverage of citnames with unit tests and functional tests.

    Bugfixes:

    • Add Clang flag handling to fix missing flags (#394 @deadly-platypus)
    • Build fails with nlohmann/json 3.10.0 (#397 @sternenseemann)
    • Timestamps in intercept produced output are sub-second, and can support build system profiling use cases.
    Source code(tar.gz)
    Source code(zip)
  • 3.0.13(Jun 27, 2021)

    Bugfixes:

    • documentation fixes (#388 #390 thanks to @aiden-leong @MJAS1)
    • relative path can be used to filter entries (#387 thanks to @MJAS1 to raise the issue)
    • compiler flags can be filtered (#268 thanks to @DeadRabbits307)
    • fix FreeBSD problem (#378 thanks to @AimerYi to raise the issue)
    Source code(tar.gz)
    Source code(zip)
  • 3.0.12(May 31, 2021)

  • 3.0.11(Apr 17, 2021)

  • 3.0.10(Mar 22, 2021)

    Bugfixes:

    • citnames execution time linear to the input size. (Single SQL execution during the event reading.)
    • intercept performance tuning to allocate less object during event processing.
    Source code(tar.gz)
    Source code(zip)
  • 3.0.9(Mar 4, 2021)

    Bugfixes:

    • compile failed with clang/musl/libc++ #362
    • reduce grpc clone size with shallow clone #361
    • intercept write messages async #350
    • Clang is not recognized on macOS #355
    Source code(tar.gz)
    Source code(zip)
  • 3.0.8(Jan 28, 2021)

    Features:

    • Interception execution reporter (er) got merged with the compiler wrapper (wrapper).
    • Refactoring: removed duplicate code.
    • Refactoring: gRPC calls are unified for wrapper and preload interceptions.
    Source code(tar.gz)
    Source code(zip)
  • 3.0.7(Jan 14, 2021)

  • 3.0.6(Dec 29, 2020)

  • 3.0.5(Dec 21, 2020)

    Features:

    • bear and citnames are expose less flags, but using a configuration file.
    • refactoring: removed duplicated code on process initialization
    • dependency updates
    Source code(tar.gz)
    Source code(zip)
  • 3.0.4(Dec 13, 2020)

    Bugfixes:

    • citnames does not start if there is no input file for it.
    • fixing install problems (#337 )
    • dependency version bump ups
    • use localhost in gRPC address to avoid HTTP proxy usage (#296 )
    Source code(tar.gz)
    Source code(zip)
  • 3.0.3(Nov 22, 2020)

  • 3.0.2(Nov 8, 2020)

    Bugfixes:

    • Release version is not bumped #322
    • Shell scripts not executed correctly without a hashbang in 3.0 #319
    • Excessive "Received start event could not be merged into execution report. Ignored." messages #316
    • Removed duplicated code
    Source code(tar.gz)
    Source code(zip)
  • 3.0.1(Oct 29, 2020)

  • 3.0.0(Sep 30, 2020)

    Rewrite Bear in C++

    Bear is decomposed into an intercept and a semantic analysis processes. It also supports compiler wrappers for intercepting compiler calls in environments where the dynamic linker trick is not working.

    Source code(tar.gz)
    Source code(zip)
  • 3.0.0-rc3(Sep 27, 2020)

  • 3.0.0-rc2(Sep 20, 2020)

  • 3.0.0-rc1(Sep 13, 2020)

    Rewrite Bear in C++

    Bear is decomposed into an intercept and a semantic analysis processes. It also supports compiler wrappers for intercepting compiler calls in environments where the dynamic linker trick is not working.

    This is a release candidate!!! (Expecting to have issues with packaging or with functionalities on OSes where I could not test. Please report any issues you have with version number.)

    Source code(tar.gz)
    Source code(zip)
  • 2.4.4(Sep 10, 2020)

    Bugfixes:

    • Don't cache the value of _NSGetEnviron on macOS (@saagarjha, #290)
    • Add --remove-flags argument (@wangnangg, #288)
    • Use bash-completions conditionally in CMake (@Ergus, #292)
    Source code(tar.gz)
    Source code(zip)
  • v2.4.3(Jan 27, 2020)

  • 2.4.2(Aug 29, 2019)

    Changes since 2.4.1

    Features:

    • Support output field in the output. (#254, @bofeng17)
    • Support Fortran compiler (#201, #241, #253, @rubyzhou2014, @chunhualiao)
    • Support filter options (#261, #252, @liugang)

    Bugfixes:

    • Fix Cpack problem to create RPM. (#191, @antmak, @reverendhomer)
    Source code(tar.gz)
    Source code(zip)
  • 2.4.1(Jul 31, 2019)

  • 2.4.0(Jul 31, 2019)

Owner
László Nagy
László Nagy
All-in-One firmware for your 32-bit Prusa MK3S/+ Bear!

Prusa All-in-One Marlin Firmware About All-in-One firmware for your 32-bit Prusa MK3S/+ Bear! Configuring & Building Prusa All-in-One Firmware To conf

Keith Bennett 5 Jun 17, 2022
This is a fork of prboom+ with extra tooling for demo recording and playback, with a focus on speedrunning.

dsda-doom v0.15.1 This is a fork of prboom+ with extra tooling for demo recording and playback, with a focus on speedrunning. Heretic Support (beta) D

Ryan Krafnick 101 Jul 22, 2022
A template CMake project to get you started with C++ and tooling

cpp_starter_project Getting Started Use the Github template First, click the green Use this template button near the top of this page. This will take

Jason Turner 2k Jul 30, 2022
Local OXID Resolver (LCLOR) : Research and Tooling

hazmat5 Local OXID Resolver (LCLOR) : Research and Tooling Welcome to a repository on my research into DCOM's Local OXID Resolution mechanisms, and RP

Alex Ionescu 25 Jun 23, 2022
Tooling and Scripts for Hacking Super Street Fighter II Cabinets

sf-cabinet Tools and utilities for modifying SF2 Cabinets What This repository contains research and tooling around the mini Street Fighter 2 cabinet

wrongbaud 12 Apr 14, 2022
3DO M2 Portfolio OS v3.0 and tooling source dump

3DO M2 Portfolio OS v3.0 The 3DO Opera platform ran an OS called Portfolio. Developed internally at NTG/3DO by several of the same people who develope

null 14 Feb 17, 2022
A tool that analyzes headers and generates introspection code

A tool that analyzes headers and generates introspection code

Crax 2 Nov 7, 2021
Tool that generates unit test by C/C++ source code, trying to reach all branches and maximize code coverage

What is UTBotCpp? UTBotCpp generates test cases by code, trying to cover maximum statements and execution paths. We treat source code as source of tru

null 30 Aug 5, 2022
A tool for use with clang to analyze #includes in C and C++ source files

Include What You Use For more in-depth documentation, see docs. Instructions for Users "Include what you use" means this: for every symbol (type, func

null 2.9k Aug 1, 2022
A tool for use with clang to analyze #includes in C and C++ source files

Include What You Use For more in-depth documentation, see docs. Instructions for Users "Include what you use" means this: for every symbol (type, func

null 2.9k Aug 1, 2022
Clang build analysis tool using -ftime-trace

Clang Build Analyzer Clang C/C++ build analysis tool when using Clang 9+ -ftime-trace. The -ftime-trace compiler flag (see blog post or Clang 9 releas

Aras Pranckevičius 669 Jul 28, 2022
MySQL Server, the world's most popular open source database, and MySQL Cluster, a real-time, open source transactional database.

Copyright (c) 2000, 2021, Oracle and/or its affiliates. This is a release of MySQL, an SQL database server. License information can be found in the

MySQL 8.1k Aug 6, 2022
A mini database for learning database

A mini database for learning database

Chuckie Tan 4 Jul 21, 2022
SymQEMU: Compilation-based symbolic execution for binaries

SymQEMU This is SymQEMU, a binary-only symbolic executor based on QEMU and SymCC. It currently extends QEMU 4.1.1 and works with the most recent versi

null 206 Jul 29, 2022
"Zero setup" cross-compilation for a wide variety of architectures.

"Zero setup" cross-compilation for a wide variety of architectures. xcross includes compact docker images and a build utility for minimal setup C/C++ cross-compiling, inspired by rust-embedded/cross

Alexander Huszagh 24 May 20, 2022
Competitive Programming Solutions Compilation

Competitive Programming Solutions Compilation Hello everyone ?? This repository contains solutions and explanations to various competitive programming

Abhinav Agrawal 27 Jul 5, 2022
Ziggified GLFW bindings with 100% API coverage, zero-fuss installation, cross compilation, and more.

mach/glfw - Ziggified GLFW bindings Ziggified GLFW bindings that Mach engine uses, with 100% API coverage, zero-fuss installation, cross compilation,

Hexops 167 Jul 27, 2022
This is a compilation of the code and images for all Arduino code in the Robotics 11 class.

Robotics 11 - Arduino This is a compilation of the code and images for all Arduino code in the Robotics 11 class. All code can be viewed in each proje

GuhBean 1 Oct 29, 2021
C++ Live Toolkit are tools subset used to perform on-the-fly compilation and running of cpp code

C++ Live Toolkit CLT (C++ Live Toolkit) is subset of tools that are very light in size, and maintained to help programmers in compiling and executing

MondeO 1 Jan 4, 2022
A collection of tools, libraries, and tests for Vulkan shader compilation.

Shaderc A collection of tools, libraries and tests for shader compilation. At the moment it includes: glslc, a command line compiler for GLSL/HLSL to

Google 1.4k Jul 28, 2022
Fluid Visualization - The code compilation is only tested on Arch Linux x86_64

Fluid Visualization The code compilation is only tested on Arch Linux x86_64, Linux kernel 5.15.13-arch1, with gcc 11.1.0, CMake 3.22.1, Xorg X server

krr 2 Jan 30, 2022
A cross platform shader language with multi-threaded offline compilation or platform shader source code generation

A cross platform shader language with multi-threaded offline compilation or platform shader source code generation. Output json reflection info and c++ header with your shaders structs, fx-like techniques and compile time branch evaluation via (uber-shader) "permutations".

Alex Dixon 275 Jul 18, 2022
Basic framework for D3D11 init, model/texture loading, shader compilation and camera movement.

reed-framework Basic framework for D3D11 init, model/texture loading, camera movement, etc. Instructions: #include <framework.h> Link with framework.l

Nathan Reed 34 May 18, 2022
This is the source code for Mirai. The compilation method has been simplified a little and some modifications have been made.

Mirai BotNet to Tashiro(未来砲) Leaked Linux.Mirai Source Code for Research/IoT Development Purposes Uploaded for research purposes and so we can develop

われ 28 Jul 30, 2022
multi-sdr-gps-sim generates a IQ data stream on-the-fly to simulate a GPS L1 baseband signal using a SDR platform like HackRF or ADLAM-Pluto.

multi-sdr-gps-sim generates a GPS L1 baseband signal IQ data stream, which is then transmitted by a software-defined radio (SDR) platform. Supported at the moment are HackRF, ADLAM-Pluto and binary IQ file output. The software interacts with the user through a curses based text user interface (TUI) in terminal.

null 57 Jul 23, 2022
Generates CIL MLIR dialect from C/C++ source.

Build steps -DLLVM_ENABLE_PROJECTS="mlir;clang" in cmake ninja cml should build the cml clang tool ninja check-clang-cml to run the CIL tests. Check c

Compiler Tree Technologies 23 Jun 28, 2022
Indexes points and lines and generates map tiles to display them

Datamaps This is a tool for indexing large lists of geographic points or lines and dynamically generating map tiles from the index for display. Depend

Eric Fischer 329 Jul 16, 2022
A simple application that generates animated BTTV emotes from static images

emoteJAM WARNING! The application is in active development and can't do anything yet. A simple application that generates animated BTTV emotes from st

Tsoding 7 Apr 27, 2021
A simple API wrapper that generates images & facts of any animal

animality.h A simple API wrapper that generates images & facts of any animal Required dependencies: libcurl for sending HTTPS requests. pthreads for t

animality 5 Jun 23, 2022