LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 01-03-2015, 01:37 PM   #1
michanux
LQ Newbie
 
Registered: Jan 2015
Posts: 28

Rep: Reputation: Disabled
compiling gcc-4.9.1 failed


Hello
on debian wheezy as root I start to install a LFS. For help I use LFS book. But gcc failed with this message:
Code:
checking for C compiler default output file name... 
configure: error: in `/lfs/gcc-builds/gcc-4.9.1/host-i686-pc-linux-gnu/lto-plugin':
configure: error: C compiler cannot create executables
See `config.log' for more details.
make[2]: *** [configure-stage2-lto-plugin] Fehler 77
make[2]: Leaving directory `/lfs/gcc-builds/gcc-4.9.1'
make[1]: *** [stage2-bubble] Fehler 2
make[1]: Leaving directory `/lfs/gcc-builds/gcc-4.9.1'
make: *** [all] Fehler 2
Wheezy has the path:
Code:
/usr/lib/gcc/i486-linux-gnu/4.7/liblto_plugin.so.0.0.0
There is no description of the break in config.log

What was going wrong?
 
Old 01-04-2015, 12:12 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
I thing your gcc toolchain is not installed fully. Try compiling a dummy c file. Have you installed gcc, binutils and it's devel packages.
 
Old 01-04-2015, 08:14 AM   #3
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,152

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
To start off, what chapter are you on?, what is the output of the version script?
If you are building the tool chain you should NOT be using root, as per the instructions in the LFS book.

