Your message dated Tue, 28 Oct 2025 10:36:29 +0000
with message-id <[email protected]>
and subject line Bug#1078861: fixed in numpy 1:2.3.4+ds-1
has caused the Debian Bug report #1078861,
regarding python3-numpy: f2py does not link object files correctly when 
building extension modules
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1078861: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1078861
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: python3-numpy
Version: 1:1.26.4+ds-11
Severity: normal
X-Debbugs-Cc: [email protected]

Dear Maintainer,
  I use f2py to use fortran subroutines from python scripts. With meson backend 
I am having problems, when I link object files to create extension modules.
I report the following simplified example.
I have two files:
provamod.f90
subroutine pp(x,y)
  implicit none
  double precision x,y
  y=sin(x)
end subroutine

and 

provasub.f90
subroutine func(x,f)
!f2py intent(in) x
!f2py intent(out) f
  implicit none
  double precision x,f
  call pp(x,f)
end subroutine

The compilation is the following
gfortran -c provamod.f90 <enter>
ls provamod* <enter>
provamod.f90  provamod.o
f2py -c -m prova provasub.f90 provamod.o <enter>
Cannot use distutils backend with Python>=3.12, using meson backend instead.
Using meson backend
Will pass --lower to f2py
See https://numpy.org/doc/stable/f2py/buildtools/meson.html
Reading fortran codes...
        Reading file 'provasub.f90' (format:free)
Post-processing...
        Block: prova
                        Block: func
Applying post-processing hooks...
  character_backward_compatibility_hook
Post-processing (stage 2)...
Building modules...
    Building module "prova"...
    Generating possibly empty wrappers"
    Maybe empty "prova-f2pywrappers.f"
        Constructing wrapper function "func"...
          f = func(x)
    Wrote C/API module "prova" to file "./provamodule.c"
The Meson build system
Version: 1.5.1
Source dir: /tmp/tmpumsqkcku
Build dir: /tmp/tmpumsqkcku/bbdir
Build type: native build
Project name: prova
Project version: 0.1
Fortran compiler for the host machine: gfortran (gcc 13.3.0 "GNU Fortran 
(Debian 13.3.0-3) 13.3.0")
Fortran linker for the host machine: gfortran ld.bfd 2.43
C compiler for the host machine: cc (gcc 13.3.0 "cc (Debian 13.3.0-3) 13.3.0")
C linker for the host machine: cc ld.bfd 2.43
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program /usr/bin/python3 found: YES (/usr/bin/python3)
Found pkg-config: YES (/usr/bin/pkg-config) 1.8.1
Run-time dependency python found: YES 3.12
Library quadmath found: YES
Build targets in project: 1

Found ninja-1.12.1 at /usr/bin/ninja
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/bin/ninja -C 
/tmp/tmpumsqkcku/bbdir
ninja: Entering directory `/tmp/tmpumsqkcku/bbdir'
[6/6] Linking target prova.cpython-312-x86_64-linux-gnu.so

ls prova* <enter>
prova.cpython-312-x86_64-linux-gnu.so  provamod.o  provasub.f90
provamod.f90                         

Now I start python and I get:

python3 <enter>
Python 3.12.4 (main, Jul 15 2024, 12:17:32) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> import prova
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: 
/home/stefano/Downloads/prova/prova.cpython-312-x86_64-linux-gnu.so: undefined 
symbol: pp_
>>> 

It looks like the object file was not loaded. 
I get the same thing if I indicate the path of the object file

f2py -c -m prova provasub.f90 $(pwd)/provamod.o
Cannot use distutils backend with Python>=3.12, using meson backend instead.
Using meson backend
Will pass --lower to f2py
See https://numpy.org/doc/stable/f2py/buildtools/meson.html
Reading fortran codes...
        Reading file 'provasub.f90' (format:free)
Post-processing...
        Block: prova
                        Block: func
Applying post-processing hooks...
  character_backward_compatibility_hook
Post-processing (stage 2)...
Building modules...
    Building module "prova"...
    Generating possibly empty wrappers"
    Maybe empty "prova-f2pywrappers.f"
        Constructing wrapper function "func"...
          f = func(x)
    Wrote C/API module "prova" to file "./provamodule.c"
The Meson build system
Version: 1.5.1
Source dir: /tmp/tmp3jiab8oq
Build dir: /tmp/tmp3jiab8oq/bbdir
Build type: native build
Project name: prova
Project version: 0.1
Fortran compiler for the host machine: gfortran (gcc 13.3.0 "GNU Fortran 
(Debian 13.3.0-3) 13.3.0")
Fortran linker for the host machine: gfortran ld.bfd 2.43
C compiler for the host machine: cc (gcc 13.3.0 "cc (Debian 13.3.0-3) 13.3.0")
C linker for the host machine: cc ld.bfd 2.43
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program /usr/bin/python3 found: YES (/usr/bin/python3)
Found pkg-config: YES (/usr/bin/pkg-config) 1.8.1
Run-time dependency python found: YES 3.12
Library quadmath found: YES
Build targets in project: 1

Found ninja-1.12.1 at /usr/bin/ninja
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/bin/ninja -C 
/tmp/tmp3jiab8oq/bbdir
ninja: Entering directory `/tmp/tmp2jiab8oq/bbdir'
[6/6] Linking target prova.cpython-312-x86_64-linux-gnu.so

python3 
Python 3.12.4 (main, Jul 15 2024, 12:17:32) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import prova
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: 
/home/stefano/Downloads/prova/prova.cpython-312-x86_64-linux-gnu.so: undefined 
symbol: pp_
>>>

Only the complete compilation works:

f2py -c -m prova provasub.f90 provamod.f90
Cannot use distutils backend with Python>=3.12, using meson backend instead.
Using meson backend
Will pass --lower to f2py
See https://numpy.org/doc/stable/f2py/buildtools/meson.html
Reading fortran codes...
        Reading file 'provasub.f90' (format:free)
        Reading file 'provamod.f90' (format:free)
Post-processing...
        Block: prova
                        Block: func
                        Block: pp
Applying post-processing hooks...
  character_backward_compatibility_hook
Post-processing (stage 2)...
Building modules...
    Building module "prova"...
    Generating possibly empty wrappers"
    Maybe empty "prova-f2pywrappers.f"
        Constructing wrapper function "func"...
          f = func(x)
    Generating possibly empty wrappers"
    Maybe empty "prova-f2pywrappers.f"
        Constructing wrapper function "pp"...
          pp(x,y)
    Wrote C/API module "prova" to file "./provamodule.c"
The Meson build system
Version: 1.5.1
Source dir: /tmp/tmpr_f2k6hu
Build dir: /tmp/tmpr_f2k6hu/bbdir
Build type: native build
Project name: prova
Project version: 0.1
Fortran compiler for the host machine: gfortran (gcc 13.3.0 "GNU Fortran 
(Debian 13.3.0-3) 13.3.0")
Fortran linker for the host machine: gfortran ld.bfd 2.43
C compiler for the host machine: cc (gcc 13.3.0 "cc (Debian 13.3.0-3) 13.3.0")
C linker for the host machine: cc ld.bfd 2.43
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program /usr/bin/python3 found: YES (/usr/bin/python3)
Found pkg-config: YES (/usr/bin/pkg-config) 1.8.1
Run-time dependency python found: YES 3.12
Library quadmath found: YES
Build targets in project: 1

Found ninja-1.12.1 at /usr/bin/ninja
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/bin/ninja -C 
/tmp/tmpr_f2k6hu/bbdir
ninja: Entering directory `/tmp/tmpr_f2k6hu/bbdir'
[7/7] Linking target prova.cpython-312-x86_64-linux-gnu.so


python3 
Python 3.12.4 (main, Jul 15 2024, 12:17:32) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import prova
>>> 

I have never encountered this difficulty before (with distutils). I also tried 
to transform the object into provamod.a library and then link it also 
indicating -L$(pwd) but it doesn't work.
Thank you in advance
Stefano

-- System Information:
Debian Release: trixie/sid
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 
'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.9.12-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages python3-numpy depends on:
ii  libatlas3-base [liblapack.so.3]        3.10.3-14
ii  libblas3 [libblas.so.3]                3.12.0-3
ii  libc6                                  2.39-6
ii  libgcc-s1                              14-20240330-1
ii  liblapack3 [liblapack.so.3]            3.12.0-3
ii  libopenblas0-pthread [liblapack.so.3]  0.3.27+ds-2
ii  python3                                3.12.4-1
ii  python3-pkg-resources                  70.3.0-2

python3-numpy recommends no packages.

Versions of packages python3-numpy suggests:
ii  gcc               4:13.2.0-7
ii  gfortran          4:13.2.0-7
pn  python-numpy-doc  <none>
ii  python3-dev       3.12.4-1
pn  python3-pytest    <none>

-- no debconf information

--- End Message ---
--- Begin Message ---
Source: numpy
Source-Version: 1:2.3.4+ds-1
Done: Timo Röhling <[email protected]>

We believe that the bug you reported is fixed in the latest version of
numpy, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Timo Röhling <[email protected]> (supplier of updated numpy package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 28 Oct 2025 10:40:01 +0100
Source: numpy
Architecture: source
Version: 1:2.3.4+ds-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Python Team <[email protected]>
Changed-By: Timo Röhling <[email protected]>
Closes: 1078861
Changes:
 numpy (1:2.3.4+ds-1) unstable; urgency=medium
 .
   * New upstream version 2.3.4+ds
   * Disable version warning banner in offline documentation
   * Migrate debian/watch to version 5 format
   * Refresh patches (no functional changes)
   * Fix f2py object file handling regression with meson backend
     (Closes: #1078861)
   * Build-Depend on python3-pytz instead of deprecated python3-tz
Checksums-Sha1:
 f7ede1762ceb23868caef69d7d1a4fa47dbbb5fe 3645 numpy_2.3.4+ds-1.dsc
 46d3d4938841770b76a885e86cecf592bb8fbe83 15387708 numpy_2.3.4+ds.orig.tar.xz
 3deab5cb624f60be6a89b1a7c8a398a460b00dad 161272 numpy_2.3.4+ds-1.debian.tar.xz
Checksums-Sha256:
 21030f52df1bc803e70d3545f4b641364a54b67ba4f80079624090c1cdb944cc 3645 
numpy_2.3.4+ds-1.dsc
 89c537f0535212c9de9e38ac5282d6971b4457b8658245a158e7bd85f13346b4 15387708 
numpy_2.3.4+ds.orig.tar.xz
 7b0a1cfb1f26b94a39f8b3f8037e09f65d335d51824916295fee40a271053b58 161272 
numpy_2.3.4+ds-1.debian.tar.xz
Files:
 29db02e1f9e8e2924aea2c45c6067c56 3645 python optional numpy_2.3.4+ds-1.dsc
 c4931e8d3b9dfb4b0aa9f2750e08a45a 15387708 python optional 
numpy_2.3.4+ds.orig.tar.xz
 4ff1d76f80bd15dde7faf79a727e4d49 161272 python optional 
numpy_2.3.4+ds-1.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iQJIBAEBCgAyFiEEmwPruYMA35fCsSO/zIxr3RQD9MoFAmkAlS8UHHJvZWhsaW5n
QGRlYmlhbi5vcmcACgkQzIxr3RQD9MqOsg/8CBwVh2WrYnhA21PEFPOrgY9Pm/PY
6J+JnK1gQgBQd999JI9MS/2MNuMVbh2BE+hwCfJzOJGc+Yl7n1mgj6BWJBMIrF3D
rmxk6RIuGEtLpsTSxpq0fxq/Vl5SiMl46BTxLv/Unv1+5pWgr10yuJXHLBQ89JY2
6DnMD/uUGnqwjtC9iyR3MCgTnX+3QP5WJUPCk4kS3CI0DcO9ho2k19uZPklH93kd
uXCWytqRt+ROwerD9OXEoqnkWWHV20UeK1bklmMi1eVTTuxrKHbxrrRsbLKy96QY
PqHVoyh7uSmO3voZnYIaX0QjChO9eE44lSHBcErQgoihiQwJB18oMtryGpZxKlay
i4ZydsGfQBZ0MhBRaHEV5r8tAdyBs3KPVB6V1byYOo6gUAfhjucXL7LZVAuOEXBs
UYdytE6U7aJnIpL64WDwhOHzH049HTCksqchmZYw4+hLVThgwdKRF2nWp993FFhS
jbLGw0I6bGj6O/TlehMu7caXoGUvDaBy0Cv39hSY4HDUBFWOdl+xmBDCtQLwo82j
z49OtBhM+q2p3FVJ2+Uj6FfAArCPyvKlY49kP25PTB1WqP/MCkI/7kZBjBPLqGkq
rX1uOYzSd8vO1JjfbmehjJQEB9/lbu14dCUDIaVbEuu7K8ISwM8P0kTEq0a/39ph
sF9gwgtdPYUJ6RA=
=17LZ
-----END PGP SIGNATURE-----

Attachment: pgpKWlP1Xdf6_.pgp
Description: PGP signature


--- End Message ---

Reply via email to