facebook / infer

A static analyzer for Java, C, C++, and Objective-C
http://fbinfer.com/
MIT License
14.94k stars 2.01k forks source link

Current release failing to build #830

Closed kylewayman closed 6 years ago

kylewayman commented 6 years ago

If I run the commands for "Install Infer on Linux":

wget -O Dockerfile https://raw.githubusercontent.com/facebook/infer/master/docker/Dockerfile
wget -O run.sh https://raw.githubusercontent.com/facebook/infer/master/docker/run.sh
sh run.sh

It fails at:

lock needs to be installed.
The following actions will be performed:
  - install lock 1.2*

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[lock: git] Command started
[lock: git] Command started
[lock: git] Command started
[lock: git] Command started
[lock] https://github.com/rgrinberg/opam-lock already up-to-date

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-> installed lock.1.2
Done.
[WARNING] Running as root is not recommended
[ERROR] ppx_driver.v0.9.1 is not available because your system doesn't comply
        with ocaml-version >= "4.03.0" & ocaml-version < "4.05.0".
Exception:
Reqs_error
 (Process_error
   ("opam install -y ANSITerminal.0.7 atd.1.12.0 atdgen.1.12.0 base.v0.9.3 bin_prot.v0.9.1 biniou.1.2.0 camlp4.4.05+1 camlzip.1.07 cmdliner.1.0.2 conf-aclocal.1.0.0 conf-autoconf.0.1 conf-m4.1 conf-pkg-config.1.0 conf-which.1 configurator.v0.9.1 core.v0.9.1 core_kernel.v0.9.0 cppo.1.6.0 cppo_ocamlbuild.1.6.0 ctypes.0.13.0 easy-format.1.3.0 extlib-compat.1.7.2 fieldslib.v0.9.0 integers.0.2.2 jane-street-headers.v0.9.0 javalib.2.3.4 jbuilder.1.0+beta14 menhir.20170712 mtime.1.1.0 num.0 ocaml-compiler-libs.v0.9.0 ocaml-migrate-parsetree.1.0.6 ocamlbuild.0.11.0 ocamlfind.1.7.3 octavius.1.1.0 ounit.2.0.5 parmap.1.0-rc8 ppx_assert.v0.9.0 ppx_ast.v0.9.1 ppx_base.v0.9.0 ppx_bench.v0.9.1 ppx_bin_prot.v0.9.0 ppx_compare.v0.9.0 ppx_core.v0.9.0 ppx_custom_printf.v0.9.0 ppx_derivers.1.0 ppx_deriving.4.2 ppx_driver.v0.9.1 ppx_enumerate.v0.9.0 ppx_expect.v0.9.0 ppx_fail.v0.9.0 ppx_fields_conv.v0.9.0 ppx_hash.v0.9.0 ppx_here.v0.9.1 ppx_inline_test.v0.9.2 ppx_jane.v0.9.0 ppx_js_style.v0.9.0 ppx_let.v0.9.0 ppx_metaquot.v0.9.0 ppx_optcomp.v0.9.0 ppx_optional.v0.9.0 ppx_pipebang.v0.9.0 ppx_sexp_conv.v0.9.0 ppx_sexp_message.v0.9.0 ppx_sexp_value.v0.9.0 ppx_tools.5.0+4.05.0 ppx_traverse.v0.9.0 ppx_traverse_builtins.v0.9.0 ppx_type_conv.v0.9.0 ppx_typerep_conv.v0.9.0 ppx_variants_conv.v0.9.0 re.1.7.1 result.1.2 sawja.1.5.2 sexplib.v0.9.2 spawn.v0.9.0 sqlite3.4.2.0 stdio.v0.9.0 topkg.0.9.0 typerep.v0.9.0 variantslib.v0.9.0 xmlm.1.3.0 yojson.1.4.0 --color=never",
   Unix.WEXITED 66)).

*** `install_opam_deps` failed
*** Updating opam then retrying
[WARNING] Running as root is not recommended

=-=- Updating package repositories =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[default: http] Command started
[default: http] Command started
[default] synchronized from https://opam.ocaml.org

=-=- Synchronizing development packages -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[lock: git] Command started
[lock: git] Command started
[lock: git] Command started
[lock: git] Command started
[lock] https://github.com/rgrinberg/opam-lock already up-to-date
[WARNING] Running as root is not recommended
[ERROR] ppx_driver.v0.9.1 is not available because your system doesn't comply
        with ocaml-version >= "4.03.0" & ocaml-version < "4.05.0".
Exception:
Reqs_error
 (Process_error
   ("opam install -y ANSITerminal.0.7 atd.1.12.0 atdgen.1.12.0 base.v0.9.3 bin_prot.v0.9.1 biniou.1.2.0 camlp4.4.05+1 camlzip.1.07 cmdliner.1.0.2 conf-aclocal.1.0.0 conf-autoconf.0.1 conf-m4.1 conf-pkg-config.1.0 conf-which.1 configurator.v0.9.1 core.v0.9.1 core_kernel.v0.9.0 cppo.1.6.0 cppo_ocamlbuild.1.6.0 ctypes.0.13.0 easy-format.1.3.0 extlib-compat.1.7.2 fieldslib.v0.9.0 integers.0.2.2 jane-street-headers.v0.9.0 javalib.2.3.4 jbuilder.1.0+beta14 menhir.20170712 mtime.1.1.0 num.0 ocaml-compiler-libs.v0.9.0 ocaml-migrate-parsetree.1.0.6 ocamlbuild.0.11.0 ocamlfind.1.7.3 octavius.1.1.0 ounit.2.0.5 parmap.1.0-rc8 ppx_assert.v0.9.0 ppx_ast.v0.9.1 ppx_base.v0.9.0 ppx_bench.v0.9.1 ppx_bin_prot.v0.9.0 ppx_compare.v0.9.0 ppx_core.v0.9.0 ppx_custom_printf.v0.9.0 ppx_derivers.1.0 ppx_deriving.4.2 ppx_driver.v0.9.1 ppx_enumerate.v0.9.0 ppx_expect.v0.9.0 ppx_fail.v0.9.0 ppx_fields_conv.v0.9.0 ppx_hash.v0.9.0 ppx_here.v0.9.1 ppx_inline_test.v0.9.2 ppx_jane.v0.9.0 ppx_js_style.v0.9.0 ppx_let.v0.9.0 ppx_metaquot.v0.9.0 ppx_optcomp.v0.9.0 ppx_optional.v0.9.0 ppx_pipebang.v0.9.0 ppx_sexp_conv.v0.9.0 ppx_sexp_message.v0.9.0 ppx_sexp_value.v0.9.0 ppx_tools.5.0+4.05.0 ppx_traverse.v0.9.0 ppx_traverse_builtins.v0.9.0 ppx_type_conv.v0.9.0 ppx_typerep_conv.v0.9.0 ppx_variants_conv.v0.9.0 re.1.7.1 result.1.2 sawja.1.5.2 sexplib.v0.9.2 spawn.v0.9.0 sqlite3.4.2.0 stdio.v0.9.0 topkg.0.9.0 typerep.v0.9.0 variantslib.v0.9.0 xmlm.1.3.0 yojson.1.4.0 --color=never",
   Unix.WEXITED 66)).

*** ERROR: `install_opam_deps` failed
The command '/bin/sh -c OCAML_VERSION=4.05.0+flambda;     cd /infer && ./build-infer.sh --opam-switch $OCAML_VERSION && rm -rf /root/.opam' returned a non-zero code: 1

I've tried this on an iOS laptop and a CentOS server and I get identical results. This is running in the ubuntu:17.04 container, so host OS shouldn't matter, right? Is there anything else I should try?

bulwahn commented 6 years ago

I can confirm that this happens. Fortunately, I still do have a docker container that I build two weeks ago (and that one still works for me). The unfortunate thing about this Docker container build is that it downloads the latest versions of some ocaml packages, which can happen to be incompatible with the rest of the Docker setup (at any point in time).

In my case, it occurs on a Ubuntu host OS and it is not related to the host system. If you want to pinpoint the exact problem, I believe you must check what has changed in the last few days in opam and ppx_driver, which might point to the problem that occurs here.

kylewayman commented 6 years ago

The error is saying that ocaml must be less than 4.05.0, but beb98c6baa3764dd9073028b8596de1a392369b5 updated ocaml to 4.05.0.

christophercrouzet commented 6 years ago

I am experiencing the exact same issue on Ubuntu 17.10 so I downloaded the 0.12.1 release instead and this time I got the issue described in https://github.com/facebook/infer/issues/776.

rgrig commented 6 years ago

PR #833 failed checks with this error. So, I was wondering how come it works on my machine. It turns out that ppx_driver.v0.9.1 on my laptop does not require ocaml-version < "4.05.0" but ocaml-version < "4.06.0". (I suspect I didn't do opam update lately?)

In any case, changing that dependency by hand will eventually allow you to compile https://github.com/facebook/infer/commit/7032bca1d55a736c46b897b0ac5eeaa35e6fb8cf. But, it involves manually removing opam's cache and also possibly running some opam depext commands. And, in any case, it's probably not what you want to be doing. (This was tested on a fresh Ubuntu 16.04.)

KoenDG commented 6 years ago

Any update on this? I'm experiencing this issue on with both the dockerfile and on ubuntu 16.04

Using version 4.06.0 gives the error:

[ERROR] stdio.v0.9.0 is not available because your system doesn't comply with ocaml-version >= "4.03.0" & ocaml-version < "4.06.0". [ERROR] sexplib.v0.9.2 is not available because your system doesn't comply with ocaml-version >= "4.03.0" & ocaml-version < "4.06.0". [ERROR] ppx_tools.5.0+4.05.0 is not available because your system doesn't comply with ocaml-version >= "4.05" & ocaml-version < "4.06.0". [ERROR] ppx_driver.v0.9.1 is not available because your system doesn't comply with ocaml-version >= "4.03.0" & ocaml-version < "4.05.0". [ERROR] ppx_deriving.4.2 is not available because your system doesn't comply with ocaml-version > "4.03.0" & opam-version >= "1.2" & ocaml-version < "4.06.0". [ERROR] ppx_core.v0.9.0 is not available because your system doesn't comply with ocaml-version >= "4.03.0" & ocaml-version < "4.06.0". [ERROR] ppx_ast.v0.9.1 is not available because your system doesn't comply with ocaml-version >= "4.03.0" & ocaml-version < "4.06.0". [ERROR] ocaml-migrate-parsetree.1.0.6 is not available because your system doesn't comply with ocaml-version >= "4.02.0" & ocaml-version < "4.06.0". [ERROR] num.0 is not available because your system doesn't comply with ocaml-version < "4.06.0". [ERROR] core_kernel.v0.9.0 is not available because your system doesn't comply with ocaml-version >= "4.03.0" & ocaml-version < "4.06.0". [ERROR] core.v0.9.1 is not available because your system doesn't comply with ocaml-version >= "4.03.0" & ocaml-version < "4.06.0". [ERROR] camlp4.4.05+1 is not available because your system doesn't comply with !preinstalled & ocaml-version >= "4.05" & ocaml-version < "4.06". [ERROR] bin_prot.v0.9.1 is not available because your system doesn't comply with ocaml-version >= "4.03.0" & ocaml-version < "4.06.0". [ERROR] base.v0.9.3 is not available because your system doesn't comply with ocaml-version >= "4.03.0" & ocaml-version < "4.06.0".

Using version 4.05.0 gives the error:

[ERROR] ppx_driver.v0.9.1 is not available because your system doesn't comply with ocaml-version >= "4.03.0" & ocaml-version < "4.05.0".

Using version 4.04.2 gives the error:

[ERROR] ppx_tools.5.0+4.05.0 is not available because your system doesn't comply with ocaml-version >= "4.05" & ocaml-version < "4.06.0". [ERROR] camlp4.4.05+1 is not available because your system doesn't comply with !preinstalled & ocaml-version >= "4.05" & ocaml-version < "4.06".

Using version 4.03.0 gives the error:

[ERROR] sqlite3.4.2.0 is not available because your system doesn't comply with ocaml-version >= "4.04". [ERROR] ppx_tools.5.0+4.05.0 is not available because your system doesn't comply with ocaml-version >= "4.05" & ocaml-version < "4.06.0". [ERROR] ppx_deriving.4.2 is not available because your system doesn't comply with ocaml-version > "4.03.0" & opam-version >= "1.2" & ocaml-version < "4.06.0". [ERROR] camlp4.4.05+1 is not available because your system doesn't comply with !preinstalled & ocaml-version >= "4.05" & ocaml-version < "4.06".

Bunch of overlapping errors, as can be seen.

This is all achieved by alerting the version in the build-infer.sh file.

bulwahn commented 6 years ago

I solved the issue by upgrading to the current master and created the following Dockerfile:

FROM ubuntu:17.04

RUN apt-get update && \
    apt-get install -y \
            aspcud \
            curl \
            opam \
            pkg-config \
            autoconf \
            libsqlite3-dev \
            zlib1g-dev \
            cmake \
            libc6-dev \
            libc6-i386 \
            lib32z1 \
            lib32stdc++6 \
            openjdk-8-jdk-headless && \
    apt-get install -y git

RUN mkdir /tmp-infer && cd /tmp-infer && \
    git clone -n https://github.com/facebook/infer.git && \
    cd infer && git checkout ${INFER_GIT_SHA1} && \
    ./build-infer.sh --yes --opam-switch 4.05.0+flambda && \
    make install && \
    rm -rf /root/.opam && rm -rf /tmp-infer

Note that you have to replace the ${INFER_GIT_SHA1} with a recent git commit identifier.

paulp commented 6 years ago

Note that FROM ubuntu:17.04 is now a new source of breakage, because Ubuntu EOLed 17.04 on Jan 13, so the call to apt-get update fails.

KoenDG commented 6 years ago

I got it to work with @bulwahn 's code, but using ubuntu 17.10 instead of 17.04

kylewayman commented 6 years ago

@KoenDG when I try what you suggested, I get this:

make[3]: Entering directory '/tmp/clang-setup.uYtPFT/build'
[  9%] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/cxa_aux_runtime.cpp.o
[  9%] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/cxa_default_handlers.cpp.o
[  9%] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/cxa_demangle.cpp.o
/tmp/clang-setup.uYtPFT/llvm/projects/libcxxabi/src/cxa_demangle.cpp: In function 'const char* __cxxabiv1::{anonymous}::parse_type(const char*, const char*, C&) [with C = __cxxabiv1::{anonymous}::Db]':
/tmp/clang-setup.uYtPFT/llvm/projects/libcxxabi/src/cxa_demangle.cpp:2216:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
                         if (first+1 != last)
                         ^~
/tmp/clang-setup.uYtPFT/llvm/projects/libcxxabi/src/cxa_demangle.cpp:2261:21: note: here
                     default:
                     ^~~~~~~
[  9%] Linking CXX executable ../../bin/yaml-bench
make[3]: Leaving directory '/tmp/clang-setup.uYtPFT/build'
[  9%] Built target yaml-bench
make[3]: Entering directory '/tmp/clang-setup.uYtPFT/build'
Scanning dependencies of target cxx_objects
make[3]: Leaving directory '/tmp/clang-setup.uYtPFT/build'
make[3]: Entering directory '/tmp/clang-setup.uYtPFT/build'
[  9%] Building CXX object projects/libcxx/lib/CMakeFiles/cxx_objects.dir/__/src/algorithm.cpp.o
In file included from /tmp/clang-setup.uYtPFT/llvm/projects/libcxx/include/ios:216:0,
                 from /tmp/clang-setup.uYtPFT/llvm/projects/libcxx/include/ostream:138,
                 from /tmp/clang-setup.uYtPFT/llvm/projects/libcxx/include/istream:163,
                 from /tmp/clang-setup.uYtPFT/llvm/projects/libcxx/include/random:1646,
                 from /tmp/clang-setup.uYtPFT/llvm/projects/libcxx/src/algorithm.cpp:11:
/tmp/clang-setup.uYtPFT/llvm/projects/libcxx/include/__locale:39:11: fatal error: xlocale.h: No such file or directory
 # include <xlocale.h>
           ^~~~~~~~~~~
compilation terminated.
projects/libcxx/lib/CMakeFiles/cxx_objects.dir/build.make:62: recipe for target 'projects/libcxx/lib/CMakeFiles/cxx_objects.dir/__/src/algorithm.cpp.o' failed
make[3]: Leaving directory '/tmp/clang-setup.uYtPFT/build'
make[3]: *** [projects/libcxx/lib/CMakeFiles/cxx_objects.dir/__/src/algorithm.cpp.o] Error 1
CMakeFiles/Makefile2:16743: recipe for target 'projects/libcxx/lib/CMakeFiles/cxx_objects.dir/all' failed
make[2]: *** [projects/libcxx/lib/CMakeFiles/cxx_objects.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
[  9%] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/cxa_exception_storage.cpp.o
[  9%] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/cxa_guard.cpp.o
[  9%] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/cxa_handlers.cpp.o
[  9%] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/cxa_new_delete.cpp.o
[  9%] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/cxa_unexpected.cpp.o
[  9%] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/cxa_vector.cpp.o
[  9%] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/cxa_virtual.cpp.o
[  9%] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/stdlib_exception.cpp.o
[  9%] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/stdlib_stdexcept.cpp.o
[  9%] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/stdlib_typeinfo.cpp.o
[  9%] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/abort_message.cpp.o
[  9%] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/fallback_malloc.cpp.o
[  9%] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/private_typeinfo.cpp.o
[  9%] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/cxa_exception.cpp.o
[  9%] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/cxa_personality.cpp.o
[  9%] Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/cxa_thread_atexit.cpp.o
make[3]: Leaving directory '/tmp/clang-setup.uYtPFT/build'
[  9%] Built target cxxabi_objects
make[2]: Leaving directory '/tmp/clang-setup.uYtPFT/build'
Makefile:151: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/tmp/clang-setup.uYtPFT/build'
Makefile:230: recipe for target 'clang_setup' failed
make: *** [clang_setup] Error 2

  compilation failure; you can try running

    make clean
    ./build-infer.sh --yes --opam-switch 4.05.0+flambda

The command '/bin/sh -c mkdir /tmp-infer && cd /tmp-infer &&     git clone -n https://github.com/facebook/infer.git &&     cd infer && git checkout ${INFER_GIT_SHA1} &&     ./build-infer.sh --yes --opam-switch 4.05.0+flambda &&     make install &&     rm -rf /root/.opam && rm -rf /tmp-infer' returned a non-zero code: 1
paulp commented 6 years ago

@kylewayman You can get a bit further if you add a RUN ln -s /usr/include/locale.h /usr/include/xlocale.h and that should be innocuous, but I hit something else next and decided brute forcing through the errors could wait.

KoenDG commented 6 years ago

@kylewayman The command output makes it look like you didn't replaced the ${INFER_GIT_SHA1}, it seems

You need to replace that with an actual git commit SHA1, which can be found here: https://github.com/facebook/infer/commits/master

The latest, at time of writing, being 2c6fb16636f75abd87b3a584428447767181aa07

As can be seen here: https://github.com/facebook/infer/commit/2c6fb16636f75abd87b3a584428447767181aa07

Zialus commented 6 years ago

@KoenDG I get the exact same error as @kylewayman when using 2c6fb16636f75abd87b3a584428447767181aa07

Are you sure you didn't change something else?

KoenDG commented 6 years ago

@Zialus now that you mention it, I only built java, adding the --java flag to ./build-infer.sh

--java or --java-only I'm not sure anymore.

bulwahn commented 6 years ago

@kylewayman @Zialus I also tried to use 17.10 instead of 17.04 and ran into the same problem as you when trying to compile clang. I am just retrying with debian:buster; if that does not help one would have to look into getting the right clang version that can actually compile with a recent ubuntu version and works with facebook's clang plugins.

KoenDG commented 6 years ago

Also got it working with the last commit on the 0.13 tag: https://github.com/facebook/infer/commits/v0.13.0

Again, only for Java

EDIT: This commit: dbdfb24be484384fa075b48b35723fc3b933eda1

bulwahn commented 6 years ago

I revisited my Dockerfile and could build the docker image (with some strange intermediate errors that don't impact the overall build though). For that, I changed from ubuntu 17.04 back to the ubuntu LTS 16.04. So here is the Dockerfile:

FROM ubuntu:16.04

RUN apt-get update && \
    apt-get install -y \
            aspcud \
            curl \
            opam \
            pkg-config \
            autoconf \
            libsqlite3-dev \
            zlib1g-dev \
            cmake \
            libc6-dev \
            libc6-i386 \
            lib32z1 \
            lib32stdc++6 \
            openjdk-8-jdk-headless && \
    apt-get install -y git

RUN mkdir /tmp-infer && cd /tmp-infer && \
    git clone -n https://github.com/facebook/infer.git && \
    cd infer && git checkout ${INFER_GIT_SHA1} && \
    ./build-infer.sh --yes --opam-switch 4.05.0+flambda && \
    make install && \
    rm -rf /root/.opam && rm -rf /tmp-infer

Notice, that this Dockerfile is a template; I replaced INFER_GIT_SHA1 with 80b3d08 (the current commit on master) and I could build infer with clang support.

paulp commented 6 years ago

@bulwahn Thanks for that. I pushed it a little further, avoiding cloning the entire infer history just to get the one revision, and other minor changes (I find this style of formatting multi-line statements less error-prone.)

FROM ubuntu:16.04

ENV DEBIAN_FRONTEND="noninteractive"
ENV OCAML_VERSION="4.05.0+flambda"
ENV INFER_SHA="8a9fcdc4"

RUN apt-get update && \
    apt-get install -y \
            aspcud \
            autoconf \
            cmake \
            curl \
            git \
            lib32stdc++6 \
            lib32z1 \
            libc6-dev \
            libc6-i386 \
            libsqlite3-dev \
            opam \
            openjdk-8-jdk-headless \
            pkg-config \
            wget \
            zlib1g-dev

RUN    mkdir /tmp-infer \
    && cd /tmp-infer \
    && wget -q "https://github.com/facebook/infer/archive/$INFER_SHA.zip" \
    && unzip -q *.zip \
    && rm -f *.zip \
    && cd infer* \
    && git clone --depth=1 "https://github.com/facebook/facebook-clang-plugins" \
    && ./build-infer.sh --yes --opam-switch $OCAML_VERSION \
    && make install \
    && rm -rf /root/.opam /tmp-infer

My docker container ran out of memory when this was 95% of the way to building the clang support, but I take that as provisional evidence this works as given.

kylewayman commented 6 years ago

@paulp your version gets me to about 50% and then fails here:

[ 49%] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/ConstantInitBuilder.cpp.o
[ 50%] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/CoverageMappingGen.cpp.o
[ 50%] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/ItaniumCXXABI.cpp.o
[ 50%] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/MacroPPCallbacks.cpp.o
[ 50%] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/MicrosoftCXXABI.cpp.o
[ 50%] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/ModuleBuilder.cpp.o
[ 50%] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/ObjectFilePCHContainerOperations.cpp.o
[ 50%] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/SanitizerMetadata.cpp.o
[ 50%] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/SwiftCallingConv.cpp.o
[ 50%] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/TargetInfo.cpp.o
[ 50%] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/VarBypassDetector.cpp.o
[ 50%] Linking CXX static library ../../../../lib/libclangCodeGen.a
/usr/bin/ar: ../../../../lib/libclangCodeGen.a: No space left on device
make[3]: *** [lib/libclangCodeGen.a] Error 1
make[3]: *** Deleting file 'lib/libclangCodeGen.a'
tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/build.make:1472: recipe for target 'lib/libclangCodeGen.a' failed
make[3]: Leaving directory '/tmp/clang-setup.sKopBP/build'
make[2]: *** [tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/all] Error 2
CMakeFiles/Makefile2:28683: recipe for target 'tools/clang/lib/CodeGen/CMakeFiles/clangCodeGen.dir/all' failed
make[2]: Leaving directory '/tmp/clang-setup.sKopBP/build'
make[1]: *** [all] Error 2
Makefile:149: recipe for target 'all' failed
make[1]: Leaving directory '/tmp/clang-setup.sKopBP/build'
make: *** [clang_setup] Error 2
Makefile:237: recipe for target 'clang_setup' failed

  compilation failure; you can try running

    make clean
    ./build-infer.sh --yes --opam-switch 4.05.0+flambda

The command '/bin/sh -c mkdir /tmp-infer     && cd /tmp-infer     && wget -q "https://github.com/facebook/infer/archive/$INFER_SHA.zip"     && unzip -q *.zip     && rm -f *.zip     && cd infer*     && git clone --depth=1 "https://github.com/facebook/facebook-clang-plugins"     && ./build-infer.sh --yes --opam-switch $OCAML_VERSION     && make install     && rm -rf /root/.opam /tmp-infer' returned a non-zero code: 1

Not sure why it says no space left on disk. The host OS has plenty of space left.

paulp commented 6 years ago

@kylewayman The VM image used by docker has hit its size limit, see here. You might want to try this:

docker run --rm --net=host --pid=host --privileged -it justincormack/nsenter1 /sbin/fstrim /var/lib

And look at the before/after size of

~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2

In very recent versions of osx docker you can resize that file in the gui preferences, but those versions introduced other problems and I had to roll back.

Other options are offered in that link and elsewhere.

jvillard commented 6 years ago

We just pushed a new version 0.13.1 to fix the 0.13.0 release and updated the Dockerfile. This should fix this issue. Sorry about the breakage, I hope it works now.