google / orbit

C/C++ Performance Profiler
https://orbitprofiler.com/
BSD 2-Clause "Simplified" License
4.22k stars 349 forks source link

Conflict with `z3`/4.13.0 #4879

Open DapengFeng opened 1 week ago

DapengFeng commented 1 week ago

[!CAUTION]

  • [ ] error: control reaches end of non-void function [-Werror=return-type]
  • [ ] error: exception handling disabled, use ‘-fexceptions’ to enable
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/memory_manager.cpp: In function ‘void throw_out_of_memory()’:
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/memory_manager.cpp:81:35: error: exception handling disabled, use ‘-fexceptions’ to enable
   81 |         throw out_of_memory_error();
      |                                   ^
[  4%] Building CXX object src/util/CMakeFiles/util.dir/s_integer.cpp.o
gmake[2]: *** [src/util/CMakeFiles/util.dir/build.make:314: src/util/CMakeFiles/util.dir/memory_manager.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
In file included from /home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/permutation.h:22,
                 from /home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/permutation.cpp:19:
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/vector.h: In instantiation of ‘void vector<T, CallDestructors, SZ>::expand_vector() [with T = unsigned int; bool CallDestructors = false; SZ = unsigned int]’:
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/vector.h:527:13:   required from ‘vector<T, CallDestructors, SZ>& vector<T, CallDestructors, SZ>::push_back(const T&) [with T = unsigned int; bool CallDestructors = false; SZ = unsigned int]’
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/permutation.cpp:29:22:   required from here
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/vector.h:202:17: error: exception handling disabled, use ‘-fexceptions’ to enable
  202 |                 throw default_exception("Overflow encountered when expanding vector");
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/min_cut.h:21,
                 from /home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/min_cut.cpp:18:
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/vector.h: In instantiation of ‘void vector<T, CallDestructors, SZ>::expand_vector() [with T = svector<min_cut::edge>; bool CallDestructors = true; SZ = unsigned int]’:
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/vector.h:543:13:   required from ‘vector<T, CallDestructors, SZ>& vector<T, CallDestructors, SZ>::push_back(T&&) [with T = svector<min_cut::edge>; bool CallDestructors = true; SZ = unsigned int]’
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/min_cut.cpp:23:22:   required from here
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/vector.h:202:17: error: exception handling disabled, use ‘-fexceptions’ to enable
  202 |                 throw default_exception("Overflow encountered when expanding vector");
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/prime_generator.cpp: In member function ‘uint64_t prime_generator::operator()(unsigned int)’:
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/prime_generator.cpp:91:76: error: exception handling disabled, use ‘-fexceptions’ to enable
   91 |         throw prime_generator_exception("prime generator capacity exceeded");
      |                                                                            ^
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/debug.cpp: In function ‘void invoke_gdb()’:
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/debug.cpp:132:58: error: exception handling disabled, use ‘-fexceptions’ to enable
  132 |             throw default_exception("assertion violation");
      |                                                          ^
gmake[2]: *** [src/util/CMakeFiles/util.dir/build.make:482: src/util/CMakeFiles/util.dir/permutation.cpp.o] Error 1
In file included from /home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/bit_vector.h:23,
                 from /home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/bit_vector.cpp:20:
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/vector.h: In instantiation of ‘void vector<T, CallDestructors, SZ>::expand_vector() [with T = unsigned int; bool CallDestructors = false; SZ = unsigned int]’:
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/vector.h:527:13:   required from ‘vector<T, CallDestructors, SZ>& vector<T, CallDestructors, SZ>::push_back(const T&) [with T = unsigned int; bool CallDestructors = false; SZ = unsigned int]’
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/bit_vector.h:252:29:   required from here
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/vector.h:202:17: error: exception handling disabled, use ‘-fexceptions’ to enable
  202 |                 throw default_exception("Overflow encountered when expanding vector");
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/mpfx.cpp: In member function ‘void mpfx_manager::set(mpfx&, int64_t)’:
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/mpfx.cpp:172:38: error: exception handling disabled, use ‘-fexceptions’ to enable
  172 |             throw overflow_exception();
      |                                      ^
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/mpff.cpp: In member function ‘void mpff_manager::inc_significand(mpff&)’:
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/mpff.cpp:495:38: error: exception handling disabled, use ‘-fexceptions’ to enable
  495 |             throw overflow_exception();
      |                                      ^
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/gparams.cpp: In member function ‘void gparams::imp::throw_unknown_parameter(const string&, const param_descrs&, const string&)’:
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/gparams.cpp:279:54: error: exception handling disabled, use ‘-fexceptions’ to enable
  279 |                 throw exception(std::move(strm).str());
      |                                                      ^
gmake[2]: *** [src/util/CMakeFiles/util.dir/build.make:118: src/util/CMakeFiles/util.dir/bit_vector.cpp.o] Error 1
gmake[2]: *** [src/util/CMakeFiles/util.dir/build.make:160: src/util/CMakeFiles/util.dir/debug.cpp.o] Error 1
gmake[2]: *** [src/util/CMakeFiles/util.dir/build.make:328: src/util/CMakeFiles/util.dir/min_cut.cpp.o] Error 1
In file included from /home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/inf_int_rational.cpp:20:
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/inf_int_rational.h: In member function ‘inf_int_rational& inf_int_rational::operator*=(const rational&)’:
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/inf_int_rational.h:148:89: error: exception handling disabled, use ‘-fexceptions’ to enable
  148 |             throw default_exception("multiplication with large rational is not possible");
      |                                                                                         ^
gmake[2]: *** [src/util/CMakeFiles/util.dir/build.make:496: src/util/CMakeFiles/util.dir/prime_generator.cpp.o] Error 1
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/mpq.cpp: In instantiation of ‘void mpq_manager<SYNCH>::set(mpq&, const char*) [with bool SYNCH = true]’:
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/mpq.cpp:435:16:   required from here
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/mpq.cpp:224:17: error: exception handling disabled, use ‘-fexceptions’ to enable
  224 |                 throw default_exception("mixing rational/scientific notation");
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/mpf.cpp: In member function ‘void mpf_manager::to_sbv_mpq(mpf_rounding_mode, const mpf&, scoped_mpq&)’:
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/mpf.cpp:1192:75: error: exception handling disabled, use ‘-fexceptions’ to enable
 1192 |         throw default_exception("exponents over 31 bits are not supported");
      |                                                                           ^
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/mpz.cpp: In instantiation of ‘void mpz_manager<SYNCH>::machine_div(const mpz&, const mpz&, mpz&) [with bool SYNCH = true]’:
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/mpz.cpp:2536:16:   required from here
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/mpz.cpp:569:9: error: exception handling disabled, use ‘-fexceptions’ to enable
  569 |         throw default_exception("division by 0");
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/scoped_numeral_vector.h:21,
                 from /home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/mpz.h:27,
                 from /home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/mpq.h:21,
                 from /home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/rational.h:21,
                 from /home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/rational.cpp:22:
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/vector.h: In instantiation of ‘void vector<T, CallDestructors, SZ>::expand_vector() [with T = rational; bool CallDestructors = true; SZ = unsigned int]’:
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/vector.h:527:13:   required from ‘vector<T, CallDestructors, SZ>& vector<T, CallDestructors, SZ>::push_back(const T&) [with T = rational; bool CallDestructors = true; SZ = unsigned int]’
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/rational.cpp:32:22:   required from here
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/vector.h:202:17: error: exception handling disabled, use ‘-fexceptions’ to enable
  202 |                 throw default_exception("Overflow encountered when expanding vector");
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/params.cpp: In member function ‘void params::validate(const param_descrs&)’:
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/params.cpp:402:51: error: exception handling disabled, use ‘-fexceptions’ to enable
  402 |                 throw default_exception(strm.str());
      |                                                   ^
gmake[2]: *** [src/util/CMakeFiles/util.dir/build.make:412: src/util/CMakeFiles/util.dir/mpq.cpp.o] Error 1
gmake[2]: *** [src/util/CMakeFiles/util.dir/build.make:244: src/util/CMakeFiles/util.dir/inf_int_rational.cpp.o] Error 1
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/gparams.cpp: In member function ‘std::string gparams::imp::get_value(const char*)’:
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/gparams.cpp:460:5: error: control reaches end of non-void function [-Werror=return-type]
  460 |     }
      |     ^
