All times are UTC-06:00




Post new topic  Reply to topic  [ 11 posts ] 
Author Message
 Post subject: make.conf for pegasos?
PostPosted: Tue May 17, 2005 6:40 am 
Offline

Joined: Tue May 10, 2005 11:17 pm
Posts: 21
I'm here again, with more question... :D

Thanks to the helps I have received to my las post, I have managed to configure the kernel, and a base gentoo boots up nicely, whitout any problem :)

But... :oops:

Emerging small things (like ftp, gentoolkit) is not a problem. I met my problem, when tried to emerge xorg-x11. All its dependencies merged ok, but xorg itself (and xterm) is not. The compiler stopped with some errors. Same as I had when trying stage1 or do a (deep) update. I think the problem is somewhere in the make.config file. Right now I'm trying to use the make.config file from the LiveDVD... Same result...
Does anyone know what are the correct compiler options (and use flags) especially for pegasos with G4? This would help. I think..


Top
   
PostPosted: Tue May 17, 2005 8:20 pm 
Offline

Joined: Wed Oct 20, 2004 11:20 pm
Posts: 82
Here is my make.conf:
Code:
ACCEPT_KEYWORDS="~ppc"
CFLAGS="-O2 -mcpu=7450 -mtune=7450 -maltivec -mabi=altivec -fno-strict-aliasing -pipe"
CHOST="powerpc-unknown-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPS="-j2"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
ALSA_CARDS="via82xx"
USE="alsa oss"
PORTDIR_OVERLAY="/usr/local/portage/"
--Aaron
Gentoo 2005.0
Kernel: 2.6.11-skunk6


Top
   
PostPosted: Tue May 17, 2005 8:24 pm 
Offline

Joined: Fri Sep 24, 2004 1:39 am
Posts: 103
Location: Gothenburg, Sweden
There is really no such thing as correct USE-flags. The whole point of the USE-flag system is that you can adapt your Linux system to suit your personal needs. If your problems really are caused by a USE-flag (which is probably not the case) then it is a bug in Gentoo and not your fault.

Regarding CFLAGS, this is what I use on my G4 system: "-mcpu=7450 -mtune=7450 -O2 -maltivec -mabi=altivec -fno-strict-aliasing -fsigned-char -pipe"
The most important flag here is the -fno-strict-aliasing which is required with newer GCCs because not all software supports strict-aliasing yet.
-mcpu=7450 tells GCC to support all instructions available on the ppc7450-series (the 7447 which you find in the Pegasos is 7450-compatible, the main difference between the 744x and 745x is that the latter supports L3-cache).
-mtune=7450 tells GCC to optimize for the 7450
You could for instance use "-mcpu=G3 -mtune=7450" which would mean that it should only use instructions which are known to work on G3 and newer CPUs but still optimize for a 7450 (G4).
You can replace 7450 with G4, but then it will not optimize for the newer G4 models.
-O2 is the optimization level. 3 is the maximum but it is broken if you use mtune/mcpu 7450.
-maltivec enables the use of AltiVec instructions.
-mabi=altivec adds some extra code to your software to make it AltiVec-safe, it is not a good idea to use -maltivec without this option unless you really know what you are doing.
-fsigned-char is required by very few applications, I don't even remember which ones, and I don't know exactly why it is required. Someone else can probably answer this.
-pipe will tell GCC to pipe its output to the assembler, the default method is to create a temporary file in /tmp which the assembler reads from, but piping the data is normally faster.

Set CXXFLAGS="${CFLAGS}" which just tells GCC to use the same flags for C++ as for C.

If you are missing "-fno-strict-aliasing" then I would guess that is what is causing it to fail Xorg compilation. Although if this is not the case it would help if you could paste some output from the error here.
One way of logging the entire compilation process is to run something like:
emerge xorg-x11 &> /root/xorg-compile.log &
sleep 10; tail -f /root/xorg-compile.log

After the compilation breaks you will have the entire output of the compile process in /root/xorg-compile.log.


Top
   
PostPosted: Fri May 20, 2005 6:21 am 
Offline

Joined: Tue May 10, 2005 11:17 pm
Posts: 21
Thanks to both of you for the help! I had that -fno-strict-aliasing in the CFLAGS line, but what did not is -mcpu, and mtune was set for G4. After adding and changing to 7450, x-org compiled finally! :D
I tried to do a stage1 install with these settings, but had no luck. During stage1 compiling at gcc (3.4.3-r1 ??? not sure) part the process had a segmentation fault.. :( Stage3 is working... Anyway. At least I can continue to build up my system now. Thanks for your help!
:D :D :D


Top
   
PostPosted: Thu Jul 14, 2005 7:41 pm 
Offline

Joined: Sun May 08, 2005 8:46 pm
Posts: 559
Location: Paris
@dholm

i used your settngs for make.conf but after that I had several errors during the Gnome compilation so it failed. I'll go back to the default settings to give a try.


Top
   
PostPosted: Fri Jul 15, 2005 1:58 am 
Offline

Joined: Fri Sep 24, 2004 1:39 am
Posts: 103
Location: Gothenburg, Sweden
If you could paste some of the errors here that would be great since it will be easier for us to debug your problem. The easiest way to do that is to run something like:
Code:
emerge <package> >& /tmp/<package>.log &
tail -f /tmp/<package>.log
Then either compress /tmp/<package>.log and make it available online, or paste the last couple of lines (starting a few lines before the actual error message) here.


Top
   
PostPosted: Fri Jul 15, 2005 8:55 pm 
Offline

Joined: Sun May 08, 2005 8:46 pm
Posts: 559
Location: Paris
i was preparing that log file for you when i decided to check my USE settings and discovered that i had a typo mistake in it. Fixed it and Gnome is compiling fine now, sorry about that. Will double-check next time.

:roll:


Top
   
PostPosted: Sun Jul 17, 2005 7:10 pm 
Offline

Joined: Fri Sep 24, 2004 1:39 am
Posts: 103
Location: Gothenburg, Sweden
Add '-av' when you run emerge and you will get a chance to see which USE-flags you have enabled/disabled for each package you are going to install.


Top
   
PostPosted: Tue Oct 18, 2005 9:20 pm 
Offline

Joined: Tue Sep 28, 2004 9:03 pm
Posts: 45
I don't know if it would be of any help, but I get segmentation faults while compiling big apps too. I guess the CPU gets too hot? I'm monitoring it and it seems ok, though... A G3 here. Anyway, after several tries (around 3), it usually compiles.

(No, I didn't select "Preemptive Kernel" by mistake ;P)


Top
   
PostPosted: Tue Oct 18, 2005 10:35 pm 
Offline

Joined: Tue May 10, 2005 11:17 pm
Posts: 21
Hi there!

Seems I don't have problem sence installed gentoo 2005.1 from scratch. Whit this "new" Gentoo I use CFLAGS="-O2 -pipe -mcpu=7400 -maltivec -mabi=altivec" options in make.conf (see make.conf.example). Maybe that's the key. Even Openoffice Ximian goes up for the first try... ;)
And I don't use preemptive also. (I red somewhere that its bugy on ppc)


Top
   
PostPosted: Tue Oct 18, 2005 10:51 pm 
Offline

Joined: Tue Sep 28, 2004 9:03 pm
Posts: 45
Well, I also installed 2005.1 from scratch, but I still have problems compiling stuff ^^; alsa-tools just emerged in the second try. Now I was trying to emerge mozilla-firefox and the computer just froze. I was just running Xorg, Fluxbox and mpg123 (I got the song in an awful loop...).

The CPU temperature was OK (50C), although after it froze it started going up bit by bit. Anyway, I think it may be a hardware problem, but I can't figure it out. My PS/2 keyboard went nuts so now I just use USB ports.

Debugging hardware is the worst :P


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 11 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: No registered users and 32 guests


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

Search for:
Jump to:  
PowerDeveloper.org: Copyright © 2004-2012, Genesi USA, Inc. The Power Architecture and Power.org wordmarks and the Power and Power.org logos and related marks are trademarks and service marks licensed by Power.org.
All other names and trademarks used are property of their respective owners. Privacy Policy
Powered by phpBB® Forum Software © phpBB Group