LinuxQuestions.org
Review your favorite Linux distribution.
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 07-02-2007, 05:24 PM   #1
RiSK
LQ Newbie
 
Registered: Feb 2005
Location: Serbia
Distribution: Debian
Posts: 16

Rep: Reputation: 0
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!
 
Old 07-04-2007, 06:57 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
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.
 
Old 07-16-2007, 01:34 PM   #3
RiSK
LQ Newbie
 
Registered: Feb 2005
Location: Serbia
Distribution: Debian
Posts: 16

Original Poster
Rep: Reputation: 0
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.
 
Old 07-30-2007, 10:15 PM   #4
MannyNix
Member
 
Registered: Dec 2005
Location: ~
Distribution: Slackware -current, OpenBSD
Posts: 449

Rep: Reputation: 41
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

@ RiSK, yup, Slackware is g0d sent
 
  


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.0.2 make error on SuSE 10.0 tiddy Linux - Software 5 07-02-2006 11:27 AM
gcc make error laasunde Linux - Software 6 02-04-2006 11:34 AM
gcc error (can't make exexutables) TheDude05 Linux - Software 6 09-06-2005 03:51 PM
Error in gcc while trying to run make TheBelush Linux - Newbie 3 01-23-2005 12:34 AM
gcc-3.3.3 make install error Louis_Carole Linux From Scratch 4 07-31-2004 03:14 PM


All times are GMT -5. The time now is 08:51 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration