facebook / infer

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

Can't install infer 0.9.3 in linux #483

Closed CrashHunter closed 7 years ago

CrashHunter commented 8 years ago

After i download infer-linux64-v0.9.3.tar.xz and tar it

I got the following error when I run ./build-infer.sh

make[2]: *** [models/infer/report.json] Error 1
make[2]: Leaving directory `/home/jenkins/infer-linux64-v0.9.3/infer/models/java'
make[1]: *** [java] Error 2
make[1]: Leaving directory `/home/jenkins/infer-linux64-v0.9.3/infer/models'
make: *** [infer] Error 2

How to fix it?

jvillard commented 8 years ago

The error is not shown in the part of the logs that you pasted. Can you paste the full output?

CrashHunter commented 8 years ago

➜ infer-linux64-v0.9.3 sudo ./build-infer.sh initializing opam... [WARNING] Running as root is not recommended OPAM has already been initialized. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

  1. To configure OPAM in the current shell session, you need to run:

    eval opam config env

  2. To correctly configure OPAM for subsequent use, add the following line to your profile file (for instance ~/.zshrc):

    . /home/dalei/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true

  3. To avoid issues related to non-system installations of ocamlfind add the following lines to ~/.ocamlinit (create it if necessary):

    let () = try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH") with Not_found -> () ;;

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

[WARNING] Running as root is not recommended [ERROR] "/home/dalei/.opam/infer-4.02.3" already exists, please choose a different name [WARNING] Running as root is not recommended installing infer dependencies... [WARNING] Running as root is not recommended [WARNING] Running as root is not recommended [WARNING] Running as root is not recommended [WARNING] Running as root is not recommended Package infer-deps-Gdtz does not exist, create as a NEW package ? [Y/n] y infer-deps-Gdtz is now path-pinned to /home/jenkins/infer-linux64-v0.9.3/infer-deps-Gdtz

[infer-deps-Gdtz] /home/jenkins/infer-linux64-v0.9.3/infer-deps-Gdtz/ synchronized [infer-deps-Gdtz] Installing new package description from /home/jenkins/infer-linux64-v0.9.3/infer-deps-Gdtz

[WARNING] Running as root is not recommended

=-=- Synchronising pinned packages =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= [infer-deps-Gdtz] /home/jenkins/infer-linux64-v0.9.3/infer-deps-Gdtz/ already up-to-date [WARNING] Running as root is not recommended infer-deps-Gdtz is now unpinned from path /home/jenkins/infer-linux64-v0.9.3/infer-deps-Gdtz preparing build... checking for .release... yes checking for .facebook... no checking whether to use the compilers in /home/jenkins/infer-linux64-v0.9.3/facebook-clang-plugins/clang/install/bin... yes checking for shasum... shasum checking for python2.7... python2.7 checking for xcode-select... no checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether /home/jenkins/infer-linux64-v0.9.3/facebook-clang-plugins/clang/install/bin/clang accepts -g... yes checking for /home/jenkins/infer-linux64-v0.9.3/facebook-clang-plugins/clang/install/bin/clang option to accept ISO C89... none needed checking for gawk... no checking for mawk... mawk checking for a BSD-compatible install... /usr/bin/install -c checking whether ln -s works... yes checking whether make sets $(MAKE)... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking how to run the C preprocessor... /home/jenkins/infer-linux64-v0.9.3/facebook-clang-plugins/clang/install/bin/clang -E checking whether we are using the GNU C++ compiler... yes checking whether /home/jenkins/infer-linux64-v0.9.3/facebook-clang-plugins/clang/install/bin/clang++ accepts -g... yes checking if the C/C++ compiler is recent enough... yes checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking for inttypes.h... (cached) yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking locale.h usability... yes checking locale.h presence... yes checking for locale.h... yes checking malloc.h usability... yes checking malloc.h presence... yes checking for malloc.h... yes checking stddef.h usability... yes checking stddef.h presence... yes checking for stddef.h... yes checking for stdint.h... (cached) yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking sys/mount.h usability... yes checking sys/mount.h presence... yes checking for sys/mount.h... yes checking sys/param.h usability... yes checking sys/param.h presence... yes checking for sys/param.h... yes checking sys/socket.h usability... yes checking sys/socket.h presence... yes checking for sys/socket.h... yes checking sys/statfs.h usability... yes checking sys/statfs.h presence... yes checking for sys/statfs.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking for unistd.h... (cached) yes checking wchar.h usability... yes checking wchar.h presence... yes checking for wchar.h... yes checking wctype.h usability... yes checking wctype.h presence... yes checking for wctype.h... yes checking for ocamlc... ocamlc OCaml version is 4.02.3 OCaml library path is /home/dalei/.opam/infer-4.02.3/lib/ocaml checking for ocamlopt... ocamlopt checking for ocamlc.opt... ocamlc.opt checking for ocamlopt.opt... ocamlopt.opt checking for dynlink.cmxa... yes checking for ocaml... ocaml checking for ocamldep... ocamldep checking for ocamlmktop... ocamlmktop checking for ocamlmklib... ocamlmklib checking for ocamldoc... ocamldoc checking for ocamlbuild... ocamlbuild checking if OCaml version is >= 4.02.3... yes checking for ocamlfind... ocamlfind checking for ocamllex... ocamllex checking for ocamllex.opt... ocamllex.opt checking for ocamlyacc... ocamlyacc checking for OCaml findlib package atdgen version 1.6.0... /home/dalei/.opam/infer-4.02.3/lib/atdgen checking for OCaml findlib package biniou... /home/dalei/.opam/infer-4.02.3/lib/biniou checking for OCaml findlib package camlzip... /home/dalei/.opam/infer-4.02.3/lib/camlzip/../zip checking for OCaml findlib package easy-format... /home/dalei/.opam/infer-4.02.3/lib/easy-format checking for OCaml findlib package extlib version 1.5.4... /home/dalei/.opam/infer-4.02.3/lib/extlib checking for OCaml findlib package oUnit version 2.0.0... /home/dalei/.opam/infer-4.02.3/lib/oUnit checking for OCaml findlib package reason... /home/dalei/.opam/infer-4.02.3/lib/reason checking for OCaml findlib package yojson... /home/dalei/.opam/infer-4.02.3/lib/yojson checking for rebuild... rebuild checking for java... java checking for javac... javac checking for OCaml findlib package javalib version 2.3.1... /home/dalei/.opam/infer-4.02.3/lib/javalib checking for OCaml findlib package sawja version 1.5.1... /home/dalei/.opam/infer-4.02.3/lib/sawja checking for OCaml findlib package ptrees... /home/dalei/.opam/infer-4.02.3/lib/ptrees checking for JAVA_HOME... /usr/lib/jvm/java-7-openjdk-amd64/jre/.. checking for atdgen... atdgen checking which version of Buck to use... a965937ccdadf8119a98ab766c3feb0708dc424e checking for getconf... getconf checking the number of cpus the build host has... 4 configure: saving configure flags to ./config.flags configure: creating ./config.status config.status: creating Makefile.config (rm -vf infer/bin/infer && \ cd infer/bin && \ ln -s -v ../lib/infer infer) export CC="/home/jenkins/infer-linux64-v0.9.3/facebook-clang-plugins/clang/install/bin/clang" CFLAGS="-g -O2"; \ export CXX="/home/jenkins/infer-linux64-v0.9.3/facebook-clang-plugins/clang/install/bin/clang++" CXXFLAGS="-g -O2"; \ export CPP="/home/jenkins/infer-linux64-v0.9.3/facebook-clang-plugins/clang/install/bin/clang -E" LDFLAGS="" LIBS=""; \ /home/jenkins/infer-linux64-v0.9.3/facebook-clang-plugins/clang/setup.sh (rm -vf infer/bin/inferTraceBugs && \ cd infer/bin && \ ln -s -v ../lib/python/inferTraceBugs inferTraceBugs) 'infer' -> '../lib/infer' 'inferTraceBugs' -> '../lib/python/inferTraceBugs' Clang is already installed according to /home/jenkins/infer-linux64-v0.9.3/facebook-clang-plugins/clang/installed.version Nothing to do, exiting. make -C /home/jenkins/infer-linux64-v0.9.3/infer/src infer make[1]: Entering directory /home/jenkins/infer-linux64-v0.9.3/infer/src' TMPFILE=$(mktemp backend/version.ml.tmp.XXXX); \ INFER_GIT_COMMIT=$(git --work-tree=../.. --git-dir=../../.git rev-parse --short HEAD || printf "unknown"); \ INFER_GIT_BRANCH=$(git --work-tree=../.. --git-dir=../../.git rev-parse --abbrev-ref HEAD || printf "unknown"); \ sed \ -e 's|@INFER_MAJOR[@]|0|g' \ -e 's|@INFER_MINOR[@]|9|g' \ -e 's|@INFER_PATCH[@]|3|g' \ -e 's|@IS_RELEASE_TREE[@]|yes|g' \ -e "s|@INFER_GIT_COMMIT[@]|$INFER_GIT_COMMIT|g" \ -e "s|@INFER_GIT_BRANCH[@]|$INFER_GIT_BRANCH|g" \ backend/version.ml.in > "$TMPFILE"; \ /usr/bin/install -c -m 644 -C "$TMPFILE" backend/version.ml; \ rm -f "$TMPFILE" /bin/mkdir -p /home/jenkins/infer-linux64-v0.9.3/infer/_build atdgen -t checkers/stacktree.atd -o checkers/stacktree fatal: Not a git repository: '../../.git' atdgen -j checkers/stacktree.atd -o checkers/stacktree atdgen -t backend/jsonbug.atd -o backend/jsonbug fatal: Not a git repository: '../../.git' atdgen -j backend/jsonbug.atd -o backend/jsonbug atdgen -t /home/jenkins/infer-linux64-v0.9.3/facebook-clang-plugins/clang-ocaml/build/clang_ast.atd -o clang/clang_ast atdgen -b /home/jenkins/infer-linux64-v0.9.3/facebook-clang-plugins/clang-ocaml/build/clang_ast.atd -o clang/clang_ast atdgen -j /home/jenkins/infer-linux64-v0.9.3/facebook-clang-plugins/clang-ocaml/build/clang_ast.atd -o clang/clang_ast atdgen -v /home/jenkins/infer-linux64-v0.9.3/facebook-clang-plugins/clang-ocaml/build/clang_ast.atd -o clang/clang_ast /usr/bin/install -c -m 644 -C /home/jenkins/infer-linux64-v0.9.3/facebook-clang-plugins/clang-ocaml/build/clang_ast_proj.ml clang/clang_ast_proj.ml /usr/bin/install -c -m 644 -C /home/jenkins/infer-linux64-v0.9.3/facebook-clang-plugins/clang-ocaml/build/clang_ast_proj.mli clang/clang_ast_proj.mli /usr/bin/install -c -m 644 -C /home/jenkins/infer-linux64-v0.9.3/facebook-clang-plugins/clang-ocaml/clang_ast_visit.ml clang/clang_ast_visit.ml /usr/bin/install -c -m 644 -C /home/jenkins/infer-linux64-v0.9.3/facebook-clang-plugins/clang-ocaml/clang_ast_main.ml clang/clang_ast_main.ml tr -s '[*!"#\&\(\)\+,\\\.\/:;<=>\?@\[\\\\]^{|}~[:space:]]' '\n' \ < /home/jenkins/infer-linux64-v0.9.3/facebook-clang-plugins/clang-ocaml/build/clang_ast.atd \ | sort | uniq \

/home/jenkins/infer-linux64-v0.9.3/infer/etc/clang_ast.dict atdgen -t checkers/stacktree.atd -o checkers/stacktree atdgen -j checkers/stacktree.atd -o checkers/stacktree atdgen -t backend/jsonbug.atd -o backend/jsonbug atdgen -j backend/jsonbug.atd -o backend/jsonbug atdgen -t /home/jenkins/infer-linux64-v0.9.3/facebook-clang-plugins/clang-ocaml/build/clang_ast.atd -o clang/clang_ast atdgen -b /home/jenkins/infer-linux64-v0.9.3/facebook-clang-plugins/clang-ocaml/build/clang_ast.atd -o clang/clang_ast atdgen -v /home/jenkins/infer-linux64-v0.9.3/facebook-clang-plugins/clang-ocaml/build/clang_ast.atd -o clang/clang_ast atdgen -j /home/jenkins/infer-linux64-v0.9.3/facebook-clang-plugins/clang-ocaml/build/clang_ast.atd -o clang/clangast rebuild -r -cflags -g -lflags -g -cflags -short-paths -cflags -safe-string -cflags -principal -cflags -strict-formats -cflags -strict-sequence -cflags -w,+5+6+8+10+11+12+18+19+20+23+26+29+27+32+33+34+35+37+38+39+50-4-9-40-41-42-45-48 -tag-line "<{clang/clang_ast,backend/jsonbug,checkers/stacktree__}>: warn(-27-32-35-39)" -pkgs atdgen,extlib,oUnit,str,unix,yojson,zip -cflags -annot -cflags -bin-annot -j 4 -I IR -I backend -I checkers -I eradicate -I harness -I quandary -I opensource -I java -I clang -pkgs javalib,ptrees,sawja -build-dir /home/jenkins/infer-linux64-v0.9.3/infer/_build/infer backend/infer.native backend/InferAnalyze.native backend/InferPrint.native unit/inferunit.native scripts/checkCopyright.native scripts/StatsAggregator.native unit/inferunit.native java/jMain.native clang/cMain.native integration/BuckCompilationDatabase.native Finished, 813 targets (0 cached) in 00:00:34. cp -f -p /home/jenkins/infer-linux64-v0.9.3/infer/_build/infer/backend/infer.native /home/jenkins/infer-linux64-v0.9.3/infer/lib/infer cp -f -p /home/jenkins/infer-linux64-v0.9.3/infer/_build/infer/backend/InferAnalyze.native /home/jenkins/infer-linux64-v0.9.3/infer/bin/InferAnalyze cp -f -p /home/jenkins/infer-linux64-v0.9.3/infer/_build/infer/backend/InferPrint.native /home/jenkins/infer-linux64-v0.9.3/infer/bin/InferPrint cp -f -p /home/jenkins/infer-linux64-v0.9.3/infer/_build/infer/scripts/checkCopyright.native /home/jenkins/infer-linux64-v0.9.3/scripts/checkCopyright cp -f -p /home/jenkins/infer-linux64-v0.9.3/infer/_build/infer/scripts/StatsAggregator.native /home/jenkins/infer-linux64-v0.9.3/infer/bin/InferStatsAggregator cp -f -p /home/jenkins/infer-linux64-v0.9.3/infer/_build/infer/unit/inferunit.native /home/jenkins/infer-linux64-v0.9.3/infer/bin/InferUnit cp -f -p /home/jenkins/infer-linux64-v0.9.3/infer/_build/infer/java/jMain.native /home/jenkins/infer-linux64-v0.9.3/infer/bin/InferJava cp -f -p /home/jenkins/infer-linux64-v0.9.3/infer/_build/infer/clang/cMain.native /home/jenkins/infer-linux64-v0.9.3/infer/bin/InferClang cp -f -p /home/jenkins/infer-linux64-v0.9.3/infer/build/infer/integration/BuckCompilationDatabase.native /home/jenkins/infer-linux64-v0.9.3/infer/bin/InferBuckCompilationDatabase rsync -a --include '/' --include '.annot' --exclude '' /home/jenkins/infer-linux64-v0.9.3/infer/_build/infer/ /home/jenkins/infer-linux64-v0.9.3/infer/src/_build/ make[1]: Leaving directory /home/jenkins/infer-linux64-v0.9.3/infer/src' make -C /home/jenkins/infer-linux64-v0.9.3/infer/annotations make[1]: Entering directory/home/jenkins/infer-linux64-v0.9.3/infer/annotations' mkdir -p 'annot_classes' javac -source '1.7' -target '1.7' -cp /home/jenkins/infer-linux64-v0.9.3/dependencies/java/jsr-305/jsr305.jar com/facebook/infer/annotation/SuppressNullMethodCall.java com/facebook/infer/annotation/Mutable.java com/facebook/infer/annotation/IntegritySource.java com/facebook/infer/annotation/IgnoreAllocations.java com/facebook/infer/annotation/Verify.java com/facebook/infer/annotation/SuppressFieldNotInitialized.java com/facebook/infer/annotation/Present.java com/facebook/infer/annotation/SuppressViewNullability.java com/facebook/infer/annotation/TrueOnNull.java com/facebook/infer/annotation/NoAllocation.java com/facebook/infer/annotation/Strict.java com/facebook/infer/annotation/FalseOnNull.java com/facebook/infer/annotation/SuppressReturnOverAnnotated.java com/facebook/infer/annotation/IntegritySink.java com/facebook/infer/annotation/Initializer.java com/facebook/infer/annotation/SuppressNullFieldAccess.java com/facebook/infer/annotation/SuppressParameterNotNullable.java com/facebook/infer/annotation/Assertions.java com/facebook/infer/annotation/SuppressFieldNotNullable.java com/facebook/infer/annotation/PerformanceCritical.java com/facebook/infer/annotation/PrivacySink.java com/facebook/infer/annotation/Expensive.java com/facebook/infer/annotation/OkToExtend.java com/facebook/infer/annotation/PrivacySource.java -d 'annot_classes' mkdir -p 'processor_classes' javac -source '1.7' -target '1.7' com/facebook/infer/annotprocess/Preconditions.java com/facebook/infer/annotprocess/CollectSuppressWarnings.java com/facebook/infer/annotprocess/JSONOutputUtils.java -cp .:/usr/lib/jvm/java-7-openjdk-amd64/jre/../lib/tools.jar -d 'processor_classes' cd 'annot_classes' && jar cvf /home/jenkins/infer-linux64-v0.9.3/infer/annotations/annotations.jar com Note: com/facebook/infer/annotprocess/CollectSuppressWarnings.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. jar cvMf processor.jar -C resources META-INF -C 'processorclasses' com added manifest adding: com/(in = 0) (out= 0)(stored 0%) adding: com/facebook/(in = 0) (out= 0)(stored 0%) adding: com/facebook/infer/(in = 0) (out= 0)(stored 0%) adding: com/facebook/infer/annotation/(in = 0) (out= 0)(stored 0%) adding: com/facebook/infer/annotation/SuppressNullFieldAccess.class(in = 471) (out= 287)(deflated 39%) adding: com/facebook/infer/annotation/TrueOnNull.class(in = 401) (out= 243)(deflated 39%) adding: com/facebook/infer/annotation/IntegritySink.class(in = 410) (out= 247)(deflated 39%) adding: com/facebook/infer/annotation/Expensive.class(in = 411) (out= 250)(deflated 39%) adding: com/facebook/infer/annotation/PrivacySink.class(in = 406) (out= 245)(deflated 39%) adding: com/facebook/infer/annotation/IntegritySource.class(in = 441) (out= 266)(deflated 39%) adding: com/facebook/infer/annotation/IgnoreAllocations.class(in = 415) (out= 246)(deflated 40%) adding: com/facebook/infer/annotation/Strict.class(in = 515) (out= 317)(deflated 38%) adding: com/facebook/infer/annotation/NoAllocation.class(in = 405) (out= 242)(deflated 40%) adding: com/facebook/infer/annotation/SuppressParameterNotNullable.class(in = 481) (out= 290)(deflated 39%) adding: com/facebook/infer/annotation/SuppressReturnOverAnnotated.class(in = 479) (out= 286)(deflated 40%) adding: com/facebook/infer/annotation/Verify.class(in = 439) (out= 275)(deflated 37%) adding: com/facebook/infer/annotation/SuppressNullMethodCall.class(in = 469) (out= 287)(deflated 38%) adding: com/facebook/infer/annotation/PrivacySource.class(in = 437) (out= 265)(deflated 39%) adding: com/facebook/infer/annotation/SuppressViewNullability.class(in = 426) (out= 252)(deflated 40%) adding: com/facebook/infer/annotation/Assertions.class(in = 2207) (out= 911)(deflated 58%) adding: com/facebook/infer/annotation/Mutable.class(in = 439) (out= 273)(deflated 37%) adding: com/facebook/infer/annotation/Initializer.class(in = 447) (out= 277)(deflated 38%) adding: com/facebook/infer/annotation/OkToExtend.class(in = 310) (out= 203)(deflated 34%) adding: com/facebook/infer/annotation/PerformanceCritical.class(in = 431) (out= 258)(deflated 40%) adding: com/facebook/infer/annotation/Present.class(in = 456) (out= 282)(deflated 38%) adding: com/facebook/infer/annotation/SuppressFieldNotNullable.class(in = 473) (out= 288)(deflated 39%) adding: com/facebook/infer/annotation/SuppressFieldNotInitialized.class(in = 479) (out= 290)(deflated 39%) adding: com/facebook/infer/annotation/FalseOnNull.class(in = 403) (out= 244)(deflated 39%) adding: META-INF/(in = 0) (out= 0)(stored 0%) adding: META-INF/services/(in = 0) (out= 0)(stored 0%) adding: META-INF/services/javax.annotation.processing.Processor(in = 56) (out= 56)(deflated 0%) adding: com/(in = 0) (out= 0)(stored 0%) adding: com/facebook/(in = 0) (out= 0)(stored 0%) adding: com/facebook/infer/(in = 0) (out= 0)(stored 0%) adding: com/facebook/infer/annotprocess/(in = 0) (out= 0)(stored 0%) adding: com/facebook/infer/annotprocess/CollectSuppressWarnings.class(in = 5071) (out= 2507)(deflated 50%) adding: com/facebook/infer/annotprocess/JSONOutputUtils.class(in = 1675) (out= 893)(deflated 46%) adding: com/facebook/infer/annotprocess/Preconditions.class(in = 533) (out= 339)(deflated 36%) mv processor.jar /home/jenkins/infer-linux64-v0.9.3/infer/lib/java/processor.jar make[1]: Leaving directory /home/jenkins/infer-linux64-v0.9.3/infer/annotations' make -C /home/jenkins/infer-linux64-v0.9.3/infer/models all make[1]: Entering directory/home/jenkins/infer-linux64-v0.9.3/infer/models' rm -vf /home/jenkins/infer-linux64-v0.9.3/infer/lib/specs/.specs make c cpp make -C java install make[2]: Entering directory /home/jenkins/infer-linux64-v0.9.3/infer/models' make -C c install make -C cpp install make[3]: Entering directory/home/jenkins/infer-linux64-v0.9.3/infer/models/cpp' make -C src clean make[4]: Entering directory /home/jenkins/infer-linux64-v0.9.3/infer/models/cpp/src' echo c_src/glib_cxx.o c_src/infer_builtins_cxx.o c_src/libc_basic_cxx.o c_src/math_cxx.o c_src/wchar_cxx.o c_src/wctype_cxx.o c_src/xlib_cxx.o shared_ptr.o type_info.o make[3]: Entering directory/home/jenkins/infer-linux64-v0.9.3/infer/models/c' make -C src clean c_src/glib_cxx.o c_src/infer_builtins_cxx.o c_src/libc_basic_cxx.o c_src/math_cxx.o c_src/wchar_cxx.o c_src/wctype_cxx.o c_src/xlib_cxx.o shared_ptr.o type_info.o make[4]: Leaving directory /home/jenkins/infer-linux64-v0.9.3/infer/models/cpp/src' make[4]: Entering directory/home/jenkins/infer-linux64-v0.9.3/infer/models/c/src' INFER_ANALYZE_MODELS=1 /home/jenkins/infer-linux64-v0.9.3/infer/bin/infer -o out/ --models_mode --no_failures_allowed --cxx -- make -C src make[4]: Leaving directory /home/jenkins/infer-linux64-v0.9.3/infer/models/c/src' INFER_ANALYZE_MODELS=1 /home/jenkins/infer-linux64-v0.9.3/infer/bin/infer -o out/ --models_mode --no_failures_allowed -- make -C src make[2]: Entering directory/home/jenkins/infer-linux64-v0.9.3/infer/models/java' mkdir -p models INFER_ANALYZE_MODELS=1 /home/jenkins/infer-linux64-v0.9.3/infer/lib/infer --buck --analyzer infer --multicore 1 -- javac -bootclasspath /home/jenkins/infer-linux64-v0.9.3/infer/lib/java/android/android-19.jar -d models -classpath /home/jenkins/infer-linux64-v0.9.3/dependencies/java/jackson/jackson-2.2.3.jar:/home/jenkins/infer-linux64-v0.9.3/infer/annotations/annotations.jar src/junit/framework/Assert.java src/com/google/common/base/Preconditions.java src/com/google/common/base/Optional.java src/com/google/common/collect/Iterators.java src/com/google/common/io/Closeables.java src/com/fasterxml/jackson/core/JsonFactory.java src/com/fasterxml/jackson/core/json/UTF8StreamJsonParser.java src/com/fasterxml/jackson/core/JsonParser.java src/com/squareup/okhttp/internal/Util.java src/com/squareup/okhttp/internal/StrictLineReader.java src/com/facebook/infer/models/InferCloseables.java src/com/facebook/infer/models/InferBuiltins.java src/com/facebook/infer/models/InferArray.java src/com/facebook/infer/models/InferUtils.java src/com/facebook/infer/models/InferUndefined.java src/com/facebook/infer/models/InferTaint.java src/dalvik/system/CloseGuard.java src/android/provider/MediaStore.java src/android/app/Activity.java src/android/app/DownloadManager.java src/android/database/CrossProcessCursor.java src/android/database/Cursor.java src/android/database/CrossProcessCursorWrapper.java src/android/database/CursorWrapper.java src/android/database/AbstractCursor.java src/android/database/sqlite/SQLiteCursor.java src/android/database/sqlite/SQLiteDatabase.java src/android/database/sqlite/SQLiteQueryBuilder.java src/android/database/sqlite/SQLiteDatabaseConfiguration.java src/android/database/sqlite/SQLiteConnectionPool.java src/android/content/IContentService.java src/android/content/ContentProviderClient.java src/android/content/ContentValues.java src/android/content/Context.java src/android/content/IContentProvider.java src/android/content/ContentResolver.java src/android/content/res/Resources.java src/android/content/res/TypedArray.java src/android/text/TextUtils.java src/java/net/HttpURLConnection.java src/java/net/Socket.java src/java/net/ServerSocket.java src/java/net/JarURLConnection.java src/java/net/URLConnection.java src/java/net/PlainSocketImpl.java src/java/net/URL.java src/java/nio/channels/FileChannel.java src/java/nio/channels/spi/AbstractInterruptibleChannel.java src/java/nio/FileChannelImpl.java src/java/lang/Process.java src/java/lang/Object.java src/java/lang/reflect/Array.java src/java/lang/NullPointerException.java src/java/lang/Thread.java src/java/lang/ProcessManager.java src/java/lang/String.java src/java/lang/Class.java src/java/lang/Integer.java src/java/lang/Runtime.java src/java/lang/System.java src/java/security/DigestOutputStream.java src/java/security/DigestInputStream.java src/java/io/PipedInputStream.java src/java/io/ByteArrayOutputStream.java src/java/io/ByteArrayInputStream.java src/java/io/BufferedWriter.java src/java/io/BufferedReader.java src/java/io/FileWriter.java src/java/io/Reader.java src/java/io/PushbackInputStream.java src/java/io/BufferedInputStream.java src/java/io/ObjectOutputStream.java src/java/io/PipedOutputStream.java src/java/io/PipedWriter.java src/java/io/FileInputStream.java src/java/io/InputStreamReader.java src/java/io/PipedReader.java src/java/io/StringWriter.java src/java/io/FilterReader.java src/java/io/PushbackReader.java src/java/io/FileReader.java src/java/io/PrintStream.java src/java/io/StringReader.java src/java/io/DataInputStream.java src/java/io/FileOutputStream.java src/java/io/PrintWriter.java src/java/io/ObjectInputStream.java src/java/io/Writer.java src/java/io/FilterInputStream.java src/java/io/FilterOutputStream.java src/java/io/DataOutputStream.java src/java/io/File.java src/java/io/InputStream.java src/java/io/RandomAccessFile.java src/java/io/BufferedOutputStream.java src/java/io/OutputStreamWriter.java src/java/io/OutputStream.java src/java/util/HashMap.java src/java/util/Scanner.java src/java/util/jar/JarInputStream.java src/java/util/jar/JarFile.java src/java/util/jar/JarOutputStream.java src/java/util/zip/InflaterInputStream.java src/java/util/zip/ZipFile.java src/java/util/zip/DeflaterInputStream.java src/java/util/zip/GZIPOutputStream.java src/java/util/zip/Inflater.java src/java/util/zip/CheckedInputStream.java src/java/util/zip/CheckedOutputStream.java src/java/util/zip/DeflaterOutputStream.java src/java/util/zip/ZipInputStream.java src/java/util/zip/Deflater.java src/java/util/zip/InflaterOutputStream.java src/java/util/zip/GZIPInputStream.java src/java/util/zip/ZipOutputStream.java src/java/util/Vector.java src/java/util/Properties.java src/java/util/concurrent/Lock.java src/java/util/concurrent/ReentrantLock.java src/javax/crypto/CipherInputStream.java src/javax/crypto/CipherOutputStream.java src/javax/net/SocketFactory.java src/javax/net/ssl/HttpsURLConnection.java src/javax/net/ssl/SSLSocketFactory.java src/javax/net/ssl/HostnameVerifier.java Traceback (most recent call last): File "/home/jenkins/infer-linux64-v0.9.3/infer/lib/python/infer.py", line 230, in main() File "/home/jenkins/infer-linux64-v0.9.3/infer/lib/python/infer.py", line 168, in main str(locale.getdefaultlocale())) File "/usr/lib/python2.7/locale.py", line 543, in getdefaultlocale Traceback (most recent call last): File "/home/jenkins/infer-linux64-v0.9.3/infer/lib/python/infer.py", line 230, in main() File "/home/jenkins/infer-linux64-v0.9.3/infer/lib/python/infer.py", line 168, in main str(locale.getdefaultlocale())) File "/usr/lib/python2.7/locale.py", line 543, in getdefaultlocale Traceback (most recent call last): File "/home/jenkins/infer-linux64-v0.9.3/infer/lib/python/infer.py", line 230, in main() File "/home/jenkins/infer-linux64-v0.9.3/infer/lib/python/infer.py", line 168, in main str(locale.getdefaultlocale())) File "/usr/lib/python2.7/locale.py", line 543, in getdefaultlocale return _parse_localename(localename) return _parse_localename(localename) File "/usr/lib/python2.7/locale.py", line 475, in _parse_localename File "/usr/lib/python2.7/locale.py", line 475, in _parse_localename raise ValueError, 'unknown locale: %s' % localename return _parse_localename(localename) ValueError : raise ValueError, 'unknown locale: %s' % localename unknown locale: UTF-8 ValueError: unknown locale: UTF-8 File "/usr/lib/python2.7/locale.py", line 475, in _parse_localename raise ValueError, 'unknown locale: %s' % localename ValueError: unknown locale: UTF-8 Failed to execute: /home/jenkins/infer-linux64-v0.9.3/infer/lib/python/infer.py -j 4 --out out/ --project_root /home/jenkins/infer-linux64-v0.9.3/infer/models/c -- make -C src Failed to execute: /home/jenkins/infer-linux64-v0.9.3/infer/lib/python/infer.py --analyzer infer --buck -j 1 --out /home/jenkins/infer-linux64-v0.9.3/infer/models/java/infer-out --project_root /home/jenkins/infer-linux64-v0.9.3/infer/models/java -- javac -bootclasspath /home/jenkins/infer-linux64-v0.9.3/infer/lib/java/android/android-19.jar -d models -classpath /home/jenkins/infer-linux64-v0.9.3/dependencies/java/jackson/jackson-2.2.3.jar:/home/jenkins/infer-linux64-v0.9.3/infer/annotations/annotations.jar src/junit/framework/Assert.java src/com/google/common/base/Preconditions.java src/com/google/common/base/Optional.java src/com/google/common/collect/Iterators.java src/com/google/common/io/Closeables.java src/com/fasterxml/jackson/core/JsonFactory.java src/com/fasterxml/jackson/core/json/UTF8StreamJsonParser.java src/com/fasterxml/jackson/core/JsonParser.java src/com/squareup/okhttp/internal/Util.java src/com/squareup/okhttp/internal/StrictLineReader.java src/com/facebook/infer/models/InferCloseables.java src/com/facebook/infer/models/InferBuiltins.java src/com/facebook/infer/models/InferArray.java src/com/facebook/infer/models/InferUtils.java src/com/facebook/infer/models/InferUndefined.java src/com/facebook/infer/models/InferTaint.java src/dalvik/system/CloseGuard.java src/android/provider/MediaStore.java src/android/app/Activity.java src/android/app/DownloadManager.java src/android/database/CrossProcessCursor.java src/android/database/Cursor.java src/android/database/CrossProcessCursorWrapper.java src/android/database/CursorWrapper.java src/android/database/AbstractCursor.java src/android/database/sqlite/SQLiteCursor.java src/android/database/sqlite/SQLiteDatabase.java src/android/database/sqlite/SQLiteQueryBuilder.java src/android/database/sqlite/SQLiteDatabaseConfiguration.java src/android/database/sqlite/SQLiteConnectionPool.java src/android/content/IContentService.java src/android/content/ContentProviderClient.java src/android/content/ContentValues.java src/android/content/Context.java src/android/content/IContentProvider.java src/android/content/ContentResolver.java src/android/content/res/Resources.java src/android/content/res/TypedArray.java src/android/text/TextUtils.java src/java/net/HttpURLConnection.java src/java/net/Socket.java src/java/net/ServerSocket.java src/java/net/JarURLConnection.java src/java/net/URLConnection.java src/java/net/PlainSocketImpl.java src/java/net/URL.java src/java/nio/channels/FileChannel.java src/java/nio/channels/spi/AbstractInterruptibleChannel.java src/java/nio/FileChannelImpl.java src/java/lang/Process.java src/java/lang/Object.java src/java/lang/reflect/Array.java src/java/lang/NullPointerException.java src/java/lang/Thread.java src/java/lang/ProcessManager.java src/java/lang/String.java src/java/lang/Class.java src/java/lang/Integer.java src/java/lang/Runtime.java src/java/lang/System.java src/java/security/DigestOutputStream.java src/java/security/DigestInputStream.java src/java/io/PipedInputStream.java src/java/io/ByteArrayOutputStream.java src/java/io/ByteArrayInputStream.java src/java/io/BufferedWriter.java src/java/io/BufferedReader.java src/java/io/FileWriter.java src/java/io/Reader.java src/java/io/PushbackInputStream.java src/java/io/BufferedInputStream.java src/java/io/ObjectOutputStream.java src/java/io/PipedOutputStream.java src/java/io/PipedWriter.java src/java/io/FileInputStream.java src/java/io/InputStreamReader.java src/java/io/PipedReader.java src/java/io/StringWriter.java src/java/io/FilterReader.java src/java/io/PushbackReader.java src/java/io/FileReader.java src/java/io/PrintStream.java src/java/io/StringReader.java src/java/io/DataInputStream.java src/java/io/FileOutputStream.java src/java/io/PrintWriter.java src/java/io/ObjectInputStream.java src/java/io/Writer.java src/java/io/FilterInputStream.java src/java/io/FilterOutputStream.java src/java/io/DataOutputStream.java src/java/io/File.java src/java/io/InputStream.java src/java/io/RandomAccessFile.java src/java/io/BufferedOutputStream.java src/java/io/OutputStreamWriter.java src/java/io/OutputStream.java src/java/util/HashMap.java src/java/util/Scanner.java src/java/util/jar/JarInputStream.java src/java/util/jar/JarFile.java src/java/util/jar/JarOutputStream.java src/java/util/zip/InflaterInputStream.java src/java/util/zip/ZipFile.java src/java/util/zip/DeflaterInputStream.java src/java/util/zip/GZIPOutputStream.java src/java/util/zip/Inflater.java src/java/util/zip/CheckedInputStream.java src/java/util/zip/CheckedOutputStream.java src/java/util/zip/DeflaterOutputStream.java src/java/util/zip/ZipInputStream.java src/java/util/zip/Deflater.java src/java/util/zip/InflaterOutputStream.java src/java/util/zip/GZIPInputStream.java src/java/util/zip/ZipOutputStream.java src/java/util/Vector.java src/java/util/Properties.java src/java/util/concurrent/Lock.java src/java/util/concurrent/ReentrantLock.java src/javax/crypto/CipherInputStream.java src/javax/crypto/CipherOutputStream.java src/javax/net/SocketFactory.java src/javax/net/ssl/HttpsURLConnection.java src/javax/net/ssl/SSLSocketFactory.java src/javax/net/ssl/HostnameVerifier.java Failed to execute: /home/jenkins/infer-linux64-v0.9.3/infer/lib/python/infer.py -j 4 --out out/ --project_root /home/jenkins/infer-linux64-v0.9.3/infer/models/cpp -- make -C src make[3]: * [/home/jenkins/infer-linux64-v0.9.3/infer/lib/specs/c_models] Error 1 make[3]: Leaving directory /home/jenkins/infer-linux64-v0.9.3/infer/models/c' make[3]: *** [/home/jenkins/infer-linux64-v0.9.3/infer/lib/specs/cpp_models] Error 1 make[3]: Leaving directory/home/jenkins/infer-linux64-v0.9.3/infer/models/cpp' make[2]: * [models/infer/report.json] Error 1 make[2]: Leaving directory `/home/jenkins/infer-linux64-v0.9.3/infer/models/java' make[2]: * [c] Error 2 make[2]: * Waiting for unfinished jobs.... make[2]: [cpp] Error 2 make[1]: [java] Error 2 make[1]: * Waiting for unfinished jobs.... make[2]: Leaving directory/home/jenkins/infer-linux64-v0.9.3/infer/models' make[1]: **\* [clang] Error 2 make[1]: Leaving directory/home/jenkins/infer-linux64-v0.9.3/infer/models' make: * [infer] Error 2

compilation failure; you can try running

make clean
./build-infer.sh

@jvillard

akotulski commented 8 years ago

@jvillard That looks like unicode problem. Extracted from the log above:

File "/usr/lib/python2.7/locale.py", line 475, in _parse_localename
File "/usr/lib/python2.7/locale.py", line 475, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
return _parse_localename(localename)
ValueError : raise ValueError, 'unknown locale: %s' % localename
unknown locale: UTF-8
ValueError: unknown locale: UTF-8
File "/usr/lib/python2.7/locale.py", line 475, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
Failed to execute: /home/jenkins/infer-linux64-v0.9.3/infer/lib/python/infer.py -j 4 --out out/ --project_root /home/jenkins/infer-linux64-v0.9.3/infer/models/c -- make -C src
jvillard commented 8 years ago

UTF-8 is not a valid locale name. And for some reason Python raises ValueError in this case but we only catch locale.Error. I suppose we can change infer to also catch ValueError here.

In the meantime @boyue you can try export LC_CTYPE=en_GB.UTF-8 or whatever valid locale before compiling and running infer. Let me know if it helps!

CrashHunter commented 8 years ago

Unfortunately,it dont work

I add export LANG="en_US.UTF-8" export LC_COLLATE="en_US.UTF-8" export LC_CTYPE="en_US.UTF-8" export LC_MESSAGES="en_US.UTF-8" export LC_MONETARY="en_US.UTF-8" export LC_NUMERIC="en_US.UTF-8" export LC_TIME="en_US.UTF-8" export LC_ALL= into the bash_profile

then test with command python -c 'import locale; print(locale.getdefaultlocale());'

got ('en_US', 'UTF-8')

but still the same error above

jvillard commented 8 years ago

Does LC_CTYPE=en_US.UTF-8 make work for you?

Can you run ./infer/bin/infer -- clang -c examples/hello.c from the root of the infer repo in a shell with the settings that you pasted, and paste the resulting infer-out/toplevel.log?

CrashHunter commented 7 years ago

I can use the infer command to check my code now after I set LC_CTYPE=en_US.UTF-8 ,thank you

When I run ./build-infer.sh i got make[4]: * [c_src/infer_builtins_cxx.o] Error 1 make[4]: * Waiting for unfinished jobs....clang -c -w infer_builtins.c -o infer_builtins.o

make[4]: * [c_src/glib_cxx.o] Error 1 clang -c -w libc_basic.c -o libc_basic.o make[4]: * [glib.o] Error 1 make[4]: * Waiting for unfinished jobs.... make[4]: * [c_src/libc_basic_cxx.o] Error 1 make[4]: Leaving directory /home/jenkins/infer-linux64-v0.9.3/infer/models/cpp/src' Failed to execute: /home/jenkins/infer-linux64-v0.9.3/infer/lib/python/infer.py -j 4 --out out/ --project_root /home/jenkins/infer-linux64-v0.9.3/infer/models/cpp -- make -C src make[3]: *** [/home/jenkins/infer-linux64-v0.9.3/infer/lib/specs/cpp_models] Error 2 make[3]: Leaving directory/home/jenkins/infer-linux64-v0.9.3/infer/models/cpp' make[2]: * [cpp] Error 2 make[2]: * Waiting for unfinished jobs.... error: unable to load plugin '/home/jenkins/infer-linux64-v0.9.3/infer/lib/clang_wrappers/../../../facebook-clang-plugins/libtooling/build/FacebookClangPlugin.dylib': '/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version GLIBCXX_3.4.20' not found (required by /home/jenkins/infer-linux64-v0.9.3/infer/lib/clang_wrappers/../../../facebook-clang-plugins/libtooling/build/FacebookClangPlugin.dylib)' error: unable to load plugin '/home/jenkins/infer-linux64-v0.9.3/infer/lib/clang_wrappers/../../../facebook-clang-plugins/libtooling/build/FacebookClangPlugin.dylib': '/usr/lib/x86_64-linux-gnu/libstdc++.so.6: versionGLIBCXX_3.4.20' not found (required by /home/jenkins/infer-linux64-v0.9.3/infer/lib/clang_wrappers/../../../facebook-clang-plugins/libtooling/build/FacebookClangPlugin.dylib)' make[4]: * [libc_basic.o] Error 1 make[4]: * [infer_builtins.o] Error 1 make[4]: Leaving directory /home/jenkins/infer-linux64-v0.9.3/infer/models/c/src' Failed to execute: /home/jenkins/infer-linux64-v0.9.3/infer/lib/python/infer.py -j 4 --out out/ --project_root /home/jenkins/infer-linux64-v0.9.3/infer/models/c -- make -C src make[3]: *** [/home/jenkins/infer-linux64-v0.9.3/infer/lib/specs/c_models] Error 2 make[3]: Leaving directory/home/jenkins/infer-linux64-v0.9.3/infer/models/c' make[2]: * [c] Error 2 make[2]: Leaving directory `/home/jenkins/infer-linux64-v0.9.3/infer/models' make[1]: * [clang] Error 2 make[1]: Leaving directory`/home/jenkins/infer-linux64-v0.9.3/infer/models' make: *\ [infer] Error 2

compilation failure; you can try running

make clean
./build-infer.sh

so ,I fall into the trap of thinking of building error .