Ubuntu

libstdc++-dev:i386 cannot be installed on 64bit system.

Reported by jcdutton on 2012-04-04
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
gcc-4.6 (Ubuntu)
Wishlist
Unassigned
gcc-4.7 (Ubuntu)
Undecided
Unassigned

Bug Description

lsb_release -rd
Description: Ubuntu precise (development branch)
Release: 12.04
uname -a
Linux inspiron1521 3.2.0-21-generic #34-Ubuntu SMP Fri Mar 30 04:25:35 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

I don't see why libstdc should try to install g++-4.6:i386
The 64bit version of gcc has the -m32 option to build 32bit binary output, even though compiling on a 64bit system.
So, in this case, installing libstdc++6-4.6-dev:i386 should just install the 32 bit lib and nothing else.
I can see the current multiarch allowing for 64bit and 32bit library files having the same filename, but I cannot see how you can have a 32bit gcc binary installed on a 64bit system, because the location and filename are the same.
Do we need to introduce /usr/bin and /usr/bin32, similar to /usr/lib32 and /usr/lib?

aptitude install libstdc++6-4.6-dev:i386

The following NEW packages will be installed:
  binutils:i386{ab} cpp-4.6:i386{ab} g++-4.6:i386{ab} gcc-4.6:i386{ab} libc6-dev:i386{a} libgmp10:i386{a} libgomp1:i386{a}
  libmpc2:i386{a} libmpfr4:i386{a} libquadmath0:i386{a} libstdc++6-4.6-dev:i386{b} linux-libc-dev:i386{a}
0 packages upgraded, 12 newly installed, 0 to remove and 0 not upgraded.
Need to get 29.1 MB of archives. After unpacking 82.6 MB will be used.
The following packages have unmet dependencies:
 g++-4.6 : Conflicts: g++-4.6:i386 but 4.6.3-1ubuntu3 is to be installed.
 g++-4.6:i386 : Conflicts: g++-4.6 but 4.6.3-1ubuntu3 is installed.
 gcc-4.6 : Conflicts: gcc-4.6:i386 but 4.6.3-1ubuntu3 is to be installed.
 gcc-4.6:i386 : Conflicts: gcc-4.6 but 4.6.3-1ubuntu3 is installed.
 libstdc++6-4.6-dev : Conflicts: libstdc++6-4.6-dev:i386 but 4.6.3-1ubuntu3 is to be installed.
 libstdc++6-4.6-dev:i386 : Conflicts: libstdc++6-4.6-dev but 4.6.3-1ubuntu3 is installed.
 cpp-4.6 : Conflicts: cpp-4.6:i386 but 4.6.3-1ubuntu3 is to be installed.
 cpp-4.6:i386 : Conflicts: cpp-4.6 but 4.6.3-1ubuntu3 is installed.
 binutils : Conflicts: binutils:i386 but 2.22-6ubuntu1 is to be installed.
 binutils:i386 : Conflicts: binutils but 2.22-6ubuntu1 is installed.

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/973240/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
affects: ubuntu → gcc-4.6 (Ubuntu)
Matthias Klose (doko) wrote :

multiarch doesn't handle co-installation of foreign binaries in /usr/bin

Changed in gcc-4.6 (Ubuntu):
importance: Undecided → Wishlist
status: New → Confirmed
jcdutton (james-superbug) wrote :

I wished to install
libstdc++6-4.6-dev:i386
so that I could build a 32bit C++ program on a 64bit system.
This needs 64bit g++, and does not need 32bit g++,
so, libstdc++:i386 should not depend on g++:i386

Suggest:
32bit g++ depends on libstdc++
but don't make libstdc++:i386 require 32big g++

This would fix cross compiling 32bit C++ programs on a 64bit system.

Matthias Klose (doko) wrote :

just install g++-multilib

Matthias Klose (doko) wrote :

fixed for gcc-4.7 in raring, won't fix for gcc-4.6

Changed in gcc-4.7 (Ubuntu):
status: New → Fix Released
Changed in gcc-4.6 (Ubuntu):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers