LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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-2010, 10:31 PM   #1
_Linux_Learner
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 87

Rep: Reputation: 15
Unhappy make errors while compiling glibc-2.10.1 in LFS - 6.5


Hi all

I am trying to compile glibc-2.10.1 as per the procedure given in LFS book version 6.5. The configure step goes well but there are errors in the make step....

Code:
make -r PARALLELMFLAGS="" CVSOPTS="" -C ../glibc-2.10.1 objdir=`pwd` all
make[1]: Entering directory `/mnt/lfs/sources/glibc-2.10.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 gshadow 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 ...
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.10.1'
make: *** [all] Error 2
I am using ubuntu 9.04...

please help.......

Regards
_Linux_Learner
 
Old 04-05-2010, 01:03 AM   #2
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,604

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
Quote:
Originally Posted by _Linux_Learner View Post
Hi all

I am trying to compile glibc-2.10.1 as per the procedure given in LFS book version 6.5. The configure step goes well but there are errors in the make step....

Code:
make -r PARALLELMFLAGS="" CVSOPTS="" -C ../glibc-2.10.1 objdir=`pwd` all
make[1]: Entering directory `/mnt/lfs/sources/glibc-2.10.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 gshadow 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 ...
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.10.1'
make: *** [all] Error 2
I am using ubuntu 9.04...

please help.......

Regards
_Linux_Learner
Hi,

check the host system requirements again:
http://archive.linuxfromscratch.org/.../hostreqs.html

You need to have gawk installed. Mawk will not do.
 
Old 04-05-2010, 02:00 AM   #3
_Linux_Learner
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
Yes I got it work...
Now I am not understanding that what the following command is doing...

Code:
SPECS=`dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/specs
$LFS_TGT-gcc -dumpspecs | sed \
  -e 's@/lib\(64\)\?/ld@/tools&@g' \
  -e "/^\*cpp:$/{n;s,$, -isystem /tools/include,}" > $SPECS
What these @ symbols in sed command mean ????

Thanks in advance...

Regards
_Linux_Learner

Last edited by _Linux_Learner; 04-05-2010 at 02:01 AM.
 
Old 04-05-2010, 03:07 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

The default delimiter (the /) can be just about anything you want in sed, which is handy when you need to parse a directory path for example.

Instead of escaping all the forward slashes in the directory path you can change the delimiter.

The following two are the same, the second one is easier to read:

sed 's/\/some\/dir\//\/another\/directory\//' file

sed 's@/some/dir/@/another/directory/@' file

Hope this helps.

Last edited by druuna; 04-05-2010 at 09:07 AM. Reason: Syntax correction on sentence.
 
Old 04-05-2010, 07:34 AM   #5
_Linux_Learner
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
Hi all

Thanks for your help and I got the doubts cleared upto here...

Now new problem creep in....

I am getting errors while compiling binutils-2.19.1-pass 2...
Code:
make[1]: Entering directory `/mnt/lfs/sources/binutils-build'
Configuring in ./intl
configure: loading cache ./config.cache
configure: error: `CC' has changed since the previous run:
configure:   former value:  `gcc'
configure:   current value: `i686-lfs-linux-gnu-gcc -B/tools/lib/'
configure: error: `target_alias' has changed since the previous run:
configure:   former value:  `i686-lfs-linux-gnu'
configure:   current value: `i686-pc-linux-gnu'
configure: error: in `/mnt/lfs/sources/binutils-build/intl':
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
make[1]: *** [configure-intl] Error 1
make[1]: Leaving directory `/mnt/lfs/sources/binutils-build'
make: *** [all] Error 2
My host system satisfy all requirements as stated in the book...
please help..... Thanks in advance

Regards
_Linux_Learner

Last edited by _Linux_Learner; 04-05-2010 at 07:36 AM.
 
Old 04-05-2010, 09:04 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

It looks like you did not remove the previous source and/or build directory.

You need to start every build with a clean sheet. Remove the source and binutils-build directory, untar the binutils package and start again.

There is a small possibility that the source isn't clean to begin with (although I did not run into this when building LFS 6.5). If, after cleanly starting, you still get this message you could try the suggestion in the error message: configure: error: run `make distclean' and/or `rm ./config.cache' and start over. But like I stated before, I doubt this is the problem.

Hope this helps.
 
1 members found this post helpful.
Old 04-06-2010, 02:31 AM   #7
_Linux_Learner
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
Hi drunna thanks for your valuable help. I got the things work.

Now can someone please tell me waht the following code is doing in the second pass of binutils-2.19.1...

Code:
CC="$LFS_TGT-gcc -B/tools/lib/" \
   AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib \
   ../binutils-2.19.1/configure --prefix=/tools \
   --disable-nls --with-lib-path=/tools/lib
Please help me I am a newbie....

Thanks in advance

Regards
_Linux_Learner
 
Old 03-29-2011, 02:30 AM   #8
creatureofthedark
Member
 
Registered: Jan 2007
Distribution: LFS / Ubuntu / CentOs
Posts: 56

Rep: Reputation: 15
hey _Linux_Learner I am currently on the exact same step and found the answer to the not removing previous install bit...

anyway to answer your question... the meaning is given below the command in the book...

in short [and from my limited understanding] we are now setting the cross-compiler and tools to use the new system we are building and not the host system.... [only sort of makes seance to me 2....] so we should now have 2 versions of binutils one for the host and one for the new system... [I think... some one please correct me if I am wrong!!!]

Quote:
The meaning of the new configure options:

CC="$LFS_TGT-gcc -B/tools/lib/" AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib
Because this is really a native build of Binutils, setting these variables ensures that the build system uses the cross-compiler and associated tools instead of the ones on the host system.
--with-lib-path=/tools/lib
This tells the configure script to specify the library search path during the compilation of Binutils, resulting in /tools/lib being passed to the linker. This prevents the linker from searching through library directories on the host.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Lfs 6.3, Step 6.9 - Compiling Glibc-2.5.1 lszanto Linux From Scratch 2 02-09-2010 08:19 PM
glibc-compiling loves to make errors? ok, let me post mine here: glibc 2.9 me-$-on Linux From Scratch 7 04-11-2009 06:22 PM
Glibc-2.5.1 is giving errors installing on Live cd with LFS 6.3 version shanth Linux - Newbie 2 09-25-2008 12:12 AM
LFS 6.0 Chapter 6: compiling glibc problem Sakur Linux From Scratch 3 08-13-2005 11:39 PM
make glibc error (LFS) gatblast45 Linux - Software 3 12-21-2004 11:30 AM


All times are GMT -5. The time now is 12:07 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration