command-not-found suggests gcc-mingw-w64 instead of the correct g++-mingw-w64-i686 to provide the "i686-w64-mingw32-g++" command

Bug #992217 reported by Pali
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
command-not-found (Ubuntu)
Confirmed
Undecided
Unassigned
gcc-mingw-w64 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

In 64bit oneiric was present 32 mingw-w64 C++ compiler (binary i686-w64-mingw32-g++) in package gcc-mingw-w64. But in precise is 32bit cross compiler missing. What happened? Why was C++ compiler removed? Can you add it back? Note that both 32 and 64 bit versions of C compiler is included in precise (i686-w64-mingw32-gcc and x86_64-w64-mingw32-gcc).

Revision history for this message
Stephen Kitt (steve-sk2) wrote :

Doesn't the g++-mingw-w64-i686 package provide what you're looking for? (Or simply g++-mingw-w64, which will pull in the 32- and 64-bit variants.)

Regards,

Stephen

Changed in gcc-mingw-w64 (Ubuntu):
assignee: nobody → Stephen Kitt (steve-sk2)
Revision history for this message
Pali (pali) wrote :

$ i686-w64-mingw32-g++
The program 'i686-w64-mingw32-g++' is currently not installed. You can install it by typing:
sudo apt-get install gcc-mingw-w64
$ sudo apt-get install gcc-mingw-w64
[sudo] password for pali:
Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc-mingw-w64 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ i686-w64-mingw32-g++
The program 'i686-w64-mingw32-g++' is currently not installed. You can install it by typing:
sudo apt-get install gcc-mingw-w64

Revision history for this message
Pali (pali) wrote :

Now I found it, compiler is installed by package g++-mingw-w64.

But why it show me this message?

The program 'i686-w64-mingw32-g++' is currently not installed. You can install it by typing:
sudo apt-get install gcc-mingw-w64

Revision history for this message
Stephen Kitt (steve-sk2) wrote :

It sounds like a bug in command-not-found (the package which provides the "currently not installed" suggestion), or out-of-date indices.

Could you try running
        sudo apt-file update

then remove g++-mingw-w64 again
        sudo apt-get remove g++-mingw-w64

and see what error message
        i686-w64-mingw32-g++
gives?

(Obviously you can install g++-mingw-w64 again after this!)

Thanks,

Stephen

Revision history for this message
Pali (pali) wrote :

After that it show me:
The program 'i686-w64-mingw32-g++' is currently not installed. You can install it by typing:
sudo apt-get install gcc-mingw-w64

Revision history for this message
Stephen Kitt (steve-sk2) wrote :

That's odd, but I won't be able to do much about it; I'll reassign this to command-not-found (and retitle the bug).

affects: gcc-mingw-w64 (Ubuntu) → command-not-found (Ubuntu)
Changed in command-not-found (Ubuntu):
assignee: Stephen Kitt (steve-sk2) → nobody
summary: - missing c++ compiler for precise
+ command-not-found suggests gcc-mingw-w64 instead of the correct
+ g++-mingw-w64-i686 to provide the "i686-w64-mingw32-g++" command
Revision history for this message
Pali (pali) wrote :

Ok, but other think is that I had working i686-w64-mingw32-g++ before upgrading to precise. Because c++ compiler is now after upgrade in other package, upgrade tool should install it.

I think this is also bug (in upgrade tool). Upgrade tool should not delete some programs like c++ cross compiler.

Before writing this bug report I did not know that c++ compiler was moved to package g++-mingw-w64-i686. I thought that it was deleted from precise distribution.

Revision history for this message
Stephen Kitt (steve-sk2) wrote :

OK, re-adding to gcc-mingw-w64 as well then. For upgrade purposes it should at least recommend the split packages.

Revision history for this message
Micah Gersten (micahg) wrote :

@Stephen, perhaps there should be a transitional binary for this?

Revision history for this message
Stephen Kitt (steve-sk2) wrote :

Micah, that's more or less what I'm thinking, not a separate transitional binary package since gcc-mingw-w64 still exists, but making gcc-mingw-w64 recommend the various other compiler packages which used to be part of it (so g++-mingw-w64, gfortran-mingw-w64 and gnat-mingw-w64). Would that be sufficient? I'd rather avoid having a strong dependency since the whole point of the split was to allow users to only install the compilers they actually want...

Revision history for this message
Micah Gersten (micahg) wrote :

Well, we install recommends by default, I think if an old binary package should be migrated, a transitional package with a dependency on the new package would be the way to go. I can't find the binary that the reporter mentioned in oneiric.

Revision history for this message
Stephen Kitt (steve-sk2) wrote :

This is fixed in version 6, for which I filed a sync request against quantal (#995660). I'm not sure whether this can be applied to 12.04 too...

(Micah, the binary that the reporter mentioned is provided by gcc-mingw-w64 in oneiric.)

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-mingw-w64 - 6

---------------
gcc-mingw-w64 (6) unstable; urgency=low

  * Handle the different split-package versions in Ubuntu and Debian.
  * Add transitional "Recommends" so that gcc-mingw-w64 pulls in the
    compilers it used to provide (LP: #992217).
  * Make gcc-mingw32 install compatibility symlinks for binaries and
    manpages formerly provided by mingw32-binutils (LP: #992161).
  * Enable Ada support on armhf and hurd-i386 now that gnat-4.6 is
    available there.

 -- Stephen Kitt <email address hidden> Sat, 05 May 2012 12:33:32 +0200

Changed in gcc-mingw-w64 (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in command-not-found (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.