Petsc compilation with msys2/mingw64


  • I try to compile my own petsc from the source code using msys2/mingw64 but i get an error “argument list too long” at the linker stage. I know it’s possible to split the compilation (–with-single-library=0 and that works) but i’d rather have only one petsc.dll file. Did you encounter that issue when compiling ?

  • Do the files Petsc.dll and Petsc-complex.dll are freefem modules or original petsc shared libraries ? If there are ff modules, that mean they are compiled using petsc as static library ?

Thanks for helping.

PS : I read the petsc mail archive here that @prj had the same problem in 2018.

Which PETSc version are you trying to compile?

Same problem occurs with older version

3.7.2 is extremely old, please try a newer version.

Sorry it’s the 3.17.2 !

The problem is not related to petsc but rather with msys2.
Do you compile petsc as static library ?