Debian Bug report logs - #637232
general: Multiarch breaks support for non-multiarch toolchain

Package: general; Maintainer for general is debian-devel@lists.debian.org;

Reported by: Aurelien Jarno <aurel32@debian.org>

Date: Tue, 9 Aug 2011 17:33:02 UTC

Severity: important

Merged with 639214, 644986, 648889, 682678

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, debian-devel@lists.debian.org:
Bug#637232; Package general. (Tue, 09 Aug 2011 17:33:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Aurelien Jarno <aurel32@debian.org>:
New Bug report received and forwarded. Copy sent to debian-devel@lists.debian.org. (Tue, 09 Aug 2011 17:33:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Aurelien Jarno <aurel32@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: general: Multiarch breaks support for non-multiarch toolchain
Date: Tue, 09 Aug 2011 19:31:56 +0200
Package: general
Severity: critical

Debian has choosen to implement multiarch, which amongs other things,
means that the includes and libraries are moved in a new "multiarch"
path. This breaks some upstream applications and non-Debian toolchain.

It is possible to workaround some of the issues as described in 
/usr/share/doc/libc6/NEWS.Debian.gz.

| eglibc (2.13-11) unstable; urgency=low
| 
|  Starting with the eglibc package version 2.13-5, the libraries are
|  shipped in the multiarch directory /lib/$arch instead of the more
|  traditional /lib.
|
|  The toolchain in Debian has been updated to cope with that, and most
|  build systems should be unaffected. If you are using a non-Debian
|  toolchain to build your software and it is not able to cope with
|  multiarch, you might try to pass the following option to your
|  compiler:
|
|    -B/usr/lib/$arch
|
| -- Aurelien Jarno <aurel32@debian.org>  Sat, 23 Jul 2011 23:42:46 +0200

I got fed up by people reporting bug on libc6, while this problem results
from a decision Debian to implement multiarch. People should work on
implementing a compatibility wrapper and to make upstream toolchain
multiarch aware. Until this is done, this bug should be kept opened.

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

Kernel: Linux 2.6.39-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash




Information forwarded to debian-bugs-dist@lists.debian.org, debian-devel@lists.debian.org:
Bug#637232; Package general. (Wed, 10 Aug 2011 15:51:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to debian-devel@lists.debian.org. (Wed, 10 Aug 2011 15:51:03 GMT) Full text and rfc822 format available.

Message #10 received at 637232@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: 637232@bugs.debian.org
Subject: Re: general: Multiarch breaks support for non-multiarch toolchain
Date: Wed, 10 Aug 2011 10:48:23 -0500
Aurelien Jarno wrote:

> I got fed up by people reporting bug on libc6, while this problem results
> from a decision Debian to implement multiarch. People should work on
> implementing a compatibility wrapper and to make upstream toolchain
> multiarch aware. Until this is done, this bug should be kept opened.

Presumably you are referring to Bug#629819 and Bug#637218.

Bug#629819 was about upstream gcc failing to build after crti.o et al
were moved.  This is thorny because

 - the relevant non-Debian compiler is xgcc, which is an intermediate
   product from the build process.  So a compatibility wrapper for
   gcc would not help here, though a nice build script could.

 - gcc's build system is a pain in the neck.

Bug#637218 is a similar problem about headers moving.  Again, the use
case was building and testing upstream gcc.

 http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=85;bug=637218
 http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=90;bug=637218

give a recipe for building non-multiarch-aware gcc in a multiarch
environment.

You are right that this doesn't have much to do with eglibc, so I am
tempted to reassign 629819 to general and merge the bugs.  As more
packages use the multiarch paths, it will only become more important
to have a way to communicate their location to non-Debian toolchains.




Added indication that 637232 affects libc6-dev Request was from Aurelien Jarno <aurel32@debian.org> to control@bugs.debian.org. (Wed, 10 Aug 2011 17:45:03 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, debian-devel@lists.debian.org:
Bug#637232; Package general. (Wed, 10 Aug 2011 20:39:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Aurelien Jarno <aurelien@aurel32.net>:
Extra info received and forwarded to list. Copy sent to debian-devel@lists.debian.org. (Wed, 10 Aug 2011 20:39:03 GMT) Full text and rfc822 format available.

Message #17 received at 637232@bugs.debian.org (full text, mbox):

From: Aurelien Jarno <aurelien@aurel32.net>
To: Jonathan Nieder <jrnieder@gmail.com>, 637232@bugs.debian.org
Subject: Re: Bug#637232: general: Multiarch breaks support for non-multiarch toolchain
Date: Wed, 10 Aug 2011 22:34:58 +0200
On Wed, Aug 10, 2011 at 10:48:23AM -0500, Jonathan Nieder wrote:
> Aurelien Jarno wrote:
> 
> > I got fed up by people reporting bug on libc6, while this problem results
> > from a decision Debian to implement multiarch. People should work on
> > implementing a compatibility wrapper and to make upstream toolchain
> > multiarch aware. Until this is done, this bug should be kept opened.
> 
> Presumably you are referring to Bug#629819 and Bug#637218.
> 
> Bug#629819 was about upstream gcc failing to build after crti.o et al
> were moved.  This is thorny because
> 
>  - the relevant non-Debian compiler is xgcc, which is an intermediate
>    product from the build process.  So a compatibility wrapper for
>    gcc would not help here, though a nice build script could.
> 
>  - gcc's build system is a pain in the neck.
> 
> Bug#637218 is a similar problem about headers moving.  Again, the use
> case was building and testing upstream gcc.
> 
>  http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=85;bug=637218
>  http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=90;bug=637218
> 
> give a recipe for building non-multiarch-aware gcc in a multiarch
> environment.
> 
> You are right that this doesn't have much to do with eglibc, so I am
> tempted to reassign 629819 to general and merge the bugs.  As more
> packages use the multiarch paths, it will only become more important
> to have a way to communicate their location to non-Debian toolchains.
> 

The bug is closed given we have provided some hints in NEWS.Debian.gz. I
am not sure what reassigning this already closed bug would change there.

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net




Information forwarded to debian-bugs-dist@lists.debian.org, debian-devel@lists.debian.org:
Bug#637232; Package general. (Wed, 10 Aug 2011 21:03:13 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to debian-devel@lists.debian.org. (Wed, 10 Aug 2011 21:03:13 GMT) Full text and rfc822 format available.

Message #22 received at 637232@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: 637232@bugs.debian.org
Subject: Re: general: Multiarch breaks support for non-multiarch toolchain
Date: Wed, 10 Aug 2011 15:59:18 -0500
Aurelien Jarno wrote:
> On Wed, Aug 10, 2011 at 10:48:23AM -0500, Jonathan Nieder wrote:

>> I am
>> tempted to reassign 629819 to general and merge the bugs.
[...]
> The bug is closed given we have provided some hints in NEWS.Debian.gz. I
> am not sure what reassigning this already closed bug would change there.

Yep.  Thanks for the hints, by the way, and sorry to have filled your
inbox.  So if I understand correctly, this bug is about two or three
remaining things:

 1. Getting multiarch support patches applied in non-Debian toolchains
    (upstream gcc, upstream clang, and so on);

 2. Wrapper scripts for building and using toolchains that lack
    built-in support for multiarch paths (e.g., for bisecting bugs
    introduced by old versions of gcc, using proprietary compilers,
    etc);

 3. (?) Some other sort of trick to fool toolchains without lack for
    multiarch paths into coping with wheezy (symlinks to each library
    and header don't scale well for that, though it has been suggested
    by some people, but maybe a fake sysroot with symlinks to the
    multiarch and common directories could work).

(1) and (2) is basically what you said already.  Sorry for the noise.




Information forwarded to debian-bugs-dist@lists.debian.org, debian-devel@lists.debian.org:
Bug#637232; Package general. (Sat, 13 Aug 2011 17:15:12 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matthias Klose <doko@debian.org>:
Extra info received and forwarded to list. Copy sent to debian-devel@lists.debian.org. (Sat, 13 Aug 2011 17:15:12 GMT) Full text and rfc822 format available.

Message #27 received at 637232@bugs.debian.org (full text, mbox):

From: Matthias Klose <doko@debian.org>
To: 637232@bugs.debian.org
Subject: Re: Bug#637232: general: Multiarch breaks support for non-multiarch toolchain
Date: Sat, 13 Aug 2011 19:11:56 +0200
On 08/09/2011 07:31 PM, Aurelien Jarno wrote:
> I got fed up by people reporting bug on libc6, while this problem results
> from a decision Debian to implement multiarch. People should work on
> implementing a compatibility wrapper and to make upstream toolchain
> multiarch aware. Until this is done, this bug should be kept opened.

just do it. upstream changes will only land on trunk, and afaik the outcome of
one of the multiarch sessions at Debconf was to have a multiarch-compat package
at least containing symlinks for the .o files in /usr/lib, and maybe the
/usr/include/asm symlink (replacing the one from gcc-multilib).




Forcibly Merged 637232 639214. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Thu, 25 Aug 2011 05:27:09 GMT) Full text and rfc822 format available.

Forcibly Merged 637232 639214 644986. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Tue, 11 Oct 2011 20:00:04 GMT) Full text and rfc822 format available.

Forcibly Merged 637232 639214 644986 648889. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Tue, 15 Nov 2011 22:03:10 GMT) Full text and rfc822 format available.

Severity set to 'important' from 'critical' Request was from Holger Levsen <holger@layer-acht.org> to control@bugs.debian.org. (Tue, 29 May 2012 08:03:05 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, debian-devel@lists.debian.org:
Bug#637232; Package general. (Sun, 22 Jul 2012 17:54:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to debian-devel@lists.debian.org. (Sun, 22 Jul 2012 17:54:05 GMT) Full text and rfc822 format available.

Message #40 received at 637232@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: 637232@bugs.debian.org
Subject: Re: Multiarch breaks support for non-multiarch toolchain
Date: Sun, 22 Jul 2012 12:52:10 -0500
affects 637232 + release-notes
quit

Hi,

Matthias Klose wrote:
> On 08/09/2011 07:31 PM, Aurelien Jarno wrote:

>> I got fed up by people reporting bug on libc6, while this problem results
>> from a decision Debian to implement multiarch. People should work on
>> implementing a compatibility wrapper and to make upstream toolchain
>> multiarch aware. Until this is done, this bug should be kept opened.
>
> just do it.

To be realistic, is anyone actually going to do this?

Avenues forward:

 a) Help upstream authors of toolchain components with hardcoded
    header and library search paths to implement multiarch.

	gcc: in progress - http://gcc.gnu.org/PR53468 (thanks, Matthias!)
	clang: fixed? - http://llvm.org/bugs/show_bug.cgi?id=6541
	icc (Intel C++): status?
	pathcc (PathScale ekopath): status?
	tcc (Tiny C compiler): fixed - b56edc7b, 2012-05-22
	pcc (Portable C compiler): unfixed - http://bugs.debian.org/638309
	cmake: fixed - http://public.kitware.com/Bug/view.php?id=12037

 b) There is a workaround described in libc6/NEWS.Debian.gz which
    works fine:

	LIBRARY_PATH=/usr/lib/<triplet>
	CPATH=/usr/include/<triplet>
	export CPATH LIBRARY_PATH

    It's probably worth advertising that more widely, for example in
    the release notes.

 c) Compatibility wrapper.  If someone needs this, feel free to email
    me and I'll help out however I can.



Added indication that 637232 affects release-notes Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Sun, 22 Jul 2012 17:54:13 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, debian-devel@lists.debian.org:
Bug#637232; Package general. (Mon, 23 Jul 2012 08:39:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Goswin von Brederlow <goswin-v-b@web.de>:
Extra info received and forwarded to list. Copy sent to debian-devel@lists.debian.org. (Mon, 23 Jul 2012 08:39:03 GMT) Full text and rfc822 format available.

Message #47 received at 637232@bugs.debian.org (full text, mbox):

From: Goswin von Brederlow <goswin-v-b@web.de>
To: Jonathan Nieder <jrnieder@gmail.com>, 637232@bugs.debian.org
Subject: Re: Bug#637232: Multiarch breaks support for non-multiarch toolchain
Date: Mon, 23 Jul 2012 10:36:04 +0200
On Sun, Jul 22, 2012 at 12:52:10PM -0500, Jonathan Nieder wrote:
> affects 637232 + release-notes
> quit
> 
> Hi,
> 
> Matthias Klose wrote:
> > On 08/09/2011 07:31 PM, Aurelien Jarno wrote:
> 
> >> I got fed up by people reporting bug on libc6, while this problem results
> >> from a decision Debian to implement multiarch. People should work on
> >> implementing a compatibility wrapper and to make upstream toolchain
> >> multiarch aware. Until this is done, this bug should be kept opened.
> >
> > just do it.
> 
> To be realistic, is anyone actually going to do this?
> 
> Avenues forward:
> 
>  a) Help upstream authors of toolchain components with hardcoded
>     header and library search paths to implement multiarch.
> 
> 	gcc: in progress - http://gcc.gnu.org/PR53468 (thanks, Matthias!)
> 	clang: fixed? - http://llvm.org/bugs/show_bug.cgi?id=6541
> 	icc (Intel C++): status?
> 	pathcc (PathScale ekopath): status?
> 	tcc (Tiny C compiler): fixed - b56edc7b, 2012-05-22
> 	pcc (Portable C compiler): unfixed - http://bugs.debian.org/638309
> 	cmake: fixed - http://public.kitware.com/Bug/view.php?id=12037

What I don't understand is why compilers (which probably means ld from
binutils in all cases) won't use ld.so.conf to find the libs. It only
does so to find libs linked into libs you link against. So it is used
execpt for the verry first level of recursion. Maybe this could be fixed
better in a single common point.

>  b) There is a workaround described in libc6/NEWS.Debian.gz which
>     works fine:
> 
> 	LIBRARY_PATH=/usr/lib/<triplet>
> 	CPATH=/usr/include/<triplet>
> 	export CPATH LIBRARY_PATH
> 
>     It's probably worth advertising that more widely, for example in
>     the release notes.

I find it a bit hard to believe CPATH is needed. That directory has
been in use for years and years way before multiarch. Anyone know
which compiler needs it?

>  c) Compatibility wrapper.  If someone needs this, feel free to email
>     me and I'll help out however I can.

If you write one of those then please make sure it works with gcc, gcc
-m32, gcc -m64 and uclibc (which brings some wrappers already I
believe). It would also be nice to include i486-linux-gnu-* on amd64
and amd64-linux-gnu-* on i386 and similar for other archs.

MfG
	Goswin



Information forwarded to debian-bugs-dist@lists.debian.org, debian-devel@lists.debian.org:
Bug#637232; Package general. (Mon, 23 Jul 2012 11:48:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to debian-devel@lists.debian.org. (Mon, 23 Jul 2012 11:48:06 GMT) Full text and rfc822 format available.

Message #52 received at 637232@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Goswin von Brederlow <goswin-v-b@web.de>
Cc: 637232@bugs.debian.org
Subject: Re: Multiarch breaks support for non-multiarch toolchain
Date: Mon, 23 Jul 2012 06:44:58 -0500
Hi,

Goswin von Brederlow wrote:
> On Sun, Jul 22, 2012 at 12:52:10PM -0500, Jonathan Nieder wrote:

>>  a) Help upstream authors of toolchain components with hardcoded
>>     header and library search paths to implement multiarch.
[...]
> What I don't understand is why compilers (which probably means ld from
> binutils in all cases) won't use ld.so.conf to find the libs. It only
> does so to find libs linked into libs you link against. So it is used
> execpt for the verry first level of recursion.

The ld library path and compiler library path represent different
things[*].

[..]
>                                                Maybe this could be fixed
> better in a single common point.

Something like "getconf CPATH" and "getconf LIBRARY_PATH" producing
approprite lists for passing to -I and -L to find the system libs and
headers without having to parse "gcc -print-search-dirs" output could
be interesting.  Is that what you mean?

[...]
> I find it a bit hard to believe CPATH is needed. That directory has
> been in use for years and years way before multiarch.

From the bug log:

| Bug#637218 is a similar problem about headers moving.

Have you tried it and run into different results?

>>  c) Compatibility wrapper.  If someone needs this, feel free to email
>>     me and I'll help out however I can.
>
> If you write one of those then please make sure it works with gcc, gcc
> -m32, gcc -m64 and uclibc
[...]

Let's not get ahead of ourselves.  I'm not aware of a wrapper having
been written, and I certainly wouldn't want to impose additional
requirements on someone trying unless someone interested is providing
the patches to support those.

Hope that helps,
Jonathan

[*]
- One is looking for libfoo.so.5, the other for libfoo.so and
  libfoo.a.
- One points to libs on the arch with running binaries, while the
  other has libs for the cross-compilation target.
- One contains /lib, the other doesn't.
- One should not contain compiler-specific directories like
  /usr/lib/gcc/i486-linux-gnu/4.6, while the other does.
- One can be manipulated for special-case tricks with LD_LIBRARY_PATH,
  the other with LIBRARY_PATH.

Declaring that the compiler library path always include the ld library
path would not take care of cross-compilation anyway, so my first
reaction is to suspect it wouldn't be worth the side-effects.



Merged 637232 639214 644986 648889 682678 Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Tue, 24 Jul 2012 16:51:07 GMT) Full text and rfc822 format available.

Merged 637232 639214 644986 648889 682678 Request was from Aurelien Jarno <aurel32@debian.org> to control@bugs.debian.org. (Wed, 25 Jul 2012 07:15:04 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, debian-devel@lists.debian.org:
Bug#637232; Package general. (Wed, 25 Jul 2012 13:57:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Goswin von Brederlow <goswin-v-b@web.de>:
Extra info received and forwarded to list. Copy sent to debian-devel@lists.debian.org. (Wed, 25 Jul 2012 13:57:05 GMT) Full text and rfc822 format available.

Message #61 received at 637232@bugs.debian.org (full text, mbox):

From: Goswin von Brederlow <goswin-v-b@web.de>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: 637232@bugs.debian.org
Subject: Re: Multiarch breaks support for non-multiarch toolchain
Date: Wed, 25 Jul 2012 15:52:02 +0200
On Mon, Jul 23, 2012 at 06:44:58AM -0500, Jonathan Nieder wrote:
> Hi,
> 
> Goswin von Brederlow wrote:
> > On Sun, Jul 22, 2012 at 12:52:10PM -0500, Jonathan Nieder wrote:
> 
> >>  c) Compatibility wrapper.  If someone needs this, feel free to email
> >>     me and I'll help out however I can.
> >
> > If you write one of those then please make sure it works with gcc, gcc
> > -m32, gcc -m64 and uclibc
> [...]
> 
> Let's not get ahead of ourselves.  I'm not aware of a wrapper having
> been written, and I certainly wouldn't want to impose additional
> requirements on someone trying unless someone interested is providing
> the patches to support those.

If someone writes a wrapper then he has to make sure it doesn't break
things that used to work.
 
MfG
	Goswin



Information forwarded to debian-bugs-dist@lists.debian.org, debian-devel@lists.debian.org:
Bug#637232; Package general. (Thu, 02 Aug 2012 12:51:23 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thorsten Glaser <tg@mirbsd.de>:
Extra info received and forwarded to list. Copy sent to debian-devel@lists.debian.org. (Thu, 02 Aug 2012 12:51:23 GMT) Full text and rfc822 format available.

Message #66 received at 637232@bugs.debian.org (full text, mbox):

From: Thorsten Glaser <tg@mirbsd.de>
To: Jonathan Nieder <jrnieder@gmail.com>, 637232@bugs.debian.org
Cc: debian-devel@lists.debian.org
Subject: Re: Bug#637232: Multiarch breaks support for non-multiarch toolchain
Date: Thu, 2 Aug 2012 12:39:26 +0000 (UTC)
Jonathan Nieder dixit:

>	pcc (Portable C compiler): unfixed - http://bugs.debian.org/638309

Yes, but that was not the main showstopper for pcc.
Besides upstream bugs on some architectures (recently,
even Linux/amd64 broke again – I’m following pcc dev),
the main problem was how to get pcc-libs for the target
architecture installed.

Since I can now finally use "Depends: pcc-libs:i386" on
arch-any packages (which was not at first allowed by M-A
but got added to dpkg recently), I believe I can go forward
some day now and put together new pcc versions for experi-
mental that actually make use of M-A. I approximately know
how to deal with the pathnames (having worked enough with
gcc), so no need to assist at the moment (though, that
being said, pcc is lower priority to me than others at
the moment – contact me if it’s important to you).

bye,
//mirabilos
-- 
Sometimes they [people] care too much: pretty printers [and syntax highligh-
ting, d.A.] mechanically produce pretty output that accentuates irrelevant
detail in the program, which is as sensible as putting all the prepositions
in English text in bold font.	-- Rob Pike in "Notes on Programming in C"



Information forwarded to debian-bugs-dist@lists.debian.org, debian-devel@lists.debian.org:
Bug#637232; Package general. (Fri, 02 Nov 2012 10:45:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matthias Klose <doko@ubuntu.com>:
Extra info received and forwarded to list. Copy sent to debian-devel@lists.debian.org. (Fri, 02 Nov 2012 10:45:03 GMT) Full text and rfc822 format available.

Message #71 received at 637232@bugs.debian.org (full text, mbox):

From: Matthias Klose <doko@ubuntu.com>
To: 637232@bugs.debian.org
Subject: [patch] provide a libc6-dev-compat package
Date: Fri, 02 Nov 2012 11:43:21 +0100
[Message part 1 (text/plain, inline)]
this is a patch I'm proposing to apply to the Ubuntu eglibc builds for precise, 
quantal and raring.

 - it adds symlinks for .a, .so and .o files
 - adds a symlink for the asm header dir
 - depends on the libc-dev-<multilib> packages, which provide
   more needed header files/symlinks in /usr/include.

Matthias

[compat.diff (text/x-diff, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, debian-devel@lists.debian.org:
Bug#637232; Package general. (Thu, 15 Nov 2012 06:54:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Aurelien Jarno <aurelien@aurel32.net>:
Extra info received and forwarded to list. Copy sent to debian-devel@lists.debian.org. (Thu, 15 Nov 2012 06:54:03 GMT) Full text and rfc822 format available.

Message #76 received at 637232@bugs.debian.org (full text, mbox):

From: Aurelien Jarno <aurelien@aurel32.net>
To: Matthias Klose <doko@ubuntu.com>
Cc: 637232@bugs.debian.org
Subject: Re: [patch] provide a libc6-dev-compat package
Date: Thu, 15 Nov 2012 07:50:31 +0100
On Fri, Nov 02, 2012 at 11:43:21AM +0100, Matthias Klose wrote:
> this is a patch I'm proposing to apply to the Ubuntu eglibc builds
> for precise, quantal and raring.
> 
>  - it adds symlinks for .a, .so and .o files
>  - adds a symlink for the asm header dir
>  - depends on the libc-dev-<multilib> packages, which provide
>    more needed header files/symlinks in /usr/include.

I am not sure using the biarch package for providing compat symlinks is
the way to go. Especially on architectures without biarch packages where
it even doesn't work.

> diff -Nru eglibc-2.16/debian/changelog eglibc-2.16/debian/changelog
> --- eglibc-2.16/debian/changelog	2012-10-28 00:24:42.000000000 +0200
> +++ eglibc-2.16/debian/changelog	2012-11-02 10:57:32.000000000 +0100
> @@ -1,3 +1,9 @@
> +eglibc (2.16-0ubuntu4) raring; urgency=low
> +
> +  * Build a libc-compat-dev package. Closes: #637232.
> +
> + -- Matthias Klose <doko@ubuntu.com>  Thu, 01 Nov 2012 18:16:32 +0200
> +
>  eglibc (2.16-0ubuntu3) raring; urgency=low
>  
>    * Regenerate the control file.
> diff -Nru eglibc-2.16/debian/control eglibc-2.16/debian/control
> --- eglibc-2.16/debian/control	2012-10-28 00:23:38.000000000 +0200
> +++ eglibc-2.16/debian/control	2012-11-02 10:40:56.000000000 +0100
> @@ -175,6 +175,17 @@
>   Contains the symlinks, headers, and object files needed to compile
>   and link programs which use the standard C library.
>  
> +Package: libc6-dev-compat
> +Architecture: amd64 arm arm64 armel armhf hppa i386 m68k mips mipsel powerpc powerpcspe ppc64 sparc sparc64 s390 s390x sh4 x32
> +Section: libdevel
> +Priority: extra
> +Depends: libc6-dev (= ${binary:Version}), ${multilibdev}
> +Provides: libc-dev-compat
> +Conflicts: libc6-dev (<< 2.13-0ubuntu7)
> +Description: Embedded GNU C Library: Non-Multiarch compatibility symlinks
> + Contains the symlinks for headers, libraries and object files in
> + non-multiarch locations.
> +
>  Package: libc6-dbg
>  Architecture: amd64 arm arm64 armel armhf hppa i386 m68k mips mipsel powerpc powerpcspe ppc64 sparc sparc64 s390 s390x sh4 x32
>  Section: debug
> @@ -265,6 +276,17 @@
>   Contains the symlinks, headers, and object files needed to compile
>   and link programs which use the standard C library.
>  
> +Package: libc6.1-dev-compat
> +Architecture: alpha ia64
> +Section: libdevel
> +Priority: extra
> +Depends: libc6.1-dev (= ${binary:Version}), ${multilibdev}
> +Provides: libc-dev-compat
> +Conflicts: libc6.1-dev (<< 2.13-0ubuntu7)
> +Description: Embedded GNU C Library: Non-Multiarch compatibility symlinks
> + Contains the symlinks for headers, libraries and object files in
> + non-multiarch locations.
> +
>  Package: libc6.1-dbg
>  Architecture: alpha ia64
>  Section: debug
> @@ -355,6 +377,17 @@
>   Contains the symlinks, headers, and object files needed to compile
>   and link programs which use the standard C library.
>  
> +Package: libc0.3-dev-compat
> +Architecture: hurd-i386
> +Section: libdevel
> +Priority: extra
> +Depends: libc0.3-dev (= ${binary:Version}), ${multilibdev}
> +Provides: libc-dev-compat
> +Conflicts: libc0.3-dev (<< 2.13-0ubuntu7)
> +Description: Embedded GNU C Library: Non-Multiarch compatibility symlinks
> + Contains the symlinks for headers, libraries and object files in
> + non-multiarch locations.
> +
>  Package: libc0.3-dbg
>  Architecture: hurd-i386
>  Section: debug
> @@ -445,6 +478,17 @@
>   Contains the symlinks, headers, and object files needed to compile
>   and link programs which use the standard C library.
>  
> +Package: libc0.1-dev-compat
> +Architecture: kfreebsd-amd64 kfreebsd-i386
> +Section: libdevel
> +Priority: extra
> +Depends: libc0.1-dev (= ${binary:Version}), ${multilibdev}
> +Provides: libc-dev-compat
> +Conflicts: libc0.1-dev (<< 2.13-0ubuntu7)
> +Description: Embedded GNU C Library: Non-Multiarch compatibility symlinks
> + Contains the symlinks for headers, libraries and object files in
> + non-multiarch locations.
> +
>  Package: libc0.1-dbg
>  Architecture: kfreebsd-amd64 kfreebsd-i386
>  Section: debug
> diff -Nru eglibc-2.16/debian/control.in/libc eglibc-2.16/debian/control.in/libc
> --- eglibc-2.16/debian/control.in/libc	2012-10-26 17:50:39.000000000 +0200
> +++ eglibc-2.16/debian/control.in/libc	2012-11-02 10:16:38.000000000 +0100
> @@ -39,6 +39,17 @@
>   Contains the symlinks, headers, and object files needed to compile
>   and link programs which use the standard C library.
>  
> +Package: @libc@-dev-compat
> +Architecture: @archs@
> +Section: libdevel
> +Priority: extra
> +Depends: @libc@-dev (= ${binary:Version}), ${multilibdev}
> +Provides: libc-dev-compat
> +Conflicts: @libc@-dev (<< 2.13-0ubuntu7)
> +Description: Embedded GNU C Library: Non-Multiarch compatibility symlinks
> + Contains the symlinks for headers, libraries and object files in
> + non-multiarch locations.
> +
>  Package: @libc@-dbg
>  Architecture: @archs@
>  Section: debug
> diff -Nru eglibc-2.16/debian/rules eglibc-2.16/debian/rules
> --- eglibc-2.16/debian/rules	2012-10-26 12:47:57.000000000 +0200
> +++ eglibc-2.16/debian/rules	2012-11-02 09:35:16.000000000 +0100
> @@ -143,7 +143,7 @@
>    DEB_INDEP_REGULAR_PACKAGES = 
>    DEB_UDEB_PACKAGES = 
>  else
> -  DEB_ARCH_REGULAR_PACKAGES = $(libc) $(libc)-dev $(libc)-dbg $(libc)-prof $(libc)-pic libc-bin libc-dev-bin multiarch-support
> +  DEB_ARCH_REGULAR_PACKAGES = $(libc) $(libc)-dev $(libc)-dbg $(libc)-prof $(libc)-pic libc-bin libc-dev-bin multiarch-support $(libc)-dev-compat
>    DEB_INDEP_REGULAR_PACKAGES = glibc-doc eglibc-source
>    DEB_UDEB_PACKAGES = $(libc)-udeb libnss-dns-udeb libnss-files-udeb
>  endif
> diff -Nru eglibc-2.16/debian/rules.d/debhelper.mk eglibc-2.16/debian/rules.d/debhelper.mk
> --- eglibc-2.16/debian/rules.d/debhelper.mk	2012-10-26 03:53:59.000000000 +0200
> +++ eglibc-2.16/debian/rules.d/debhelper.mk	2012-11-02 11:29:37.000000000 +0100
> @@ -95,6 +95,16 @@
>  	fi
>  endif
>  
> +	if test "$(curpass)" = "$(libc)-dev-compat"; then \
> +	  mkdir -p debian/$(libc)-dev-compat/usr/lib; \
> +	  links=`cd debian/$(libc)-dev/usr/lib/$(DEB_HOST_MULTIARCH) && ls *.[ao] *.so`; \
> +	  for l in $$links; do \
> +	    ln -sf $(DEB_HOST_MULTIARCH)/$$l debian/$(libc)-dev-compat/usr/lib/$$l; \
> +	  done; \
> +	  mkdir -p debian/$(libc)-dev-compat/usr/include; \
> +	  ln -sf $(DEB_HOST_MULTIARCH)/asm debian/$(libc)-dev-compat/usr/include/asm; \
> +	fi
> +
>  	dh_compress -p$(curpass)
>  	dh_fixperms -p$(curpass) -Xpt_chown
>  	# Use this instead of -X to dh_fixperms so that we can use
> @@ -112,7 +122,7 @@
>  
>  	dh_installdeb -p$(curpass)
>  	dh_shlibdeps -p$(curpass)
> -	dh_gencontrol -p$(curpass)
> +	dh_gencontrol -p$(curpass) -- '-Vmultilibdev=$(multilibdev)'
>  	if [ $(curpass) = nscd ] ; then \
>  		sed -i -e "s/\(Depends:.*libc[0-9.]\+\)-[a-z0-9]\+/\1/" debian/nscd/DEBIAN/control ; \
>  	fi
> diff -Nru eglibc-2.16/debian/sysdeps/amd64.mk eglibc-2.16/debian/sysdeps/amd64.mk
> --- eglibc-2.16/debian/sysdeps/amd64.mk	2012-10-27 13:13:34.000000000 +0200
> +++ eglibc-2.16/debian/sysdeps/amd64.mk	2012-11-02 11:27:53.000000000 +0100
> @@ -1,6 +1,7 @@
>  libc_rtlddir = /lib64
>  libc_extra_cflags = -O3
>  extra_config_options = --enable-multi-arch
> +multilibdev = libc6-dev-i386 (= $${binary:Version}), libc6-dev-x32 (= $${binary:Version})
>  
>  # build 32-bit (i386) alternative library
>  EGLIBC_PASSES += i386
> diff -Nru eglibc-2.16/debian/sysdeps/armel.mk eglibc-2.16/debian/sysdeps/armel.mk
> --- eglibc-2.16/debian/sysdeps/armel.mk	2012-10-26 04:45:50.000000000 +0200
> +++ eglibc-2.16/debian/sysdeps/armel.mk	2012-11-02 11:28:17.000000000 +0100
> @@ -1,4 +1,5 @@
>  libc_add-ons = ports nptl $(add-ons)
> +multilibdev = libc6-dev-armhf (= $${binary:Version})
>  
>  EGLIBC_PASSES += armhf
>  DEB_ARCH_REGULAR_PACKAGES += libc6-armhf libc6-dev-armhf
> diff -Nru eglibc-2.16/debian/sysdeps/armhf.mk eglibc-2.16/debian/sysdeps/armhf.mk
> --- eglibc-2.16/debian/sysdeps/armhf.mk	2012-10-26 04:44:05.000000000 +0200
> +++ eglibc-2.16/debian/sysdeps/armhf.mk	2012-11-02 11:28:23.000000000 +0100
> @@ -1,4 +1,5 @@
>  libc_add-ons = ports nptl $(add-ons)
> +multilibdev = libc6-dev-armel (= $${binary:Version})
>  
>  # Install a compat symlink so old binaries keep working:
>  define libc6_extra_pkg_install
> diff -Nru eglibc-2.16/debian/sysdeps/i386.mk eglibc-2.16/debian/sysdeps/i386.mk
> --- eglibc-2.16/debian/sysdeps/i386.mk	2012-10-27 13:14:05.000000000 +0200
> +++ eglibc-2.16/debian/sysdeps/i386.mk	2012-11-02 11:27:59.000000000 +0100
> @@ -1,5 +1,6 @@
>  extra_config_options = --enable-multi-arch
>  libc_extra_cflags = -mno-tls-direct-seg-refs
> +multilibdev = libc6-dev-amd64 (= $${binary:Version}), libc6-dev-x32 (= $${binary:Version})
>  
>  ## We use -march=i686 and glibc's i686 routines use cmov, so require it.
>  ## A Debian-local glibc patch adds cmov to the search path.
> diff -Nru eglibc-2.16/debian/sysdeps/powerpc.mk eglibc-2.16/debian/sysdeps/powerpc.mk
> --- eglibc-2.16/debian/sysdeps/powerpc.mk	2011-08-04 08:44:37.000000000 +0200
> +++ eglibc-2.16/debian/sysdeps/powerpc.mk	2012-11-02 11:28:30.000000000 +0100
> @@ -1,4 +1,5 @@
>  extra_config_options = --enable-multi-arch
> +multilibdev = libc6-dev-ppc64 (= $${binary:Version})
>  
>  # build 64-bit (ppc64) alternative library
>  EGLIBC_PASSES += ppc64
> diff -Nru eglibc-2.16/debian/sysdeps/ppc64.mk eglibc-2.16/debian/sysdeps/ppc64.mk
> --- eglibc-2.16/debian/sysdeps/ppc64.mk	2012-10-26 04:55:31.000000000 +0200
> +++ eglibc-2.16/debian/sysdeps/ppc64.mk	2012-11-02 11:28:39.000000000 +0100
> @@ -1,6 +1,7 @@
>  libc_rtlddir = /lib64
>  extra_config_options = --enable-multi-arch
>  extra_cflags = -O3 -fno-tree-vectorize
> +multilibdev = libc6-dev-powerpc (= $${binary:Version})
>  
>  # build 32-bit (powerpc) alternative library
>  EGLIBC_PASSES += powerpc


-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net



Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 18:54:50 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.