This:
Code:
..configure: error: in `/lfs/gcc-builds/gcc-4.9.1/host-i686-pc-linux-gnu/lto-plugin':...
Looks like you are in the wrong directory, if you have been following the book you should be somewhere like /mnt/lfs/sources/gcc-build.

What configure/make options are you using? have you deviated from the LFS book in ANY way?

Please supply some more info otherwise we can't really help much except with general advice.
 
1 members found this post helpful.
Old 01-05-2015, 02:18 PM   #4
michanux
LQ Newbie
 
Registered: Jan 2015
Posts: 28

Original Poster
Rep: Reputation: Disabled
Login as user the compiling of binutils-2.24 failed too.
Code:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.64.  Invocation command line was

  $ ./configure --prefix=/tools --with-sysroot=/mnt/lfs --with-lib-path=/tools/lib --target=/ --disable-nls --disable-werror

## --------- ##
## Platform. ##
## --------- ##

hostname = debian
uname -m = i686
uname -r = 3.2.0-4-686-pae
uname -s = Linux
uname -v = #1 SMP Debian 3.2.41-2

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/local/games
PATH: /usr/games


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2317: checking build system type
configure:2331: result: i686-pc-linux-gnu
configure:2378: checking host system type
configure:2391: result: i686-pc-linux-gnu
configure:2411: checking target system type
configure:2420: error: /bin/sh ./config.sub / failed

## ---------------- ##
The path is
Code:
/mnt/lfs/binutils-build/binutils-2.24
I use LFS Book Chapter 5.4.1
There is a link from /bin/sh --> /bin/bash
 
Old 01-05-2015, 03:15 PM   #5
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

You should be in dir binutils-build when you run the commands.

Code:
mkdir -v ../binutils-build
cd ../binutils-build
If you untar the source package then cd in unpacked dir then follow book
 
1 members found this post helpful.
Old 01-06-2015, 02:32 PM   #6
michanux
LQ Newbie
 
Registered: Jan 2015
Posts: 28

Original Poster
Rep: Reputation: Disabled
Sorry I don't understand your answer. Should I build the path:
Code:
/binutils-build/binutils-2.24
or
Code:
mnt/lfs/sources/binutils-build/binutils-2.24
 
Old 01-06-2015, 03:11 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

You should be in /mnt/lfs/sources/binutils-build, Then follow the book

re read chapter 5.3 the last "IMPOPRTANT NOTE"

start off in /mnt/lfs/sources
untar binutils-2.24.tar.bz2
cd into binutils-2.24 (untared directory)
then follow book

Last edited by spiky0011; 01-06-2015 at 03:16 PM.
 
Old 01-09-2015, 02:02 PM   #8
michanux
LQ Newbie
 
Registered: Jan 2015
Posts: 28

Original Poster
Rep: Reputation: Disabled
I changed the directionary but the mistake did not disappear. So I think it is not caused by a missing file because in the root mode the compiling runs well.
 
Old 01-09-2015, 02:24 PM   #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
Hi

Can you post the output of the version script from the book you are using.
 
1 members found this post helpful.
Old 01-10-2015, 12:06 PM   #10
michanux
LQ Newbie
 
Registered: Jan 2015
Posts: 28

Original Poster
Rep: Reputation: Disabled
Hello,
the recommendation of the book version 7.6 is binutils-2.24.

config.log in user mode
Code:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.64.  Invocation command line was

  $ ./configure --prefix=/tools --with-sysroot=/mnt/lfs --with-lib-path=/tools/lib --target=/ --disable-nls --disable-werror

## --------- ##
## Platform. ##
## --------- ##

hostname = debian
uname -m = i686
uname -r = 3.2.0-4-686-pae
uname -s = Linux
uname -v = #1 SMP Debian 3.2.41-2

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /tools/bin
PATH: /bin
PATH: /usr/bin
PATH: /sbin
PATH: /usr/sbin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2317: checking build system type
configure:2331: result: i686-pc-linux-gnu
configure:2378: checking host system type
configure:2391: result: i686-pc-linux-gnu
configure:2411: checking target system type
configure:2420: error: /bin/sh ./config.sub / failed

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=i686-pc-linux-gnu
 
Old 01-10-2015, 05:12 PM   #11
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
The output from this page
http://www.linuxfromscratch.org/lfs/.../hostreqs.html
 
Old 01-22-2015, 10:28 PM   #12
emlsena
LQ Newbie
 
Registered: Jan 2015
Distribution: Debian Jessie
Posts: 12

Rep: Reputation: Disabled
Hi, Checks your processor is 32bit or 64bit.
In my case I had to switch from a Debian 7.7 i386 for a Debian 7.8 x86-64.
 
Old 02-01-2015, 10:54 AM   #13
michanux
LQ Newbie
 
Registered: Jan 2015
Posts: 28

Original Poster
Rep: Reputation: Disabled
Okay I started to install LFS from the beginning. In the book version 7.6 GCC-4.9.1 -(Pass 1) on page 38 is a for-do operation searching for "gcc/config/linux.h". But the path on Wheezy is "/usr/lib/i486-linux-gnu/4.7/plugin/include/config/linux.h". Should I replace the path or do I misunderstand the meaning?
 
Old 02-01-2015, 11:01 AM   #14
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,152

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
By the time you run the for loop you should be in the gcc-4.9.1 folder ( /mnt/lfs/sources/gcc-4.9.1 probably ) the path to the find command does not start with a foward slash so is a relative path not absolute so find gcc/config would be, with the above path would be /mnt/lfs/sources/gcc-4.9.1/gcc/config.
 
Old 02-07-2015, 10:24 AM   #15
michanux
LQ Newbie
 
Registered: Jan 2015
Posts: 28

Original Poster
Rep: Reputation: Disabled
chapter 5.6 Linux-3.16.2 API Headers

Now I am on page 41 of "Linux from Scratch". It deals of installing the API Headers. I am confused about the steps to do. First I extract linux-3.16.2 into "/mnt/lfs/sources/linux-3.2.16" and changed into this path. Should I start with "make menuconfig" than "make" and "make mproper" and and at last "make INSTALL_HDR_PATH....." ?
 
  


Reply



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.4.3 make error - failed to build gcc-4.4.3--please help aayu09 Fedora 4 03-05-2010 09:20 AM
help: failed build of GCC 4.3 on SLES 10/gcc 4.1 ia64 ron7000 Programming 6 05-27-2008 11:24 PM
gcc wont install, 'failed dependencies: glibc-devel is needed by gcc-3.3.3-41' TdlSnare SUSE / openSUSE 3 11-29-2004 02:13 PM
Kernel compiling: gcc-3.3 is 586, should be gcc-3.3 386 Erik Plaggenmar Linux - Software 0 10-01-2004 11:38 AM
Various Compiling Errors (GCC compiling Openal, GUIlib, xmms-wma) gregorya Linux - Software 2 08-27-2004 05:03 AM

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

All times are GMT -5. The time now is 01:50 AM.

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