Re: Compilation errors when trying to build GCC

Hrishi via Gcc-help <[email protected]>
Newsgroups gmane.comp.gcc.help
Message-ID <CABkgKQ0qAkpOgZ_EbdQvbO0hGxbJjFh3k_+HqHy3=Etbbj=dQQ@mail.gmail.com>
Thanks a lot for the help, I don't recall changing the gawk version, but I
did have some issues earlier while downloading the packages since my
network connection wasn't very stable- I'll try reading over the book and
check if I missed anything weird.

On Mon, 10 Aug 2026, 07:09 Xi Ruoyao <[email protected]> wrote:

>
> 在 2026/8/10 06:02, Hrishi via Gcc-help 写道:
> > Hello!
> > I've been attempting  a Linux From Scratch install as a summer project
> for
> > university applications and what not. I've run into a little bit of a
> > problem when compiling gcc however, whenever i try to compile gcc
> (version
> > 16.2.0) on the system after chrooting in; (a cross compilation is first
> > done so I do have access to a gcc compiler, not a complete one though)
> >
> > I have glibc version 2.43, binutils version 2.45 and a cross compiled gcc
> > and libstdc++ of version 16.2.0 .
> >
> > here are the configure flags:
> >
> > ../configure --prefix=/usr            \
> >               LD=ld                    \
> >               --enable-languages=c,c++ \
> >               --enable-default-pie     \
> >               --enable-default-ssp     \
> >               --enable-host-pie        \
> >               --enable-targets=all     \
> >               --disable-multilib       \
> >               --disable-bootstrap      \
> >               --disable-fixincludes    \
> >               --with-system-zlib
> >
> >
> > and below are the errors i encountered during my attempt at compilation:
> > ---
> > options.cc:27216:2: error: #error 0Wabsolute-value does not have a Var()
> > flag
> > 27216 | #error 0Wabsolute-value does not have a Var() flag
>
> Because gawk is buggy.  If gawk-5.4.1 is built without mpfr you'll hit
> the bug.
> That's why we (the LFS editors) moved ch.08 gawk earlier than GCC.
>
> > I've attempted to ask for help in the #lfs-support irc channel, but felt
> it
> > would probably be well to also request help from the GCC devs themselves.
>
> No, it contradicts with what we say in the book
> (
> https://www.linuxfromscratch.org/lfs/view/systemd/chapter01/askforhelp.html
> ):
>
>     In case you've hit an issue building one package with the LFS
>     instruction, we strongly
>     discourage posting the issue directly onto the upstream support
>     channel before
>     discussing via a LFS support channel listed in Section 1.4,
>     “Resources.” Doing so is
>     often quite inefficient because the upstream maintainers are rarely
>     familiar with LFS
>     building procedure. Even if you've really hit an upstream issue, the
>     LFS community
>     can still help to isolate the information wanted by the upstream
>     maintainers and
>     make a proper report.
>
> And this incident itself proves the points: this is actually a gawk
> issue instead of
> gcc issue; the gawk issue only manifests if it's not built with mpfr
> (and such a build
> does not occur frequently out of LFS so the GCC maintainers are
> generally not familiar
> with such a build); and the gawk issue was firstly identified by the LFS
> manage editor
> and he has already worked it around for the book.
>
> Apparently you are reading the instructions from an old LFS release but
> changing
> the gawk version on your own (because we don't have a revision where
> gawk is 5.4.1
> but it's not moved before GCC in chapter 8).  This is not good for a
> first-time builder
> and we already state that.  In the book
> (
> https://www.linuxfromscratch.org/lfs/view/systemd/partintro/generalinstructions.html
> ):
>
>     During a development cycle of LFS, the instructions in the book are
>     often modified
>     to adapt for a package update or take the advantage of new features
>     from updated
>     packages. Mixing up the instructions of different versions of the
>     LFS book can cause
>     subtle breakages.
>
> And in the FAQ (https://www.linuxfromscratch.org/faq/#why-not-version):
>
>     If this is your first time building LFS, using a version not in the
>     book or varying from the
>     book in any way is not a good idea. The IRC channel regulars have a
>     saying, "FBBG",
>     meaning "Follow Book, Book Good." They and the people on the lists
>     have helped many
>     an unhappy newbie who deviated from the book during that first build.
>
> Now you can see we state things in the book for a reason... Please do
> not skip them.
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.