You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having an issue trying to build a code using f2py with meson (aka Python 3.12). To wit, I have an f2py code that depends on a library libMAPL.base.so. When I try and use f2py with it, I get this error from Meson:
The Meson build system
Version: 1.4.1
Source dir: /tmp/tmpzxxmb51m
Build dir: /tmp/tmpzxxmb51m/bbdir
Build type: native build
meson.build:35:10: ERROR: Expecting lparen got assign.
MAPL.base = declare_dependency(link_args : ['-lMAPL.base'])
^
A full log can be found at /tmp/tmpzxxmb51m/bbdir/meson-logs/meson-log.txt
Traceback (most recent call last):
File "/usr/local/other/GEOSpyD/24.4.0-0_py3.12/2024-05-31/bin/f2py", line 10, in<module>sys.exit(main())
^^^^^^
File "/usr/local/other/GEOSpyD/24.4.0-0_py3.12/2024-05-31/lib/python3.12/site-packages/numpy/f2py/f2py2e.py", line 766, in main
run_compile()
File "/usr/local/other/GEOSpyD/24.4.0-0_py3.12/2024-05-31/lib/python3.12/site-packages/numpy/f2py/f2py2e.py", line 738, in run_compile
builder.compile()
File "/usr/local/other/GEOSpyD/24.4.0-0_py3.12/2024-05-31/lib/python3.12/site-packages/numpy/f2py/_backends/_meson.py", line 178, in compile
self.run_meson(self.build_dir)
File "/usr/local/other/GEOSpyD/24.4.0-0_py3.12/2024-05-31/lib/python3.12/site-packages/numpy/f2py/_backends/_meson.py", line 171, in run_meson
self._run_subprocess_command(setup_command, build_dir)
File "/usr/local/other/GEOSpyD/24.4.0-0_py3.12/2024-05-31/lib/python3.12/site-packages/numpy/f2py/_backends/_meson.py", line 167, in _run_subprocess_command
subprocess.run(command, cwd=cwd, check=True)
File "/usr/local/other/GEOSpyD/24.4.0-0_py3.12/2024-05-31/lib/python3.12/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['meson', 'setup', 'bbdir']' returned non-zero exit status 1.
Python and NumPy Versions:
1.26.4
3.12.2 | packaged by conda-forge | (main, Feb 16 2024, 20:50:58) [GCC 12.3.0]
Uh oh!
There was an error while loading. Please reload this page.
Describe the issue:
I'm having an issue trying to build a code using f2py with meson (aka Python 3.12). To wit, I have an f2py code that depends on a library
libMAPL.base.so
. When I try and usef2py
with it, I get this error from Meson:I believe the issue is that Meson thinks that
MAPL.base
is a method of theMAPL
object or something? (I do not know Meson.)You can reproduce this with the code below (saved as
qsat_py.F90
) running with:Reproduce the code example:
Error message:
Python and NumPy Versions:
1.26.4
3.12.2 | packaged by conda-forge | (main, Feb 16 2024, 20:50:58) [GCC 12.3.0]
Runtime Environment:
[{'numpy_version': '1.26.4',
'python': '3.12.2 | packaged by conda-forge | (main, Feb 16 2024, 20:50:58) '
'[GCC 12.3.0]',
'uname': uname_result(system='Linux', node='discover33', release='5.14.21-150400.24.81-default', version='#1 SMP PREEMPT_DYNAMIC Tue Aug 8 14:10:43 UTC 2023 (90a74a8)', machine='x86_64')},
{'simd_extensions': {'baseline': ['SSE', 'SSE2', 'SSE3'],
'found': ['SSSE3',
'SSE41',
'POPCNT',
'SSE42',
'AVX',
'F16C',
'FMA3',
'AVX2'],
'not_found': ['AVX512F',
'AVX512CD',
'AVX512_KNL',
'AVX512_KNM',
'AVX512_SKX',
'AVX512_CLX',
'AVX512_CNL',
'AVX512_ICL',
'AVX512_SPR']}},
{'filepath': '/gpfsm/dulocal15/sles15/other/GEOSpyD/24.4.0-0_py3.12/2024-05-31/lib/libmkl_rt.so.2',
'internal_api': 'mkl',
'num_threads': 1,
'prefix': 'libmkl_rt',
'threading_layer': 'intel',
'user_api': 'blas',
'version': '2023.2-Product'},
{'filepath': '/gpfsm/dulocal15/sles15/other/GEOSpyD/24.4.0-0_py3.12/2024-05-31/lib/libomp.so',
'internal_api': 'openmp',
'num_threads': 1,
'prefix': 'libomp',
'user_api': 'openmp',
'version': None}]
Context for the issue:
We cannot move to Python 3.12 unless we can work around this. Is there someway to have f2py "mangle" the variables it constructs in meson?
The text was updated successfully, but these errors were encountered: