LLNL / sundials

Official development repository for SUNDIALS - a SUite of Nonlinear and DIfferential/ALgebraic equation Solvers. Pull requests are welcome for bug fixes and minor changes.
https://computing.llnl.gov/projects/sundials
BSD 3-Clause "New" or "Revised" License
520 stars 129 forks source link

many link errors about missing <file>.f90.obj during sundials build #601

Open rughar opened 2 days ago

rughar commented 2 days ago

Current Behavior:

I am building sundials 7.1.1 for c++ and fortran and cant finish install step in Visual Studio due to many link errors. It seems .c.obj files are properly created but .f90.obj are not

Expected Behavior:

I would expect with flag -DBUILD_FORTRAN_MODULE_INTERFACE=on there will be a buildable solution for fortran code of sundials in visual studio

Steps To Reproduce:

  1. Download sundials into \sundials-7.1.1
  2. Create folders \build , \install , \examples
  3. goto \build and run cmake -DCMAKE_INSTALL_PREFIX=..\install -DEXAMPLES_INSTALL_PATH=..\examples ..\sundials-7.1.1 -DBUILD_FORTRAN_MODULE_INTERFACE=on
  4. open \build\SUNDIALS.sln in Visual Studio
  5. Try INSTALL step on RelWithDebInfo
  6. See many errors similar to "Error LNK1181 cannot open input file '...\build\src\cvodes\fmod_int64\sundials_fcvodes_mod_obj_static.dir\RelWithDebInfo\fcvodes_mod.f90.obj' sundials_fcvodes_mod_static ...\build\src\cvodes\fmod_int64\LINK 1"

Environment:

Anything else:

I can see in folder ...\build\src\cvodes\fmod_int64\sundials_fcvodes_mod_obj_static.dir\RelWithDebInfo

there is a file fcvodes_mod.c.obj and no fcvodes_mod.f90.obj If that is a problem, is there a way to fix that?

balos1 commented 1 day ago

We test with the Intel compilers on Windows with ninja, so that should work now (if that helps as a workaround). I will look into this specific setup (Intel fortran compiler + Visual Studio).