Linux From ScratchThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.