LinuxQuestions.org
Review your favorite Linux distribution.
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 12-18-2012, 06:28 AM   #1
anjohn
LQ Newbie
 
Registered: Nov 2012
Posts: 16

Rep: Reputation: Disabled
LFS 7.2 GCC First pass: undefined reference to `GNU_USER_TARGET_OS_CPP_BUILTINS'


Hello guys,

I'm trying to follow the LSF 7.2 instructions but I get problems very early in the book.

Just during compiling GCC in first pass I get this error:

c-family/c-cppbuiltin.o: In function `c_cpp_builtins':
/mnt/lfs/sources/7.2/gcc-build/gcc/../../gcc-4.7.1/gcc/c-familyc-cppbuiltin.c:918: undefined reference to `GNU_USER_TARGET_OS_CPP_BUILTINS'
collect2: ld returned 1 exit status
make[2]: *** [cc1] Error 1
make[2]: Leaving directory `/mnt/lfs/sources/7.2/gcc-build/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/7.2/gcc-build'
make: *** [all] Error 2

I started again for three times but I get this error allways. What could I do now?

Thanks,
anjohn
 
Old 12-18-2012, 06:47 AM   #2
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Hi

Can you post the output of version-check it would be a good starting place to make sure host is compliant
 
Old 12-18-2012, 08:05 AM   #3
anjohn
LQ Newbie
 
Registered: Nov 2012
Posts: 16

Original Poster
Rep: Reputation: Disabled
Well, sorry for wasting your time. I had a look over the packages required by the host system and thought that I have them all. Two packages missed, now it worked.
 
Old 12-18-2012, 08:26 AM   #4
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
if you want it checked just post it otherwise good luck
 
Old 12-18-2012, 09:07 AM   #5
anjohn
LQ Newbie
 
Registered: Nov 2012
Posts: 16

Original Poster
Rep: Reputation: Disabled
Oh, if you could have a look for me it would be nice. Thanks a lot sir.

Code:
lfs@pris:/mnt/lfs$ sh version-check.sh 
bash, version 4.1.5(1)-release
/bin/sh -> /bin/dash
Binutils: (GNU Binutils) 2.22
bison (GNU Bison) 2.4.1
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2,  Version 1.0.5, 10-Dec-2007.
Coreutils:  7.4
diff (GNU diffutils) 2.8.1
find (GNU findutils) 4.4.2
GNU Awk 3.1.6
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3
(GNU libc) 2.16
GNU grep 2.5.4
gzip 1.3.12
Linux version 2.6.32-45-generic (buildd@akateko) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1) ) #101-Ubuntu SMP Mon Dec 3 15:41:13 UTC 2012
m4 (GNU M4) 1.4.13
GNU Make 3.81
patch 2.6
Perl version='5.10.1';
GNU sed version 4.2.1
tar (GNU tar) 1.22
version-check.sh: 30: makeinfo: not found
Texinfo: 
xz (XZ Utils) 4.999.9beta
gcc compilation OK

Last edited by anjohn; 12-18-2012 at 09:09 AM.
 
Old 12-18-2012, 09:18 AM   #6
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Hi

Ok we hav a few problems

lfs@pris:/mnt/lfs$ sh version-check.sh
bash, version 4.1.5(1)-release
/bin/sh -> /bin/dash should be /bin/sh -> /bin/bash
Binutils: (GNU Binutils) 2.22
bison (GNU Bison) 2.4.1
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2, Version 1.0.5, 10-Dec-2007.
Coreutils: 7.4
diff (GNU diffutils) 2.8.1
find (GNU findutils) 4.4.2
GNU Awk 3.1.6
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3
(GNU libc) 2.16
GNU grep 2.5.4
gzip 1.3.12
Linux version 2.6.32-45-generic (buildd@akateko) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1) ) #101-Ubuntu SMP Mon Dec 3 15:41:13 UTC 2012
m4 (GNU M4) 1.4.13
GNU Make 3.81
patch 2.6
Perl version='5.10.1';
GNU sed version 4.2.1
tar (GNU tar) 1.22
version-check.sh: 30: makeinfo: not found install texinfo
Texinfo:
xz (XZ Utils) 4.999.9beta
gcc compilation OK
 
1 members found this post helpful.
Old 12-20-2012, 08:52 AM   #7
anjohn
LQ Newbie
 
Registered: Nov 2012
Posts: 16

Original Poster
Rep: Reputation: Disabled
Looks pretty good now. Thank you very much spiky0011.
I'm a student at the Technical University of Dortmund, Germany. I'm working as software engineer beside my studies and I have to build an individual OS for a robot at the institute I'm working at.
I hope I get it to run, thanks!!!

Code:
lfs@pris:/mnt/lfs$ sh version-check.sh 
bash, version 4.1.5(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils) 2.22
bison (GNU Bison) 2.4.1
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2,  Version 1.0.5, 10-Dec-2007.
Coreutils:  7.4
diff (GNU diffutils) 2.8.1
find (GNU findutils) 4.4.2
GNU Awk 3.1.6
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3
(GNU libc) 2.16
GNU grep 2.5.4
gzip 1.3.12
Linux version 2.6.32-45-generic (buildd@akateko) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1) ) #101-Ubuntu SMP Mon Dec 3 15:41:13 UTC 2012
m4 (GNU M4) 1.4.13
GNU Make 3.81
patch 2.6
Perl version='5.10.1';
GNU sed version 4.2.1
tar (GNU tar) 1.22
Texinfo: makeinfo (GNU texinfo) 4.13
xz (XZ Utils) 4.999.9beta
gcc compilation OK
 
Old 12-23-2012, 08:21 PM   #8
SuMZ
LQ Newbie
 
Registered: Dec 2012
Posts: 7

Rep: Reputation: Disabled
Quote:
Originally Posted by anjohn View Post
Well, sorry for wasting your time. I had a look over the packages required by the host system and thought that I have them all. Two packages missed, now it worked.
Hi, anjohn. I got the same problem. Can you tell me what two packages are missing? Are they bison and flex? I installed them all but still not fix it.
 
Old 12-24-2012, 12:49 AM   #9
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Hi

Post the version-check if your not sure
 
Old 12-26-2012, 12:12 AM   #10
SuMZ
LQ Newbie
 
Registered: Dec 2012
Posts: 7

Rep: Reputation: Disabled
It will be nice if you could have a look. Thanks a lot.

Here is my version-check:

Quote:
bash, version 4.2.10(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils for Ubuntu) 2.21.53.20110810
bison (GNU Bison) 2.4.1
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2, Version 1.0.5, 10-Dec-2007.
Coreutils: 8.5
diff (GNU diffutils) 3.0
find (GNU findutils) 4.4.2
GNU Awk 3.1.8
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
(Ubuntu EGLIBC 2.13-20ubuntu5) 2.13
grep (GNU grep) 2.9
gzip 1.3.12
Linux version 3.0.0-12-generic (buildd@vernadsky) (gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) ) #20-Ubuntu SMP Fri Oct 7 14:50:42 UTC 2011
m4 (GNU M4) 1.4.16
GNU Make 3.81
patch 2.6.1
Perl version='5.12.4';
GNU sed version 4.2.1
tar (GNU tar) 1.25
Texinfo: makeinfo (GNU texinfo) 4.13
xz (XZ Utils) 5.0.0
gcc compilation OK
 
Old 12-26-2012, 02:04 AM   #11
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Thats all good
 
Old 01-08-2013, 06:09 AM   #12
anjohn
LQ Newbie
 
Registered: Nov 2012
Posts: 16

Original Poster
Rep: Reputation: Disabled
I think the yacc or bison stuff was missing when I had this problem. After installing the packages I started from the beginning with my LSF.
Then the error did not occur again.
 
  


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
[SOLVED] LFS: Error during GCC-4.7.1-Pass 1 (LFS 7.2, Section 5.5) erkant Linux From Scratch 7 11-28-2012 06:03 AM
gcc does not show undefined reference error moonmoth Linux - Software 8 07-25-2010 04:33 PM
gcc linking: undefined reference to just about everything shabbychef Programming 7 09-09-2005 08:42 PM
gcc ld error. Undefined reference redness Linux - Software 4 02-08-2005 02:01 AM
Undefined reference error using gcc with Redhat Linux 9.0 armesk Programming 2 08-28-2003 06:42 AM

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

All times are GMT -5. The time now is 10:25 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