Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How can I install 4.0.2 to /opt
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
spinner
n00b
n00b


Joined: 30 Sep 2005
Posts: 46

PostPosted: Mon Oct 03, 2005 2:41 pm    Post subject: How can I install 4.0.2 to /opt Reply with quote

hi,
I've download the latest ppc portage and source gcc-4.0.2 from distfiles.

How do I make the installation to /opt so that I can use the gcc whenever i like.
I want it to test the autovectorization feateurs with Altivec ?(has anyone made any tests yes ?)

Sorry for the questions.Did had the time to read the manual of emerge thourougly
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Mon Oct 03, 2005 4:40 pm    Post subject: Reply with quote

You don't have to install it in /opt. Install it in a different slot instead.

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1:
1. A Portage Introduction wrote:
With Portage different versions of a single package can coexist on a system. While other distributions tend to name their package to those versions (like freetype and freetype2) Portage uses a technology called SLOTs. An ebuild declares a certain SLOT for its version. Ebuilds with different SLOTs can coexist on the same system. For instance, the freetype package has ebuilds with SLOT="1" and SLOT="2".

_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
echo6
Guru
Guru


Joined: 04 Jan 2003
Posts: 587

PostPosted: Mon Oct 03, 2005 6:08 pm    Post subject: Reply with quote

You can also use gcc-config to select which gcc version you want to use.
Back to top
View user's profile Send private message
fb
l33t
l33t


Joined: 08 Dec 2003
Posts: 636
Location: New Zealand

PostPosted: Tue Oct 04, 2005 10:24 pm    Post subject: Reply with quote

nixnut wrote:
You don't have to install it in /opt. Install it in a different slot instead.

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1:
1. A Portage Introduction wrote:
With Portage different versions of a single package can coexist on a system. While other distributions tend to name their package to those versions (like freetype and freetype2) Portage uses a technology called SLOTs. An ebuild declares a certain SLOT for its version. Ebuilds with different SLOTs can coexist on the same system. For instance, the freetype package has ebuilds with SLOT="1" and SLOT="2".


I have to say I have thought quite often about this kind of stuff. Slotting is very
nice but what (with a quick look) the page you pointed to and your quote doesn't
answer is :"how do I use this for myself?".
I have this program in arch and a newer version in ~arch. I would like to test the
version in ~arch but keep the arch version. But the ~arch version doesn't come in a new
SLOT it will take the SLOT of the arch version! How do I create myself the new slot?
Do I have to create a special ebuild of the ~arch version of the program in my portage
overlay tree and declare it as a new slot in this ebuild. Or is there a much easier way
to have the current ~arch ebuild be merged in a new slot by just entering a few
keywords and setting a few variables?
Now that is something I would like to know and I suspect quite a few other people.
Do you have an answer to this?

Cheers,
François
Back to top
View user's profile Send private message
spinner
n00b
n00b


Joined: 30 Sep 2005
Posts: 46

PostPosted: Wed Oct 05, 2005 1:53 pm    Post subject: Reply with quote

fb wrote:
nixnut wrote:
You don't have to install it in /opt. Install it in a different slot instead.

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1:
1. A Portage Introduction wrote:
With Portage different versions of a single package can coexist on a system. While other distributions tend to name their package to those versions (like freetype and freetype2) Portage uses a technology called SLOTs. An ebuild declares a certain SLOT for its version. Ebuilds with different SLOTs can coexist on the same system. For instance, the freetype package has ebuilds with SLOT="1" and SLOT="2".


I have to say I have thought quite often about this kind of stuff. Slotting is very
nice but what (with a quick look) the page you pointed to and your quote doesn't
answer is :"how do I use this for myself?".
I have this program in arch and a newer version in ~arch. I would like to test the
version in ~arch but keep the arch version. But the ~arch version doesn't come in a new
SLOT it will take the SLOT of the arch version! How do I create myself the new slot?
Do I have to create a special ebuild of the ~arch version of the program in my portage
overlay tree and declare it as a new slot in this ebuild. Or is there a much easier way
to have the current ~arch ebuild be merged in a new slot by just entering a few
keywords and setting a few variables?
Now that is something I would like to know and I suspect quite a few other people.
Do you have an answer to this?

Cheers,
François


I am having kinda the same question.

And to be more specific from my experience with slackware when it comes to development I prefer to have a stable compiler in the usual place and another one(or two) for testing in my /opt so that things don't get mixed up with SLOTS.
This is the traditional way and it always works.

Is it safe to emere ebuilds ?
e.g. emerge /usr/portage/<directories>/xyz.ebuild
Back to top
View user's profile Send private message
zeekec
n00b
n00b


Joined: 24 Feb 2004
Posts: 56
Location: Athens, GA, USA

PostPosted: Wed Oct 05, 2005 2:02 pm    Post subject: Reply with quote

fb wrote:
I have to say I have thought quite often about this kind of stuff. Slotting is very
nice but what (with a quick look) the page you pointed to and your quote doesn't
answer is :"how do I use this for myself?".
I have this program in arch and a newer version in ~arch. I would like to test the
version in ~arch but keep the arch version. But the ~arch version doesn't come in a new
SLOT it will take the SLOT of the arch version! How do I create myself the new slot?
Do I have to create a special ebuild of the ~arch version of the program in my portage
overlay tree and declare it as a new slot in this ebuild. Or is there a much easier way
to have the current ~arch ebuild be merged in a new slot by just entering a few
keywords and setting a few variables?
Now that is something I would like to know and I suspect quite a few other people.
Do you have an answer to this?

Cheers,
François


It is my understanding that "slotting" is primarily for libraries and other "versioned" installables. To support sloting in any random ebuild would be difficult. Some ebuilds do it, but it requires extra software to select which executable is being used (i.e. java-config, gcc-config).

spinner wrote:
I am having kinda the same question.

And to be more specific from my experience with slackware when it comes to development I prefer to have a stable compiler in the usual place and another one(or two) for testing in my /opt so that things don't get mixed up with SLOTS.
This is the traditional way and it always works.

Is it safe to emere ebuilds ?
e.g. emerge /usr/portage/<directories>/xyz.ebuild


The gcc ebuild is set up to support multiple versions being installed simultaneously. Check out "gcc-config." It's used to switch between versions, and supports gcc4.

Erik
_________________
Against stupidity the very gods
Themselves contend in vain.
-Johann Christoph Friedrich von Schiller (1801)
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Wed Oct 05, 2005 2:03 pm    Post subject: Reply with quote

fb:
Slots really only work for programs that have different library versions and ebuilds that have a selector program (like gcc, binutils, etc.). If you want to test an ~arch app and still have the arch version, what I usually do is build packages (quickpkg from gentoolkit for apps that are already installed, emerge -B to build a new package but not install it). When I want to switch between versions, it's simple to emerge the binary package for the version I want. Maintaining your own SLOTed ebuilds would be a nightmare. :p

spinner:
GCC is a special package that *is* slotted. What this means is that you can have different versions of GCC emerged and active on your machine. Switching between them is as easy as using gcc-config. Really, this is the best way to switch between compilers on Gentoo. I don't really understand your question for emerging ebuilds? What are you trying to achieve with that?
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
spinner
n00b
n00b


Joined: 30 Sep 2005
Posts: 46

PostPosted: Wed Oct 05, 2005 2:15 pm    Post subject: Reply with quote

JoseJX wrote:
fb:
Slots really only work for programs that have different library versions and ebuilds that have a selector program (like gcc, binutils, etc.). If you want to test an ~arch app and still have the arch version, what I usually do is build packages (quickpkg from gentoolkit for apps that are already installed, emerge -B to build a new package but not install it). When I want to switch between versions, it's simple to emerge the binary package for the version I want. Maintaining your own SLOTed ebuilds would be a nightmare. :p

spinner:
GCC is a special package that *is* slotted. What this means is that you can have different versions of GCC emerged and active on your machine. Switching between them is as easy as using gcc-config. Really, this is the best way to switch between compilers on Gentoo. I don't really understand your question for emerging ebuilds? What are you trying to achieve with that?


I had libquicktime in my distfiles and it was version 0.9.7.
But the ebuilds in my portage(current) was for version 0.9.4 and 0.9.7.
This results that when I when I give
emerge libquicktime
it searched for the 0.9.4 version only.
So I did
emerge <path-to-ebuild-libquicktime>/<ebuild-ver-0.9.7>
and it compiled the 0.9.7 version
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Wed Oct 05, 2005 2:44 pm    Post subject: Reply with quote

That's really not the recommended method of doing that, next time you try to update your system, it will downgrade again.

In this case, libquicktime-0.9.7 is marked ~ppc (unstable/testing) and libquicktime-0.9.4 is marked ppc (stable). If you want to use the ~ppc version, you tell portage by unmasking it:
Code:

echo "=media-libs/libquicktime-0.9.7 ~ppc" >> /etc/portage/package.keywords
emerge quicktime -pv # Now shows 0.9.7 instead of 0.9.4


See man portage for more details on the /etc/portage directory and how to use it.
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
spinner
n00b
n00b


Joined: 30 Sep 2005
Posts: 46

PostPosted: Wed Oct 05, 2005 2:46 pm    Post subject: Reply with quote

JoseJX wrote:
That's really not the recommended method of doing that, next time you try to update your system, it will downgrade again.

In this case, libquicktime-0.9.7 is marked ~ppc (unstable/testing) and libquicktime-0.9.4 is marked ppc (stable). If you want to use the ~ppc version, you tell portage by unmasking it:
Code:

echo "=media-libs/libquicktime-0.9.7 ~ppc" >> /etc/portage/package.keywords
emerge quicktime -pv # Now shows 0.9.7 instead of 0.9.4


See man portage for more details on the /etc/portage directory and how to use it.


Thanks, I will check it :)
Back to top
View user's profile Send private message
fb
l33t
l33t


Joined: 08 Dec 2003
Posts: 636
Location: New Zealand

PostPosted: Wed Oct 05, 2005 8:42 pm    Post subject: Reply with quote

JoseJX wrote:
fb:
Slots really only work for programs that have different library versions and ebuilds that have a selector program (like gcc, binutils, etc.). If you want to test an ~arch app and still have the arch version, what I usually do is build packages (quickpkg from gentoolkit for apps that are already installed, emerge -B to build a new package but not install it). When I want to switch between versions, it's simple to emerge the binary package for the version I want. Maintaining your own SLOTed ebuilds would be a nightmare. :p

I suspected as much (I knew gcc is slotted I just piggy-backed on the first question).
It would have been nice to have an other way.

Cheers
François
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum