[SOLVED] LFS-11.3 15 July 2023, 14:50:09 I was pleased when binutils installed as step 1 of the independent toolchain you need to build LFS. Next gcc, kernel-headers and glibc. Fall at the next hurdle - gcc builds but then an error occurs "checking for CET support: configure error: link tests are not allowed after GCC_NO_EXECUTABLES ". Build options included "without-headers, --newlib, --with-sysroot=[new lfs partition], --with-prefix=[toolchain root] --with-target=x86_64-lfs-linux-gnu --disable-shared" and disable a lot of other things, copied verbatim from LFS 11.3 book. If I could change configure to check for CET support without using link tests, that would be nice; or just disable CET. For some reason binutils installed into [toolchain root]/x86_64-pc-linux-gnu instead of x86_64-lfs-linux-gnu, as specified. I renamed it and made a symlink to point ldscripts correctly but gcc configure was unimpressed. Any ideas appreciated. Last Edit: 20 July 2023, 07:47:53 by nous
Re: LFS-11.3 Reply #1 – 15 July 2023, 15:23:28 First building an LFS system is a good thing to do educationally imho.But here is probably not the best place to ask about problems as those of us who have done it probably did so some time ago.There are mailing lists you can sign up to.https://lists.linuxfromscratch.org/sympa/info/lfs-support amongst others.I took advantage of them at the time I built mine.There is a forum which seems reasonably active here https://www.linuxquestions.org/questions/linux-from-scratch-13/I'm not saying don't ask here. Just ask there as well. For likely better quality responses.Also the toolchain is very important. That needs to be got right or I suspect you'll have many problems ahead. No hacks or winging it.Good luck
Re: LFS-11.3 Reply #2 – 16 July 2023, 01:03:27 Thanks for these links, gzipped, and I have been to the Linux Questions one but it wasn't very helpful. I'll investigate the other one now. Appreciate it, thx.
Re: LFS-11.3 Reply #3 – 17 July 2023, 12:26:12 Tried it without --enable-default-ssp and it built on my desktop but on my laptop ran into libcp1plugin - "no include path found in which to search for stdc-predef". I guess it isn't easy to build gcc with nothing but binutils to support it. Apparently you could put binutils in the gcc source tree but whether a second build would lead to any improved functionality I have no idea. Perhaps after the first binutils install I could put something in the environment to point to the include directory, CPATH perhaps. Doesn't say in the book, though.
Re: LFS-11.3 Reply #4 – 18 July 2023, 05:14:48 Setting CPATH to include dir installed by binutils helped so I also set LD_LIBRARY_PATH to libs installed by binutils but now I get "cannot compute suffix for object files" when conftest fails in libgcc build. Apparently this often happens when gmp. mpfr, mpc are not in place before gcc but that's the LFS book procedure.
Re: LFS-11.3 Reply #5 – 19 July 2023, 08:00:38 Seems to be a matter of updating CPATH, LD_LIBRARY_PATH etc when new functionality is available. Binutils and GCC installed fine following the book so I'll mark thread solved.
Re: [SOLVED] LFS-11.3 Reply #6 – 11 September 2023, 23:15:02 tried it some years ago. was able to build without errors but then my kernel wouldnt boot. don't know if i have the gumption to try again. best of luck to you though!