View previous topic :: View next topic |
Author |
Message |
mike808 n00b
Joined: 19 Feb 2003 Posts: 5
|
Posted: Sun Feb 23, 2003 2:23 am Post subject: Bootstrap 1.4RC2 Stage 1 problems on AMD K6 - with fix |
|
|
I typically got compile failures (segmentation fault) in iconvdata in GCC. But I've seen other reports of folks having issues with K6 CPUs. I saw the advice to set CHOST to i586 instead
of the default i686 value. I've also seen tips to set CFLAGS to use -march=k6 or -mcpu=k6
in the /etc/make.conf file.
So I did that. Started a clean re-install.
Still barfed in various places during the bootstrap.
So, I watched ... very ... carefully (using Ctrl-S and Ctrl-Q to start/stop the scrolling
display) since the console has no scrollback. :=(
And I saw, to my surprise, that there were still some programs magically thinking that I was using a i686 CPU. Like the part where GCC is detecting whether or not it can compile a program, which it decides it can't, since the i686 code it generated craps out. That pretty
much stops further progress on the bootstrap....
So where was the i686 information coming from? I tracked it down to /etc/make.globals.
So, the advice, IMHO, needs to be clearer - if you are changing CHOST or CFLAGS
in /etc/make.conf you *MUST* also change them in /etc/make.globals - for non i686 CPUs!
Even when the instructions and all of the other posts say not to ever, ever change /etc/make.globals unless you really know what you're doing.
Well, I didn't know what I was doing, but the critical piece of information I learned
was this:
If you have an AMD K6 class CPU (e.g. K6/200 or any non i686 CPU), you must set CHOST and CFLAGS in both /etc/make.conf and /etc/make.globals.
In my case I am using:
Code: |
CHOST="i586-pc-linux-gnu"
CFLAGS="-march=k6 -O3 -pipe"
|
Once I made the change to /etc/make.globals and ignored the dire warnings, the bootstrap is proceeding fine.
I hope this helps other K6 owners and pre-i686 CPUs.
P.S. Moderators - feel free to borrow, quote, make sticky, adapt, etc. freely.
Mike808/
----------
i430TX K6/200 160MB RAM 3GB HD = 400 bogomips of pure vintage '98 computing. |
|
Back to top |
|
|
cyrillic Watchman
Joined: 19 Feb 2003 Posts: 7313 Location: Groton, Massachusetts USA
|
Posted: Sun Feb 23, 2003 4:52 am Post subject: |
|
|
Quote: | So, I watched ... very ... carefully (using Ctrl-S and Ctrl-Q to start/stop the scrolling
display) since the console has no scrollback. :=( |
You can use <shift>+<page up> and <shift>+<page down> to scroll the console. |
|
Back to top |
|
|
mike808 n00b
Joined: 19 Feb 2003 Posts: 5
|
Posted: Sun Feb 23, 2003 4:48 pm Post subject: |
|
|
That might be a good thing to put in the instructions for folks to send in bug reports.
It's kind of hard to send one in when the error message has scrolled off
the screen, and you don't know anything about this magical scrollback key sequence.
Thanks for the tip. |
|
Back to top |
|
|
sindre Guru
Joined: 01 Nov 2002 Posts: 315 Location: Norway
|
Posted: Mon Feb 24, 2003 6:08 pm Post subject: |
|
|
I'm in the process of installing Gento 1.4rc2 on my k6-3 450mhz. I had similar problems during bootstrap.
What I noticed, was that when emerging portage in the bootstrap process, my make.conf and make.globals get overwritten.
I thought it might be the CONFIG_PROTECT env thing, so I unset it. This didn't help, maybe if I set it to something special?
Anyway, I suspended the bootstrap after it automatically emerged portage, and edited the make.* files again (also changed chost and mcpu in make.globals as they defaults to i686).
It's running now, don't know if it will work or not (I'll report when it's done). Hope this can be sorted out. |
|
Back to top |
|
|
sindre Guru
Joined: 01 Nov 2002 Posts: 315 Location: Norway
|
Posted: Mon Feb 24, 2003 7:38 pm Post subject: |
|
|
It didn't work out, gave me a compilation error. I decided to try to use gcc-3.2.1-r7 rather than r6. Upon editing the build to change ~x86 to x86, I noticed something regarding k6 and k6-2 processors. It would automatically change -march to i586 for those. I have a k6-3 so I decided to add a similar line for -march=k6-3.
Now it seems to have passed gcc complation without problems as all I see is lines regarding glibc. I'm not sure exactly how many of the changes were needed to make it work, since I included them all in the last try. |
|
Back to top |
|
|
sindre Guru
Joined: 01 Nov 2002 Posts: 315 Location: Norway
|
Posted: Mon Feb 24, 2003 8:45 pm Post subject: |
|
|
Got a kernel crash... don't know why. Anyway it seems the bootstrap.sh takes care of the CFLAGS/CHOST thing, it stores them so it doesn't matter that the files get overwritten.
I'm tring again, this time I'll try the gcc-3.2.1-r6 again with the added k6-3 line. Gives me another chance to diagnose the problem so I can make a bug-report if neccesary. |
|
Back to top |
|
|
mike808 n00b
Joined: 19 Feb 2003 Posts: 5
|
Posted: Tue Feb 25, 2003 2:47 am Post subject: |
|
|
sindre wrote: | I'm in the process of installing Gento 1.4rc2 on my k6-3 450mhz. I had similar problems during bootstrap. |
It's not just me then.
sindre wrote: |
What I noticed, was that when emerging portage in the bootstrap process, my make.conf and make.globals get overwritten.
|
I noticed that too. And did the same thing. I stuck 'nano -w /etc/make.globals'
in bootstrap.sh to "fix" between emerges.
I saw some gcc problems with AMD K6 series CPUs, so backed off to "-mcpu=i586".
Something about loop unrolling.
I'm segfaulting in gettext-0.11.5 in format-c-3-prg.c in program 'as' now.
Where do I find out how to unmask unstable emerge pulls?
Grrrr. |
|
Back to top |
|
|
sindre Guru
Joined: 01 Nov 2002 Posts: 315 Location: Norway
|
Posted: Tue Feb 25, 2003 11:54 am Post subject: |
|
|
I might have to use -march=i586 too then. I'm trying different versions of gcc and glibc, and running bootstrap.sh with 1.5 argument. Makes it run the first half of the process. Afterwards you can run it with argument 2, to execute the other half. If I get nowhere doing this I'll just back down to -march=i586 |
|
Back to top |
|
|
RobertTheBruce n00b
Joined: 14 Feb 2003 Posts: 41
|
Posted: Tue Feb 25, 2003 1:34 pm Post subject: |
|
|
I thought about using the -mcpu=k6-2 and -march=k6-2 but then decided to go with -march=i586 and Ihaven't had any problems at all with that option. |
|
Back to top |
|
|
sindre Guru
Joined: 01 Nov 2002 Posts: 315 Location: Norway
|
Posted: Tue Feb 25, 2003 5:11 pm Post subject: |
|
|
So do you need to use -march=i586 permanently or just for the bootstrap?
This seems very strange, it kind of fails at random places.. I'll try bootstrapping with -march=i586. If this doesn't work, I'll test my RAM bricks...
It seems unlikely to be my hardware, as other k6* owners have similar problems. |
|
Back to top |
|
|
sindre Guru
Joined: 01 Nov 2002 Posts: 315 Location: Norway
|
Posted: Wed Feb 26, 2003 6:13 pm Post subject: |
|
|
OK, I got through bootstrap and emerge system. The following ebuilds needed modification to compile:
Code: | gcc-3.2.2
glibc-2.3.1-r2
libperl-5.8.0
python-2.2.2
slang-1.4.5-r2 |
All of the mentioned ebuilds, except gcc-3.2.2 and glibc-2.3.1-r2, were edited with:
Code: | replace-flags "-march=k6-3" "-march=i586 -mcpu=k6-3" |
Some of the ebuilds missed this line: Code: | inherit eutils flag-o-matic |
So I had to add it to get the replace-flags line working.
Further, the bootstrap-process I ran with -march=k6. I don't know if this was necessary. The rest I ran with -march=k6-3. And the glibc and gcc ebuilds were edited with
Code: | relace-flags "-march=k6" "-march=i586" |
I think that if I had used the same -march, and replace-flags line in the bootstrap-process as I did with the emerge system part, it would still have worked. Therefore I recommend trying that first, as it should result in better optimisation.
So, if I were to run bootstrap again, I would have used (I'm running a k6-3 so replace with k6-2/k6 if you run one of those):
Code: | CFLAGS="-march=k6-3 -mmmx -m3dnow -Os -pipe -fomit-frame-pointer -fforce-addr" |
all the way, and edited all of the listed ebuilds:
Code: | inherit eutils flag-o-matic
replace-flags "-march=k6-3" "-march=i586 -mcpu=k6-3" |
I will probably try this with gcc and glibc later (too tired of those right now). Anyway those ebuilds should be fixed before 1.4... |
|
Back to top |
|
|
needles n00b
Joined: 27 Feb 2003 Posts: 31 Location: Downingtown, Pennsylvania - USA
|
Posted: Thu Feb 27, 2003 3:51 am Post subject: Fix for K6-x woes |
|
|
I have a K6-2 500, and am using Gentoo 1.4_rc2. I've had a glibc compile problem as mentioned above.
I dug around in Bugzilla and found this to be the most common suggestion for fixing the problems I've been running into:
Quote: | You need to install gcc-3.2.2_pre20030131, as the earlier versions have
have a bud bug for K6 ....
|
I've changed my gcc line in /etc/make.profiles/packages to
Code: | *=sys-devel/gcc-3.2.2_pre20030131
|
and I get this error after I build portage in the /usr/protage/scripts/bootstrap.sh script:
Code: | Calculating dependencies -
emerge: there are no masked or unmasked ebuilds to satisfy "=sys-devel/gcc-3.2.2_pre20030131".
!!! Error calculating dependancies. Please correct.
|
I've looked around for this gcc build, even on gcc's site in their CVS tree, and I don't see it. How do I make this gcc version?
The bugs I've referenced can be found here:
https://bugs.gentoo.org/show_bug.cgi?id=14676
https://bugs.gentoo.org/show_bug.cgi?id=14531
I'm going to attempt the ebuild modifcations above, but I don't know if that will solve my problems. The developer answering these bug reports seems pretty keen on it being a gcc problem.
Thank you for your time,
Needles |
|
Back to top |
|
|
ravenq Apprentice
Joined: 19 Feb 2003 Posts: 161
|
Posted: Thu Feb 27, 2003 4:08 am Post subject: |
|
|
sindre wrote: | It seems unlikely to be my hardware, as other k6* owners have similar problems. |
I might have this wrong, but if other people with the same hardware have an issue the same as yours, then it's basically a hardware issue isn't it? Well, a hardware incompatability anyway. Strictly speaking though, you own hardware is probably functional, just the support isn't quite there at full optimization. _________________ --
The Game is Nothing,
the Playing of it Everything. |
|
Back to top |
|
|
sindre Guru
Joined: 01 Nov 2002 Posts: 315 Location: Norway
|
Posted: Thu Feb 27, 2003 12:23 pm Post subject: |
|
|
Seems my struggle to get through the install was a complete waste of time. I booted up in my new and shiny gentoo system... Noticed I had compiled in the wrong network card, so I started recompiling the kernel. Midway in the kernel compilation... SEGFAULT!
Seems anything but -march=i586 will make the system unstable/compile errors. Wonder if -march=i586 with -mcpu=k6-3 will be ok? Or -march=i586 -m3dnow -mmmx. I don't want to compile it all once more just to get another segfault thrown at me...
@needles: Why would you install gcc-3.2.2_preanything, when gcc-3.2.2 is done and avialible? |
|
Back to top |
|
|
SpamMonkey n00b
Joined: 29 Sep 2002 Posts: 35 Location: Birmingham, UK
|
Posted: Sun Mar 02, 2003 10:04 am Post subject: |
|
|
I'm currently trying to install Gentoo on a K6-2 333, 112mb Ram and an 8.4gb HD (sounds easy so far)..
But, after reading this thread I'm concerned that I'll run into problems when compiling.
At the moment I've simply set -march="i586" in my make.conf file so I'll keep my fingers crossed and post back if it works (or not)..
l8rs
Gavin _________________ Solve two of the worlds problems..
Feed the homeless to the hungry |
|
Back to top |
|
|
sindre Guru
Joined: 01 Nov 2002 Posts: 315 Location: Norway
|
Posted: Sun Mar 02, 2003 6:39 pm Post subject: |
|
|
I compiled it all with -march=i586 -mmmx -m3dnow etc.
Everything's fine until I try to emerge qt. It fails with a segfault... Seems someone with athlon processors have experienced the same, looking at the bug reports. Think I'll just have to experiment with the CFLAGS and see if I can make it work...
If I don't find any solution I might remerge gcc with no optimisatioin at all. I ran memtest86 for 5 hours or so without errors, so I think my RAM bricks are fine. Maybe I should test the processor too... |
|
Back to top |
|
|
sindre Guru
Joined: 01 Nov 2002 Posts: 315 Location: Norway
|
Posted: Mon Mar 03, 2003 11:33 pm Post subject: |
|
|
Seems my cpu is not entirely stable... I ran cpuburn, and I got a kernel panic a little while later. I'm not sure what to do as it's not overclocked or anything. Maybe I'll have to get some better cooling. |
|
Back to top |
|
|
|