moves-rwth / storm

A Modern Probabilistic Model Checker
https://www.stormchecker.org
GNU General Public License v3.0
126 stars 73 forks source link

Make Storm binary 1.8.1 gives Compilation errors #522

Closed JornTeurlings closed 2 months ago

JornTeurlings commented 2 months ago

Having issues with trying to compile the binary on a Macbook Pro with an Intel i5. Had a similar issue on the M2 pro as well. It runs everything fine up until this point. Does this have to do with my compiler or is there another issue at play. Followed the installation of the dependecies as mentioned on the storm site and followed all steps. Carl is installed, all brew dependencies are installed. The suspicion I have is perhaps the compiler that comes with the newest macOS. I tried GCC 13 as well but that also failed. This issue happens around 77%. I have read this issue but I would not expect only me to run into this if it was a known issue.

/Users/jornteurlings/packages/storm/src/storm/utility/constants.cpp:931:83: error: partial ordering for explicit instantiation of 'simplify' is ambiguous template storm::storage::MatrixEntry<storm::storage::sparse::state_type, double>& simplify( ^ /Users/jornteurlings/packages/storm/src/storm/utility/constants.cpp:147:52: note: explicit instantiation candidate function 'storm::utility::simplify<unsigned long long, double>' template here [with IndexType = unsigned long long, ValueType = double] storm::storage::MatrixEntry<IndexType, ValueType>& simplify(storm::storage::MatrixEntry<IndexType, ValueType>& matrixEntry) { ^ /Users/jornteurlings/packages/storm/src/storm/utility/constants.cpp:134:11: note: explicit instantiation candidate function 'storm::utility::simplify<storm::storage::MatrixEntry<unsigned long long, double> &>' template here [with ValueType = storm::storage::MatrixEntry<unsigned long long, double> &] ValueType simplify(ValueType value) { ^ /Users/jornteurlings/packages/storm/src/storm/utility/constants.cpp:933:84: error: partial ordering for explicit instantiation of 'simplify' is ambiguous template storm::storage::MatrixEntry<storm::storage::sparse::state_type, double>&& simplify( ^ /Users/jornteurlings/packages/storm/src/storm/utility/constants.cpp:153:53: note: explicit instantiation candidate function 'storm::utility::simplify<unsigned long long, double>' template here [with IndexType = unsigned long long, ValueType = double] storm::storage::MatrixEntry<IndexType, ValueType>&& simplify(storm::storage::MatrixEntry<IndexType, ValueType>&& matrixEntry) { ^ /Users/jornteurlings/packages/storm/src/storm/utility/constants.cpp:134:11: note: explicit instantiation candidate function 'storm::utility::simplify<storm::storage::MatrixEntry<unsigned long long, double> &&>' template here [with ValueType = storm::storage::MatrixEntry<unsigned long long, double> &&] ValueType simplify(ValueType value) { ^ /Users/jornteurlings/packages/storm/src/storm/utility/constants.cpp:1002:101: error: partial ordering for explicit instantiation of 'simplify' is ambiguous template storm::storage::MatrixEntry<storm::storage::sparse::state_type, storm::ClnRationalNumber>& simplify( ^ /Users/jornteurlings/packages/storm/src/storm/utility/constants.cpp:147:52: note: explicit instantiation candidate function 'storm::utility::simplify<unsigned long long, cln::cl_RA>' template here [with IndexType = unsigned long long, ValueType = cln::cl_RA] storm::storage::MatrixEntry<IndexType, ValueType>& simplify(storm::storage::MatrixEntry<IndexType, ValueType>& matrixEntry) { ^ /Users/jornteurlings/packages/storm/src/storm/utility/constants.cpp:134:11: note: explicit instantiation candidate function 'storm::utility::simplify<storm::storage::MatrixEntry<unsigned long long, cln::cl_RA> &>' template here [with ValueType = storm::storage::MatrixEntry<unsigned long long, cln::cl_RA> &] ValueType simplify(ValueType value) { ^ /Users/jornteurlings/packages/storm/src/storm/utility/constants.cpp:1004:102: error: partial ordering for explicit instantiation of 'simplify' is ambiguous template storm::storage::MatrixEntry<storm::storage::sparse::state_type, storm::ClnRationalNumber>&& simplify( ^ /Users/jornteurlings/packages/storm/src/storm/utility/constants.cpp:153:53: note: explicit instantiation candidate function 'storm::utility::simplify<unsigned long long, cln::cl_RA>' template here [with IndexType = unsigned long long, ValueType = cln::cl_RA] storm::storage::MatrixEntry<IndexType, ValueType>&& simplify(storm::storage::MatrixEntry<IndexType, ValueType>&& matrixEntry) { ^ /Users/jornteurlings/packages/storm/src/storm/utility/constants.cpp:134:11: note: explicit instantiation candidate function 'storm::utility::simplify<storm::storage::MatrixEntry<unsigned long long, cln::cl_RA> &&>' template here [with ValueType = storm::storage::MatrixEntry<unsigned long long, cln::cl_RA> &&] ValueType simplify(ValueType value) { ^ /Users/jornteurlings/packages/storm/src/storm/utility/constants.cpp:1033:101: error: partial ordering for explicit instantiation of 'simplify' is ambiguous template storm::storage::MatrixEntry<storm::storage::sparse::state_type, storm::GmpRationalNumber>& simplify( ^ /Users/jornteurlings/packages/storm/src/storm/utility/constants.cpp:147:52: note: explicit instantiation candidate function 'storm::utility::simplify<unsigned long long, gmp_expr<mpq_t, mpq_t>>' template here [with IndexType = unsigned long long, ValueType = __gmp_expr<mpq_t, mpq_t>] storm::storage::MatrixEntry<IndexType, ValueType>& simplify(storm::storage::MatrixEntry<IndexType, ValueType>& matrixEntry) { ^ /Users/jornteurlings/packages/storm/src/storm/utility/constants.cpp:134:11: note: explicit instantiation candidate function 'storm::utility::simplify<storm::storage::MatrixEntry<unsigned long long, gmp_expr<mpq_t, mpq_t>> &>' template here [with ValueType = storm::storage::MatrixEntry<unsigned long long, gmp_expr<mpq_t, mpq_t>> &] ValueType simplify(ValueType value) { ^ /Users/jornteurlings/packages/storm/src/storm/utility/constants.cpp:1035:102: error: partial ordering for explicit instantiation of 'simplify' is ambiguous template storm::storage::MatrixEntry<storm::storage::sparse::state_type, storm::GmpRationalNumber>&& simplify( ^ /Users/jornteurlings/packages/storm/src/storm/utility/constants.cpp:153:53: note: explicit instantiation candidate function 'storm::utility::simplify<unsigned long long, gmp_expr<mpq_t, mpq_t>>' template here [with IndexType = unsigned long long, ValueType = gmp_expr<mpq_t, mpq_t>] storm::storage::MatrixEntry<IndexType, ValueType>&& simplify(storm::storage::MatrixEntry<IndexType, ValueType>&& matrixEntry) { ^ /Users/jornteurlings/packages/storm/src/storm/utility/constants.cpp:134:11: note: explicit instantiation candidate function 'storm::utility::simplify<storm::storage::MatrixEntry<unsigned long long, __gmp_expr<mpq_t, mpq_t>> &&>' template here [with ValueType = storm::storage::MatrixEntry<unsigned long long, gmp_expr<mpq_t, mpq_t>> &&] ValueType simplify(ValueType value) { ^ /Users/jornteurlings/packages/storm/src/storm/utility/constants.cpp:1056:93: error: partial ordering for explicit instantiation of 'simplify' is ambiguous template storm::storage::MatrixEntry<storm::storage::sparse::state_type, RationalFunction>& simplify( ^ /Users/jornteurlings/packages/storm/src/storm/utility/constants.cpp:147:52: note: explicit instantiation candidate function 'storm::utility::simplify<unsigned long long, carl::RationalFunction<storm::Polynomial, true>>' template here [with IndexType = unsigned long long, ValueType = carl::RationalFunction<storm::Polynomial, true>] storm::storage::MatrixEntry<IndexType, ValueType>& simplify(storm::storage::MatrixEntry<IndexType, ValueType>& matrixEntry) { ^ /Users/jornteurlings/packages/storm/src/storm/utility/constants.cpp:134:11: note: explicit instantiation candidate function 'storm::utility::simplify<storm::storage::MatrixEntry<unsigned long long, carl::RationalFunction<storm::Polynomial, true>> &>' template here [with ValueType = storm::storage::MatrixEntry<unsigned long long, carl::RationalFunction<storm::Polynomial, true>> &] ValueType simplify(ValueType value) { ^ /Users/jornteurlings/packages/storm/src/storm/utility/constants.cpp:1058:94: error: partial ordering for explicit instantiation of 'simplify' is ambiguous template storm::storage::MatrixEntry<storm::storage::sparse::state_type, RationalFunction>&& simplify( ^ /Users/jornteurlings/packages/storm/src/storm/utility/constants.cpp:153:53: note: explicit instantiation candidate function 'storm::utility::simplify<unsigned long long, carl::RationalFunction<storm::Polynomial, true>>' template here [with IndexType = unsigned long long, ValueType = carl::RationalFunction<storm::Polynomial, true>] storm::storage::MatrixEntry<IndexType, ValueType>&& simplify(storm::storage::MatrixEntry<IndexType, ValueType>&& matrixEntry) { ^ /Users/jornteurlings/packages/storm/src/storm/utility/constants.cpp:134:11: note: explicit instantiation candidate function 'storm::utility::simplify<storm::storage::MatrixEntry<unsigned long long, carl::RationalFunction<storm::Polynomial, true>> &&>' template here [with ValueType = storm::storage::MatrixEntry<unsigned long long, carl::RationalFunction<storm::Polynomial, true>> &&] ValueType simplify(ValueType value) { ^ 8 errors generated. make[3]: [src/storm/CMakeFiles/storm.dir/utility/constants.cpp.o] Error 1 make[2]: [src/storm/CMakeFiles/storm.dir/all] Error 2 make[1]: [src/CMakeFiles/binaries.dir/rule] Error 2 make: [binaries] Error 2

sjunges commented 2 months ago

Hi Jorn,

Could you please include the output of CMake ?

Sebastian

JornTeurlings commented 2 months ago

Hi,

I fixed it by referring to commit

https://github.com/moves-rwth/storm/commit/b3e08d72d8de1cc0d7b8f2b827dfebac2bc07843

Here they fixed the issue, however, I now ran into a linking issue. First the CMake output:

CMake Deprecation Warning at CMakeLists.txt:3 (cmake_policy):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- Storm - CMake install dir: /usr/local/lib/CMake/storm
-- Storm - Building RELEASE version.
-- Storm - Could not find ccache.
-- Storm - Detected operating system Mac OS.
-- Storm - Assuming extension for shared libraries: .dylib
-- Storm - Assuming extension for static libraries: .a
-- Storm - Build static libraries.
CMake Warning at CMakeLists.txt:247 (message):
  Disabling stack checks for AppleClang version 11.0.0 or higher.

-- Storm - Enabling link-time optimizations.
-- Storm - Using compiler configuration AppleClang 15.0.0.15000309.
-- Storm - Building external resources with 5 job(s) in parallel.
-- Storm - Including Eigen 3.3.9.
-- Storm - Using workaround for Boost >= 1.81
-- Storm - Using boost 108400 (library version 1_84).
-- Storm - Including ExprTk.
-- Storm - Including Parallel Hashmap.
-- Storm - Including cpphoafparser 0.99.2
-- Storm - Including ModernJSON.
-- Storm - Linking with Z3 (version 4.12.6). (Z3 version supports optimization)
-- Storm - Using system version of glpk.
-- Storm - Linking with glpk 5.0
CMake Warning at resources/3rdparty/include_cudd.cmake:39 (message):
  There are some known issues compiling CUDD on some setups.  We implemented
  a workaround that mostly works, but if you still have problems compiling
  CUDD, especially if you do not use the default compiler of your system,
  please contact the Storm developers.
Call Stack (most recent call first):
  resources/3rdparty/CMakeLists.txt:287 (include)
  CMakeLists.txt:473 (include)

-- Storm - Linking with CUDD 3.0.0.
-- Storm - Found carl-storm version
-- Storm - Use system version of carl.
-- Storm - Linking with preinstalled carl 14.27 (include: /Users/jornteurlings/packages/carl-storm/src, library lib_carl, CARL_USE_CLN_NUMBERS: ON, CARL_USE_GINAC: ON).
-- Storm - Use system version of xerces.
-- Storm (GSPN) - Linking with Xerces-c 3.2.5: /usr/local/lib/libxerces-c.dylib
-- Storm - Using system version of Spot 2.11.6 (include: /usr/local/include, library: /usr/local/lib/libspot.dylib;/usr/local/lib/libbddx.dylib).
-- Storm - Using shipped version of sylvan.
-- Storm - Linking with sylvan.
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Storm - Version is 1.8.1 (version 1.8.1 + 0 commits), building from git: 3f74f3e59acfba3b61c686af01a864962d44af97 (dirty: DirtyState::Clean).
-- Registered with cmake
-- Configuring done (2.5s)
-- Generating done (1.4s)
-- Build files have been written to: /Users/jornteurlings/packages/storm/build

Now the linking error:

Undefined symbols for architecture x86_64:
  "storm::storage::MatrixEntry<unsigned long long, __gmp_expr<__mpq_struct [1], __mpq_struct [1]>>&& storm::utility::simplify<unsigned long long, __gmp_expr<__mpq_struct [1], __mpq_struct [1]>>(storm::storage::MatrixEntry<unsigned long long, __gmp_expr<__mpq_struct [1], __mpq_struct [1]>>&&)", referenced from:
      storm::solver::stateelimination::EliminatorBase<__gmp_expr<__mpq_struct [1], __mpq_struct [1]>, (storm::solver::stateelimination::ScalingMode)0>::eliminate(unsigned long long, unsigned long long, bool) in lto.o
      storm::solver::stateelimination::EliminatorBase<__gmp_expr<__mpq_struct [1], __mpq_struct [1]>, (storm::solver::stateelimination::ScalingMode)0>::eliminate(unsigned long long, unsigned long long, bool) in lto.o
      storm::solver::stateelimination::EliminatorBase<__gmp_expr<__mpq_struct [1], __mpq_struct [1]>, (storm::solver::stateelimination::ScalingMode)1>::eliminate(unsigned long long, unsigned long long, bool) in lto.o
      storm::solver::stateelimination::EliminatorBase<__gmp_expr<__mpq_struct [1], __mpq_struct [1]>, (storm::solver::stateelimination::ScalingMode)1>::eliminate(unsigned long long, unsigned long long, bool) in lto.o
  "storm::storage::MatrixEntry<unsigned long long, carl::RationalFunction<carl::FactorizedPolynomial<carl::MultivariatePolynomial<cln::cl_RA, carl::NotRelevant, carl::StdMultivariatePolynomialPolicies<0>>>, true>>&& storm::utility::simplify<unsigned long long, carl::RationalFunction<carl::FactorizedPolynomial<carl::MultivariatePolynomial<cln::cl_RA, carl::NotRelevant, carl::StdMultivariatePolynomialPolicies<0>>>, true>>(storm::storage::MatrixEntry<unsigned long long, carl::RationalFunction<carl::FactorizedPolynomial<carl::MultivariatePolynomial<cln::cl_RA, carl::NotRelevant, carl::StdMultivariatePolynomialPolicies<0>>>, true>>&&)", referenced from:
      storm::solver::stateelimination::EliminatorBase<carl::RationalFunction<carl::FactorizedPolynomial<carl::MultivariatePolynomial<cln::cl_RA, carl::NotRelevant, carl::StdMultivariatePolynomialPolicies<0>>>, true>, (storm::solver::stateelimination::ScalingMode)0>::eliminate(unsigned long long, unsigned long long, bool) in lto.o
      storm::solver::stateelimination::EliminatorBase<carl::RationalFunction<carl::FactorizedPolynomial<carl::MultivariatePolynomial<cln::cl_RA, carl::NotRelevant, carl::StdMultivariatePolynomialPolicies<0>>>, true>, (storm::solver::stateelimination::ScalingMode)0>::eliminate(unsigned long long, unsigned long long, bool) in lto.o
      storm::solver::stateelimination::EliminatorBase<carl::RationalFunction<carl::FactorizedPolynomial<carl::MultivariatePolynomial<cln::cl_RA, carl::NotRelevant, carl::StdMultivariatePolynomialPolicies<0>>>, true>, (storm::solver::stateelimination::ScalingMode)1>::eliminate(unsigned long long, unsigned long long, bool) in lto.o
      storm::solver::stateelimination::EliminatorBase<carl::RationalFunction<carl::FactorizedPolynomial<carl::MultivariatePolynomial<cln::cl_RA, carl::NotRelevant, carl::StdMultivariatePolynomialPolicies<0>>>, true>, (storm::solver::stateelimination::ScalingMode)1>::eliminate(unsigned long long, unsigned long long, bool) in lto.o
  "storm::storage::MatrixEntry<unsigned long long, double>&& storm::utility::simplify<unsigned long long, double>(storm::storage::MatrixEntry<unsigned long long, double>&&)", referenced from:
      storm::solver::stateelimination::EliminatorBase<double, (storm::solver::stateelimination::ScalingMode)0>::eliminate(unsigned long long, unsigned long long, bool) in lto.o
      storm::solver::stateelimination::EliminatorBase<double, (storm::solver::stateelimination::ScalingMode)0>::eliminate(unsigned long long, unsigned long long, bool) in lto.o
      storm::solver::stateelimination::EliminatorBase<double, (storm::solver::stateelimination::ScalingMode)1>::eliminate(unsigned long long, unsigned long long, bool) in lto.o
      storm::solver::stateelimination::EliminatorBase<double, (storm::solver::stateelimination::ScalingMode)1>::eliminate(unsigned long long, unsigned long long, bool) in lto.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [lib/libstorm.dylib] Error 1
make[2]: *** [src/storm/CMakeFiles/storm.dir/all] Error 2
make[1]: *** [src/CMakeFiles/binaries.dir/rule] Error 2
make: *** [binaries] Error 2

I saw carl in there and maybe the issue lies there

volkm commented 2 months ago

As you said, the issue should be fixed in newer Storm versions (see https://github.com/moves-rwth/storm/issues/411). Can you try to use the latest version from the master branch? I recommend to remove the build directory and start the build process again.

JornTeurlings commented 2 months ago

Thank you Matthias! That was indeed the solution. Maybe the stable tag should be updated to point to perhaps master or a certain commit hash. Thanks anyways!