Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Thanks for your response. Yes. I can see where the errors are mentioning mawk. I proceeded to install gawk (apt-get install gawk) and uninstall mawk. However, I still get the same errors when running make.
Why is it trying to use mawk instead of gawk?
lfs@boca:/media/lfs/sources/glibc-build$ make
make -r PARALLELMFLAGS="" CVSOPTS="" -C ../glibc-2.5.1 objdir=`pwd` all
make[1]: Entering directory `/media/lfs/sources/glibc-2.5.1'
mawk -f scripts/gen-sorted.awk \
-v subdirs='csu assert ctype locale intl catgets math setjmp signal stdlib stdio-common libio malloc string wcsmbs time dirent grp pwd posix io termios resource misc socket sysvipc gmon gnulib iconv iconvdata wctype manual shadow po argp crypt nss localedata timezone rt conform debug dlfcn elf' \
-v srcpfx='' \
nptl/sysdeps/pthread/Subdirs sysdeps/unix/inet/Subdirs sysdeps/unix/Subdirs assert/Depend intl/Depend catgets/Depend stdlib/Depend stdio-common/Depend libio/Depend malloc/Depend string/Depend wcsmbs/Depend time/Depend posix/Depend iconvdata/Depend nss/Depend localedata/Depend rt/Depend debug/Depend > /media/lfs/sources/glibc-build/sysd-sorted-tmp
mawk: scripts/gen-sorted.awk: line 19: regular expression compile failed (bad class -- [], [^] or [)
/[^
mawk: scripts/gen-sorted.awk: line 19: syntax error at or near ]
mawk: scripts/gen-sorted.awk: line 19: runaway regular expression /, "", subd ...
make[1]: *** No rule to make target `/media/lfs/sources/glibc-build/Versions.all', needed by `/media/lfs/sources/glibc-build/abi-versions.h'. Stop.
make[1]: Leaving directory `/media/lfs/sources/glibc-2.5.1'
make: *** [all] Error 2
After reading through that error message a little more carefully, I noticed the Makefile was reporting some sort of syntax error. I figured the source must have been corrupted during download therefore producing incomplete code and finally syntax errors during make. I simply downloaded the source again and attempted to build again and it worked beautifully.
Could this really have been the issue? Or was it because I didn't have gawk installed and was using mawk instead?
If your download was corrupted, you would not have been able to extract it in the first place. However, I am trying to build a toolchain with glibc-2.7 and I am stuck at the exact same place :-S
Some systems are setup with links from /usr/bin/awk -> /etc/alternatives/awk -> /usr/bin/mawk
Even after installing gawk, it would not get preferred use. The /etc/alternatives/awk link needs to point to
gawk
Thanks for your response. Yes. I can see where the errors are mentioning mawk. I proceeded to install gawk (apt-get install gawk) and uninstall mawk. However, I still get the same errors when running make.
Why is it trying to use mawk instead of gawk?
lfs@boca:/media/lfs/sources/glibc-build$ make
make -r PARALLELMFLAGS="" CVSOPTS="" -C ../glibc-2.5.1 objdir=`pwd` all
make[1]: Entering directory `/media/lfs/sources/glibc-2.5.1'
mawk -f scripts/gen-sorted.awk \
-v subdirs='csu assert ctype locale intl catgets math setjmp signal stdlib stdio-common libio malloc string wcsmbs time dirent grp pwd posix io termios resource misc socket sysvipc gmon gnulib iconv iconvdata wctype manual shadow po argp crypt nss localedata timezone rt conform debug dlfcn elf' \
-v srcpfx='' \
nptl/sysdeps/pthread/Subdirs sysdeps/unix/inet/Subdirs sysdeps/unix/Subdirs assert/Depend intl/Depend catgets/Depend stdlib/Depend stdio-common/Depend libio/Depend malloc/Depend string/Depend wcsmbs/Depend time/Depend posix/Depend iconvdata/Depend nss/Depend localedata/Depend rt/Depend debug/Depend > /media/lfs/sources/glibc-build/sysd-sorted-tmp
mawk: scripts/gen-sorted.awk: line 19: regular expression compile failed (bad class -- [], [^] or [)
/[^
mawk: scripts/gen-sorted.awk: line 19: syntax error at or near ]
mawk: scripts/gen-sorted.awk: line 19: runaway regular expression /, "", subd ...
make[1]: *** No rule to make target `/media/lfs/sources/glibc-build/Versions.all', needed by `/media/lfs/sources/glibc-build/abi-versions.h'. Stop.
make[1]: Leaving directory `/media/lfs/sources/glibc-2.5.1'
make: *** [all] Error 2
Don't forget to rerun configure after installing gawk.
Installing gawk and then immediately rerunning make will not work!
Great help,
just wanted to add, that having gawk is listed in the host system requirements in the LFS book. Oops, I missed it too and had the same problem. Also remember, that when you are following the LFS instructions, your environment PATH is very limiting. I built gawk from source which installs to /usr/local/bin/gawk. when I ran "../glibc-2.5.1/configure ...blah" the script was still not finding gawk, but finding mawk instead. You need to create a symbolic link to gawk in /usr/bin.
Code:
$ sudo ln -vs /usr/local/bin/gawk /usr/bin/gawk
this solved the problem for me.
NOTE: also remember that if you created an "lfs" user, most likely 'sudo' will not work. I switched to my normal user to run this command. Or you can probably do this...
Wow, I've failed at this step a few times now. I can't believe that I didn't catch this problem! I'm so glad I found this now. I decided to give LFS another go and got stuck at this point once again, but I installed gawk and made my link and now it seems to be working beautifully!
Ubuntu is not suitable (out of the box) to be a LFS host. If you don't want to run into these problems I would suggest using the LFS liveCD, it was build to be a host for LFS.
Do a search on LQ for ubuntu and lfs and you will see a lot of problems. Ubuntu is most common, but other distro's have the same issues.
Ubuntu is not suitable (out of the box) to be a LFS host. If you don't want to run into these problems I would suggest using the LFS liveCD, it was build to be a host for LFS.
Do a search on LQ for ubuntu and lfs and you will see a lot of problems. Ubuntu is most common, but other distro's have the same issues.
Hope this helps.
Yeah, I've been noticing that Ubuntu doesn't work out so well. I think I'm going to restart using the LFS Live CD. I had actually thought of that before, but I didn't have any DVDs on hand at time to burn the ISO to, so I went ahead and tried it with Ubuntu again just for the heck of it. That's what I get for being impatient I guess
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.