gmake[2]: *** [src/util/CMakeFiles/util.dir/build.make:384: src/util/CMakeFiles/util.dir/mpfx.cpp.o] Error 1
cc1plus: some warnings being treated as errors
gmake[2]: *** [src/util/CMakeFiles/util.dir/build.make:510: src/util/CMakeFiles/util.dir/rational.cpp.o] Error 1
gmake[2]: *** [src/util/CMakeFiles/util.dir/build.make:370: src/util/CMakeFiles/util.dir/mpff.cpp.o] Error 1
gmake[2]: *** [src/util/CMakeFiles/util.dir/build.make:202: src/util/CMakeFiles/util.dir/gparams.cpp.o] Error 1
gmake[2]: *** [src/util/CMakeFiles/util.dir/build.make:440: src/util/CMakeFiles/util.dir/mpz.cpp.o] Error 1
gmake[2]: *** [src/util/CMakeFiles/util.dir/build.make:356: src/util/CMakeFiles/util.dir/mpf.cpp.o] Error 1
In file included from /home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/rlimit.h:21,
                 from /home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/rlimit.cpp:19:
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/vector.h: In instantiation of ‘void vector<T, CallDestructors, SZ>::expand_vector() [with T = long unsigned int; bool CallDestructors = false; SZ = unsigned int]’:
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/vector.h:527:13:   required from ‘vector<T, CallDestructors, SZ>& vector<T, CallDestructors, SZ>::push_back(const T&) [with T = long unsigned int; bool CallDestructors = false; SZ = unsigned int]’
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/rlimit.cpp:60:23:   required from here
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/vector.h:202:17: error: exception handling disabled, use ‘-fexceptions’ to enable
  202 |                 throw default_exception("Overflow encountered when expanding vector");
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gmake[2]: *** [src/util/CMakeFiles/util.dir/build.make:468: src/util/CMakeFiles/util.dir/params.cpp.o] Error 1
gmake[2]: *** [src/util/CMakeFiles/util.dir/build.make:538: src/util/CMakeFiles/util.dir/rlimit.cpp.o] Error 1
In file included from /home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/scoped_numeral_vector.h:21,
                 from /home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/mpz.h:27,
                 from /home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/mpq.h:21,
                 from /home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/rational.h:21,
                 from /home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/sexpr.h:21,
                 from /home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/sexpr.cpp:19:
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/vector.h: In instantiation of ‘void vector<T, CallDestructors, SZ>::expand_vector() [with T = std::pair<const sexpr_composite*, unsigned int>; bool CallDestructors = true; SZ = unsigned int]’:
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/vector.h:543:13:   required from ‘vector<T, CallDestructors, SZ>& vector<T, CallDestructors, SZ>::push_back(T&&) [with T = std::pair<const sexpr_composite*, unsigned int>; bool CallDestructors = true; SZ = unsigned int]’
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/sexpr.cpp:193:19:   required from here
/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/src/src/util/vector.h:202:17: error: exception handling disabled, use ‘-fexceptions’ to enable
  202 |                 throw default_exception("Overflow encountered when expanding vector");
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gmake[2]: *** [src/util/CMakeFiles/util.dir/build.make:580: src/util/CMakeFiles/util.dir/sexpr.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1568: src/util/CMakeFiles/util.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
z3/4.13.0: 
z3/4.13.0: ERROR: Package '32317304257841009ca799ee836f0a44fa3b7b73' build failed
z3/4.13.0: WARN: Build folder /home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/build/Release
ERROR: z3/4.13.0: Error in build() method, line 111
    cmake.build()
    ConanException: Error 2 while executing cmake --build "/home/dapeng/.conan/data/z3/4.13.0/_/_/build/32317304257841009ca799ee836f0a44fa3b7b73/build/Release" '--' '-j32'
markRtron commented 5 days ago

I ran into the same issue. I got compilation to run by modifying the cxx_compile_flags_override.cmake (in /home/dapeng/.conan/data/z3/4.13.0/_/_/source/32317304257841009ca799ee836f0a44fa3b7b73/src/cmake) and changing it to:

# This file overrides the default compiler flags for CMake's built-in
# configurations (CMAKE_BUILD_TYPE). Most compiler flags should not be set here.
# The main purpose is to have very fine grained control of the compiler flags.

# We only override the defaults for Clang and GCC right now.
# CMake's MSVC logic is complicated so for now it's better to just inherit CMake's defaults.
if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU"))
  # Taken from Modules/Compiler/GNU.cmake
  set(CMAKE_CXX_FLAGS_INIT "-fexceptions")
  set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g -O0 -fexceptions")
  set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG -fexceptions")
  set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG -fexceptions")
  set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG -fexceptions")
endif()

Unfortunately, (at least for me) the build is producing further issues when compiling the actual code base for Orbit. After I removed -Werror=ignored-attributes from the add_compile_options section in CMakeList.txt in the local orbit source code checkout, the compilation works. One test case fails, though, but that seems to be related to the code being a pre-release. Starting Orbit just works fine.