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

Re: g++-4.8 multiarch/multilib



On Thu, Jul 11, 2013 at 8:48 AM, Matthias Klose <doko@debian.org> wrote:
> Am 09.07.2013 23:25, schrieb Zoltan Hidvegi:
>> This may be related to Bug#712044, and may reflect my ignorance with
>> the issue. I am trying to have a C/C++ development system that can
>> compile both 32 and 64-bit binaries based purely on multiarch, without
>> the need for packages like g++-4.8-multilib or libc6-i386 etc. which
>> duplicate the contents of the i386 architecture packages. On an amd64
>> system, with g++-4.8 this almost work, in fact all I had to do is to
>> install the needed *-dev:i386 packages and create a symlink:
>>
>> # ls -al /usr/lib/gcc/x86_64-linux-gnu/4.8/32
>> lrwxrwxrwx 1 root root 24 Jul  8 18:54
>> /usr/lib/gcc/x86_64-linux-gnu/4.8/32 -> ../../i486-linux-gnu/4.8
>>
>> After this, g++ -m32 seem to work. I wonder if there was some way to
>> make this setup more official.
>
> The packaging already allows this for the default multilib, however not yet for
> the non-default multilibs.  Look for with_deps_on_target_arch_pkgs in the
> packaging.  Patches to make this work for the non-default multilibs are appreciated.
>
> A proper solution would be not to use symlinks at all, but have the compiler
> lookup these locations. Again, patch and getting this applied upstream, would be
> welcome.

I have neither the Debian packaging expertise nor the time to do all
this, sorry, I'll live with the symlink workaround for now. I was
actually hoping for some less invasive solution, like an alternative
or a diversion for the /32 link/dir. But I really don't know enough
about all this.

> The other question is, if this should be enabled by default. And my position is
> still the one as given in the cited bug report: No. The compiler needs to be
> built without any build dependencies on a foreign architecture, and should not
> depend by default on packages which don't belong to the native architecture.

Sure, all I wish is gcc -m32 to work if I install the *-dev:i386
packages, it does not have to be the only way, I'm fine having the
lib32 lib*-i386 packages, as long as there is a way to install a
multiarch devel system without having to install any of these.

>> I assume this would also work for older gcc versions, however it is
>> currently blocked by a dependency of libstdc++6-4.7-dev:i386 on
>> g++-4.7:i386 which of course is not co-installable with g++-4.7:amd64.
>> I don't really know why this dependency is needed, maybe it's really a
>> bug that should be opened against libstdc++6-4.7-dev?
>
> no, there is no such dependency, you always should look at unstable first.

Oops, right, libstdc++6-4.7-dev is fine in unstable. However
libstdc++6-4.4-dev still depends on g++-4.4.

-Zoltan


Reply to: