LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-11-2017, 02:12 PM   #1
jr_bob_dobbs
Member
 
Registered: Mar 2009
Distribution: Bedrock, Devuan, Slackware, Linux From Scratch, Void
Posts: 651
Blog Entries: 135

Rep: Reputation: 188Reputation: 188
GCC: fortran, go{lang}, objective c


So I've started work on a fresh LFS install. This time I am using the 8.1 stable book. Got chapter five done. Currently I am pausing before starting chapter 6.

In chapter 6, this time around, I'd like to compile some of the extra languages (fortran, go/golang, objective c & c++) as part of GCC, so that I would not need to recompile GCC later. If I understand the LFS and BLFS books correctly, I'll need DejaGnu. That in turn requires Expect... which needs TCL. So in order, I'd need to compile TCL, Expect and then DejaGNU. Logically I would do this *right* before compiling GCC.

Fortunately, all three packages are used in chapter 5, so I have LFS-approved versions of the sources already.

A question: can I just use the version already in /tools (from chapter five)?

Another question: if I *do* re-compile those three packages, should I then re-compile them *again* after GCC is in and working? keep in mind that when I compile them before GCC, it will be with the chapter 5 GCC yet the chapter 6 Glibc

Thank you.

Last edited by jr_bob_dobbs; 12-11-2017 at 02:13 PM.
 
Old 12-12-2017, 08:26 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,278

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Doesn't the book say in chapter 6 that compiling other languages is a job in the BLFS book? It requires a complete bootstrapped recompile of gcc? Don't ignore what they say.

It's your box; Read the small print; do what you like, but don't come crying when it doesn't work. If there was a lazier way, they'd have used it.
 
Old 12-20-2017, 07:33 AM   #3
jr_bob_dobbs
Member
 
Registered: Mar 2009
Distribution: Bedrock, Devuan, Slackware, Linux From Scratch, Void
Posts: 651

Original Poster
Blog Entries: 135

Rep: Reputation: 188Reputation: 188
Right: some concrete and specific details of interest. The version of tcl used by LFS and BLFS is the same ... however, they are different.

tcl-core8.6.7-src.tar.gz is used in chapter five of the LFS book

tcl8.6.7-src.tar.gz is used in the BLFS book.

Looks like "core" is a minimal mix whereas the other is the full version. This clearly indicates that the version of TCL used in chapter five of LFS should not (or can not) be used when attempting to compile GCC to have extra languages.

So, just before the LFS book had me compile GCC, I compiled the full version of TCL. Seeing as how Expect depends on TCL and DejaGNU depends on Expect and how DejaGNU is needed the test phase of GCC, I then recompiled Expect and then DejaGNU.

The BLFS book had the GCC using the bootstrap option and the LFS book disabled is. I opted to follow the LFS and disable the bootstrap. So my command line was nearly exactly as in the LFS book, save for the additional languages:
Code:
SED=sed ../configure --prefix=/usr --enable-languages=c,c++,fortran,go,objc,obj-c++ --disable-multilib --disable-bootstrap --with-system-zlib
The test results were excellent. Out of the tens of thousands of tests run, there were only eight unexpected failures. Five of them mentioned in the LFS book. The remaining three are in the tests of the go compiler. Go had over 2000 tests. Good odds. These results are better than any I've had in previous compiles of LFS.

Last edited by jr_bob_dobbs; 12-20-2017 at 07:37 AM.
 
  


Reply



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] $LANG per user doesn't obey the global $LANG set in /etc/profile.d/lang.sh me_h Slackware 23 11-20-2016 07:28 AM
help... gcc-fortran installation allan_bg Linux - Software 3 01-31-2008 10:06 AM
g77 in gcc 4.1.0 not found only gfortran fortran 95 compiler! I need fortran 77. TheBrick Linux - Software 3 07-04-2007 06:39 AM
Problems with compiling Objective-C using gcc in Slack 11. Tomtherab Slackware 7 02-16-2007 06:54 PM
gcc-fortran on x86_64 clemens07 Linux - Software 1 01-29-2007 05:04 AM

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

All times are GMT -5. The time now is 06:36 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