Skip to content

Commit

Permalink
Turning off boost dependency by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Triton Library committed Jul 4, 2024
1 parent 674485c commit 3a39d48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ option(GCOV "Enable code coverage"
option(LLVM_INTERFACE "Use LLVM for lifting" OFF)
option(MSVC_STATIC "Use statically-linked runtime library" OFF)
option(Z3_INTERFACE "Use Z3 as SMT solver" ON)
option(BOOST_INTERFACE "Use Boost as multiprecision library" ON)
option(BOOST_INTERFACE "Use Boost as multiprecision library" OFF)
option(PYTHON_BINDINGS_AUTOCOMPLETE "Generate an autocomplete stub file" OFF)

# Define cmake dependent options
Expand Down

1 comment on commit 3a39d48

@GriffinMB
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change results in link errors.

ld: Undefined symbols:
  triton::ast::AstContext::bv(boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<512ul, 512ul, (boost::multiprecision::cpp_integer_type)0, (boost::multiprecision::cpp_int_check_type)0, void>, (boost::multiprecision::expression_template_option)0> const&, unsigned int), referenced from:
      xor_simplification(triton::Context&, std::__1::shared_ptr<triton::ast::AbstractNode> const&) in simplification.cpp.o
  triton::Context::setConcreteRegisterValue(triton::arch::Register const&, boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<512ul, 512ul, (boost::multiprecision::cpp_integer_type)0, (boost::multiprecision::cpp_int_check_type)0, void>, (boost::multiprecision::expression_template_option)0> const&, bool), referenced from:
      _main in simplification.cpp.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/examples/cpp/simplification] Error 1
make[1]: *** [src/examples/cpp/CMakeFiles/simplification.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
ld: Undefined symbols:
  triton::ast::AstContext::bv(boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<512ul, 512ul, (boost::multiprecision::cpp_integer_type)0, (boost::multiprecision::cpp_int_check_type)0, void>, (boost::multiprecision::expression_template_option)0> const&, unsigned int), referenced from:
      _main in constraint.cpp.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/examples/cpp/constraint] Error 1
make[1]: *** [src/examples/cpp/CMakeFiles/constraint.dir/all] Error 2
[ 99%] Linking CXX executable ctest_api
ld: Undefined symbols:
  triton::Context::setConcreteRegisterValue(triton::arch::Register const&, boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<512ul, 512ul, (boost::multiprecision::cpp_integer_type)0, (boost::multiprecision::cpp_int_check_type)0, void>, (boost::multiprecision::expression_template_option)0> const&, bool), referenced from:
      test_1() in ctest_api.cpp.o
      test_2() in ctest_api.cpp.o
      test_8() in ctest_api.cpp.o
  triton::callbacks::Callbacks::addCallback(triton::callbacks::callback_e, triton::ComparableFunctor<void (triton::Context&, triton::arch::MemoryAccess const&, boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<512ul, 512ul, (boost::multiprecision::cpp_integer_type)0, (boost::multiprecision::cpp_int_check_type)0, void>, (boost::multiprecision::expression_template_option)0> const&)>), referenced from:
      test_12() in ctest_api.cpp.o
  triton::callbacks::Callbacks::addCallback(triton::callbacks::callback_e, triton::ComparableFunctor<void (triton::Context&, triton::arch::Register const&, boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<512ul, 512ul, (boost::multiprecision::cpp_integer_type)0, (boost::multiprecision::cpp_int_check_type)0, void>, (boost::multiprecision::expression_template_option)0> const&)>), referenced from:
      test_12() in ctest_api.cpp.o
  triton::callbacks::Callbacks::removeCallback(triton::callbacks::callback_e, triton::ComparableFunctor<void (triton::Context&, triton::arch::MemoryAccess const&, boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<512ul, 512ul, (boost::multiprecision::cpp_integer_type)0, (boost::multiprecision::cpp_int_check_type)0, void>, (boost::multiprecision::expression_template_option)0> const&)>), referenced from:
      test_12() in ctest_api.cpp.o
  triton::callbacks::Callbacks::removeCallback(triton::callbacks::callback_e, triton::ComparableFunctor<void (triton::Context&, triton::arch::Register const&, boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<512ul, 512ul, (boost::multiprecision::cpp_integer_type)0, (boost::multiprecision::cpp_int_check_type)0, void>, (boost::multiprecision::expression_template_option)0> const&)>), referenced from:
      test_12() in ctest_api.cpp.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/examples/cpp/ctest_api] Error 1
make[1]: *** [src/examples/cpp/CMakeFiles/ctest_api.dir/all] Error 2
make: *** [all] Error 2

Reverting this commit results in successful build. Not sure what the thought process was here, otherwise I'd just submit a PR.

Please sign in to comment.