[SOLVED] Building and installing an alternative gcc in LFS 8.2
Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
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.
Building and installing an alternative gcc in LFS 8.2
I want to build Pale Moon in LFS. I know I can't do it with gcc-7; it needs an earlier version. I think the recommended one is now gcc-5 but I've done it in Crux with gcc-6 and it worked. The point is that I don't want the older version to contaminate my primary tool chain.
I googled around and found a Red Hat article which suggested that only two additional configuration parameters are necessary: an installation prefix that puts all the files off the main path (they suggested /opt/gcc-$VERSION/) and a program suffix (-$VERSION) for the binaries, as one does with autoconf-2.13. Is that really all that is necessary? And can I take the rest of the configuration from the blfs instructions for rebuilding gcc?
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513
Rep:
Re #1.
You can have as many gcc versions as you want, installed at the same time.
.. As long as program suffix and a hidden location is used.
( Extra compilers can be built in a single final step.)
Yes, that's exactly the method I was querying. I have downloaded gcc-4.9 (the Pale Moon developers' preferred compiler) and I am going to build it like that and then build PM with it. If that works, I shall report back and mark this as solved.
I couldn't build gcc-4.9 with gcc-7. I suppose the gap is too great. It crashed while building libgcc.
Code:
In file included from ../../../libgcc/unwind-dw2.c:405:0:
./md-unwind-support.h: In function `x86_64_fallback_frame_state':
./md-unwind-support.h:65:47: error: dereferencing pointer to incomplete type
sc = (struct sigcontext *) (void *) &uc_->uc_mcontext;
^
make[3]: *** [../../../libgcc/shared-object.mk:14: unwind-dw2.o] Error 1
However, I was able to build and install gcc-5.5. I will try to build palemoon with this, probably on Saturday as tomorrow will be a very busy day for me.
I successfully built pm and I'm testing it out now. It crashes in Yahoo but I remember that I had the same problem before and it turned out to be a mesa3d thing. Rebuilding mesa cured it, so I will try that again.
I am writing this in pm but haven't installed it yet. I think I'll do that now.
I remember now! It wasn't mesa, it was the Intel video driver. Pale Moon has problems with it on certain sites. I have replaced it with the modesetting driver and pm works now.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.