RPM request: gcc 4.5.3

General conversations about MIB project
Forum rules
Image
Before you post, please read forum rules:
Software requests - How to
Tag [SOLVED] in topics
Post Reply
User avatar
King_DuckZ
Utente junior
Utente junior
Posts: 23
Joined: 6 June 2011, 1:47
OpenMandriva: 2010.2
Kernel: 2.6.38.8
Desktop: KDE
country: Italia
Location: Paris

RPM request: gcc 4.5.3

Post by King_DuckZ »

I need gcc for work as it has, among the other things, a fix for a crash occurring when we build our software, which is blocking me.
I tried to build it from source but configuring the system was not evident to me, so I rolled back to the 4.4.3 (unstable in my case, as I said). Even 4.5.2 would be acceptable, and maybe the 4.6.0.
I find it hard to believe that there's no gcc update on the mandriva repositories, I hope you can do something! :)

- version of mandriva in use: 2010.2
- arch: x86_64
- link to software home page: http://gcc.gnu.org/
- link to source download: http://gcc.gnu.org/mirrors.html

User avatar
Pulfer
Collaboratore
Collaboratore
Posts: 291
Joined: 30 July 2008, 3:10
ROSA: 2012.1 i686
OpenMandriva: -
Kernel: 3.10.x
Desktop: KDE 4.10.x
country: Russia
Location: Vladivostok

Re: RPM request: gcc 4.5.3

Post by Pulfer »

King_DuckZ wrote:I need gcc for work as it has, among the other things, a fix for a crash occurring when we build our software, which is blocking me.
I tried to build it from source but configuring the system was not evident to me, so I rolled back to the 4.4.3 (unstable in my case, as I said). Even 4.5.2 would be acceptable, and maybe the 4.6.0.
I find it hard to believe that there's no gcc update on the mandriva repositories, I hope you can do something! :)
Updating gcc is extremely dangerous. I don't think we should package it for our repos. There are two possible ways here.

1. You can try to build it from Cooker SRPMs. It will require to rebuild some more libraries, but overall it shouldn't be a hard task (just use rpmbuild --rebuild package.src.rpm command).
2. If you try and fail, perhaps we can create a personal repository for you and upload gcc 4.6.0 there.
Core i7-3770 / 4 Gb RAM / Gigabyte Z77-D3H / ASUS ENGTS250 / Rosa 2012.1 i686

User avatar
King_DuckZ
Utente junior
Utente junior
Posts: 23
Joined: 6 June 2011, 1:47
OpenMandriva: 2010.2
Kernel: 2.6.38.8
Desktop: KDE
country: Italia
Location: Paris

Re: RPM request: gcc 4.5.3

Post by King_DuckZ »

Allright, I'll give it a try. Since I'm not familiar with the process, could you explain me a bit more? If I understand well, I need to download gcc-4.6.0-13.src.rpm, then recursively download all of its dependencies, and pass each of them in bottom-to-top order to rpmbuil --rebuild, then install the resulting rpms using urpmi. Is this correct? If so, it's going to be faster for me to write a script that does that automatically, and of course I can share it here ;)

User avatar
NicCo
Amministratore
Amministratore
Posts: 4765
Joined: 6 December 2007, 19:54

Re: RPM request: gcc 4.5.3

Post by NicCo »

From a konsole/terminal root window,

Code: Select all

urpmi --buildrequires /your_path/gcc-4.6...src.rpm
from a konsole/terminal user window,

Code: Select all

rpmbuild --rebuild /your_path/gcc-4.6...src.rpm
if all goes fine, you'll find all rpms inside:

Code: Select all

cd /$HOME/rpmbuild/RPMS/

bye, NicCo
.
--- Professional experience ---
Kernel designer, engineer, maintainer and tester for ROSA Desktop and OpenMandriva Lx O.S.

--- currently I'm playing with ---
LTS Kernels > Linux 4.1.12-nrjQL <<< Linux 3.18.17-nrjQL <<< Linux 3.14.46-nrjQL
EOL Kernels > Linux 3.19.8-nrjQL <<< Linux 3.17.8-nrjQL <<< Linux 3.15.10-nrjQL

User avatar
Pulfer
Collaboratore
Collaboratore
Posts: 291
Joined: 30 July 2008, 3:10
ROSA: 2012.1 i686
OpenMandriva: -
Kernel: 3.10.x
Desktop: KDE 4.10.x
country: Russia
Location: Vladivostok

Re: RPM request: gcc 4.5.3

Post by Pulfer »

King_DuckZ wrote:then recursively download all of its dependencies
Yes, it's done with "urpmi --buildrequires" command. But you'll need to rebuild one dependency from Cooker's SRPM: cloog-ppl-0.16.1-1.src.rpm
Core i7-3770 / 4 Gb RAM / Gigabyte Z77-D3H / ASUS ENGTS250 / Rosa 2012.1 i686

User avatar
King_DuckZ
Utente junior
Utente junior
Posts: 23
Joined: 6 June 2011, 1:47
OpenMandriva: 2010.2
Kernel: 2.6.38.8
Desktop: KDE
country: Italia
Location: Paris

Re: RPM request: gcc 4.5.3

Post by King_DuckZ »

Hi, sorry for the late reply. I've tried doing the installation via urpmi and it seems to work, but I've stopped it midway as it seems to be installing old packages from my actual repositories as the dependencies. I know that changing low level libs can be dangerous, but I still wanted to give a try and get all of the latest stuff (likely I'll try it in a VM before breaking everything).

If you're interested, here http://www.box.net/shared/q837m4252a I uploaded a script that does what I described in my previous post. I know it's not perfect and I listed some known problems inside it, at the top, but I got it running for a while now and most of the rpms are being rebuilt as I type :)
I hope someone finds it useful! Basically it downloads the package you want to install, gather its dependencies by calling rpm and then redo the same for each of the dependencies, until it can actually call rpmbuild. No installation is done, so I assume that for non-leaf dependencies rpmbuild is going to fail, but then I can just urpmi * in the RPMs directory and try again o.O
I just launched it like this:

Code: Select all

./srpmrebuild http://mirror.yandex.ru/mandriva/devel/cooker/SRPMS/main/release/ gcc ~/gcc460/
where gcc460 is a temporary directory where I want to store downloaded files. You can omit it, but then the script will create a temporary folder and clean it automatically, so you will have to redownload everything if you launch it twice.
I'll definitely try the urpmi thing and let you know which method worked best for me, thanks for helping!

User avatar
forrestw517
Utente junior
Utente junior
Posts: 80
Joined: 22 August 2009, 2:38
OpenMandriva: 2010.2 x86_64
Kernel: 2.6.36.4-desktop-69m
Desktop: kde 4.5.5 mib
Contact:

Re: RPM request: gcc 4.5.3

Post by forrestw517 »

I was curious is there a way to put both main and contrib http on the same line with the srpmbuild script so it can pull dependencies from contrib when needed to do so?

User avatar
King_DuckZ
Utente junior
Utente junior
Posts: 23
Joined: 6 June 2011, 1:47
OpenMandriva: 2010.2
Kernel: 2.6.38.8
Desktop: KDE
country: Italia
Location: Paris

Re: RPM request: gcc 4.5.3

Post by King_DuckZ »

Nope sorry, I didn't add that yet. You can try and edit the script by yourself if you know some Ruby, otherwise I will try to add that feature when I get some spare time (it's unlikely to be within the next days tho).
Eventually, I can add the file to some online source control, so let me know before editing it ;)

Also, I found a problem with a package asking and waiting for user's input, so the script seems to freeze with no output, but hitting enter a few times gets you past that (doing so you're sticking to default values).

User avatar
forrestw517
Utente junior
Utente junior
Posts: 80
Joined: 22 August 2009, 2:38
OpenMandriva: 2010.2 x86_64
Kernel: 2.6.36.4-desktop-69m
Desktop: kde 4.5.5 mib
Contact:

Re: RPM request: gcc 4.5.3

Post by forrestw517 »

sorry I have no real programming experience.

User avatar
King_DuckZ
Utente junior
Utente junior
Posts: 23
Joined: 6 June 2011, 1:47
OpenMandriva: 2010.2
Kernel: 2.6.38.8
Desktop: KDE
country: Italia
Location: Paris

Re: RPM request: gcc 4.5.3

Post by King_DuckZ »

Ok, I think I need some more help :/ I've tried to do:

Code: Select all

urmpi cloog-ppl-0.16.1-1.src.rpm
A requested package cannot be installed:
cloog-ppl-0.16.1-1.src (due to unsatisfied ppl-devel[>= 0.11])
Continue installation anyway? (Y/n) 
and if I try to rebuild ppl I do nothing more than bury myself into dependency hell. One other problem is that many dependencies seem to be circular, so even running my script fails, because I don't see how I can solve circular dependencies using rpmbuild.
Should I install cloog even if its requirements are unsatisfied? How can I rpmbuild something that depends on itself, like ant for example?

User avatar
forrestw517
Utente junior
Utente junior
Posts: 80
Joined: 22 August 2009, 2:38
OpenMandriva: 2010.2 x86_64
Kernel: 2.6.36.4-desktop-69m
Desktop: kde 4.5.5 mib
Contact:

Re: RPM request: gcc 4.5.3

Post by forrestw517 »

I have been doing rpm -rebuild all day on packages just want to see if I can successfully build kde 4.6.3 for 2010.2 its been a night mare. all the dependencies needed. and stated in your post there are a few that require itself to build which is strange.

Post Reply