g++-multilib conflicts with g++-4.8-multilib-powerpc-linux-gnu

Asked by Brad Keifenheim

Hello,

I'm setting up C++ compilers in Ubuntu 14.04 amd64.

I ran:
"sudo apt-get install build-essential"

That worked for the normal stuff, but I found it wasn't enough for a 32-bit compile:
"g++ -m32 hello_world.cpp -o hello_world"

To fix that, based on internet research, I installed the multilib:
"sudo apt-get install g++-multilib"

Then I wanted to compile for the powerpc architecture. Refer to <http://packages.ubuntu.com/source/trusty/gcc-4.8-powerpc-cross>:
"sudo apt-get install g++-4.8-powerpc-linux-gnu"

In the recommends section, apt recommends package g++-4.8-multilib-powerpc-linux-gnu.
"sudo apt-get install g++-4.8-multilib-powerpc-linux-gnu"

Apt then tells me that g++-multilib will be removed! If I do so, I can no longer compile hello_world on the amd64 machine.

Why do these two packages conflict with each other? I want to build 32-bit applications for powerpc. Doesn't that mean I should install g++-4.8-multilib-powerpc-linux-gnu? If not, what is that package for?

Is there a different way to configure my machine so that I can compile natively for 32 bit and cross to ppc32?

Thank you much for your help.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gcc-4.8-powerpc-cross Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#1

I suggest you report a bug.

Revision history for this message
Brad Keifenheim (bkeifenheim) said :
#2

I'm really not sure it is a bug and not just my own misunderstanding.

For example, I've tried the arm cross compiler multilib to see if it would also conflict:
"sudo apt-get install g++-4.8-multilib-arm-linux-gnueabihf"

Once again, g++-multilib is listed as a package to be removed.

Are these multilib packages meant to be installed for cross-compiling 32 bit applications?

Revision history for this message
Brad Keifenheim (bkeifenheim) said :
#3

Thanks actionparsnip, that solved my question.