View previous topic :: View next topic |
Author |
Message |
Palhoto Tux's lil' helper
Joined: 27 Feb 2003 Posts: 111 Location: Iberian Peninsula
|
Posted: Tue Mar 26, 2013 3:48 pm Post subject: [SOLVED] GCC 4.6.3 i486/i686 toolchain architecture mismatch |
|
|
Hello,
Can anyone please provide a gcc-4.6.3 binary package for i686 with optimizations up to SSE1? Or does anyone have an alternative idea on how to fix the i486/i686 toolchain mismatch issue.
I was unaware of the specific gcc upgrade issue and did what mahdi1234 also stumbled upon; NeddySeagoon provided the solution for his machine (doesn't work for mine).
[...]
NeddySeagoon wrote: | I'm not 100% sure this will work as the CHOST value is hard coded into the toolchain all over the place and your current toolchain is a mix of CHOST i486 and CHOST i686.
That may be permanently broken.
I may have gcc-4.6.3 built on a 32 bit Intel Atom, which I could turn into a binary package for you. That will be built with a i686 CHOST.
[...]
CFLAGS are Code: | CFLAGS="-O2 -msse3 -march=prescott -mfpmath=sse -pipe -fomit-frame-pointer" | |
For my Athlon XP 2500+ processor, I would require something with up to SSE1 optimizations. The processor does not have SSE2 or SSE3 instructions.
Thanks.
Last edited by Palhoto on Thu Mar 28, 2013 2:41 pm; edited 1 time in total |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Tue Mar 26, 2013 8:32 pm Post subject: |
|
|
Palhoto,
Extract the files you need from a stage3 tarball.
The essential steps are as follows. Make a dir, I'll use /mnt/stage3 but you can use where ever you have some space.
mkdir /mnt/stage3
Fetch a i686 stage3 tarball
Untar it, just like the handbook says but into /mnt/stage3.
Mount /proc and /dev as per the handbook.
Bind mount your /usrportage to /mnt/stage3/usr/portage
This shares your portage tree and distfiles with the install in /mnt/stage3
Copy over /etc/resolv.conf
do the chroot as per the handbook.
The rest of the steps are carried out in the chroot.
In /etc/portage/make.conf set FEATURES="buildpkg", or add it to the existing FEATURES.
This saves a binary package of everything you build into /usr/portage/packages. Because of the bind mount, thats the same places both inside and outside the chroot.
emerge gentoolkit.
For gcc, you can run to make a binary package of gcc and put it into /usr/portage/package.
If you want gcc with your normal USE flags, set the profile and use flags in the chroot.
What you have now is an unbootable rescue gentoo installed in /mnt/stage3. You can only use it via chrooting into it.
When you are done saving binary packages and building things, exit the chroot.
You can install the packages in your real system with Code: | emerge -K =catagory/package-version |
If emerge needs gcc, then treat the gcc tarball in /usr/portage/packages as a mini stage3 and untar it to your root filesystem.
Code: | tar xpf /path/to/tarball -C / |
Use gcc-config to select your new gcc, even if its the sme version as your broken installed one. Follow the on screen instructions. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Palhoto Tux's lil' helper
Joined: 27 Feb 2003 Posts: 111 Location: Iberian Peninsula
|
Posted: Wed Mar 27, 2013 12:02 am Post subject: |
|
|
Thank you NeddySeagoon for such a detailed explanation. I understood perfectly what is to be done. I should be able to carry these instructions out and report back in a few days. |
|
Back to top |
|
|
Palhoto Tux's lil' helper
Joined: 27 Feb 2003 Posts: 111 Location: Iberian Peninsula
|
Posted: Wed Mar 27, 2013 5:22 pm Post subject: |
|
|
NeddySeagoon wrote: | Fetch a i686 stage3 tarball |
Seems like the last available i686 one is stage3-i686-20121213, downloading now. The current autobuilds are all i486. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Wed Mar 27, 2013 7:20 pm Post subject: |
|
|
Palhoto,
If that stage3 has the wrong gcc version in it, you can emerge the one you need. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Palhoto Tux's lil' helper
Joined: 27 Feb 2003 Posts: 111 Location: Iberian Peninsula
|
Posted: Wed Mar 27, 2013 8:39 pm Post subject: |
|
|
NeddySeagoon wrote: | Palhoto,
If that stage3 has the wrong gcc version in it, you can emerge the one you need. |
Yep, the gcc screen saver is still cranking it out. |
|
Back to top |
|
|
Palhoto Tux's lil' helper
Joined: 27 Feb 2003 Posts: 111 Location: Iberian Peninsula
|
Posted: Thu Mar 28, 2013 2:24 pm Post subject: |
|
|
NeddySeagoon wrote: | For gcc, you can run to make a binary package of gcc and put it into /usr/portage/package. |
How do I get quickpkg to package the 4.6.3 version of GCC instead of 4.5.4 which it does by default? I've already switched to 4.6.3 with gcc-config and ran . Do I need to remove 4.5.4 from the chroot environment? |
|
Back to top |
|
|
Palhoto Tux's lil' helper
Joined: 27 Feb 2003 Posts: 111 Location: Iberian Peninsula
|
Posted: Thu Mar 28, 2013 2:29 pm Post subject: |
|
|
Palhoto wrote: | How do I get quickpkg to package the 4.6.3 version of GCC instead of 4.5.4 which it does by default? |
Didn't RTFM completely, just searched for SLOT or slot without success in the man page.
Answer: Code: | quickpkg =sys-devel/gcc-4.6.3 |
|
|
Back to top |
|
|
Palhoto Tux's lil' helper
Joined: 27 Feb 2003 Posts: 111 Location: Iberian Peninsula
|
Posted: Thu Mar 28, 2013 2:40 pm Post subject: |
|
|
NeddySeagoon wrote: | You can install the packages in your real system with Code: | emerge -K =catagory/package-version |
|
Done. Tested re-emerging nasm (a small C package) successfully. Thank you NeddySeagoon for your support. Are there any other user tests I can perform to be sure I've got the toolchain properly setup (besides re-emerging the whole portage tree)? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Thu Mar 28, 2013 7:02 pm Post subject: |
|
|
Palhoto,
If gcc works for one package, it should work for them all.
No other testing should be needed. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|