-
Notifications
You must be signed in to change notification settings - Fork 42
Description
Hello! I'm trying to build the dynamatic project which seems to inherit -fno-exceptions from LLVM. Here's an example build command invoked as part of build.sh building the project.
/usr/bin/ccache /usr/bin/clang++ -DDYNAMATIC_ENABLE_CBC -DDYNAMATIC_GUROBI_NOT_INSTALLED -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/scratch/ed596/dynamatic/polygeist/llvm-project/llvm/include -I/scratch/ed596/dynamatic/polygeist/llvm-project/build/include -I/scratch/ed596/dynamatic/polygeist/llvm-project/mlir/include -I/scratch/ed596/dynamatic/polygeist/llvm-project/build/tools/mlir/include -I/scratch/ed596/dynamatic/polygeist/llvm-project/clang/include -I/scratch/ed596/dynamatic/polygeist/llvm-project/build/tools/clang/include -I/scratch/ed596/dynamatic/polygeist/llvm-project/polly/include -I/scratch/ed596/dynamatic/polygeist/llvm-project/build/tools/polly/lib/External/isl/include -I/scratch/ed596/dynamatic/polygeist/llvm-project/polly/lib/External/isl/include -I/scratch/ed596/dynamatic/polygeist/llvm-project/build/tools/polly/include -I/scratch/ed596/dynamatic/include -I/scratch/ed596/dynamatic/DYNAMATIC_BINARY_DIR -I/scratch/ed596/dynamatic/build -I/scratch/ed596/dynamatic/build/include -I/scratch/ed596/dynamatic/experimental/include -I/scratch/ed596/dynamatic/build/experimental/include -I/scratch/ed596/dynamatic/dynamatic-opt -I/scratch/ed596/dynamatic/PRIVATE -I/scratch/ed596/downloads/dist/include/coin-or -fno-exceptions -frtti -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=gnu++17 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-exceptions -funwind-tables -fno-exceptions -funwind-tables -MD -MT tools/translate-llvm-to-std/CMakeFiles/translate-llvm-to-std.dir/main.cpp.o -MF tools/translate-llvm-to-std/CMakeFiles/translate-llvm-to-std.dir/main.cpp.o.d -o tools/translate-llvm-to-std/CMakeFiles/translate-llvm-to-std.dir/main.cpp.o -c /scratch/ed596/dynamatic/tools/translate-llvm-to-std/main.cpp
This seems to be an issue, however, since Cbc (which Dynamatic depends on- although the makefile lets compilation proceed with it missing, BufferPlacement/CFDFC.cpp fails to find CbcSolver) throws exceptions. I have the most recent master (b22ed24) installed and pointed to through PKG_CONFIG_PATH- unfortunately, I do not have root access to this machine.
coin-or/coin/CoinPackedMatrix.hpp:200:7: error: cannot use 'throw' with exceptions disabled
throw CoinError("bad index", "vector", "CoinPackedMatrix");
I can think of two potential solutions: hack out all of the throws in the library (which may be ok if they're only for debugging, although some of them seem like important sanity checks), or track down the cmake dependency hell to set on fexceptions to overwrite the others (although building half of the project with -fno-exceptions and the other without seems sketchy). Is there a version of Cbc without exceptions that Dynamatic is supposed to be built against?
Thanks very much!