Bug#963254: gcc-10: d/rules.def, set AQ to :all for cross build

2020-06-30 Thread Helmut Grohne
On Tue, Jun 30, 2020 at 02:34:35PM +0800, YunQiang Su wrote:
> No clear sense.
> I just wonder that will conficts happen for native gcc:i686 conflict with
> gcc-i686-linux-gnu:amd64?
> if gcc-i686-linux-gnu:amd64 is marked as Multi-Arch:foreign.

Well yes, there will be conflicts. Those conflicts are entirely
independent of the M-A value though. You see gcc-i686-linux-gnu:amd64
will contain /usr/bin/i686-linux-gnu-gcc. gcc:i686 presently contains
the same file. You cannot coinstall gcc-i686-linux-gnu:amd64 and
gcc:i386 in any case.

> And how about if multi foreign architecutures are added, for example:
> i686> dpkg --add-architecutre amd64 arm64 ppc64el
> ?

Well, you install only one compiler targeting i386. You get to choose
from which of these architectures you want to install the compiler.

You can only install one package owning /usr/bin/i686-linux-gnu-gcc at a
time. This seems pretty normal to me. What's the issue?

Helmut



Bug#963254: gcc-10: d/rules.def, set AQ to :all for cross build

2020-06-30 Thread YunQiang Su
Helmut Grohne  于2020年6月27日周六 上午12:00写道:
>
> Control: clone -1 -2
> Control: submitter -2 !
> Control: reassign -2 dpkg-cross
> Control: retitle -2 mark dpkg-crossed packages Multi-Arch: foreign
> Control: tags -2 + patch
>
> On Fri, Jun 26, 2020 at 02:12:46PM +0800, YunQiang Su wrote:
> > Helmut Grohne  于2020年6月26日周五 上午5:11写道:
> > > Did you actually try the patch to see whether it solves your problem?
> >
> > You patch cannot work:
> >
> > root@sid-i386:/build# dpkg -i
> > gcc-10-i686-linux-gnu_10.1.0-4cross1_amd64.deb
> > libgcc-10-dev-i386-cross_10.1.0-4cross1_all.deb
> > Selecting previously unselected package gcc-10-i686-linux-gnu:amd64.
> > (Reading database ... 42731 files and directories currently installed.)
> > Preparing to unpack gcc-10-i686-linux-gnu_10.1.0-4cross1_amd64.deb ...
> > Unpacking gcc-10-i686-linux-gnu:amd64 (10.1.0-4cross1) ...
> > Selecting previously unselected package libgcc-10-dev-i386-cross.
> > Preparing to unpack libgcc-10-dev-i386-cross_10.1.0-4cross1_all.deb ...
> > Unpacking libgcc-10-dev-i386-cross (10.1.0-4cross1) ...
> > dpkg: dependency problems prevent configuration of 
> > gcc-10-i686-linux-gnu:amd64:
> >  gcc-10-i686-linux-gnu:amd64 depends on libgcc-10-dev-i386-cross (>=
> > 10.1.0-4cross1).
> >
> > dpkg: error processing package gcc-10-i686-linux-gnu:amd64 (--install):
> >  dependency problems - leaving unconfigured
> > Setting up libgcc-10-dev-i386-cross (10.1.0-4cross1) ...
> > Errors were encountered while processing:
> >  gcc-10-i686-linux-gnu:amd64
>
> Thank you. You are correct. The patch cannot work as is. The patch can
> only change the Multi-Arch field of tool packages, not for library
> packages. Library packages should be Multi-Arch: same. However, we are
> converting those architecture-dependent Multi-Arch: same packages to
> libsomething-somearch-cross packages using dpkg-cross. And then they
> become Multi-Arch: foreign. Since they, too, carry the architecture in
> their name, they should be Multi-Arch: foreign as well. That's a pretty
> simple change to dpkg-cross. So we need both patches in combination
> here.
>
> Could you try answering the other question from my mail about why the
> Multi-Arch field would be harmful?

No clear sense.
I just wonder that will conficts happen for native gcc:i686 conflict with
gcc-i686-linux-gnu:amd64?
if gcc-i686-linux-gnu:amd64 is marked as Multi-Arch:foreign.

And how about if multi foreign architecutures are added, for example:
i686> dpkg --add-architecutre amd64 arm64 ppc64el
?

>
> Helmut



-- 
YunQiang Su



Bug#963254: gcc-10: d/rules.def, set AQ to :all for cross build

2020-06-26 Thread Helmut Grohne
Control: clone -1 -2
Control: submitter -2 !
Control: reassign -2 dpkg-cross
Control: retitle -2 mark dpkg-crossed packages Multi-Arch: foreign
Control: tags -2 + patch

On Fri, Jun 26, 2020 at 02:12:46PM +0800, YunQiang Su wrote:
> Helmut Grohne  于2020年6月26日周五 上午5:11写道:
> > Did you actually try the patch to see whether it solves your problem?
> 
> You patch cannot work:
> 
> root@sid-i386:/build# dpkg -i
> gcc-10-i686-linux-gnu_10.1.0-4cross1_amd64.deb
> libgcc-10-dev-i386-cross_10.1.0-4cross1_all.deb
> Selecting previously unselected package gcc-10-i686-linux-gnu:amd64.
> (Reading database ... 42731 files and directories currently installed.)
> Preparing to unpack gcc-10-i686-linux-gnu_10.1.0-4cross1_amd64.deb ...
> Unpacking gcc-10-i686-linux-gnu:amd64 (10.1.0-4cross1) ...
> Selecting previously unselected package libgcc-10-dev-i386-cross.
> Preparing to unpack libgcc-10-dev-i386-cross_10.1.0-4cross1_all.deb ...
> Unpacking libgcc-10-dev-i386-cross (10.1.0-4cross1) ...
> dpkg: dependency problems prevent configuration of 
> gcc-10-i686-linux-gnu:amd64:
>  gcc-10-i686-linux-gnu:amd64 depends on libgcc-10-dev-i386-cross (>=
> 10.1.0-4cross1).
> 
> dpkg: error processing package gcc-10-i686-linux-gnu:amd64 (--install):
>  dependency problems - leaving unconfigured
> Setting up libgcc-10-dev-i386-cross (10.1.0-4cross1) ...
> Errors were encountered while processing:
>  gcc-10-i686-linux-gnu:amd64

Thank you. You are correct. The patch cannot work as is. The patch can
only change the Multi-Arch field of tool packages, not for library
packages. Library packages should be Multi-Arch: same. However, we are
converting those architecture-dependent Multi-Arch: same packages to
libsomething-somearch-cross packages using dpkg-cross. And then they
become Multi-Arch: foreign. Since they, too, carry the architecture in
their name, they should be Multi-Arch: foreign as well. That's a pretty
simple change to dpkg-cross. So we need both patches in combination
here.

Could you try answering the other question from my mail about why the
Multi-Arch field would be harmful?

Helmut
diff --minimal -Nru dpkg-cross-2.6.15/dpkg-cross dpkg-cross-2.6.15/dpkg-cross
--- dpkg-cross-2.6.15/dpkg-cross2017-07-24 17:47:10.0 +0200
+++ dpkg-cross-2.6.15/dpkg-cross2020-06-26 17:52:45.0 +0200
@@ -1105,6 +1105,7 @@
print CONTROL "Section: " . $control{"section"} . "\n";
print CONTROL "Priority: extra\n";
print CONTROL "Architecture: all\n";
+   print CONTROL "Multi-Arch: foreign\n";
 
if (defined($control{"maintainer"})) {
print CONTROL "Maintainer: " . $control{"maintainer"} . "\n";


Processed: Re: Bug#963254: gcc-10: d/rules.def, set AQ to :all for cross build

2020-06-26 Thread Debian Bug Tracking System
Processing control commands:

> clone -1 -2
Bug #963254 [src:gcc-10] gcc-10: d/rules.def, set AQ to :all for cross build
Bug 963254 cloned as bug 963759
> submitter -2 !
Bug #963759 [src:gcc-10] gcc-10: d/rules.def, set AQ to :all for cross build
Changed Bug submitter to 'Helmut Grohne ' from 'YunQiang Su 
'.
> reassign -2 dpkg-cross
Bug #963759 [src:gcc-10] gcc-10: d/rules.def, set AQ to :all for cross build
Bug reassigned from package 'src:gcc-10' to 'dpkg-cross'.
No longer marked as found in versions gcc-10/10.1.0-4.
Ignoring request to alter fixed versions of bug #963759 to the same values 
previously set
> retitle -2 mark dpkg-crossed packages Multi-Arch: foreign
Bug #963759 [dpkg-cross] gcc-10: d/rules.def, set AQ to :all for cross build
Changed Bug title to 'mark dpkg-crossed packages Multi-Arch: foreign' from 
'gcc-10: d/rules.def, set AQ to :all for cross build'.
> tags -2 + patch
Bug #963759 [dpkg-cross] mark dpkg-crossed packages Multi-Arch: foreign
Added tag(s) patch.

-- 
963254: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=963254
963759: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=963759
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#963254: gcc-10: d/rules.def, set AQ to :all for cross build

2020-06-26 Thread YunQiang Su
Helmut Grohne  于2020年6月26日周五 上午5:11写道:
>
> On Thu, Jun 25, 2020 at 09:49:01AM +0800, YunQiang Su wrote:
> > Helmut Grohne  于2020年6月24日周三 上午6:30写道:
> > > On Sun, Jun 21, 2020 at 09:10:48PM +0800, YunQiang Su wrote:
> > > > The major problem is  Depends: libgcc-10-dev-i386-cross:amd64 (>=
> > > > 10.1.0-3cross1) but it is not installable
> > > > we need to mark gcc-10-i686-linux-gnu depends on
> > > > libgcc-10-dev-i386-cross:all to solve this problem.
> > >
> > > Can you try applying the attached patch?
> >
> > I don't think that mark gcc-N-triple as MA: foreign is a good idea.
> > It may confuse some user lot: will they try to install gcc-N-triple
> > from non-compliance arch?
>
> Can you elaborate on why you think this is not a good idea? In
> particular, #666743 will also include this change. The patch set has
> been there for quite a while. It would be high time comment on such an
> important aspect.
>
> I'm also confused about which users would be confused by the change. The
> idea is that it doesn't matter which gcc you install. apt will prefer
> the native one. What does "non-compliance" mean in this context?
>
> Did you actually try the patch to see whether it solves your problem?

You patch cannot work:

root@sid-i386:/build# dpkg -i
gcc-10-i686-linux-gnu_10.1.0-4cross1_amd64.deb
libgcc-10-dev-i386-cross_10.1.0-4cross1_all.deb
Selecting previously unselected package gcc-10-i686-linux-gnu:amd64.
(Reading database ... 42731 files and directories currently installed.)
Preparing to unpack gcc-10-i686-linux-gnu_10.1.0-4cross1_amd64.deb ...
Unpacking gcc-10-i686-linux-gnu:amd64 (10.1.0-4cross1) ...
Selecting previously unselected package libgcc-10-dev-i386-cross.
Preparing to unpack libgcc-10-dev-i386-cross_10.1.0-4cross1_all.deb ...
Unpacking libgcc-10-dev-i386-cross (10.1.0-4cross1) ...
dpkg: dependency problems prevent configuration of gcc-10-i686-linux-gnu:amd64:
 gcc-10-i686-linux-gnu:amd64 depends on libgcc-10-dev-i386-cross (>=
10.1.0-4cross1).

dpkg: error processing package gcc-10-i686-linux-gnu:amd64 (--install):
 dependency problems - leaving unconfigured
Setting up libgcc-10-dev-i386-cross (10.1.0-4cross1) ...
Errors were encountered while processing:
 gcc-10-i686-linux-gnu:amd64

>
> Helmut
>


-- 
YunQiang Su



Bug#963254: gcc-10: d/rules.def, set AQ to :all for cross build

2020-06-25 Thread Helmut Grohne
On Thu, Jun 25, 2020 at 09:49:01AM +0800, YunQiang Su wrote:
> Helmut Grohne  于2020年6月24日周三 上午6:30写道:
> > On Sun, Jun 21, 2020 at 09:10:48PM +0800, YunQiang Su wrote:
> > > The major problem is  Depends: libgcc-10-dev-i386-cross:amd64 (>=
> > > 10.1.0-3cross1) but it is not installable
> > > we need to mark gcc-10-i686-linux-gnu depends on
> > > libgcc-10-dev-i386-cross:all to solve this problem.
> >
> > Can you try applying the attached patch?
> 
> I don't think that mark gcc-N-triple as MA: foreign is a good idea.
> It may confuse some user lot: will they try to install gcc-N-triple
> from non-compliance arch?

Can you elaborate on why you think this is not a good idea? In
particular, #666743 will also include this change. The patch set has
been there for quite a while. It would be high time comment on such an
important aspect.

I'm also confused about which users would be confused by the change. The
idea is that it doesn't matter which gcc you install. apt will prefer
the native one. What does "non-compliance" mean in this context?

Did you actually try the patch to see whether it solves your problem?

Helmut



Bug#963254: gcc-10: d/rules.def, set AQ to :all for cross build

2020-06-24 Thread YunQiang Su
Helmut Grohne  于2020年6月24日周三 上午6:30写道:
>
> Hi,
>
> On Sun, Jun 21, 2020 at 09:10:48PM +0800, YunQiang Su wrote:
> > The major problem is  Depends: libgcc-10-dev-i386-cross:amd64 (>=
> > 10.1.0-3cross1) but it is not installable
> > we need to mark gcc-10-i686-linux-gnu depends on
> > libgcc-10-dev-i386-cross:all to solve this problem.
>
> Can you try applying the attached patch?

I don't think that mark gcc-N-triple as MA: foreign is a good idea.
It may confuse some user lot: will they try to install gcc-N-triple
from non-compliance arch?

>
> Helmut



-- 
YunQiang Su



Bug#963254: gcc-10: d/rules.def, set AQ to :all for cross build

2020-06-23 Thread Helmut Grohne
Hi,

On Sun, Jun 21, 2020 at 09:10:48PM +0800, YunQiang Su wrote:
> The major problem is  Depends: libgcc-10-dev-i386-cross:amd64 (>=
> 10.1.0-3cross1) but it is not installable
> we need to mark gcc-10-i686-linux-gnu depends on
> libgcc-10-dev-i386-cross:all to solve this problem.

Can you try applying the attached patch?

Helmut
diff --minimal -Nru gcc-10-10.1.0/debian/control gcc-10-10.1.0/debian/control
--- gcc-10-10.1.0/debian/control2020-05-15 15:11:57.0 +0200
+++ gcc-10-10.1.0/debian/control2020-06-24 00:17:56.0 +0200
@@ -265,6 +265,7 @@
 
 Package: gcc-10-hppa64-linux-gnu
 Architecture: hppa amd64 i386 x32
+Multi-Arch: foreign
 Section: devel
 Priority: optional
 Depends: gcc-10-base (= ${gcc:Version}), gcc-10 (= ${gcc:Version}),
diff --minimal -Nru gcc-10-10.1.0/debian/control.m4 
gcc-10-10.1.0/debian/control.m4
--- gcc-10-10.1.0/debian/control.m4 2020-05-11 13:38:42.0 +0200
+++ gcc-10-10.1.0/debian/control.m4 2020-06-24 00:17:56.0 +0200
@@ -107,6 +107,8 @@
 ifelse(regexp(SRCNAME, `gcc-snapshot'),0,`dnl
 Package: gcc-snapshot`'TS
 Architecture: any
+ifelse(TS,`',`',`Multi-Arch: foreign
+')dnl
 Section: devel
 Priority: optional
 Depends: binutils`'TS (>= ${binutils:Version}),
@@ -187,6 +189,8 @@
 Package: gnat`'PV-base`'TS
 Architecture: any
 # "all" causes build instabilities for "any" dependencies (see #748388).
+ifelse(TS,`',`',`Multi-Arch: foreign
+')dnl
 Section: libs
 Priority: PRI(optional)
 Depends: ${misc:Depends}
@@ -998,7 +1002,7 @@
 ifenabled(`cdev',`
 Package: gcc`'PV`'TS
 Architecture: any
-ifdef(`TARGET',`Multi-Arch: foreign
+ifelse(TS,`',`',`Multi-Arch: foreign
 ')dnl
 Section: devel
 Priority: optional
@@ -1037,7 +1041,7 @@
 ifenabled(`multilib',`
 Package: gcc`'PV-multilib`'TS
 Architecture: ifdef(`TARGET',`any',MULTILIB_ARCHS)
-ifdef(`TARGET',`Multi-Arch: foreign
+ifelse(TS,`',`',`Multi-Arch: foreign
 ')dnl
 Section: devel
 Priority: optional
@@ -1066,7 +1070,7 @@
 ifenabled(`plugindev',`
 Package: gcc`'PV-plugin-dev`'TS
 Architecture: any
-ifdef(`TARGET',`Multi-Arch: foreign
+ifelse(TS,`',`',`Multi-Arch: foreign
 ')dnl
 Section: devel
 Priority: optional
@@ -1082,8 +1086,7 @@
 ifenabled(`cdev',`
 Package: gcc`'PV-hppa64-linux-gnu
 Architecture: ifdef(`TARGET',`any',hppa amd64 i386 x32)
-ifdef(`TARGET',`Multi-Arch: foreign
-')dnl
+Multi-Arch: foreign
 Section: devel
 Priority: PRI(optional)
 Depends: BASEDEP, gcc`'PV`'TS (= ${gcc:Version}),
@@ -1097,7 +1100,7 @@
 ifenabled(`cdev',`
 Package: cpp`'PV`'TS
 Architecture: any
-ifdef(`TARGET',`Multi-Arch: foreign
+ifelse(TS,`',`',`Multi-Arch: foreign
 ')dnl
 Section: ifdef(`TARGET',`devel',`interpreters')
 Priority: optional
@@ -1148,7 +1151,7 @@
 ifenabled(`c++dev',`
 Package: g++`'PV`'TS
 Architecture: any
-ifdef(`TARGET',`Multi-Arch: foreign
+ifelse(TS,`',`',`Multi-Arch: foreign
 ')dnl
 Section: devel
 Priority: optional
@@ -1166,7 +1169,7 @@
 ifenabled(`multilib',`
 Package: g++`'PV-multilib`'TS
 Architecture: ifdef(`TARGET',`any',MULTILIB_ARCHS)
-ifdef(`TARGET',`Multi-Arch: foreign
+ifelse(TS,`',`',`Multi-Arch: foreign
 ')dnl
 Section: devel
 Priority: optional
@@ -3290,7 +3293,7 @@
 ifenabled(`objppdev',`
 Package: gobjc++`'PV`'TS
 Architecture: any
-ifdef(`TARGET',`Multi-Arch: foreign
+ifelse(TS,`',`',`Multi-Arch: foreign
 ')dnl
 Priority: optional
 Depends: BASEDEP, gobjc`'PV`'TS (= ${gcc:Version}), g++`'PV`'TS (= 
${gcc:Version}), ${shlibs:Depends}, libidevdep(objc`'PV-dev,,=), ${misc:Depends}
@@ -3306,7 +3309,7 @@
 ifenabled(`multilib',`
 Package: gobjc++`'PV-multilib`'TS
 Architecture: ifdef(`TARGET',`any',MULTILIB_ARCHS)
-ifdef(`TARGET',`Multi-Arch: foreign
+ifelse(TS,`',`',`Multi-Arch: foreign
 ')dnl
 Section: devel
 Priority: optional
@@ -3325,7 +3328,7 @@
 ifenabled(`objcdev',`
 Package: gobjc`'PV`'TS
 Architecture: any
-ifdef(`TARGET',`Multi-Arch: foreign
+ifelse(TS,`',`',`Multi-Arch: foreign
 ')dnl
 Priority: optional
 Depends: BASEDEP, gcc`'PV`'TS (= ${gcc:Version}), ${dep:libcdev}, 
${shlibs:Depends}, libidevdep(objc`'PV-dev,,=), ${misc:Depends}
@@ -3341,7 +3344,7 @@
 ifenabled(`multilib',`
 Package: gobjc`'PV-multilib`'TS
 Architecture: ifdef(`TARGET',`any',MULTILIB_ARCHS)
-ifdef(`TARGET',`Multi-Arch: foreign
+ifelse(TS,`',`',`Multi-Arch: foreign
 ')dnl
 Section: devel
 Priority: optional
@@ -3629,7 +3632,7 @@
 ifenabled(`fdev',`
 Package: gfortran`'PV`'TS
 Architecture: any
-ifdef(`TARGET',`Multi-Arch: foreign
+ifelse(TS,`',`',`Multi-Arch: foreign
 ')dnl
 Priority: optional
 Depends: BASEDEP, gcc`'PV`'TS (= ${gcc:Version}), 
libidevdep(gfortran`'PV-dev,,=), ${dep:libcdev}, ${shlibs:Depends}, 
${misc:Depends}
@@ -3647,7 +3650,7 @@
 ifenabled(`multilib',`
 Package: gfortran`'PV-multilib`'TS
 Architecture: ifdef(`TARGET',`any',MULTILIB_ARCHS)
-ifdef(`TARGET',`Multi-Arch: foreign
+ifelse(TS,`',`',`Multi-Arch: foreign
 ')dnl
 Section: devel
 Priority: optional
@@ -3959,7 +3962,7 @@
 ifenabled(`godev',`
 Package: gccgo`'PV`'TS
 Architecture: any

Bug#963254: gcc-10: d/rules.def, set AQ to :all for cross build

2020-06-21 Thread YunQiang Su
Package: src:gcc-10
Version: 10.1.0-4

Currently, on i386,
   apt install gcc-10-i686-linux-gnu:amd64

The following packages have unmet dependencies:
 gcc-10-i686-linux-gnu:amd64 : Depends: cpp-10-i686-linux-gnu:amd64 (=
10.1.0-3cross1) but it is not going to be installed
   Depends: libcc1-0:amd64 (>= 10) but it
is not going to be installed
   Depends: binutils-i686-linux-gnu:amd64
(>= 2.34) but it is not going to be installed
   Depends: libgcc-10-dev-i386-cross:amd64
(>= 10.1.0-3cross1) but it is not installable
   Depends: libc6:amd64 (>= 2.14) but it
is not going to be installed
   Depends: libgcc-s1:amd64 (>= 3.0) but
it is not going to be installed
   Depends: libgmp10:amd64 (>= 2:5.0.1~)
but it is not going to be installed
   Depends: libisl22:amd64 (>= 0.15) but
it is not going to be installed
   Depends: libmpc3:amd64 but it is not
going to be installed
   Depends: libmpfr6:amd64 (>= 3.1.3) but
it is not going to be installed
   Depends: libstdc++6:amd64 (>= 5) but it
is not going to be installed
   Depends: zlib1g:amd64 (>= 1:1.1.4) but
it is not going to be installed
   Recommends: libc6-dev-i386-cross:amd64
(>= 2.30-1~)
E: Unable to correct problems, you have held broken packages.

The major problem is  Depends: libgcc-10-dev-i386-cross:amd64 (>=
10.1.0-3cross1) but it is not installable
we need to mark gcc-10-i686-linux-gnu depends on
libgcc-10-dev-i386-cross:all to solve this problem.

-- 
YunQiang Su