Bug#1086679: gfortran-for-host should provide libgfortran.so on a default library path
Package: gfortran-14-for-host
Version: 14.2.0-7
Tags: patch
User: debian-cross@lists.debian.org
Usertags: ftcbfs
Control: affects -1 + src:lapack
Hi Matthias,
I looked into cross building lapack and that mostly works except that
dpkg-shlibdeps fails to find libgfortran.so. I looked and there is a
subtle cross/native difference at play here. The native
gfortran-PV-arch_gnusuffix built from gcc-PV depends on
libgfortran-PV-dev whereas the cross toolchain
gfortran-PV-arch_gnusuffix built from gcc-PV-cross depends on
libgfortran-PV-dev-ARCH-cross. I think this is right as the cross
toolchain cannot issue cross-architecture dependencies. Still this means
that when using a cross toolchain, libgfortran.so is placed in
/usr/triplet and not found by dpkg-shlibdeps. Really though when
depending on gfortran-for-host, I want to expect that dpkg-shlibdeps
just works on generated binaries. I propose that we duplicate the
libgfortran-PV-dev dependency issued from the native toolchain
gfortran-PV-arch_gnusuffix into the gfortran-PV-for-host package. In the
native case, it will be satisfied already and in the cross case it will
pull the library that makes dpkg-shlibdeps happy. I'm attaching the
obvious patch for your convenience.
Helmut
diff --minimal -Nru gcc-14-14.2.0/debian/changelog gcc-14-14.2.0/debian/changelog
--- gcc-14-14.2.0/debian/changelog 2024-10-19 09:24:57.000000000 +0200
+++ gcc-14-14.2.0/debian/changelog 2024-11-03 19:29:38.000000000 +0100
@@ -1,3 +1,10 @@
+gcc-14 (14.2.0-7.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Let gfortran-PV-for-host depend on libgfortran-PV-dev. (Closes: #-1)
+
+ -- Helmut Grohne <helmut@subdivi.de> Sun, 03 Nov 2024 19:29:38 +0100
+
gcc-14 (14.2.0-7) unstable; urgency=medium
* Update to git 20241019 from the gcc-14 branch.
diff --minimal -Nru gcc-14-14.2.0/debian/control gcc-14-14.2.0/debian/control
--- gcc-14-14.2.0/debian/control 2024-09-15 10:27:06.000000000 +0200
+++ gcc-14-14.2.0/debian/control 2024-11-03 19:29:31.000000000 +0100
@@ -2980,7 +2980,8 @@
X-DH-Build-For-Type: target
Multi-Arch: same
Depends: gcc-14-base (= ${gcc:Version}), gfortran-14${target:suffix} (>= ${gcc:SoftVersion}),
- gcc-14-for-host (= ${gcc:Version}), ${misc:Depends}
+ gcc-14-for-host (= ${gcc:Version}), ${misc:Depends},
+ libgfortran-14-dev (= ${gcc:Version}),
Description: GNU Fortran compiler for the host architecture
This is the GNU Fortran compiler for the host architecture,
which compiles Fortran on platforms supported by the gcc compiler.
diff --minimal -Nru gcc-14-14.2.0/debian/control.m4 gcc-14-14.2.0/debian/control.m4
--- gcc-14-14.2.0/debian/control.m4 2024-08-02 02:50:33.000000000 +0200
+++ gcc-14-14.2.0/debian/control.m4 2024-11-03 19:29:02.000000000 +0100
@@ -2846,7 +2846,8 @@
TARGET_PACKAGE`'dnl
Multi-Arch: same
Depends: BASEDEP, gfortran`'PV`'${target:suffix} (>= ${gcc:SoftVersion}),
- gcc`'PV`'-for-host (= ${gcc:Version}), ${misc:Depends}
+ gcc`'PV`'-for-host (= ${gcc:Version}), ${misc:Depends},
+ libidevdep(gfortran`'PV-dev,,=),
BUILT_USING`'dnl
Description: GNU Fortran compiler for the host architecture
This is the GNU Fortran compiler for the host architecture,
Reply to: