spatial-model-editor / sme_deps_common

various libraries statically compiled for linux / macOS / windows
MIT License
2 stars 0 forks source link

dune-copasi 2 support #28

Open lkeegan opened 11 months ago

lkeegan commented 11 months ago
lkeegan commented 8 months ago

lapack will be complicated to do correctly on linux/windows:

the above should hopefully work for the compiled binaries, but

lkeegan commented 8 months ago

building gfortran with PIC seems to work at least locally:

../configure --prefix=/opt/gccfpic --disable-shared --with-pic --disable-gcov --disable-multilib --disable-bootstrap --enable-languages=fortran
make -j30
sudo make install
lkeegan commented 8 months ago

Branch with some incomplete attempt at this here: https://github.com/spatial-model-editor/sme_deps_common/tree/gfortran_fpic

Status:

Possible ways forward (in ascending order of unmaintability):

  1. don't add suitesparse or any lapack/fortran-dependent libs (i.e. delete this branch)
  2. skip gfortran/openblas and only build suitesparse on mac
    • make suitesparse an optional build-time dependency of sme, only enable it for mac
  3. use system fortran compilers on linux/windows & statically link libgfortran/libquadmath
    • pass libs through to sme build & enable suitesparse
    • disable suitesparse & do not link these libs in sme wheel build (not PIC -> can't link in shared lib)
  4. use custom linux gfortran, need to pass lapack/gfortran libs all the way to sme build, but then can use them in the wheel
  5. try to do this on windows
    • either by fiddling with patches & config options when building gfortran such that it links with the system libstdc++
    • or by modifying the recipe for gcc & building our own complete fpic gcc msys2 toolchain