On Sat, Oct 31, 2020 at 05:41:13AM +0530, Rahil Kabani wrote: > PS: you can find the code here: > > https://github.com/alias-rahil/lfs >
For some reason I haven't received the message you are replying to, but I don't have any real interest in debugging someone else's scripts, I get enough problems debugging my own. But one thing jumps out from this output - > > On Sat, 31 Oct 2020, 05:39 Rahil Kabani, <rahil.kaban...@gmail.com> wrote: > > > Hello, > > I am trying to build LFS inside docker. I am getting an error while > > building diffutils-3.7 package inside chroot. Below are the details: > > > > Version: 10.0-systemd > > Host system: Ubuntu-20.04 as the base docker image > > Section where error was encountered: running make command for > > diffutils-3.7 package > > Error message: > > > > ``` > > 2020-10-30T22:52:52.0595637Z CC xreadlink.o > > 2020-10-30T22:52:52.0886483Z CC xsize.o > > 2020-10-30T22:52:52.1343020Z > > CC xstriconv.o > > 2020-10-30T22:52:52.1697205Z CC xstrndup.o > > 2020-10-30T22:52:52.1990460Z GEN getopt.h > > 2020-10-30T22:52:52.2042561Z CC xstrtol.o > > 2020-10-30T22:52:52.2131296Z In > > file included from ./getopt.h:84, > > 2020-10-30T22:52:52.2131637Z from xstrtol.h:22, > > 2020-10-30T22:52:52.2131927Z from xstrtol.c:31: > > 2020-10-30T22:52:52.2132823Z ./getopt-cdefs.h:32:5: error: #if with no > > expression > > 2020-10-30T22:52:52.2133155Z 32 | #if > > 2020-10-30T22:52:52.2133320Z | ^ > > 2020-10-30T22:52:52.2310406Z make[2]: *** [Makefile:1924: xstrtol.o] Error > > 1 > > 2020-10-30T22:52:52.2311287Z make[2]: Leaving directory > > '/sources/diffutils-3.7/lib' > > 2020-10-30T22:52:52.2315647Z make[1]: *** [Makefile:1678: all] Error 2 > > 2020-10-30T22:52:52.2316504Z make[1]: Leaving directory > > '/sources/diffutils-3.7/lib' > > 2020-10-30T22:52:52.2327418Z make: *** [Makefile:1361: all-recursive] > > Error 1 > > 2020-10-30T22:52:53.0244505Z ##[error]Process completed with exit code 2. > > ``` > > This all blows up in GEN getopt.h. That is odd, because a quick build of diffutils on a completed system doesn't find any reference to getopt in the output. On my successful build, getopt.h was installed by glibc in /mnt/lfs/usr/include/getopt.h and I guess your code has fallen down a route that nobody normally hits. Does your getopt.h exist (in $LFS/usr/include) ? > > Deviation from book: I did not mount a separate partition for building > > lfs, just made a separate folder for it in my home directory. > > No idea if that works these days, I suspect it can do because our build is now much cleaner, with less references to /tools. ĸen -- The people next door oppress me all night long. I tell them: I work all day, a man's got to have some time to learn to play the tuba. That's oppression, that is. [ Guards! Guards! ] -- 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