LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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


Reply
  Search this Thread
Old 03-14-2018, 12:08 PM   #1
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,615
Blog Entries: 19

Rep: Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460
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?
 
Old 03-14-2018, 09:09 PM   #2
anak_bawang
Member
 
Registered: Jun 2015
Location: Bandung Indonesia
Distribution: Debian, LFS/BLFS
Posts: 138

Rep: Reputation: 23
Similar to my old thread. Hope it's useful for you.
Libstdc++-7.2.0 error, LFS-8.1 systemd stable

Last edited by anak_bawang; 03-14-2018 at 09:11 PM.
 
Old 03-15-2018, 05:54 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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.)

Examples https://drive.google.com/drive/folde...nO?usp=sharing

gcc-5.xx https://docs.google.com/document/d/1...it?usp=sharing

gcc-6.xx https://drive.google.com/file/d/1eW5...ew?usp=sharing

-

Last edited by knudfl; 03-15-2018 at 05:58 AM.
 
1 members found this post helpful.
Old 03-15-2018, 06:27 AM   #4
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,615

Original Poster
Blog Entries: 19

Rep: Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460
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.
 
Old 03-15-2018, 04:16 PM   #5
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,615

Original Poster
Blog Entries: 19

Rep: Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460
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.
 
1 members found this post helpful.
Old 03-15-2018, 10:00 PM   #6
anak_bawang
Member
 
Registered: Jun 2015
Location: Bandung Indonesia
Distribution: Debian, LFS/BLFS
Posts: 138

Rep: Reputation: 23
Maybe you can try to build gcc-4.9 using gcc-5.5 which has been successfully installed before.
Well, just an idea.

Last edited by anak_bawang; 03-15-2018 at 10:02 PM.
 
Old 03-16-2018, 12:18 PM   #7
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,615

Original Poster
Blog Entries: 19

Rep: Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460
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.
 
Old 03-17-2018, 06:18 AM   #8
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,615

Original Poster
Blog Entries: 19

Rep: Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460
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.
 
  


Reply

Tags
gcc49



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Building LFS/BLFS without GCC anak_bawang Linux From Scratch 4 04-18-2016 03:22 PM
[SOLVED] LFS 7.7 - Error when building GCC first pass followj Linux From Scratch 6 04-18-2015 03:44 AM
LFS 7.1 errors in chapter 6 when building gcc in 6.17 kevstev Linux From Scratch 3 01-02-2013 12:31 PM
Building GCC for LFS dbbolton Linux - Software 9 11-27-2009 03:35 AM
building LFS GCC question citrus Linux From Scratch 6 05-12-2004 08:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 02:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration