Closed mantejl closed 7 months ago
Looking at the failed command, CXX
is suspicious to include some flags. Could you check how it has been set in config.status
. For example, for me it is like,
S["CXXFLAGS"]="-g -O2"
S["CXX"]="clang++"
If CXX
is including -std=gnu++11
, I think it is better to set under CXXFLAGS
.
Just checked the config.status file, and this is what showed up for me:
S["CXXFLAGS"]="-g -O2" S["CXX"]="clang++ -std=gnu++11"
I ran into the same issue? any idea? build with os 13 and xcode14
I am trying to build Infer using the documentation given, but I am coming across this issue everytime I try to build. Not sure what the error is, I have tried changing the script and make file.
Infer version: not yet available, as infer is not building
OS Version: Ventura 13.0.1
Command: ./build-infer.sh clang
Output:
initializing opam... looking if switch 4.14.0+flambda exists in this list: 4.14.0+flambda verdict: yes
installing infer dependencies; this can take up to 30 minutes... Nothing to do. preparing build...
set +x [12:26:04][60505] Building clang plugin... [ 0s][60505] SUCCESS Building clang plugin [12:26:04][60527] Building clang plugin OCaml interface... [ERROR][60527] ERROR 'Building clang plugin OCaml interface' [ERROR][60527] command: ' /Library/Developer/CommandLineTools/usr/bin/make INTERACTIVE=1 -C /Users/mantej/steel-work/infer/facebook-clang-plugins/clang-ocaml build/clang_ast_proj.ml build/clang_ast_proj.mli CC=clang CXX=clang++ -std=gnu++11 CFLAGS="-g -O2" CXXFLAGS="-g -O2" CPP="clang -E" LDFLAGS="" LIBS="" LOCAL_CLANG=/Users/mantej/steel-work/infer/facebook-clang-plugins/clang/install/bin/clang CLANG_PREFIX=/Users/mantej/steel-work/infer/facebook-clang-plugins/clang/install CLANG_INCLUDES=/Users/mantej/steel-work/infer/facebook-clang-plugins/clang/install/include SDKPATH=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk ' [ERROR][60527] CWD: '/Users/mantej/steel-work/infer' [ERROR][60527] stdout: [ERROR][60527] stderr: [*ERROR][60527] /Library/Developer/CommandLineTools/usr/bin/make: invalid option -- = [*ERROR*][60527] /Library/Developer/CommandLineTools/usr/bin/make: invalid option -- g [ERROR][60527] /Library/Developer/CommandLineTools/usr/bin/make: invalid option -- u [*ERROR][60527] /Library/Developer/CommandLineTools/usr/bin/make: invalid option -- + [*ERROR*][60527] /Library/Developer/CommandLineTools/usr/bin/make: invalid option -- + [ERROR][60527] /Library/Developer/CommandLineTools/usr/bin/make: invalid option -- 1 [*ERROR][60527] /Library/Developer/CommandLineTools/usr/bin/make: invalid option -- 1 [*ERROR*][60527] Usage: make [options] [target] ... [ERROR][60527] Options: [*ERROR][60527] -b, -m Ignored for compatibility. [*ERROR*][60527] -B, --always-make Unconditionally make all targets. [ERROR][60527] -C DIRECTORY, --directory=DIRECTORY [*ERROR][60527] Change to DIRECTORY before doing anything. [*ERROR*][60527] -d Print lots of debugging information. [ERROR][60527] --debug[=FLAGS] Print various types of debugging information. [*ERROR][60527] -e, --environment-overrides [*ERROR*][60527] Environment variables override makefiles. [ERROR][60527] -f FILE, --file=FILE, --makefile=FILE [*ERROR][60527] Read FILE as a makefile. [*ERROR*][60527] -h, --help Print this message and exit. [ERROR][60527] -i, --ignore-errors Ignore errors from commands. [*ERROR][60527] -I DIRECTORY, --include-dir=DIRECTORY [*ERROR*][60527] Search DIRECTORY for included makefiles. [ERROR][60527] -j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg. [*ERROR][60527] -k, --keep-going Keep going when some targets can't be made. [*ERROR*][60527] -l [N], --load-average[=N], --max-load[=N] [ERROR][60527] Don't start multiple jobs unless load is below N. [*ERROR][60527] -L, --check-symlink-times Use the latest mtime between symlinks and target. [*ERROR*][60527] -n, --just-print, --dry-run, --recon [ERROR][60527] Don't actually run any commands; just print them. [*ERROR][60527] -o FILE, --old-file=FILE, --assume-old=FILE [*ERROR*][60527] Consider FILE to be very old and don't remake it. [ERROR][60527] -p, --print-data-base Print make's internal database. [*ERROR][60527] -q, --question Run no commands; exit status says if up to date. [*ERROR*][60527] -r, --no-builtin-rules Disable the built-in implicit rules. [ERROR][60527] -R, --no-builtin-variables Disable the built-in variable settings. [*ERROR][60527] -s, --silent, --quiet Don't echo commands. [*ERROR*][60527] -S, --no-keep-going, --stop [ERROR][60527] Turns off -k. [*ERROR][60527] -t, --touch Touch targets instead of remaking them. [*ERROR*][60527] -v, --version Print the version number of make and exit. [ERROR][60527] -w, --print-directory Print the current directory. [*ERROR][60527] --no-print-directory Turn off -w, even if it was turned on implicitly. [*ERROR*][60527] -W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE [ERROR][60527] Consider FILE to be infinitely new. [*ERROR][60527] --warn-undefined-variables Warn when an undefined variable is referenced. [*ERROR*][60527] -N OPTION, --NeXT-option=OPTION [ERROR][60527] Turn on value of NeXT OPTION. [*ERROR][60527] [*ERROR*][60527] This program built for i386-apple-darwin11.3.0 [ERROR][60527] Report bugs to bug-make@gnu.org make[1]: [clang_plugin] Error 2 make: [opt] Error 2
compilation failure; you can try running
make clean './build-infer.sh' clang