Skip to content
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

Cannot get infer to compile clang #1082

Closed
ab4359 opened this issue Apr 8, 2019 · 4 comments
Closed

Cannot get infer to compile clang #1082

ab4359 opened this issue Apr 8, 2019 · 4 comments

Comments

@ab4359
Copy link

ab4359 commented Apr 8, 2019

I cannot get clang to compile when cloning the latest version of infer in a Ubuntu 16.04 LTS VM using VMware Fusion. I am following the instructions and get this as the end of output when I run ./build-infer.sh clang:

[ 97%] Linking CXX executable ../../bin/opt
clang: error: unable to execute command: Killed
clang: error: linker command failed due to signal (use -v to see invocation)
tools/llvm-opt-fuzzer/CMakeFiles/llvm-opt-fuzzer.dir/build.make:280: recipe for target 'bin/llvm-opt-fuzzer' failed
make[3]: *** [bin/llvm-opt-fuzzer] Error 254
make[3]: Leaving directory '/tmp/clang-setup.PgVIHF/build'
CMakeFiles/Makefile2:80176: recipe for target 'tools/llvm-opt-fuzzer/CMakeFiles/llvm-opt-fuzzer.dir/all' failed
make[2]: *** [tools/llvm-opt-fuzzer/CMakeFiles/llvm-opt-fuzzer.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
make[3]: Leaving directory '/tmp/clang-setup.PgVIHF/build'
[ 97%] Built target opt
make[2]: Leaving directory '/tmp/clang-setup.PgVIHF/build'
Makefile:149: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/tmp/clang-setup.PgVIHF/build'
Makefile:330: recipe for target 'clang_setup' failed
make: *** [clang_setup] Error 2

  compilation failure; you can try running

    make clean
    './build-infer.sh' clang

Other times the build has failed in the mid 90% range.

I've experienced the same problem when trying to install in Ubuntu 18.04.2
Packages are installed as follows:

||/ Name                     Version           Architecture      Description
+++-========================-=================-=================-======================================================
ii  autoconf                 2.69-9            all               automatic configure script builder
ii  automake                 1:1.15-4ubuntu1   all               Tool for generating GNU Standards-compliant Makefiles
ii  clang                    1:3.8-33ubuntu3.1 amd64             C, C++ and Objective-C compiler (LLVM based)
ii  gcc                      4:5.3.1-1ubuntu1  amd64             GNU C compiler
ii  opam                     2.0.2-0ppa2~xenia amd64             a source-based package manager for OCaml.
ii  pkg-config               0.29.1-0ubuntu1   amd64             manage compile and link flags for libraries
ii  python                   2.7.12-1~16.04    amd64             interactive high-level object-oriented language (defau
@aytey
Copy link
Contributor

aytey commented Apr 9, 2019

The OOM (out of memory) killer on Linux is killing the linking step of clang (which is notoriously memory-intensive).

You can try increasing the RAM in the VM, or, potentially, using fewer jobs (e.g., try setting _NPROCESSORS_ONLN and JOBS to 1).

There's also some other way to tell the infer build process to accept a build of clang, which you've "manually completed" (i.e., rather than making infer build clang all again, you can go to the clang folder---probably in /tmp---, run make, copy the artefacts into the infer source tree, and then continue the infer build). I'll try to find that for you.

@aytey
Copy link
Contributor

aytey commented Apr 9, 2019

There's also this comment: #1044 (comment)

@aytey
Copy link
Contributor

aytey commented Apr 9, 2019

This is what I was referring to (about completing a build): #649 (comment)

@ab4359
Copy link
Author

ab4359 commented Apr 10, 2019

Solved. Allocated 12GB of RAM and 80GB of hard disk space to the VM to get it to clang to complete the compile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants