Page 1 of 1

Installing GCC 4.5 or 4.7 in Mageia 2

PostPosted: Nov 26th, '12, 17:06
by sekelsenmat
Hello,

I am very long time user of Mageia (and before that Mandriva and before that Conectiva), but today I have faced a new challange that I dont know how to solve =) I need to build a software but it refuses to compile with gcc 4.6 and gives a message saying that some issue prevents it's compilation with gcc 4.6 and that I use 4.5 or 4.7 instead. It is not a compilation error, it simply detects and 4.6 and refuses to proceed. I have no way to overcome this problem by any other kind of way, the only solution is really installing GCC 4.5 or maybe 4.7. 4.5 seams to be preferred to 4.7

So how could I go to execute this task? In the Mageia Control Center in the packages section I see only 1 option for GCC ... 4.6

I wonder if any of the repositories contain 4.5 or 4.7. I think it is unlikely that they will contain older software like 4.7 but maybe so experimental repos might contain 4.7 ...

I also wonder if one could have multiple gcc versions installed at the same time, although this might be a management hell ... and I dont really need the 4.6.

Any hints are welcome!

thanks,

Re: Installing GCC 4.5 or 4.7 in Mageia 2

PostPosted: Nov 26th, '12, 19:09
by djennings
Cauldron has gcc 4.7
You could try compiling your application in a Cauldron vbox and then transferring the app to mga2
There are images for Mageia3Alpha3 on the mirrors. Install that in a VirtualBox and away you go.

Alternatively you could try installing gcc 4.7 from Cauldron in mga2 although you might run into dependency problems.

Re: Installing GCC 4.5 or 4.7 in Mageia 2

PostPosted: Nov 26th, '12, 22:27
by doktor5000
Better mention which software you want to compile, maybe there are other workarounds ...

Re: Installing GCC 4.5 or 4.7 in Mageia 2

PostPosted: Nov 28th, '12, 09:54
by sekelsenmat
It is 2 things: pike and a proprietary software that my company produces ...

I decided to try Mageia 3 alpha instead as it should come with GCC 4.7 and fix the issue. So far it works good for an alpha.

I tryed Mageia 1 too, but it was a disaster. Crashed a lot ... probably my hardware is too new for it.

Re: Installing GCC 4.5 or 4.7 in Mageia 2

PostPosted: Nov 30th, '12, 13:14
by sekelsenmat
Ok, this didn't help anything. The software does not compile with GCC 4.7 either ... it really needs to be GCC 4.5 ... so does anyone have any idea how to install GCC 4.5 in Mageia 2 or 3?

I can't use Mageia 1 because of its old kernel which freezes my computer very often.

And installing the gcc 4.5 packages from Mageia 1 in Mageia 2 or 3 fails because of a network of dependencies which goes up to libc =/

Re: Installing GCC 4.5 or 4.7 in Mageia 2

PostPosted: Nov 30th, '12, 22:37
by martinw
Is http://pike.lysator.liu.se/ the software you are trying to build? A quick Google search suggests the GCC 4.6 problem only affects 32-bit builds. Can you use the 64-bit version of Mageia instead? I've just checked, and Pike appears to build without any errors on my 64-bit Mageia-2 system.

Re: Installing GCC 4.5 or 4.7 in Mageia 2

PostPosted: Dec 14th, '12, 12:25
by sekelsenmat
thanks, the idea is good, but no, I cannot use 64-bits because the proprietary software that my company develops works only in 32-bits ... so this is not a solution for me.

I really would need to get GCC 4.5 installed in Mageia 2 or 3. Well, it seams that only building GCC myself would solve the issue (which will probably be a terrible pain).

Re: Installing GCC 4.5 or 4.7 in Mageia 2

PostPosted: Dec 15th, '12, 16:35
by martinw
A couple of other suggestions:
  • Try installing and running Mageia-1 on a virtual machine (e.g. VirtualBox). That might insulate it from your hardware enough to avoid the crashes.
  • You can run 32-bit binaries on a 64-bit machine (providing you install any necessary dynamic libraries). So if you have a binary version of your proprietary software, you should be able to run it on a 64-bit Mageia installation.