LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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


Reply
  Search this Thread
Old 04-04-2008, 03:18 AM   #1
ameya.malondkar
LQ Newbie
 
Registered: Apr 2008
Posts: 4

Rep: Reputation: 0
GCC Error in chapter 5


I am working on a project 'Pendrive Linux' i.e making a boot/root pendrive linux from scratch.I am using Ubuntu 7.10 distro as my host distribution
While installing gcc from chapter 5 of LFS book after giving the make bootstrap command i get the following error:

libgcc/./unwind-dw2_s.o libgcc/./unwind-dw2-fde-glibc_s.o libgcc/./unwind-sjlj_s.o libgcc/./gthr-gnat_s.o libgcc/./unwind-c_s.o -lc && rm -f ./libgcc_s.so && if [ -f ./libgcc_s.so.1 ]; then mv -f ./libgcc_s.so.1 ./libgcc_s.so.1.backup; else true; fi && mv ./libgcc_s.so.1.tmp ./libgcc_s.so.1 && ln -s libgcc_s.so.1 ./libgcc_s.so
exec: 2: /media/ROOT/tools/i686-pc-linux-gnu/bin/ld: Permission denied
collect2: ld returned 2 exit status
make[2]: *** [libgcc_s.so] Error 1
make[2]: Leaving directory `/home/g25/lfstrial/gcc-build/gcc'
make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory `/home/g25/lfstrial/gcc-build/gcc'
make: *** [all-gcc] Error 2

I created a directory tools in the pendrive and for all prefix paths i give the path of my pendrive tools directory.

I installed binutils which got installed successfully.
Can any body help me with this.
 
Old 04-05-2008, 02:53 PM   #2
bsdunix
Senior Member
 
Registered: May 2006
Distribution: BeOS, BSD, Caldera, CTOS, Debian, LFS, Mac, Mandrake, Red Hat, Slackware, Solaris, SuSE
Posts: 1,761

Rep: Reputation: 80
Quote:
make[2]: Leaving directory `/home/g25/lfstrial/gcc-build/gcc'
Just a guess, but aren't you supposed to be building the chapter 5 programs under $LFS/tools ? Looks like your at /home/g25/lfstrial.

http://www.linuxfromscratch.org/lfs/...gtoolsdir.html

Maybe that's why your getting the permission denied as the lfs user does not have permissions for your home directory?

http://www.linuxfromscratch.org/lfs/...ddinguser.html
 
Old 04-07-2008, 12:27 AM   #3
ameya.malondkar
LQ Newbie
 
Registered: Apr 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Question

Quote:
Originally Posted by bsdunix View Post
Just a guess, but aren't you supposed to be building the chapter 5 programs under $LFS/tools ? Looks like your at /home/g25/lfstrial.

http://www.linuxfromscratch.org/lfs/...gtoolsdir.html

Maybe that's why your getting the permission denied as the lfs user does not have permissions for your home directory?

http://www.linuxfromscratch.org/lfs/...ddinguser.html

Actually i have to build the entire system in a pendrive. So i took a different way. I thought i would make the entire system in a directory and give prefix directory as my pendrive partition and install only the required packages.So i issued the commands as superuser (root). I dont think being the root it should give any error of premission denied.Or am i thinking the wrong way....!!!!

Last edited by ameya.malondkar; 04-07-2008 at 12:29 AM.
 
Old 04-07-2008, 08:19 AM   #4
bsdunix
Senior Member
 
Registered: May 2006
Distribution: BeOS, BSD, Caldera, CTOS, Debian, LFS, Mac, Mandrake, Red Hat, Slackware, Solaris, SuSE
Posts: 1,761

Rep: Reputation: 80
If you've never built a LFS system, to me it would make better sense to build the system per the instructions before deviating from them.
 
Old 04-08-2008, 12:39 AM   #5
ameya.malondkar
LQ Newbie
 
Registered: Apr 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Question As you say

i Tried following the exact instructions in LFS by using a bigger size pendrive.
Still i got stuck up at installation of glibc in chapter 5.
Error i got after issuing make command of glibc-2.5.1:

/[^
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]: Leaving directory `/mnt/lfs/sources/glibc-2.5.1'
make[1]: Entering directory `/mnt/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 > /mnt/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 ...
rm -f /mnt/lfs/sources/glibc-build/stamp.o; > /mnt/lfs/sources/glibc-build/stamp.o
rm -f /mnt/lfs/sources/glibc-build/stamp.os; > /mnt/lfs/sources/glibc-build/stamp.os
rm -f /mnt/lfs/sources/glibc-build/stamp.oS; > /mnt/lfs/sources/glibc-build/stamp.oS
cd /mnt/lfs/sources/glibc-build && /tools/bin/ar cruv libc.a `cat stamp.o`
: /mnt/lfs/sources/glibc-build/libc.a
cd /mnt/lfs/sources/glibc-build && /tools/bin/ar cruv libc_pic.a `cat stamp.os`
: /mnt/lfs/sources/glibc-build/libc_pic.a
cd /mnt/lfs/sources/glibc-build && /tools/bin/ar cruv libc_nonshared.a `cat stamp.oS`
: /mnt/lfs/sources/glibc-build/libc_nonshared.a
make[1]: *** No rule to make target `/mnt/lfs/sources/glibc-build/Versions.all', needed by `/mnt/lfs/sources/glibc-build/abi-versions.h'. Stop.
make[1]: Leaving directory `/mnt/lfs/sources/glibc-2.5.1'
make: *** [all] Error 2
lfs@ameya-desktop:/mnt/lfs/sources/glibc-build$

SOlution??????

Last edited by ameya.malondkar; 04-08-2008 at 12:42 AM.
 
Old 04-08-2008, 08:25 AM   #6
bsdunix
Senior Member
 
Registered: May 2006
Distribution: BeOS, BSD, Caldera, CTOS, Debian, LFS, Mac, Mandrake, Red Hat, Slackware, Solaris, SuSE
Posts: 1,761

Rep: Reputation: 80
Looks like your host mawk application is giving you problems. Doing a search of mawk problems with LFS, it appears your not the only one. If your distro has mawk installed as a separate package from gawk or awk, then uninstall mawk. Then if you didn't do it already, check your host system versions against what LFS needs.

http://www.linuxfromscratch.org/lfs/.../hostreqs.html

If after you've done these steps and your still stuck, I suggest you search or post a question on the FLS mailing list.

http://www.linuxfromscratch.org/mail.html
 
Old 05-01-2008, 11:16 AM   #7
pa2ees
LQ Newbie
 
Registered: May 2008
Posts: 1

Rep: Reputation: 0
I don't know if you have found an answer yet or not, but here is what worked for me:
I modified line 19 of the scripts/gen-sorted.awk from sub(/\/[^/]+$/, "", subdir); to sub(/\/[^\/]+$/, "", subdir); it seems that the forward-slash within the square brackets needs to be escaped. This issue will crop up 2 more times in the script, around lines 60 and 64. After those modifications, the make command worked fine.

I'm building LFS 6.3 on an eMac (PPC) running Ubuntu 7.04 kernel 2.6.20-16-powerpc
 
Old 05-08-2008, 01:19 AM   #8
unerklarlich
LQ Newbie
 
Registered: May 2008
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by pa2ees View Post
I don't know if you have found an answer yet or not, but here is what worked for me:
I modified line 19 of the scripts/gen-sorted.awk from sub(/\/[^/]+$/, "", subdir); to sub(/\/[^\/]+$/, "", subdir); it seems that the forward-slash within the square brackets needs to be escaped. This issue will crop up 2 more times in the script, around lines 60 and 64. After those modifications, the make command worked fine.

I'm building LFS 6.3 on an eMac (PPC) running Ubuntu 7.04 kernel 2.6.20-16-powerpc

Thanks for posting this!! Helped me today
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
gcc compile error in chapter 6.12 efus Linux From Scratch 4 03-12-2010 11:27 AM
gcc check error (in chapter 6) alinsoar Linux From Scratch 0 05-23-2005 04:58 AM
Chapter 5.13 GCC and C++ RobbieB Linux From Scratch 1 02-07-2005 07:29 PM
gcc check error (chapter 6 install) vexer Linux From Scratch 4 12-03-2003 09:39 PM
Chapter 5 - Installing GCC... Grim Reaper Linux From Scratch 22 12-31-2002 12:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 03:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration