LinuxQuestions.org
Visit Jeremy's Blog.
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 10-06-2009, 04:55 AM   #1
appzer0
LQ Newbie
 
Registered: Nov 2008
Location: France
Distribution: 0Linux, Slackware
Posts: 13

Rep: Reputation: 0
[SOLVED] re-adjusting, chapter 6.10


Hi,

Everything just went OK until there. After re-adjusting the GCC specs file to make it stop pointing /tools, smething went wrong : a.out is not produced anymore when testing the dummy.c compilation. dummy.log show that libgcc_s* cannot be found: in fact, these files (libgcc_s.so and libgcc_s.a) are both in /tools/lib but gcc/ld are searching in /tools/lib/gcc/i686-pc-linux-gnu.

Deviations are : custom target vendor (i686-frenchslack-linux), and, in chroot environment, /tools is pointing /lfs/tools (this is wanted).

If I made an error with the environment variables, I'll be glad just to know how to put gcc specs just as in chapter 5 (pointing /tools), as I suspect suspend-to-ram to get my bash/chroot env. variables messy when waking up.

Here are the environment, the outputs from dummy.log and commands from chapter 6.10. Please note that 'cc' and 'gcc' produce same output :

Code:
root:/# cc dummy.c -v -Wl,--verbose &> dummy.log
root:/# less dummy.log
Reading specs from /lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/specs
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.4.1/configure --prefix=/tools --with-local-prefix=/tools --enable-clocale=gnu --enable-shared --enable-threads=p
osix --enable-__cxa_atexit --enable-languages=c,c++ --disable-libstdcxx-pch --disable-multilib --disable-bootstrap
Thread model: posix
gcc version 4.4.1 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-mtune=generic'
 /lfs/tools/bin/../libexec/gcc/i686-pc-linux-gnu/4.4.1/cc1 -quiet -v -iprefix /lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/ -isystem 
/usr/include dummy.c -quiet -dumpbase dummy.c -mtune=generic -auxbase dummy -version -o /tmp/cc6nhH5n.s
ignoring nonexistent directory "/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/../../../../i686-pc-linux-gnu/include"
ignoring duplicate directory "/lfs/tools/bin/../lib/gcc/../../lib/gcc/i686-pc-linux-gnu/4.4.1/include"
ignoring duplicate directory "/lfs/tools/bin/../lib/gcc/../../lib/gcc/i686-pc-linux-gnu/4.4.1/include-fixed"
ignoring nonexistent directory "/lfs/tools/bin/../lib/gcc/../../lib/gcc/i686-pc-linux-gnu/4.4.1/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include
 /lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/include
 /lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/include-fixed
 /tools/include
End of search list.
GNU C (GCC) version 4.4.1 (i686-pc-linux-gnu)
        compiled by GNU C version 4.4.1, GMP version 4.3.1, MPFR version 2.4.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 986c9f9cca14fe4c1247cacdbc265bdf
COLLECT_GCC_OPTIONS='-v' '-mtune=generic'
 /lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/../../../../i686-pc-linux-gnu/bin/as -V -Qy -o /tmp/ccamUpEA.o /tmp/cc6nhH5n.s
GNU assembler version 2.19.1 (i686-pc-linux-gnu) using BFD version (GNU Binutils) 2.19.1
COMPILER_PATH=/lfs/tools/bin/../libexec/gcc/i686-pc-linux-gnu/4.4.1/:/lfs/tools/bin/../libexec/gcc/:/lfs/tools/bin/../lib/gcc/i686-pc-linu
x-gnu/4.4.1/../../../../i686-pc-linux-gnu/bin/
LIBRARY_PATH=/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/:/lfs/tools/bin/../lib/gcc/:/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4
.1/../../../../i686-pc-linux-gnu/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-mtune=generic'
 /lfs/tools/bin/../libexec/gcc/i686-pc-linux-gnu/4.4.1/collect2 --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt
1.o /usr/lib/crti.o /lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/crtbegin.o -L/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1 -L/lf
s/tools/bin/../lib/gcc -L/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/../../../../i686-pc-linux-gnu/lib /tmp/ccamUpEA.o --verbose -lg
cc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/crten
d.o /usr/lib/crtn.o
GNU ld (GNU Binutils) 2.19.1
  Supported emulations:
   elf_i386
   i386linux
using internal linker script:
==================================================
/* Script for -z combreloc: combine and sort reloc sections */
OUTPUT_FORMAT("elf32-i386", "elf32-i386",
              "elf32-i386")
OUTPUT_ARCH(i386)
ENTRY(_start)
SEARCH_DIR("/tools/i686-pc-linux-gnu/lib"); SEARCH_DIR("/usr/lib"); SEARCH_DIR("/lib");

=== snip ===

==================================================
attempt to open /usr/lib/crt1.o succeeded
/usr/lib/crt1.o
attempt to open /usr/lib/crti.o succeeded
/usr/lib/crti.o
attempt to open /lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/crtbegin.o succeeded
/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/crtbegin.o
attempt to open /tmp/ccamUpEA.o succeeded
/tmp/ccamUpEA.o
attempt to open /lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/libgcc.so failed
attempt to open /lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/libgcc.a succeeded
attempt to open /lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/libgcc_s.so failed
attempt to open /lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/libgcc_s.a failed
attempt to open /lfs/tools/bin/../lib/gcc/libgcc_s.so failed
attempt to open /lfs/tools/bin/../lib/gcc/libgcc_s.a failed
attempt to open /lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/../../../../i686-pc-linux-gnu/lib/libgcc_s.so failed
attempt to open /lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/../../../../i686-pc-linux-gnu/lib/libgcc_s.a failed
attempt to open /tools/i686-pc-linux-gnu/lib/libgcc_s.so failed
attempt to open /tools/i686-pc-linux-gnu/lib/libgcc_s.a failed
attempt to open /usr/lib/libgcc_s.so failed
attempt to open /usr/lib/libgcc_s.a failed
attempt to open /lib/libgcc_s.so failed
attempt to open /lib/libgcc_s.a failed/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
I think the problem is in some wrong paths here. Now for the environment:

Code:
root:/# env
TERM=xterm
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin
PWD=/
PS1=\u:\w\$ 
SHLVL=1
HOME=/root
_=/bin/env
As I said, no a.out is produced. Here are the output of next commands :

Code:
root:/# grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log
/usr/lib/crt1.o succeeded
/usr/lib/crti.o succeeded
1 file is missing here (crtn.o)...

Code:
root:/# grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'
SEARCH_DIR("/tools/i686-pc-linux-gnu/lib")
SEARCH_DIR("/usr/lib")
SEARCH_DIR("/lib");
No info about ld-linux.so.2 or libc.so.6 ... :/
That's all I've got. Everything went all right until then. Any direction ?

Last edited by appzer0; 10-13-2009 at 11:27 AM.
 
Old 10-13-2009, 11:26 AM   #2
appzer0
LQ Newbie
 
Registered: Nov 2008
Location: France
Distribution: 0Linux, Slackware
Posts: 13

Original Poster
Rep: Reputation: 0
No answer but no problem anymore, I had skipped just one step in LFS book
 
  


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
LFS 6.3, messed up somewhere prior to chapter 6.12 (gcc), how to restart chapter 6? Funkster Linux From Scratch 2 12-24-2008 07:30 AM
No output from sanity check, chapter 5.7.*Adjusting the Toolchain Murdock_nl Linux From Scratch 2 09-13-2008 01:59 AM
Chapter 5.7 Adjusting Toolchains... Find error speedbird889 Linux From Scratch 3 03-26-2008 09:44 PM
LFS chapter 5 adjusting the tool chain JusCrzn Linux From Scratch 1 12-20-2004 07:32 PM
adjusting time under RH trutnev Red Hat 1 03-28-2004 02:56 PM

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

All times are GMT -5. The time now is 02:18 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