LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS 7.2 GCC First pass: undefined reference to `GNU_USER_TARGET_OS_CPP_BUILTINS' (https://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-7-2-gcc-first-pass-undefined-reference-to-%60gnu_user_target_os_cpp_builtins-4175441951/)

anjohn 12-18-2012 06:28 AM

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

spiky0011 12-18-2012 06:47 AM

Hi

Can you post the output of version-check it would be a good starting place to make sure host is compliant

anjohn 12-18-2012 08:05 AM

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.

spiky0011 12-18-2012 08:26 AM

if you want it checked just post it otherwise good luck

anjohn 12-18-2012 09:07 AM

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


spiky0011 12-18-2012 09:18 AM

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

anjohn 12-20-2012 08:52 AM

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


SuMZ 12-23-2012 08:21 PM

Quote:

Originally Posted by anjohn (Post 4851816)
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.

spiky0011 12-24-2012 12:49 AM

Hi

Post the version-check if your not sure

SuMZ 12-26-2012 12:12 AM

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

spiky0011 12-26-2012 02:04 AM

Thats all good

anjohn 01-08-2013 06:09 AM

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.


All times are GMT -5. The time now is 11:06 AM.