Installation quits: clang not recognizing flags
sukritsilas opened this issue · 2 comments
Trying to install smashpp on MacOSX Mojave 10.14.6 (18G2022). Git (2.26.0) and homebrew (2.2.10) installed already.
clang --version returns:-
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Here's the ouput from running "sudo sh install.sh" or "sudo bash install.sh". The ./ method doesn't work for some reason.
-- The C compiler identification is AppleClang 10.0.1.10010046
-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES)
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/sukrit/smashpp/build
Scanning dependencies of target smashpp
[ 14%] Building CXX object CMakeFiles/smashpp.dir/fcm.cpp.o
[ 14%] Building CXX object CMakeFiles/smashpp.dir/logtbl8.cpp.o
[ 35%] Building CXX object CMakeFiles/smashpp.dir/tbl32.cpp.o
[ 42%] Building CXX object CMakeFiles/smashpp.dir/cmls4.cpp.o
[ 42%] Building CXX object CMakeFiles/smashpp.dir/tbl64.cpp.o
[ 42%] Building CXX object CMakeFiles/smashpp.dir/par.cpp.o
[ 50%] Building CXX object CMakeFiles/smashpp.dir/filter.cpp.o
[ 57%] Building CXX object CMakeFiles/smashpp.dir/segment.cpp.o
clang: error: unknown argument: '-fbranch-target-load-optimize'
clang: clang: error: error: unknown argument: '-fbranch-target-load-optimize'unknown argument: '-fbranch-target-load-optimize'
clang: error: unknown argument: '-fbranch-target-load-optimize'
clang: error: unknown argument: '-fbranch-target-load-optimize'
clang: error: unknown argument: '-fbranch-target-load-optimize'
clang: error: unknown argument: '-fbranch-target-load-optimize'
make[2]: *** [CMakeFiles/smashpp.dir/cmls4.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/smashpp.dir/fcm.cpp.o] Error 1
make[2]: *** [CMakeFiles/smashpp.dir/filter.cpp.o] Error 1
make[2]: *** [CMakeFiles/smashpp.dir/logtbl8.cpp.o] Error 1
make[2]: *** [CMakeFiles/smashpp.dir/tbl64.cpp.o] Error 1
make[2]: *** [CMakeFiles/smashpp.dir/tbl32.cpp.o] Error 1
make[2]: *** [CMakeFiles/smashpp.dir/par.cpp.o] Error 1
clang: error: unknown argument: '-fbranch-target-load-optimize'
make[2]: *** [CMakeFiles/smashpp.dir/segment.cpp.o] Error 1
make[1]: *** [CMakeFiles/smashpp.dir/all] Error 2
make: *** [all] Error 2
As a quick fix, you can install 'g++'.
With new modifications, you can now compile the code with Clang.