On Mon, Aug 17, 2020 at 06:07:31PM -0600, Julio ordoñez wrote: > Hi, > I'm having issues in chapter 5 lfs with systemd. building gcc Pass 1. when > I try to execute the script with sed to substitute the linux.h > configuration with the tools path and to add STANDARD_STARTFILE_PREFIX_1 & > 2 the script gets stuck after copying linux.h to linux.h.orig... I don't > know what could be the issue... maybe a syntax issue? > the funny thing is that I can run > sed - e 's@/lib\(64\)\?\32\)\?/ld@/tools&@g' -e ... linux.h.orig > linux.h > and it does the substitution > but when I try with for file in gcc/... do > cp -uv $file{,.orig} > sed -e .... > $file.orig > $file > > it seems to get stuck. so I'm guessing the issue is with $file.orig > > $file. I checked earlier versions and it doesn't seem to have changed > that's why I find it strange. > thanks for the help > Regards, > Julio Ordóñez
Hi Julio, to examine whether it is indeed stuck in the copy, you can open another term and look at the $file.orig version with tail, and then at the resulting $file with tail. I suspect that you might have missed something in the echo which follows the sed: echo ' #undef STANDARD_STARTFILE_PREFIX_1 #undef STANDARD_STARTFILE_PREFIX_2 #define STANDARD_STARTFILE_PREFIX_1 "/tools/lib/" #define STANDARD_STARTFILE_PREFIX_2 ""' >> $file touch $file.orig Note that the first line is a single quote follwed by the newline then 4 lines get echo'd and the fourth line has the terminating single quote follwed by the '>>' to append it. Therefore the copy should have four additional lines at the end of it if the echo command was pasted correctly. I'm guessing one of the quotes or double quotes, or even the 'done' maybe got missed. But with luck that process will soon be old history with LFS-10.0. ĸen -- Juliet's version of cleanliness was next to godliness, which was to say it was erratic, past all understanding and was seldom seen. -- Unseen Academicals -- 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