Distcc between i686 and i486 leads to 'illegal instruction'
GentooThis forum is for the discussion of Gentoo Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distcc between i686 and i486 leads to 'illegal instruction'
I have a fileserver with an AMD k6-2 (350 MHz) processor. I use the gentoo i486 stage 3 install. To speed install up, I use distcc for compiling. The computer that compiles is my 3.0 GHz pentium 4 (i686 stage 3).
When i compile grub for the server, and run grub-install, I get these errors:
I know that these errors have something to do with code that can't be executed because they're compiled against a wrong architecture. In my case the code is probably i686, while I need i486 or i586.
My questions is, how can I make my pentium 4 make code for my server? Do I need Crossdev? What I understand is that Crossdev only makes an toolchain for another architecture, am I right?
EDIT:
Forgot to mention that on the server I use:
CFLAGS="-O2 -march=k6-2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
And on my desktop:
CFLAGS="-O2 -mtune=pentium4 -march=pentium4 -pipe -fomit-frame-pointer"
CXXFLAGS="$CFLAGS"
Uh? If you're building for pentium4 then of course there's going to be sections that won't run on a k6. I don't know gentoo or distcc, but maybe change march/mtune on the P4 when you're compiling for the k6??
I know that these errors have something to do with code that can't be executed because they're compiled against a wrong architecture. In my case the code is probably i686, while I need i486 or i586.
Yes. Unless your gcc is bugged. Please, check this guide about distcc and cross-compiling:
I've also requested this to be moved to teh Gentoo subforum. I know little about distcc and probably someone around there can give a better insight if the guide I linked is not enough help.
Therefore I thought of unpacking an i486 stage3 from Gentoo, then chroot to it and use this as the distcc client. But there is a problem that you got 2 Gentoo installations (well, 1 real and a chroot) on one IP-address. Therefore the server don't know about the chroot.
Quote:
Uh? If you're building for pentium4 then of course there's going to be sections that won't run on a k6. I don't know gentoo or distcc, but maybe change march/mtune on the P4 when you're compiling for the k6??
Is it possible to change march/mtune? I think it will still not work, because CHOST is still set at i686-pc-linux-gnu, or is it safe to temporary change that to i486-pc-linux-gnu (and don't install software on the pentium4)?
Yes, it takes time. But in first place I don't quite understand the question. The stage3 file has everything a basic Gentoo system needs to work, including a proper compiler (unlike stage1, which needed -note the past tense, it's not supported nowadays- to be bootstrapped).
So, you already have a toolchain if you uncompressed the stage3 file.
Quote:
Is it possible to change march/mtune? I think it will still not work, because CHOST is still set at i686-pc-linux-gnu, or is it safe to temporary change that to i486-pc-linux-gnu (and don't install software on the pentium4)?
You don't need to change anything in the make.conf file of your distcc satellites as far as I know. But again, I am not a master in distcc as said above. In any case, changing the CHOST is not trivial, you shouldn't be doing that.
I think you don't understand my problem. For clarification:
I have a server (amd k6-2, build from i486 stage 3). For compilation i have my destkop (pentium 4, build from i686 stage 3). The problem is that I can't use my desktop for distcc compiling, because it generates i686 code, which will not work on the server (because it's i486).
As far as I understand, I need to make an i486 toolchain on my desktop. But this takes probably a lot of time. Therefore I thought of using an unpacked i486 stage 3, chroot to it and use this for compiling. But this gives problems, because the server can't connect with distcc to the chroot.
When the server is ready compiling it's kernel, I will give changing march/mtune on my desktop a try.
I think you don't understand my problem. For clarification:
I have a server (amd k6-2, build from i486 stage 3). For compilation i have my destkop (pentium 4, build from i686 stage 3). The problem is that I can't use my desktop for distcc compiling, because it generates i686 code, which will not work on the server (because it's i486).
As far as I understand, I need to make an i486 toolchain on my desktop. But this takes probably a lot of time. Therefore I thought of using an unpacked i486 stage 3, chroot to it and use this for compiling. But this gives problems, because the server can't connect with distcc to the chroot.
When the server is ready compiling it's kernel, I will give changing march/mtune on my desktop a try.
I see. I misunderstood one point.
I don't think that your p4 is gonna take an eternity to build a toolchain for 486, it could take at most several hours depending on many factors.
However, i686 and i468 are very close, and I am not sure you truly need this. This is over the top of my knowledge though, so I won't continue because I could be misleading you. I hope this thread is moved soon to the Gentoo subforum where you can probably get better help about the issue from my Gentoo comrades. I'll poke a couple of them and see if they can give better help.
I have no idea on this one, because I never used distcc. If we don't find the answer here, I suggest that you repost your problem inside the Gentoo forum.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.