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 01-19-2023, 05:04 PM   #1
albator9
LQ Newbie
 
Registered: Jan 2023
Posts: 2

Rep: Reputation: 0
LFS 11.2 - chapter05/gcc-pass1 -> error when configure


Hi all,
I'm new there.

I have an error when generating the Makefile (= "reconfigure phase") at chapter05/gcc-pass1.
Below the console output

Code:
checking for gcc option to accept ISO C99... none needed
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking whether g++ accepts -static-libstdc++ -static-libgcc... no
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking for gdc... no
checking whether the D compiler works... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking whether g++ supports C++11 features by default... no
checking whether g++ supports C++11 features with -std=gnu++11... no
checking whether g++ supports C++11 features with -std=gnu++0x... no
checking whether g++ supports C++11 features with -std=c++11... no
checking whether g++ supports C++11 features with +std=c++11... no
checking whether g++ supports C++11 features with -h std=c++11... no
checking whether g++ supports C++11 features with -std=c++0x... no
checking whether g++ supports C++11 features with +std=c++0x... no
checking whether g++ supports C++11 features with -h std=c++0x... no
configure: error: *** A compiler with support for C++11 language features is required.
Any idea ?

Albator
 
Old 01-29-2023, 01:03 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,453

Rep: Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342
Hello, albator9, & welcome to LQ.

I've done LFS in the past, and even HLFS when it was a thing. In chapter 5, you're using your host system to build static build tools, a sort of mini-os; Then you can chroot into your new system and build LFS itself in Chapter 6.

Please mention what your host OS is. Some systems (e.g. Red Hat, fedora, Centos, anything from the RH stable) are not suitable hosts. Your problem
Code:
configure: error: *** A compiler with support for C++11 language features is required.
means you don't have a C++ compiler installed. If your host system uses apt, there's usually a target
Code:
sudo apt update
sudo apt install build-essential
 
Old 01-29-2023, 06:57 PM   #3
xlfs-0.2
Member
 
Registered: Oct 2022
Posts: 207

Rep: Reputation: 44
$ gcc --version

Any version gcc that supports c++11 setting should be fine. $ man gcc

You need something like CFLAGS="$CFLAGS std=gnu++11" if you don't have that. Gcc won't use c11 unless asked. It doesn't detect that.

Last edited by xlfs-0.2; 01-29-2023 at 06:59 PM.
 
Old 02-01-2023, 09:24 AM   #4
albator9
LQ Newbie
 
Registered: Jan 2023
Posts: 2

Original Poster
Rep: Reputation: 0
my gcc may not support c++11. So I have installed explicitly g++ package and now it's OK. Thanks a lot. Sorry for the dummy question.
 
Old 02-01-2023, 09:57 AM   #5
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,680
Blog Entries: 19

Rep: Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492
Don't apologise. It was a perfectly reasonable question in the circumstances.

I hope that before starting your LFS build, you looked at the requirements page. There is a minimum version for all the tools on your host system, but for the essential tools like gcc, there is often a maximum version too. This can be a problem in bleeding edge hosts like Fedora. Using a later version than recommended might work but isn't advised for LFS newbies.
 
Old 02-01-2023, 11:50 AM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,453

Rep: Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342
Quote:
Originally Posted by albator9 View Post
my gcc may not support c++11. So I have installed explicitly g++ package and now it's OK. Thanks a lot. Sorry for the dummy question.
Good, so you can mark this solved and carry on.
 
  


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] LFS - Pass1 gcc make failed with [configure-target-libvtv] Error 1 girishpotdar Linux From Scratch 4 12-05-2019 12:01 PM
LFS8.2, Host-Ubuntu(16.04, liveCD) ERROR compiling GCC-7.3.0 Pass1 Shreyansh_nayak Linux From Scratch 3 03-28-2018 11:27 AM
collect2: error: ld returned 1 exit status , for make install gcc-4.8.1 in gcc-pass1 cola Linux From Scratch 1 02-16-2014 10:51 PM
[SOLVED] 7.3 gcc pass1 error Axium1998 Linux From Scratch 13 10-15-2013 07:25 AM
error while configuring gcc-3.3.3 (pass1) alext_29 Linux From Scratch 4 09-28-2004 11:48 PM

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

All times are GMT -5. The time now is 07:29 PM.

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