[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1032275: gcc-12-cross: gfortran-12-ARCH is missing Provides: virtual packages



Control: tags -1 + wontfix
Control: close -1
Control: block 983600 by 666743

Hi Dima,

On Thu, Mar 02, 2023 at 09:15:41AM -0800, Dima Kogan wrote:
> Hi. This is the underlying cause of
> 
>   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983600

Thank you for working on this and thank you for consulting with
d-cross@l.d.o.

> Installing libopenmpi-dev:foreign is impossible because it depends on
> some virtual gfortran packages that the cross-compiler is not providing.
> I see this:
> 
>   # dpkg --print-architecture
>   amd64
> 
>   # dpkg --print-foreign-architectures
>   arm64
> 
>   # apt install libopenmpi-dev:arm64
>   ...
>   The following packages have unmet dependencies:
>    libopenmpi-dev:arm64 : Depends: gfortran-12:arm64 but it is not going to be installed or
>                                    gfortran-mod-15:arm64
> 
>   # apt show libopenmpi-dev:arm64
>   Package: libopenmpi-dev:arm64
>   Depends: gfortran-12 | gfortran-mod-15, ...
> 
> So to install libopenmpi-dev:arm64 we need gfortran-mod-15. This is
> provided by the native compiler:
> 
>   # apt show gfortran-12 | grep Provides
>   Provides: fortran95-compiler, gfortran-mod-15
> 
> But not by the cross compiler:
> 
>   # apt show gfortran-12-aarch64-linux-gnu | grep Provides
>   ---- nothing printed ----

Good summary of the problem. Thanks.

> Should the cross-compiler Provide this? Or is libopenmpi-dev wrong to
> Depend on it?

If gfortran-<ver>-<triplet> were to provide gfortran-mod-15, bad things
were to happen. Provides inherit the Multi-Arch property, and since
gfortran-<ver>-<triplet> is M-A:foreign, so would be gfortran-mod-15 and
that would mean that gfortran-12-sparc-linux-gnu would satisfy
libopenmpi-dev:arm64, which is something we really don't want.

The other alternative here is changing dependencies of libopenmpi-dev
and while that sounds workable initially, it isn't immediately obvious
what to change it to. Fortunately, the answer is already being worked
on. libopenmpi-dev should Depends: gfortran-12-for-host as its first
alternative. The minor downside is that gfortran-12-for-host doesn't
exist (yet). Since gfortran-12-for-host will be M-A:same, it can indeed
provide gfortran-mod-15 and thus solve the issue from the other side.

The bug that adds -for-host is #666743. It needs desperately needs more
people working on it, especially with reviewing and testing.

For these reasons, I'm going to close this bug report and hope you
agree. It really isn't actionable on the gcc side and #666743 should
entirely solve the issue.

Helmut


Reply to: