LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-11-2012, 08:20 AM   #16
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

It will help with the build and it will explain how to start
 
Old 11-12-2012, 08: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, 08:37 AM   #18
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
Why not cd into soirces then in tar xvjf binutils

What is the output of echo §LFS
 
Old 11-12-2012, 08: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, 08: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, 08: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, 09: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, 09:24 AM   #23
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
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 09:38 AM.
 
1 members found this post helpful.
Old 11-12-2012, 09: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, 09: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 09:53 AM.
 
Old 11-12-2012, 11:42 AM   #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, 11:45 AM   #27
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

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 11:48 AM.
 
Old 11-12-2012, 12:03 PM   #28
Only_Jeck
Member
 
Registered: Nov 2012
Posts: 32

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


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

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

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