-
Notifications
You must be signed in to change notification settings - Fork 152
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
Failed to get it working #20
Comments
Hi @kimwalisch, IKOS compiles without problem on my laptop, but I'm using macOS High Sierra.
This is a python warning raised by a homebrew command. I think this has nothing to do with IKOS.
It looks like homebrew cannot clone or download a resource from Github. You might have invalid Github credentials in your keychain. Personally, I define the
Why are you trying to compile with clang 7? You should probably let
This is weird. Those are errors in llvm that I have never seen before. |
I have updated setuptools and virtualenv on GitHub and set my GitHub API token but the installation using pip install --upgrade setuptools --user
pip install --upgrade virtualenv --user
export HOMEBREW_GITHUB_API_TOKEN=XXX
brew install nasa-sw-vnv/core/ikos
==> Installing ikos from nasa-sw-vnv/core
==> Downloading https://github.com/nasa-sw-vnv/ikos/releases/download/v2.1/ikos-2.1.tar.gz
Already downloaded: /Users/kim/Library/Caches/Homebrew/downloads/dad01cb7251bcbeb8345d543aa960a47f31758f2ea6a65cf2d43bf0aa1210f09--ikos-2.1.tar.gz
==> Downloading https://files.pythonhosted.org/packages/4e/8b/75469c270ac544265f0020aa7c4ea925c5284b23e445cf3aa8b99f662690/virtualenv-16.1.0.tar.g
Already downloaded: /Users/kim/Library/Caches/Homebrew/downloads/bda8bcde19a275fd9c84a7ec957593976e90dfd0e461a87f5698f1d2286c0197--virtualenv-16.1.0.tar.gz
==> python -c import setuptools... --no-user-cfg install --prefix=/private/tmp/ikos--homebrew-virtualenv-20181213-5640-1ghpl3t/target --install-sc
Last 15 lines from /Users/kim/Library/Logs/Homebrew/ikos/01.python:
-c
import setuptools, tokenize
__file__ = 'setup.py'
exec(compile(getattr(tokenize, 'open', open)(__file__).read()
.replace('\r\n', '\n'), __file__, 'exec'))
--no-user-cfg
install
--prefix=/private/tmp/ikos--homebrew-virtualenv-20181213-5640-1ghpl3t/target
--install-scripts=/private/tmp/ikos--homebrew-virtualenv-20181213-5640-1ghpl3t/target/bin
--single-version-externally-managed
--record=installed.txt
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
error in virtualenv setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/nasa-sw-vnv/homebrew-core/issues |
I have now successfully compiled ikos on Ubuntu 18.10 x64 using Clang 7 :-) But I first got a linker error: CXX=clang++ CC=clang cmake .. -DLLVM_CONFIG_EXECUTABLE="/home/xxx/Downloads/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04/bin/llvm-config"
make -j4
[ 36%] Building CXX object frontend/llvm/CMakeFiles/ikos-pp.dir/src/ikos_pp.cpp.o
[ 36%] Building CXX object frontend/llvm/CMakeFiles/ikos-llvm-to-ar.dir/src/import/source_location.cpp.o
[ 38%] Building CXX object frontend/llvm/CMakeFiles/ikos-llvm-to-ar.dir/src/import/type.cpp.o
[ 38%] Linking CXX static library libikos-ar.a
[ 38%] Built target ikos-ar
[ 38%] Linking CXX executable ikos-pp
CMakeFiles/ikos-pp.dir/src/ikos_pp.cpp.o:(.data.rel.ro._ZTIN4llvm2cl15OptionValueCopyINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE[_ZTIN4llvm2cl15OptionValueCopyINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE]+0x10): undefined reference to `typeinfo for llvm::cl::GenericOptionValue'
CMakeFiles/ikos-pp.dir/src/ikos_pp.cpp.o:(.data.rel.ro._ZTIN4llvm2cl4listINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbNS0_6parserIS7_EEEE[_ZTIN4llvm2cl4listINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbNS0_6parserIS7_EEEE]+0x18): undefined reference to `typeinfo for llvm::cl::Option'
CMakeFiles/ikos-pp.dir/src/ikos_pp.cpp.o:(.data.rel.ro._ZTIN4llvm2cl3optI12OptLevelTypeLb0ENS0_6parserIS2_EEEE[_ZTIN4llvm2cl3optI12OptLevelTypeLb0ENS0_6parserIS2_EEEE]+0x18): undefined reference to `typeinfo for llvm::cl::Option'
CMakeFiles/ikos-pp.dir/src/ikos_pp.cpp.o:(.data.rel.ro._ZTIN4llvm2cl6parserI12OptLevelTypeEE[_ZTIN4llvm2cl6parserI12OptLevelTypeEE]+0x10): undefined reference to `typeinfo for llvm::cl::generic_parser_base'
CMakeFiles/ikos-pp.dir/src/ikos_pp.cpp.o:(.data.rel.ro._ZTIN4llvm2cl15OptionValueCopyI12OptLevelTypeEE[_ZTIN4llvm2cl15OptionValueCopyI12OptLevelTypeEE]+0x10): undefined reference to `typeinfo for llvm::cl::GenericOptionValue'
CMakeFiles/ikos-pp.dir/src/ikos_pp.cpp.o:(.data.rel.ro._ZTIN4llvm2cl4listIPKNS_8PassInfoEbNS_14PassNameParserEEE[_ZTIN4llvm2cl4listIPKNS_8PassInfoEbNS_14PassNameParserEEE]+0x18): undefined reference to `typeinfo for llvm::cl::Option'
CMakeFiles/ikos-pp.dir/src/ikos_pp.cpp.o:(.data.rel.ro._ZTIN4llvm2cl15OptionValueCopyIbEE[_ZTIN4llvm2cl15OptionValueCopyIbEE]+0x10): undefined reference to `typeinfo for llvm::cl::GenericOptionValue'
libikos-pp.a(lower_cst_expr.cpp.o):(.data.rel.ro._ZTIN12_GLOBAL__N_116LowerCstExprPassE+0x10): undefined reference to `typeinfo for llvm::FunctionPass'
libikos-pp.a(lower_select.cpp.o):(.data.rel.ro._ZTIN12_GLOBAL__N_115LowerSelectPassE+0x10): undefined reference to `typeinfo for llvm::FunctionPass'
libikos-pp.a(mark_internal_inline.cpp.o):(.data.rel.ro._ZTIN12_GLOBAL__N_122MarkInternalInlinePassE+0x10): undefined reference to `typeinfo for llvm::ModulePass'
libikos-pp.a(mark_no_return_function.cpp.o):(.data.rel.ro._ZTIN12_GLOBAL__N_124MarkNoReturnFunctionPassE+0x10): undefined reference to `typeinfo for llvm::ModulePass'
libikos-pp.a(name_values.cpp.o):(.data.rel.ro._ZTIN12_GLOBAL__N_114NameValuesPassE+0x10): undefined reference to `typeinfo for llvm::ModulePass'
libikos-pp.a(remove_printf_calls.cpp.o):(.data.rel.ro._ZTIN12_GLOBAL__N_121RemovePrintfCallsPassE+0x10): undefined reference to `typeinfo for llvm::FunctionPass'
libikos-pp.a(remove_unreachable_blocks.cpp.o):(.data.rel.ro._ZTIN12_GLOBAL__N_127RemoveUnreachableBlocksPassE+0x10): undefined reference to `typeinfo for llvm::FunctionPass'
[ 38%] Linking CXX static library libikos-llvm-to-ar.a
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
frontend/llvm/CMakeFiles/ikos-pp.dir/build.make:134: recipe for target 'frontend/llvm/ikos-pp' failed
make[2]: *** [frontend/llvm/ikos-pp] Error 1
CMakeFiles/Makefile2:1820: recipe for target 'frontend/llvm/CMakeFiles/ikos-pp.dir/all' failed
make[1]: *** [frontend/llvm/CMakeFiles/ikos-pp.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 38%] Built target ikos-llvm-to-ar
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2 I was able to fix that linker error by adding CXX=clang++ CC=clang cmake .. -DCMAKE_CXX_FLAGS="-fno-rtti" -DLLVM_CONFIG_EXECUTABLE="/home/kim/Downloads/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04/bin/llvm-config"
make -j4
... |
Unfortunately none of my projects could be analysed using ikos: # https://github.com/kimwalisch/primesieve
$ ikos-scan cmake .. -DBUILD_SHARED_LIBS=OFF
$ ikos-scan make
...
Analyze primesieve? [Y/n] Y
[*] Running ikos primesieve.bc -o primesieve.db
[*] Running ikos preprocessor
[*] Running ikos analyzer
[*] Translating LLVM bitcode to AR
ikos-analyzer: /tmp/ikos-eJchin/primesieve.pp.bc: error: unexpected null pointer in llvm::DICompositeType with DW_TAG_structure_type or DW_TAG_class_type tag
ikos: error: a run-time error occured # https://github.com/kimwalisch/libpopcnt
$ ikos-scan cmake ..
$ ikos-scan make
...
Analyze benchmark? [Y/n] Y
[*] Running ikos benchmark.bc -o benchmark.db
[*] Running ikos preprocessor
[*] Running ikos analyzer
[*] Translating LLVM bitcode to AR
ikos-analyzer: /tmp/ikos-p_Q2Kq/benchmark.pp.bc: error: unsupported intrinsic function @llvm.x86.avx2.pslli.q
ikos: error: a run-time error occured |
For the issue with homebrew, see NASA-SW-VnV/homebrew-core#1 I am investigating the errors with primesieve and libpopcnt. Please give me time. |
I have now rebuilt ikos from scratch on Ubuntu 18.04 x64 and clang-7 using your latest code. The good news is that the linker error from Ubuntu I reported earlier has gone away (it was caused by myself by having installed incompatible packages). Unfortunately ikos still fails to analyse primesieve because of the same issue: # https://github.com/kimwalisch/primesieve
$ ikos-scan cmake .. -DBUILD_SHARED_LIBS=OFF
$ ikos-scan make
Scanning dependencies of target libprimesieve-static
[ 4%] Building CXX object CMakeFiles/libprimesieve-static.dir/src/api-c.cpp.o
[ 8%] Building CXX object CMakeFiles/libprimesieve-static.dir/src/api.cpp.o
...
[100%] Linking CXX executable primesieve
[100%] Built target primesieve
Analyze primesieve? [Y/n] Y
[*] Running ikos primesieve.bc -o primesieve.db
[*] Running ikos preprocessor
[*] Running ikos analyzer
[*] Translating LLVM bitcode to AR
ikos-analyzer: /tmp/ikos-qrPPF6/primesieve.pp.bc: error: unexpected null pointer in llvm::DICompositeType with DW_TAG_structure_type or DW_TAG_class_type tag
ikos: error: a run-time error occured ikos also fails to analyse libpopcnt but the error is different from last time: # https://github.com/kimwalisch/libpopcnt
$ ikos-scan cmake ..
$ ikos-scan make
Scanning dependencies of target benchmark
[ 16%] Building CXX object CMakeFiles/benchmark.dir/benchmark.cpp.o
[ 33%] Linking CXX executable benchmark
...
[100%] Built target test1
Analyze benchmark? [Y/n] Y
[*] Running ikos benchmark.bc -o benchmark.db
[*] Running ikos preprocessor
[*] Running ikos analyzer
[*] Translating LLVM bitcode to AR
ikos-analyzer: /tmp/ikos-m3za0s/benchmark.pp.bc: error: unexpected llvm::BinaryOperator (opcode: add)
ikos: error: a run-time error occured |
Hi again, @kimwalisch: For primesieve, I think the error has been fixed with baecd7f. Please recompile ikos (master branch) and try again. |
The error message has changed using your latest code: Analyze primesieve? [Y/n] Y
[*] Running ikos primesieve.bc -o primesieve.db
[*] Running ikos preprocessor
[*] Running ikos analyzer
[*] Translating LLVM bitcode to AR
ikos-analyzer: /tmp/ikos-RnR8iJ/primesieve.pp.bc: error: unexpected tag for union member of llvm::DICompositeType
ikos: error: a run-time error occured |
This error has been fixed in 94f1251, please try again. |
The previous error has been fixed. But here is a new one ;-)
|
Could you please send me I am getting a different error than you:
|
Here it is: primesieve.bc.zip |
Thanks, I can reproduce the error. I will need more time to investigate. |
Commit caad19f should fix the issue with primesieve. If you still have problems, please open new issues. Thank you. |
Hi,
I failed to get it working. Here is my frustrating list of what I have tried:
brew install
I am an expert C/C++ user, it is very rare that I fail to build any C/C++ project!
Below are 2 error messages I encountered:
brew install
.The text was updated successfully, but these errors were encountered: