LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   gcc 4.0.3 make error (https://www.linuxquestions.org/questions/linux-from-scratch-13/gcc-4-0-3-make-error-566142/)

RiSK 07-02-2007 05:24 PM

gcc 4.0.3 make error
 
I try to build LFS 6.2 and I have a problem building gcc for a temporary system.

I do stuff as described in chapter 5.4 of LFS 6.2 book, but `make bootstrap` returns an error. Here's last few lines
Code:

Bootstrapping the compiler
make[1]: Entering directory `/mnt/lfs/source/gcc-build/gcc'
make CC=" stage1/xgcc -Bstage1/ -B/tools/i686-pc-linux-gnu/bin/" CC_FOR_BUILD=" stage1/xgcc -Bstage1/ -B/tools/i686-pc-linux-gnu/bin/" \
                STAGE_PREFIX=stage1/ \
                ADAFLAGS="" CFLAGS="-O2 -g -fomit-frame-pointer" LDFLAGS="" WARN_CFLAGS="\$(GCC_WARN_CFLAGS)" STRICT_WARN="-pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition " libdir=/tools/lib LANGUAGES="c gcov gcov-dump " MAKEINFO="makeinfo --split-size=5000000" MAKEINFOFLAGS="--no-split" MAKEOVERRIDES= OUTPUT_OPTION="-o \$@" \
                CFLAGS="-O2 -g -fomit-frame-pointer" WERROR=""
make[2]: Entering directory `/mnt/lfs/source/gcc-build/gcc'
build/genmodes -h > tmp-modes.h
/bin/sh: build/genmodes: No such file or directory
make[2]: *** [s-modes] Error 127
make[2]: Leaving directory `/mnt/lfs/source/gcc-build/gcc'
make[1]: *** [stage2_build] Error 2
make[1]: Leaving directory `/mnt/lfs/source/gcc-build/gcc'
make: *** [bootstrap] Error 2

File `genmodes` exists. I check it.
This is c/p from bash, ant it's really strange ;)
Code:

[/mnt/lfs/source/gcc-build]lfs: cd gcc/build/
[/mnt/lfs/source/gcc-build/gcc/build]lfs: ls -l
total 192
-rw-r--r-- 1 lfs lfs  7640 Jul  2 22:56 errors.o
-rwxr-xr-x 1 lfs lfs 69342 Jul  2 23:18 genmodes
-rwxr-xr-x 1 lfs lfs 69342 Jul  3 00:00 genmodes.new
-rw-r--r-- 1 lfs lfs 38760 Jul  2 22:56 genmodes.o
[/mnt/lfs/source/gcc-build/gcc/build]lfs: ./genmodes
bash: ./genmodes: No such file or directory
[/mnt/lfs/source/gcc-build/gcc/build]lfs:

Target system is PC. Host system is Debian Etch.
Code:

[/]rile: cat /proc/version
Linux version 2.6.18-4-k7 (Debian 2.6.18.dfsg.1-12) (waldi@debian.org) (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #1 SMP Mon Mar 26 17:57:15 UTC 2007
[/]rile: gcc --version
gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

Any idea what's going wrong?

Tnx for helping!

druuna 07-04-2007 06:57 AM

Hi,

Could it be that you unpacked the gcc tarbal in the wrong place?
Looking at the output you posted I see this: /mnt/lfs/source/gcc-build/gcc

After untarring gcc you should end up with: /mnt/lfs/source/gcc-4.0.3
The you create the separate building directory: mkdir gcc-build
Now you have 2 gcc related directories in your source directory (/mnt/lfs/source/gcc-4.0.3 and /mnt/lfs/source/gcc-build)

Enter the build dir and execute the ../gcc-4.0.3/configure...... and the make bootstrap command.

PS: The LFS team always assumes that you have unpacked the tarbal and are standing in the newly created directory.

Hope this helps.

RiSK 07-16-2007 01:34 PM

Actually, I did it just as you describe. Everything was on it's place.

btw: When I grab new version of gcc (from testing branch) the problem disappears. But, there was a new error ;) I'm quitting this. Or maybe I grab Slack 12 DVD and try with Pat's sources and try again.

MannyNix 07-30-2007 10:15 PM

Quote:

Originally Posted by druuna
PS: The LFS team always assumes that you have unpacked the tarbal and are standing in the newly created directory.

Hope this helps.

It really helped me! Thanks!
btw i was also having bootstrap errors because i was (mistakenly) patching gcc with gcc-4.0.3-specs-1.patch and i didn't know it's until 5.11. GCC-4.0.3 - Pass 2 when you should patch it :p

@ RiSK, yup, Slackware is g0d sent


All times are GMT -5. The time now is 05:35 AM.