I was not able to compile it on a Debian 11 with plain python 3.9 and gcc10. The first issue is a type mismatch on GCC and the second issue is the order to compile the Fortran files. The spectra.f90 should be the first one to be compiled but distutils does not respect that.
What I did to get it installed and compiled in a pretty hackish manner, don't recommend to anyone, but pointing to what should be properly done on distutils:
stavanger:~/mtspec$ git diff
diff --git a/setup.py b/setup.py
index b7ac047..d6ddbd3 100644
--- a/setup.py
+++ b/setup.py
@@ -141,10 +141,20 @@ if arch_flag:
else:
extra_link_args = None
+liba = MyExtension('mtspeca',
+ libraries=["gfortran"],
+ library_dirs=get_libgfortran_dir(),
+ extra_link_args=extra_link_args,
+ extra_compile_args = ["-fallow-argument-mismatch"],
+ sources=[
+ src + 'spectra.f90'])
+
+
lib = MyExtension('mtspec',
libraries=["gfortran"],
library_dirs=get_libgfortran_dir(),
extra_link_args=extra_link_args,
+ extra_compile_args = ["-fallow-argument-mismatch"],
sources=[
src + 'spectra.f90', src + 'adaptspec.f90',
src + 'atanh2.f90',
@@ -187,7 +197,7 @@ setup_config = dict(
'tests': ['flake8>=3']
},
ext_package='mtspec.lib',
- ext_modules=[lib],
+ ext_modules=[liba, lib],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
I was not able to compile it on a Debian 11 with plain python 3.9 and gcc10. The first issue is a type mismatch on GCC and the second issue is the order to compile the Fortran files. The spectra.f90 should be the first one to be compiled but distutils does not respect that.
Solutions:
-fallow-argument-mismatch"to the compile flag.What I did to get it installed and compiled in a pretty hackish manner, don't recommend to anyone, but pointing to what should be properly done on distutils: