LinuxQuestions.org
Register a domain and help support LQ
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 04-07-2011, 06:19 AM   #1
janakiramulu
Member
 
Registered: Jan 2011
Location: mangalore
Distribution: ubuntu
Posts: 167

Rep: Reputation: 0
strucking gcc-4.5.1-pass2(lfs-6.7)


hi all
i am using lfslivecd

5.10. GCC-4.5.1 - Pass 2(lfs-6.7-pageno-46)
-------------------------------
for file in \
$(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h)
do
cp -uv $file{,.orig}
sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \
-e 's@/usr@/tools@g' $file.orig > $file
echo '
#undef STANDARD_INCLUDE_DIR
#define STANDARD_INCLUDE_DIR 0
#define STANDARD_STARTFILE_PREFIX_1 ""
#define STANDARD_STARTFILE_PREFIX_2 ""' >> $file
touch $file.orig
done
--------------------------------------------
lfs:/mnt/lfs/sources$ tar -jxf gcc-4.5.1.tar.bz2
lfs:/mnt/lfs/sources$ cd gcc-4.5.1
lfs:/mnt/lfs/sources/gcc-4.5.1$ patch -Np1 -i ../gcc-4.5.1-startfiles_fix-1.patch
patching file gcc/gcc.c
Hunk #1 succeeded at 7083 with fuzz 1 (offset 713 lines).
lfs:/mnt/lfs/sources/gcc-4.5.1$ cp -v gcc/Makefile.in{,.orig}
`gcc/Makefile.in' -> `gcc/Makefile.in.orig'
lfs:/mnt/lfs/sources/gcc-4.5.1$ sed 's@\./fixinc\.sh@-c true@' gcc/Makefile.in.orig > gcc/Makefile.in
lfs:/mnt/lfs/sources/gcc-4.5.1$ cp -v gcc/Makefile.in{,.tmp}
`gcc/Makefile.in' -> `gcc/Makefile.in.tmp'
lfs:/mnt/lfs/sources/gcc-4.5.1$ sed 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in.tmp \
> > gcc/Makefile.in

lfs:/mnt/lfs/sources/gcc-4.5.1$ $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h)
bash: gcc/config/cris/linux.h: Permission denied

this is 3 rd time i am facing problem
plz help
 
Old 04-07-2011, 06:31 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 1,337

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
It would help a little bit if you said what you were trying to do.

It looks like you are trying to build gcc in /mnt/lfs/sources

Is this writeable media?

What do you get when you do this?
Code:
ls -l /mnt/lfs/sources/gcc/config/cris/linux.h
 
Old 04-07-2011, 09:37 AM   #3
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,

I noticed you had previous "permission denied" messages (not only for gcc, but also for binutils).

A few things that come to mind:

- Are you sure you used the lfs user for _all_ the previous steps in chapter 5?
- Did you remove the source tree after doing gcc pass 1?

Hope this helps.
 
Old 04-08-2011, 12:14 AM   #4
janakiramulu
Member
 
Registered: Jan 2011
Location: mangalore
Distribution: ubuntu
Posts: 167

Original Poster
Rep: Reputation: 0
thanks for reply druuna

A few things that come to mind:

- Are you sure you used the lfs user for _all_ the previous steps in chapter 5?
ans:yes i am in lfs usr all previous steps in chapter 5(means lfs:/mnt/lfs)

- Did you remove the source tree after doing gcc pass 1?
yes i removed sources dir,build dir after first gcc pass 1
in second pass i untared gcc pkg,i entered the gcc source dir
lfs:/mnt/lfs$ $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h)
its coming here permission denied
if want any info i will
 
Old 04-08-2011, 01:38 AM   #5
janakiramulu
Member
 
Registered: Jan 2011
Location: mangalore
Distribution: ubuntu
Posts: 167

Original Poster
Rep: Reputation: 0
hi smallpond

What do you get when you do this?
ls -l /mnt/lfs/sources/gcc/config/cris/linux.h[/CODE][/QUOTE]
reslut following
ls:cannot access /mnt/lfs/sources/gccc/cris/linux.h:no such file or directory
 
Old 04-08-2011, 01:47 AM   #6
janakiramulu
Member
 
Registered: Jan 2011
Location: mangalore
Distribution: ubuntu
Posts: 167

Original Poster
Rep: Reputation: 0
hi druuna

this time i got diff
have a look

see post 1

lfs:/mnt/lfs/sources/gcc-4.5.1$ $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h)
bash: gcc/config/cris/linux.h: Permission denied
-------------------------------------------------------------------
i did fresh from starting
see new result
lfs:/mnt/lfs/sources/gcc-4.5.1$ $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h)
bash: gcc/config/i386/sysv4.h: Permission denied
i hope this will,u can give soltution now
why i am getting diff (when i start fresh)
thanks
 
Old 04-08-2011, 02:15 AM   #7
janakiramulu
Member
 
Registered: Jan 2011
Location: mangalore
Distribution: ubuntu
Posts: 167

Original Poster
Rep: Reputation: 0
hi druuna
this may be helpful

lfs:/mnt/lfs/sources$ls -la
drwxr-xr-x 27 lfs lfs 4096 Jul 31 2010 gcc-4.5.1
-rw-rw-r-- 1 lfs 1000 1446 Sep 18 2010 gcc-4.5.1-startfiles_fix-1.patch
-rw-rw-r-- 1 lfs 1000 66121821 Sep 18 2010 gcc-4.5.1.tar.bz2

something i am missing
one bit doubt does find command wont work without parenthisis()
 
Old 04-08-2011, 03:19 AM   #8
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,

What are you actually doing?

The following is one command:
Code:
for file in \
 $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h)
do
.
.
done
The above code can also be written as:
Code:
for file in $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h)
do
.
.
done
Only executing the $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h) part will _not_ work (you'll get a Permission Denied message in this specific case).

This find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h would work, but that is not what is in the book and not what was intended.

Like I stated many times before: You should follow the book. Copy and paste these commands to make sure you do not make any mistakes.

Hope this helps.
 
Old 04-08-2011, 03:56 AM   #9
janakiramulu
Member
 
Registered: Jan 2011
Location: mangalore
Distribution: ubuntu
Posts: 167

Original Poster
Rep: Reputation: 0
hi druuna
1)sorry for that i miss undurstood

really i didnt get this step now

The following is one command k,
but ,where i have to run this step(commands)
i should not skip this step right?
------------------------------------------------------------
for file in $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h)
do
.
.
done
-------------------------------------------------------------
before doing this step i should not move to pgno-47 (furhter) right
can u explain in detail about this step only
plz
 
Old 04-08-2011, 04:14 AM   #10
janakiramulu
Member
 
Registered: Jan 2011
Location: mangalore
Distribution: ubuntu
Posts: 167

Original Poster
Rep: Reputation: 0
hi druuna,i think i got it
i simply copy and pasted
why i confused here that 'for file' word

lfs:/mnt/lfs/sources$ for file in \
> $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h)
> do
> cp -uv $file{,.orig}
> sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \
> -e 's@/usr@/tools@g' $file.orig > $file
> echo '
> #undef STANDARD_INCLUDE_DIR
> #define STANDARD_INCLUDE_DIR 0
> #define STANDARD_STARTFILE_PREFIX_1 ""
> #define STANDARD_STARTFILE_PREFIX_2 ""' >> $file
> touch $file.orig
> done

thanku so much
 
Old 04-08-2011, 05:42 AM   #11
janakiramulu
Member
 
Registered: Jan 2011
Location: mangalore
Distribution: ubuntu
Posts: 167

Original Poster
Rep: Reputation: 0
hi druuna
here i am giving what i got

lfs:/mnt/lfs/sources/gcc-4.5.1$ for file in \
> $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h)
> do
> cp -uv $file{,.orig}
> sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \
> -e 's@/usr@/tools@g' $file.orig > $file
> echo '
> #undef STANDARD_INCLUDE_DIR
> #define STANDARD_INCLUDE_DIR 0
> #define STANDARD_STARTFILE_PREFIX_1 ""
> #define STANDARD_STARTFILE_PREFIX_2 ""' >> $file
> touch $file.orig
> done
`gcc/config/i386/sysv4.h' -> `gcc/config/i386/sysv4.h.orig'
`gcc/config/i386/linux64.h' -> `gcc/config/i386/linux64.h.orig'
`gcc/config/i386/linux.h' -> `gcc/config/i386/linux.h.orig'
`gcc/config/ia64/sysv4.h' -> `gcc/config/ia64/sysv4.h.orig'
`gcc/config/ia64/linux.h' -> `gcc/config/ia64/linux.h.orig'
`gcc/config/sparc/sysv4.h' -> `gcc/config/sparc/sysv4.h.orig'
`gcc/config/sparc/linux64.h' -> `gcc/config/sparc/linux64.h.orig'
`gcc/config/sparc/linux.h' -> `gcc/config/sparc/linux.h.orig'
`gcc/config/cris/linux.h' -> `gcc/config/cris/linux.h.orig'
`gcc/config/m32r/linux.h' -> `gcc/config/m32r/linux.h.orig'
`gcc/config/rs6000/sysv4.h' -> `gcc/config/rs6000/sysv4.h.orig'
`gcc/config/rs6000/linux64.h' -> `gcc/config/rs6000/linux64.h.orig'
`gcc/config/rs6000/linux.h' -> `gcc/config/rs6000/linux.h.orig'
`gcc/config/xtensa/linux.h' -> `gcc/config/xtensa/linux.h.orig'
`gcc/config/mn10300/linux.h' -> `gcc/config/mn10300/linux.h.orig'
`gcc/config/frv/linux.h' -> `gcc/config/frv/linux.h.orig'
`gcc/config/alpha/linux.h' -> `gcc/config/alpha/linux.h.orig'
`gcc/config/sh/linux.h' -> `gcc/config/sh/linux.h.orig'
`gcc/config/bfin/linux.h' -> `gcc/config/bfin/linux.h.orig'
`gcc/config/s390/linux.h' -> `gcc/config/s390/linux.h.orig'
`gcc/config/linux.h' -> `gcc/config/linux.h.orig'
`gcc/config/m68k/linux.h' -> `gcc/config/m68k/linux.h.orig'
`gcc/config/mips/linux64.h' -> `gcc/config/mips/linux64.h.orig'
`gcc/config/mips/linux.h' -> `gcc/config/mips/linux.h.orig'
`gcc/config/vax/linux.h' -> `gcc/config/vax/linux.h.orig'

everything working great, i moved to pgno-47(tcl pkg)
thanku so much,
 
  


Reply

Tags
gcc, lfs


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 compilation with the LFS er.surendersharma Linux - Mobile 1 12-27-2010 06:21 AM
error using lfs while compiling lfs book's 6.12 (gcc-4.1.2) section aditya_gpch Linux From Scratch 3 04-24-2008 04:23 PM
which directories do I untar during GCC pass2? microsoft/linux Linux From Scratch 6 09-09-2005 08:35 AM
strucking sound in xmms gobi_dgm Linux - Software 8 02-23-2005 06:07 PM


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

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