Bug#640672: moving files to arch specific include breaks compilations with -m32

2011-09-13 Thread Daniel Bayer
Hi!

On Mon, Sep 12, 2011 at 10:29:30PM -0700, Steve Langasek wrote:
 On Tue, Sep 06, 2011 at 03:14:58PM +0100, Ben Hutchings wrote:
  On Tue, 2011-09-06 at 14:44 +0200, Daniel Bayer wrote:
   Package: linux-libc-dev
   Version: 3.0.0-3
   Severity: normal
   File: /usr/include/x86_64-linux-gnu/asm/errno.h
 
   since asm/errno.h was moved to the arch specific sub directory it is
   no longer possible to create 32 Bit Binaries on amd64:
 
   | $ echo '#include errno.h' | gcc -E -o -  -m32 -   
   
   | [...]
   | # 1 /usr/include/bits/errno.h 1 3 4
   | # 25 /usr/include/bits/errno.h 3 4
   | # 1 /usr/include/linux/errno.h 1 3 4
   | In file included from /usr/include/bits/errno.h:25:0,
   |  from /usr/include/errno.h:36,
   |  from stdin:1:
   | /usr/include/linux/errno.h:4:23: fatal error: asm/errno.h: No such file 
   or directory
   | compilation terminated.
 
   I guess with multiarch I should install the i386 deb, too. But this is
   not yet supported by dpkg in unstable, is it?
  [...]
 
  It's not.  And since the kernel uses the same set of header files for
  32-bit and 64-bit versions of each architecture, I wonder whether that
  would make sense.
 
  Maybe the right way to do this is:
 
  - linux-libc-dev (multiarch: same) becomes a metapackage depending on
linux-libc-dev-$SRCARCH
  - linux-libc-dev-$SRCARCH (not multiarch) provides headers for all
architectures built from kernel $SRCARCH, with symlinks
 
 I think this entire bug report is based on a misunderstanding of how gcc
 -m32 is supposed to work.  'gcc -m32' is not guaranteed to work unless the
 gcc-multilib package is installed;

gcc-multilib was always installed:
| ii  gcc-multilib4:4.6.1-2   GNU C compiler (multilib files)

 and if gcc-multilib is installed, you get
 a /usr/include/asm compatibility symlink pointing to
 /usr/include/$triplet/asm. 

nope. With linux-libc-dev 3.0.0-1 installed /usr/include/asm is a
directory containing header files provided by linux-libc6-dev. E.g.:
| linux-libc-dev: /usr/include/asm/a.out.h
| linux-libc-dev: /usr/include/asm/auxvec.h
| linux-libc-dev: /usr/include/asm/bitsperlong.h
| linux-libc-dev: /usr/include/asm/boot.h

and:
| $ dpkg -S /usr/include/asm
| gcc-multilib, linux-libc-dev: /usr/include/asm

Now I updated to linux-libc-dev 3.0.0-3 to test. After this /usr/include/asm
is an empty directory which belongs to gcc-multilib:

| $ ls /usr/include/asm -lha 
| insgesamt 88K
| drwxr-xr-x  2 root root 12K 13. Sep 20:53 .
| drwxr-xr-x 78 root root 72K  8. Sep 21:52 ..
| $ dpkg -S  /usr/include/asm 
| gcc-multilib: /usr/include/asm

 There are still some problems with this setup,
 but I don't agree that the issue reported here is one of them and I don't
 see any reason to change the linux-libc-dev package.

So it is a bug in gcc-multilib? Or where is the link supposed to come
from?

I got to this point from a working setup (I use -m32 almost every day
since more then 3 years) by daily distupgrade using unstable.


Daniel


pgp12b7WKHKCp.pgp
Description: PGP signature


Bug#640672: moving files to arch specific include breaks compilations with -m32

2011-09-13 Thread Sven Joachim
On 2011-09-13 21:04 +0200, Daniel Bayer wrote:

 Now I updated to linux-libc-dev 3.0.0-3 to test. After this /usr/include/asm
 is an empty directory which belongs to gcc-multilib:

Congratulations, you have just rediscovered bug #638418.

Cheers,
   Sven



-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87zki8ntdn@turtle.gmx.de



Bug#640672: moving files to arch specific include breaks compilations with -m32

2011-09-12 Thread Michael Tokarev
The same is obviously true the other way around:
on a 32bit x86 userspace it was possible to compile
64bit binaries using -m64.  Now this is broken in
exactly the same way as it is for -m32 on 64bits.



-- 
To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4e6e05f5.6080...@msgid.tls.msk.ru



Bug#640672: moving files to arch specific include breaks compilations with -m32

2011-09-12 Thread Steve Langasek
On Tue, Sep 06, 2011 at 03:14:58PM +0100, Ben Hutchings wrote:
 On Tue, 2011-09-06 at 14:44 +0200, Daniel Bayer wrote:
  Package: linux-libc-dev
  Version: 3.0.0-3
  Severity: normal
  File: /usr/include/x86_64-linux-gnu/asm/errno.h

  since asm/errno.h was moved to the arch specific sub directory it is
  no longer possible to create 32 Bit Binaries on amd64:

  | $ echo '#include errno.h' | gcc -E -o -  -m32 - 

  | [...]
  | # 1 /usr/include/bits/errno.h 1 3 4
  | # 25 /usr/include/bits/errno.h 3 4
  | # 1 /usr/include/linux/errno.h 1 3 4
  | In file included from /usr/include/bits/errno.h:25:0,
  |  from /usr/include/errno.h:36,
  |  from stdin:1:
  | /usr/include/linux/errno.h:4:23: fatal error: asm/errno.h: No such file 
  or directory
  | compilation terminated.

  I guess with multiarch I should install the i386 deb, too. But this is
  not yet supported by dpkg in unstable, is it?
 [...]

 It's not.  And since the kernel uses the same set of header files for
 32-bit and 64-bit versions of each architecture, I wonder whether that
 would make sense.

 Maybe the right way to do this is:

 - linux-libc-dev (multiarch: same) becomes a metapackage depending on
   linux-libc-dev-$SRCARCH
 - linux-libc-dev-$SRCARCH (not multiarch) provides headers for all
   architectures built from kernel $SRCARCH, with symlinks

I think this entire bug report is based on a misunderstanding of how gcc
-m32 is supposed to work.  'gcc -m32' is not guaranteed to work unless the
gcc-multilib package is installed; and if gcc-multilib is installed, you get
a /usr/include/asm compatibility symlink pointing to
/usr/include/$triplet/asm.  There are still some problems with this setup,
but I don't agree that the issue reported here is one of them and I don't
see any reason to change the linux-libc-dev package.

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
Ubuntu Developerhttp://www.debian.org/
slanga...@ubuntu.com vor...@debian.org


signature.asc
Description: Digital signature


Bug#640672: moving files to arch specific include breaks compilations with -m32

2011-09-06 Thread Daniel Bayer
Package: linux-libc-dev
Version: 3.0.0-3
Severity: normal
File: /usr/include/x86_64-linux-gnu/asm/errno.h

Hi,

since asm/errno.h was moved to the arch specific sub directory it is
no longer possible to create 32 Bit Binaries on amd64:

| $ echo '#include errno.h' | gcc -E -o -  -m32 - 
  
| [...]
| # 1 /usr/include/bits/errno.h 1 3 4
| # 25 /usr/include/bits/errno.h 3 4
| # 1 /usr/include/linux/errno.h 1 3 4
| In file included from /usr/include/bits/errno.h:25:0,
|  from /usr/include/errno.h:36,
|  from stdin:1:
| /usr/include/linux/errno.h:4:23: fatal error: asm/errno.h: No such file or 
directory
| compilation terminated.

I guess with multiarch I should install the i386 deb, too. But this is
not yet supported by dpkg in unstable, is it?


Daniel

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

-- no debconf information


pgpvBEF9CX2RY.pgp
Description: PGP signature


Bug#640672: moving files to arch specific include breaks compilations with -m32

2011-09-06 Thread Ben Hutchings
On Tue, 2011-09-06 at 14:44 +0200, Daniel Bayer wrote:
 Package: linux-libc-dev
 Version: 3.0.0-3
 Severity: normal
 File: /usr/include/x86_64-linux-gnu/asm/errno.h
 
 Hi,
 
 since asm/errno.h was moved to the arch specific sub directory it is
 no longer possible to create 32 Bit Binaries on amd64:
 
 | $ echo '#include errno.h' | gcc -E -o -  -m32 -   
 
 | [...]
 | # 1 /usr/include/bits/errno.h 1 3 4
 | # 25 /usr/include/bits/errno.h 3 4
 | # 1 /usr/include/linux/errno.h 1 3 4
 | In file included from /usr/include/bits/errno.h:25:0,
 |  from /usr/include/errno.h:36,
 |  from stdin:1:
 | /usr/include/linux/errno.h:4:23: fatal error: asm/errno.h: No such file or 
 directory
 | compilation terminated.
 
 I guess with multiarch I should install the i386 deb, too. But this is
 not yet supported by dpkg in unstable, is it?
[...]

It's not.  And since the kernel uses the same set of header files for
32-bit and 64-bit versions of each architecture, I wonder whether that
would make sense.

Maybe the right way to do this is:

- linux-libc-dev (multiarch: same) becomes a metapackage depending on
  linux-libc-dev-$SRCARCH
- linux-libc-dev-$SRCARCH (not multiarch) provides headers for all
  architectures built from kernel $SRCARCH, with symlinks

Ben.



signature.asc
Description: This is a digitally signed message part