Bug 1006053 - x86_64-linux-gnu-gcc doesn't support c++
x86_64-linux-gnu-gcc doesn't support c++
Product: Fedora
Classification: Fedora
Component: cross-gcc (Show other bugs)
i686 Linux
unspecified Severity medium
: ---
: ---
Assigned To: David Howells
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-09-09 18:03 EDT by Brendan Long
Modified: 2013-09-24 05:04 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-18 12:19:07 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Brendan Long 2013-09-09 18:03:25 EDT
Description of problem:

I want to use icecream for distributed compiling, and I want my 32-bit machines to cross compile for the 64-bit machines. Unfortunately, the 64-bit version of gcc doesn't come with c++, and there's no c++ package for it.

Version-Release number of selected component (if applicable):

Fedora 19

How reproducible:

Every time.

Steps to Reproduce:

1. sudo yum install x86_64-linux-gnu-gcc
2. x86_64-linux-gnu-gcc test.cpp

Actual results:

x86_64-linux-gnu-gcc: error: test.cpp: C++ compiler not installed on this system

Expected results:

Should compile the file.

Additional info:

Installing gcc-c++ doesn't help, and there's no x86_64-linux-gnu-g++ or x86_64-linux-gnu-gcc-c++ package.
Comment 1 Brendan Long 2013-09-09 18:35:27 EDT
Interestingly, there's even a binary called `x86_64-linux-gcc-cpp`, but it doesn't work:

> $ x86_64-linux-gnu-gcc test.cpp
> x86_64-linux-gnu-gcc: error: test.cpp: C++ compiler not installed on this system
Comment 2 Jakub Jelinek 2013-09-18 11:39:00 EDT
*-cpp is a preprocessor, not a C++ compiler, that would be *-c++, but I bet cross-gcc is meant to support only C, it is there mainly for kernel people, building usable cross compilers for C++ requires usually more effort, you need target libraries which cross-gcc doesn't bother with.
Comment 3 David Howells 2013-09-18 12:19:07 EDT
Jakub is right.  We don't support any userspace side at this time because of the massive multiplication factor that it would incur and the messiness it incurs.

The SRPM that builds this also builds 23 other cross-compilers RPMs at the same time in the same build.  Multiply those by the different arch variants the kernel supports (MIPS has at least 6 for example) and the different C libraries that may be available (glibc and uClibc) and you start getting huge RPM counts.

Then you need to inflate the SRPM because it needs kernel headers, glibc sources, uClibc sources and libstdc++ library sources in addition to the compiler sources.  (Does libstdc++ even build for uClibc?)

Further, there's no guarantee that we can build C++ for every cross-compiler.
Comment 4 Marcin Juszkiewicz 2013-09-24 05:04:15 EDT
If you need C++ cross compiler then fetch source, select only required target architecture and change configure call to enable also c++ language.

I understand why there is no such one enabled.

Note You need to log in before you can comment on or make changes to this bug.