-
Notifications
You must be signed in to change notification settings - Fork 91
Description
Hi,
Would it be possible to add instructions on how to compile swatplus with dynamic link to libgfortran.so instead of just the static option (libgfortran.a)?
I made it compile by removing the link_libraries("-static") lines in the CMakeLists.txt. But I don't know if that is the correct approach, or if it will break other things later.
Adding this information to the documentation on building SWAT, or adding a configuration options for people to choose dynamic/static linkage, would probably be useful.
When I ran the ctest command, I got an error with the following message in the log:
.....
Original Simulation 5 5 1990 Yr 16 of 46 Time 16:33:17
Original Simulation 5 6 1990 Yr 16 of 46 Time 16:33:17
Original Simulation 5 7 1990 Yr 16 of 46 Time 16:33:17
Original Simulation 5 8 1990 Yr 16 of 46 Time 16:33:17
Original Simulation 5 9 1990 Yr 16 of 46 Time 16:33:17
Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.
Backtrace for this error:
#0 0x7f6529c3e4cf in ???
#1 0x7f6529f7383d in ???
#2 0x562a6fe5636f in ???
#3 0x562a6fb901a5 in ???
#4 0x562a6f820b58 in ???
#5 0x562a703e1ad9 in ???
#6 0x562a6fda08c1 in ???
#7 0x562a6fda0f37 in ???
#8 0x7f6529c27634 in ???
#9 0x7f6529c276e8 in ???
#10 0x562a6f4cd424 in ???
#11 0xffffffffffffffff in ???
SWAT+ exited with code: -8
Processing 'mgt_out.txt' in
(1) /home/user/git-packages/swatplus/data/Ames_sub1 and
(2) /home/user/git-packages/swatplus/build/data/Ames_sub1
Full log: LastTest.log
So I don't know if it is related to the compilation process, or if the test is broken due to other problems.
Context:
I was trying to compile swatplus in Arch Linux, and looks like it does not ship with libgfortran.a anymore, and to get the libgfortran.a file, I need to recompile the gcc tools, which takes hours. So I wanted to see if I could compile swatplus to use the dynamic library that is already available instead of the static one, and I did not find any documentation.