Discussion:
installing a second gcc on the same machine
Mark Ryden
2008-06-11 14:15:52 UTC
Permalink
Hello,

I want to be able to build a kernel module of FC6 on an FC9 machine,
I build the module on the FC9 machine against an FC6 kernel tree.
However, when I insmod it, I get an error: it expects it to be built
agains the gcc version of FC6.

I want to keep the gcc of FC9.

I tried to install the fc6 gcc rpm, with -force, but this seems to
overwrite the previous version.

My question is: is there a way to install two gcc rpms on the same machine?

(BTW: there is no compat version for gcc of FC6 in FC9)

Regards,
Mark
James Olin Oden
2008-06-11 14:40:48 UTC
Permalink
Post by Mark Ryden
Hello,
I want to be able to build a kernel module of FC6 on an FC9 machine,
I build the module on the FC9 machine against an FC6 kernel tree.
However, when I insmod it, I get an error: it expects it to be built
agains the gcc version of FC6.
I want to keep the gcc of FC9.
I tried to install the fc6 gcc rpm, with -force, but this seems to
overwrite the previous version.
My question is: is there a way to install two gcc rpms on the same machine?
You can use -i, --badreloc and --relocate (see rpm's man page). With
the proper use of these you'll get the other gcc rpm installed off
in some other directory like /opt/gcc-fc6. This may or may not work
well though depeding on how hard coded the search for various items
are within the gcc package. If it doesn't you'll need to just resort
to building and installing gcc yourself (which is not really that
hard).

If it does work you've got some new problems though. You can't
upgrade gcc now, as that will remove both gcc's. This will mean that
you can either:

upgrade one
reinstall the other.

install the new one
remove the old one

That last one is an "rpm -i" followed by an "rpm -e", and probably can
be reversed.

Cheers...james
Post by Mark Ryden
(BTW: there is no compat version for gcc of FC6 in FC9)
Regards,
Mark
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
devzero2000
2008-06-11 15:35:22 UTC
Permalink
Post by Mark Ryden
Hello,
I want to be able to build a kernel module of FC6 on an FC9 machine,
I build the module on the FC9 machine against an FC6 kernel tree.
However, when I insmod it, I get an error: it expects it to be built
agains the gcc version of FC6.
I want to keep the gcc of FC9.
I tried to install the fc6 gcc rpm, with -force, but this seems to
overwrite the previous version.
My question is: is there a way to install two gcc rpms on the same machine?
You can use -i, --badreloc and --relocate (see rpm's man page). With
the proper use of these you'll get the other gcc rpm installed off
in some other directory like /opt/gcc-fc6.

No, gcc on FC or RHEL is not relocatable, so --relocate doesn't work (as it
is written in the rpm's man page).
In this case the best option is to build an "compact-gcc-x.y.z" on FC9,
where x.y.z are the gcc release of FC6:
look at an example SRPMS of compact-gcc in FC or RHEL4.

JMHO, YMMV

hth
James Olin Oden
2008-06-11 16:47:49 UTC
Permalink
Post by James Olin Oden
Post by Mark Ryden
Hello,
I want to be able to build a kernel module of FC6 on an FC9 machine,
I build the module on the FC9 machine against an FC6 kernel tree.
However, when I insmod it, I get an error: it expects it to be built
agains the gcc version of FC6.
I want to keep the gcc of FC9.
I tried to install the fc6 gcc rpm, with -force, but this seems to
overwrite the previous version.
My question is: is there a way to install two gcc rpms on the same machine?
You can use -i, --badreloc and --relocate (see rpm's man page). With
the proper use of these you'll get the other gcc rpm installed off
in some other directory like /opt/gcc-fc6.
No, gcc on FC or RHEL is not relocatable, so --relocate doesn't work (as it
is written in the rpm's man page).
In this case the best option is to build an "compact-gcc-x.y.z" on FC9,
look at an example SRPMS of compact-gcc in FC or RHEL4.
That is what --badreloc is for....the question of whether a package is
built to be relocatable, and whether it will work when its relocated
is two entirely different questions (and to what degree will it work
or not work, and will that degree meet your needs are some other
questions).

...james
devzero2000
2008-06-11 20:47:43 UTC
Permalink
Something as "--badreloc" force someone to think that the rpm package
manager is evil
ad i don't think this (look at this
http://www.germane-software.com/~ser/Files/Essays/RPM_Hell.html<http://www.germane-software.com/%7Eser/Files/Essays/RPM_Hell.html>).
One thing marked as "--bad" is bad, not sure a normal mode of work. So it is
a matter of quality assurace : do to the right think so to have confidence
that the package preserve my system integrity ( and my time )

In the same vein, someone think that the package dependency are a nightname
and i don't think this: but they think are more simple disabling the
dependency, also when they distributed only binary package - commercial
software or so. But it is this a nightmare : it is possible to upgrade the
system ? which truly requisite i have on this software ? Sure, it is
possibile to do : --ignorearch, --nodeps, ecc. But is it a sane thing to do
? But ok, i am a lazy sysadmin, i like pace of mind : so i like rpm.

I hope you agreed with most of the argument i have described.

Best Regards
Post by James Olin Oden
Post by James Olin Oden
Post by Mark Ryden
Hello,
I want to be able to build a kernel module of FC6 on an FC9 machine,
I build the module on the FC9 machine against an FC6 kernel tree.
However, when I insmod it, I get an error: it expects it to be built
agains the gcc version of FC6.
I want to keep the gcc of FC9.
I tried to install the fc6 gcc rpm, with -force, but this seems to
overwrite the previous version.
My question is: is there a way to install two gcc rpms on the same machine?
You can use -i, --badreloc and --relocate (see rpm's man page). With
the proper use of these you'll get the other gcc rpm installed off
in some other directory like /opt/gcc-fc6.
No, gcc on FC or RHEL is not relocatable, so --relocate doesn't work (as
it
Post by James Olin Oden
is written in the rpm's man page).
In this case the best option is to build an "compact-gcc-x.y.z" on FC9,
look at an example SRPMS of compact-gcc in FC or RHEL4.
That is what --badreloc is for....the question of whether a package is
built to be relocatable, and whether it will work when its relocated
is two entirely different questions (and to what degree will it work
or not work, and will that degree meet your needs are some other
questions).
...james
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
Michael Jennings
2008-06-13 00:41:32 UTC
Permalink
On Wednesday, 11 June 2008, at 22:47:43 (+0200),
Post by devzero2000
Something as "--badreloc" force someone to think that the rpm
package manager is evil
The "bad" in "badreloc" refers to the packaging, not the package
manager. It simply means that the packager did not account for such a
relocation being a possibility; this may be intentional or
unintentional.
Post by devzero2000
ad i don't think this (look at this
http://www.germane-software.com/~ser/Files/Essays/RPM_Hell.html
While RPM certainly has its flaws, the ignorance displayed in this
essay explains about 95% of the complaints it contains. I could
respond point by point to all the false claims, misunderstandings,
etc. this person wrote, but I can't invest that much time into
something that would probably fall on deaf ears anyway.

But I don't think the name of the option implies that RPM is evil, nor
do I think that the ignorance of some users invalidates the
technology.

Michael
--
Michael Jennings (a.k.a. KainX) http://www.kainx.org/ <***@kainx.org>
Linux Server/Cluster Admin, LBL.gov Author, Eterm (www.eterm.org)
-----------------------------------------------------------------------
"When my time is up, I want to know that I did one thing well: Love
somebody. The rest of this is just an expression of that one
thing." -- Julie Bowen (Aunt Gwen), "Dawson's Creek"
devzero2000
2008-06-13 11:47:56 UTC
Permalink
Without dubt, i agreed with your opinion:it could not be otherwise. Perhaps
but it is the case to bring back in this mailing list, that who discusses
mostly in this days and believes nell' rpm it is part in wide part of the
rpm5.org team.

But this is carrying beyond
what was asked and it is not help to who placed the question in this
thread in first place.

Best Regards


Elia
Post by Michael Jennings
On Wednesday, 11 June 2008, at 22:47:43 (+0200),
Post by devzero2000
Something as "--badreloc" force someone to think that the rpm
package manager is evil
The "bad" in "badreloc" refers to the packaging, not the package
manager. It simply means that the packager did not account for such a
relocation being a possibility; this may be intentional or
unintentional.
Post by devzero2000
ad i don't think this (look at this
http://www.germane-software.com/~ser/Files/Essays/RPM_Hell.html<http://www.germane-software.com/%7Eser/Files/Essays/RPM_Hell.html>
While RPM certainly has its flaws, the ignorance displayed in this
essay explains about 95% of the complaints it contains. I could
respond point by point to all the false claims, misunderstandings,
etc. this person wrote, but I can't invest that much time into
something that would probably fall on deaf ears anyway.
But I don't think the name of the option implies that RPM is evil, nor
do I think that the ignorance of some users invalidates the
technology.
Michael
--
Linux Server/Cluster Admin, LBL.gov Author, Eterm (www.eterm.org)
-----------------------------------------------------------------------
"When my time is up, I want to know that I did one thing well: Love
somebody. The rest of this is just an expression of that one
thing." -- Julie Bowen (Aunt Gwen), "Dawson's Creek"
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
Mark Ryden
2008-06-12 06:28:51 UTC
Permalink
Hi,
Thanks all for your answers !
Post by James Olin Oden
If it doesn't you'll need to just resort
to building and installing gcc yourself (which is not really that
hard).
I am trying to install and build gcc myself, as this seems the best
option; I downloaded the
gcc src.rpm and ran:
rpm -ivh
and then
rpmbuild -bp --target=x86_64 gcc41.spec (there are many pathces in
this source rpm)

Now, under /usr/src/redhat/BUILD I have a folder named:
gcc-4.1.1-20061011

I navigated there; I should run ./configure, but is there a way I can
know what are the options
for the configure which the gcc on FC6 was compiled with ? There are
really many options and
I am afraid that if I will miss one, the when trying to build my
module with the generated gcc, it will give
errors. (I have access to a machine on which FC6 with this gcc runs;
but is there a way I can know what
are the options gcc was compiled when this gcc rpm was build ? maybe
by some option to
rpmbuild --rebuild??)

regards,
Mark
Post by James Olin Oden
Post by Mark Ryden
Hello,
I want to be able to build a kernel module of FC6 on an FC9 machine,
I build the module on the FC9 machine against an FC6 kernel tree.
However, when I insmod it, I get an error: it expects it to be built
agains the gcc version of FC6.
I want to keep the gcc of FC9.
I tried to install the fc6 gcc rpm, with -force, but this seems to
overwrite the previous version.
My question is: is there a way to install two gcc rpms on the same machine?
You can use -i, --badreloc and --relocate (see rpm's man page). With
the proper use of these you'll get the other gcc rpm installed off
in some other directory like /opt/gcc-fc6. This may or may not work
well though depeding on how hard coded the search for various items
are within the gcc package. If it doesn't you'll need to just resort
to building and installing gcc yourself (which is not really that
hard).
If it does work you've got some new problems though. You can't
upgrade gcc now, as that will remove both gcc's. This will mean that
upgrade one
reinstall the other.
install the new one
remove the old one
That last one is an "rpm -i" followed by an "rpm -e", and probably can
be reversed.
Cheers...james
Post by Mark Ryden
(BTW: there is no compat version for gcc of FC6 in FC9)
Regards,
Mark
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
Loading...