LinuxQuestions.org
Help answer threads with 0 replies.
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 05-20-2012, 09:50 AM   #1
ThomasZ80
LQ Newbie
 
Registered: May 2012
Posts: 4

Rep: Reputation: Disabled
GCC 4.6.2 Pass 1 Error with gtype-desc.c


Hallo everyone

I ran into an error during gcc-4.6.2 build process. Can you please help me finding a solution. During web search i figured out, that maybe gcc-4.6.2 has an error with gtype-desc and it is fixed in 4.6.3. I am using Arch Linux as Host Distribution.

Code:
make[2]: Entering directory `/mnt/lfs/sources/gcc-build/gcc'
gcc -c   -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat   -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.6.2/gcc -I../../gcc-4.6.2/gcc/. -I../../gcc-4.6.2/gcc/../include -I../../gcc-4.6.2/gcc/../libcpp/include -I//mnt/lfs/sources/gcc-build/../gcc-4.6.2/mpfr/src  -I../../gcc-4.6.2/gcc/../libdecnumber -I../../gcc-4.6.2/gcc/../libdecnumber/dpd -I../libdecnumber    gtype-desc.c -o gtype-desc.o
gtype-desc.c:8893:18: error: subscripted value is neither array nor pointer nor vector
gtype-desc.c:9012:36: error: subscripted value is neither array nor pointer nor vector
gtype-desc.c:9096:31: error: subscripted value is neither array nor pointer nor vector
gtype-desc.c:9117:31: error: subscripted value is neither array nor pointer nor vector
gtype-desc.c:9124:31: error: subscripted value is neither array nor pointer nor vector
gtype-desc.c:9131:31: error: subscripted value is neither array nor pointer nor vector
make[2]: *** [gtype-desc.o] Error 1
Here is the output of version-check.sh. I am using gcc-4.7.0 and a newer version of glibc as suggested.
Code:
bash, version 4.2.28(2)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils) 2.22.0.20120323
bison (GNU Bison) 2.5
/usr/bin/yacc -> /usr/bin/bison
bzip2,  Version 1.0.6, 6-Sept-2010.
Coreutils:  8.17
diff (GNU diffutils) 3.2
find (GNU findutils) 4.4.2
GNU Awk 4.0.1
/usr/bin/awk -> /usr/bin/gawk
gcc (GCC) 4.7.0 20120505 (prerelease)
(GNU libc) 2.15
grep (GNU grep) 2.12
gzip 1.4
Linux version 3.3.6-1-ARCH (tobias@T-POWA-LX) (gcc version 4.7.0 20120505 (prerelease) (GCC) ) #1 SMP PREEMPT Sun May 13 09:59:18 UTC 2012
m4 (GNU M4) 1.4.16
GNU Make 3.82
patch 2.6.1
Perl version='5.14.2';
GNU sed version 4.2.1
tar (GNU tar) 1.26
Texinfo: makeinfo (GNU texinfo) 4.13
xz (XZ Utils) 5.0.3
gcc compilation OK
Thanks everyone

Greetings Thomas
 
Old 05-20-2012, 10:35 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 did you apply the patch as mentioned in the book, I dont see why it should fail thats the same as I used not so long ago.
 
Old 05-20-2012, 11:07 AM   #3
ThomasZ80
LQ Newbie
 
Registered: May 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Yes i did apply the patch. I had a problem with the patch file. It didnīt find the right configure und configure.ac files (Patch file not altered since 4.6.0?). I wrote /mnt/lfs/sources/gcc-4.6.2/configure when promted.

Code:
patch -Np1 -i gcc-4.6.2-cross_compile-1.patch
can't find file to patch at input line 13
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Submitted By:            Matt Burgess <matthew_at_linuxfromscratch_dot_org>
|Date:                    2011-03-30
|Initial Package Version: 4.6.0
|Upstream Status:         Submitted Upstream
|Origin:                  http://gcc.gnu.org/PR47836
|Description:             Allows --disable-target-libiberty and
|                         --disable-target-zlib to be passed to configure as they
|                         don't build correctly in cross-compiled environments.
|
|diff -Naur gcc-4.6.0.orig/configure gcc-4.6.0/configure
|--- gcc-4.6.0.orig/configure   2011-03-16 18:27:36.000000000 +0000
|+++ gcc-4.6.0/configure        2011-03-30 19:50:41.000000000 +0000
--------------------------
File to patch:
 
Old 05-20-2012, 11:10 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
Hi

I have found thisIt,s still development at the moment but they are using the gcc 4.7
 
1 members found this post helpful.
Old 06-04-2012, 04:19 PM   #5
anakletor
LQ Newbie
 
Registered: Jun 2012
Posts: 10

Rep: Reputation: Disabled
Hello,

I am a total newbie here, but I managed to fix this problem. If you host gcc is version 4.7 you will have problems compiling gcc-4.6. This is a known problem and to fix it you have to do a simple modification in gengtype.c right after extracting gcc tarball. Here is the link with the modification needed.

Good luck!
 
Old 06-07-2012, 02:55 PM   #6
ThomasZ80
LQ Newbie
 
Registered: May 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks a lot.

I will try it. I will report if it solves my problem.
 
Old 06-07-2012, 03:08 PM   #7
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

I would like to know how it gose. But I would like to say "anakletor" Has also had problems further down the line
 
Old 06-08-2012, 07:47 AM   #8
ThomasZ80
LQ Newbie
 
Registered: May 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Hi Spiky

Thanks for the info. I started using the SVN manual now to prevent possible errors later. GCC Pass 2 finished, no problems so far. Time for a break.
 
Old 06-08-2012, 07:52 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
I think you should be ok. He was using the earlier version
 
  


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
gcc-4.5.2 - Pass 1 error -gcc command not found ?? adi_30stm Linux From Scratch 20 11-17-2011 12:23 PM
5.4. GCC-4.0.3 - Pass 1 compilation error :( gothicbob Linux From Scratch 1 08-06-2007 05:21 PM
GCC pass 1 error mugwump84 Linux From Scratch 2 05-10-2005 05:21 PM
binutils-2.14 first pass, gcc error Add1Sun Linux From Scratch 3 04-29-2004 04:27 PM

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

All times are GMT -5. The time now is 03:13 PM.

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