On 15/03/2018 05:34, David Bernado wrote: > Hello, > > I am currently in the process of a Linux From Scratch build as a school > project, mainly following the development book. Everything went well thus far > until I had to compile and install libstdc++. Upon running the "make" command > after creating the build directory and config file, it throws this error: > > In file included from > /mnt/lfs/sources/gcc-7.3.0/build-std/include/x86_64-lfs-linux-gnu/bits/c++config.h:533:0, > from > /mnt/lfs/sources/gcc-7.3.0/libstdc++-v3/libsupc++/cxxabi.h:49, > from ../../libstdc++-v3/libsupc++/atexit_thread.cc:24: > /mnt/lfs/sources/gcc-7.3.0/build-std/include/x86_64-lfs-linux-gnu/bits/os_defines.h:44:19: > error: missing binary operator before token "(" > #if __GLIBC_PREREQ(2,15) && defined(_GNU_SOURCE) >
Isn't there a further explanation of the error: usually, gcc gives the location of the macros used (in this case __GLIBC_PREREQ), so that one can see what is generated and why it fails. Then, usual questions are: - Is the lfs user environment correctly set? "echo $LFS $LFS_TGT" should be run often enough to check (or "env"). - Does the output of the version-check.sh script in "2.2- Host System Requirements" match expectations (you may post the output to us if you are not sure) - Are you sure you entered the instructions as given? Of course there are other ways to build LFS, but we cannot help on those, since we have not tried them. I see you have at least deviated in the name of the build directory (build-std). Not a big deal of course, if it is the only deviation. - Did you erase the gcc-7.3.0 directory after gcc-pass1? This is what we suppose in the instructions. It may lead to unexpected results if not (even when changing the name of the build directory). > This is one of 4 similar errors thrown up at compile time, I assume at other > places in the package where os_defines.h is referenced. Has anyone ran into > this error and/or knows how to fix it? A quick response would be greatly > appreciated, made some pretty stupid mistakes in previous attempts at this and > deadline is approaching very soon. 😟 > I don't remember hearing about this error, but maybe others on the list have. Wait for them to wake up: they are in US or Australia... BTW, we can't find your mistakes if you don't post what you've done ;-) Pierre -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style