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 11-11-2012, 09:20 AM   #16
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Centos6.3/Debain
Posts: 1,762
Blog Entries: 1

Rep: Reputation: 245Reputation: 245Reputation: 245

It will help with the build and it will explain how to start
 
Old 11-12-2012, 09:29 AM   #17
Only_Jeck
Member
 
Registered: Nov 2012
Posts: 32

Original Poster
Rep: Reputation: Disabled
Ok. Partition done, and now I'm at the chapter 5.3.
But when I try to decompress binutils-2.22.tar.bz2 it gives me:
Code:
lfs@giacomo-notebook:~$ tar -xvzf $LFS/sources/binutils-2.22.tar.bz2
tar (child): /mnt/lfs/sources/binutils-2.22.tar.bz2: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
And so I tried to see the directory "sources" with "ls $LFS" comand, and appear it doesn't exist. But if I use "ls $LFS/sources" I can see all the patches and packages..
 
Old 11-12-2012, 09:37 AM   #18
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Centos6.3/Debain
Posts: 1,762
Blog Entries: 1

Rep: Reputation: 245Reputation: 245Reputation: 245
Why not cd into soirces then in tar xvjf binutils

What is the output of echo žLFS
 
Old 11-12-2012, 09:42 AM   #19
Only_Jeck
Member
 
Registered: Nov 2012
Posts: 32

Original Poster
Rep: Reputation: Disabled
'cause with lfs user I can't cd in sources directory... As I told, it seems not exist.
The output is /mnt/lfs, like it could be, no?
 
Old 11-12-2012, 09:44 AM   #20
Only_Jeck
Member
 
Registered: Nov 2012
Posts: 32

Original Poster
Rep: Reputation: Disabled
Code:
lfs@giacomo-notebook:~$ cd $LFS/sources/
bash: cd: /mnt/lfs/sources/: No such file or directory
 
Old 11-12-2012, 09:51 AM   #21
Only_Jeck
Member
 
Registered: Nov 2012
Posts: 32

Original Poster
Rep: Reputation: Disabled
With root I can see sources' content, and use the cd comand to enter in it. However, with lfs, none of this.
I read that I must be lfs user (and not root) to compile the packages.. is strictly required?
 
Old 11-12-2012, 10:21 AM   #22
Only_Jeck
Member
 
Registered: Nov 2012
Posts: 32

Original Poster
Rep: Reputation: Disabled
Well, found the mistake. The "sources" directory was in / and not in /mnt/lfs. I don't know why...
So I moved the directory in the right place. But now, when I tar the binutils archive, I read it can't do the various operations 'cause hasn't permission. I do it with lfs (no root, no myname user)
 
Old 11-12-2012, 10:24 AM   #23
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 493

Rep: Reputation: 133Reputation: 133
I would try running the chmod command on that directory again. See the introduction to Chapter 3 about creating the /sources directory.

P.S.: I just did a little experiment and discovered a possible explanation for the misplaced /sources directory. What you described happened when I ran the command mkdir $LFS/sources without the LFS variable set. No error occurred, and the directory was created in the / directory.
Code:
boo [ ~ ]$ echo $LFS

boo [ ~ ]$ sudo mkdir $LFS/sources2
boo [ ~ ]$ ls /
bin   dev  home  lost+found  mnt  proc  root  sbin     sources2  sys  usr
boot  etc  lib   media       opt  repo  run   sources  srv       tmp  var
The book often mentions checking that variable. This is why, I guess. At least until you get to the chroot environment.

Last edited by stoat; 11-12-2012 at 10:38 AM.
 
1 members found this post helpful.
Old 11-12-2012, 10:40 AM   #24
Only_Jeck
Member
 
Registered: Nov 2012
Posts: 32

Original Poster
Rep: Reputation: Disabled
Perfect, binutils extract! Missed the chown step, for sources directory (cause I had to re-create the dir)
 
Old 11-12-2012, 10:49 AM   #25
Only_Jeck
Member
 
Registered: Nov 2012
Posts: 32

Original Poster
Rep: Reputation: Disabled
Oh thanks =) genteel

Last edited by Only_Jeck; 11-12-2012 at 10:53 AM.
 
Old 11-12-2012, 12:42 PM   #26
Only_Jeck
Member
 
Registered: Nov 2012
Posts: 32

Original Poster
Rep: Reputation: Disabled
I can't understand this comand:

Code:
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_STARTFILE_PREFIX_1
#undef STANDARD_STARTFILE_PREFIX_2
#define STANDARD_STARTFILE_PREFIX_1 "/tools/lib/"
#define STANDARD_STARTFILE_PREFIX_2 ""' >> $file
touch $file.orig
done
I've to write all in 1 time, or write line for line (line1 enter, line2 enter, etc)?
 
Old 11-12-2012, 12:45 PM   #27
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Centos6.3/Debain
Posts: 1,762
Blog Entries: 1

Rep: Reputation: 245Reputation: 245Reputation: 245
Hi

I would copy and paste that in all in 1 go, save making any mistakes.

Also as you have solved/moved on from binutils can you mark thread solved and start a new thread.

Last edited by spiky0011; 11-12-2012 at 12:48 PM.
 
Old 11-12-2012, 01:03 PM   #28
Only_Jeck
Member
 
Registered: Nov 2012
Posts: 32

Original Poster
Rep: Reputation: Disabled
Yeah, ok, thanx
 
  


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
[SOLVED] How to stay on top of security patches for source packages padeen Debian 3 07-23-2012 08:25 PM
How to Upgrade Server with all Updated Packages and Patches!!! anishkumarv Linux - Server 6 07-05-2011 05:00 AM
patches/packages/linux-2.6.29.6-3/ needed if I run a more recent kernel? Olaus Slackware 2 12-10-2009 07:59 AM
LFS packages and patches in one zip? Lord Hakk Linux From Scratch 7 03-16-2009 08:42 AM
Why Sun distributes installers and patches for the same sfw packages? crisostomo_enrico Solaris / OpenSolaris 4 07-19-2007 09:03 AM


All times are GMT -5. The time now is 09:24 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration