Re: g++-4.8 multiarch/multilib
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.
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.
The archive and the packaging tools are not ready to install these, and it adds
complexity to the build process. Having dependencies on a foreign architecture
is a no-go as well, because it doesn't work in the default setup. And last but
not least it only works for multilib configurations which do have a port in
Debian, and which are in sync with the main archive.
> 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.
Matthias
Reply to: