LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-08-2006, 02:17 PM   #1
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Rep: Reputation: 53
Throwing in the towel for now..but..


I think I could really get into this, but for now, nothing is working, so I am going to give it up and study a little more before I try it again. But I would like to ask a few questions which might help avoid some of the foul-ups on my next attempt.

1. I started this project four times (wiped the drive and started from scratch four times). The first attempt yielded the best results, but in subsequent tries the programs refused to use the host compiler. The first program to install could not find a C compiler. I followed the book to the letter, but there was obviously a problem linking to the host gcc (Slackware, btw).

2. I became very confused by instructions to build some of the programs in a dedicated build directory outside the source directory. To me, this meant a directory INSIDE the directory to be compiled because the book command instructions were, for example,

../gcc-2.3.4/configure xxxxx

../ to me means up one directory. Didn't work, and trying normal ./configure/make/install didn't work because I got errors saying that I must configure in a dedicated directory.

Anyway, once I have sorted those two things out, I may give it another try. If anyone could enlighted me on these two items, I would certainly appreciate it.

Thanks

Bob
 
Old 05-08-2006, 02:50 PM   #2
meng
Member
 
Registered: Apr 2005
Location: Rochester, MN
Distribution: Ubuntu 7.04
Posts: 127

Rep: Reputation: 15
Giving up for now is better than giving up for good! For "ordinary folks" like me, it takes a few tries to for Linux to 'take' - and I opted for the easy path, installing Ubuntu!

Anyway, I was confused by your posts because looking at your command prompt, you don't seem to be inside your source directory at the time you invoke the mkdir command. My interpretation is that the mkdir is intended to create a build directory 'at the same level' as your source directory, not above or below. Is that not the intent?
 
Old 05-08-2006, 03:16 PM   #3
hockeyman_102
Member
 
Registered: Apr 2006
Location: Washington
Distribution: Suse, CentOS, Ubuntu
Posts: 124

Rep: Reputation: 15
1.
Since you've had trouble with the c compiler - look for an expert tab where you can specify additional options and make sure gcc is being installed. If it errors out you may have to download a new iso and re-burn (I've had this issue). You may want to also try downloading the new gcc rpm (maybe a .run for slackware?) and install it - if you dont want to start over, again.

make sure you have the following packages installed:
binutils, gcc, gcc-c++, gcc-java, kernel-headers, glibc-2.3.6-i486-1, and make.

2.
if you are in the / directory you can't go outside anymore. Mostly they don't want you to mess anything up in the /etc /usr /bin /var /lib .... directories. You can put your source files in your own direcory and if gcc is installed correctly you can call the compiler from anywhere in your directory tree. Depending on where you are in your tree depends on if ../gcc-2.3.4/configure would work or not. Also if you are in /root for instance and you run ./configure/make/install - it looks for /root/configure/make/install and tries to run it. ./program_name runs program_name even if it doesn't know its an executable. Another thing, could it be 'make install' - its just that most make files I've had experience with need something after them so they know what to 'make'.
 
Old 05-08-2006, 04:02 PM   #4
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
Thanks for your responses...

The problem is that LFS partition that I am installing to relies on the gcc of the host distro in the first few installs. The first attempt these programs (binutils, gcc, and glibc) all compiled fine using the host compiler. But on subsequent attempts somethings was wrong and the programs were not compiling. I was not using the live CD, but was installing from inside of Slack 10.2. I believe I am going to try from the live cd next since all of the compilers I need are there. The only difficulty with the live cd is that you have to set up the paths each time you reboot (just a little hassle, that's all.)

My confusion with the directory problem was with the ../ commands. The instruction tell you to extract the program into a build directory and the cd into the program directory. From there, the ./configure command complains that the configure must take make into a dedicated build directory, which did not contain the configure files, so it would not work.

I will try again once I can figure this out.

Thanks for your help,

Bob
 
Old 06-04-2006, 07:14 PM   #5
nykey
Member
 
Registered: Nov 2003
Posts: 360

Rep: Reputation: 30
Ok lets make an example here from my own lfs building, and if you follow the book exactly you should have the same.

/mnt/lfs is where my lfs partition is mounted.
/mnt/lfs/sources is where I have all the sources needed to compile it in .bz2 format (mostly).
So an example, lets take binutils. You do /mnt/lfs/sources , then "tar -xjvf binutils-2.15.94.0.2.2.tar.bz2" right ? it makes a directory called binutils-2.15.94.0.2.2 so you now type "cd /mnt/lfs/sources/binutils-2.15.94.0.2.2" . The book is telling you to make a dedicated build directory outside the source directory so if you do "mkdir -v ../binutils-build" (remember you are doing this command when you are currently located in /mnt/lfs/sources/binutils-2.15.94.0.2.2) it makes a directory called binutils-build in /mnt/lfs/sources/binutils-build and when you type "cd ../binutils-build" you actually cd from /mnt/lfs/sources/binutils-2.15.94.0.2.2 to /mnt/lfs/sources/binutils-build and when issuing the command "../binutils-2.15.94.0.2.2/configure --prefix=/tools --disable-nls" the configure command is run from "up one directory"/binutils-2.15.94.0.2.2 (meaning /mnt/lfs/sources/binutils-2.15.94.0.2.2) and it's going to populate the dedicated directory with the make file and what ever ready for make & make install. If this is done exactly like I said then you should have no error about dedicated directory at all. I see it has passed some time from the last post but maybe you'll read it and try again to build it if you haven't done so by now. I wish you good luck and I hope I understood your problem as it is and gave you a good answer, if not we can discuss further to solve the issue. And btw I'm using Slackware 10.2 too (updated to current and FULL INSTALL mode - just to make sure ). Cheers.
 
Old 07-03-2006, 08:05 PM   #6
mr.v.
Member
 
Registered: Jun 2006
Distribution: Slackware 11
Posts: 59

Rep: Reputation: 15
Quote:
2. I became very confused by instructions to build some of the programs in a dedicated build directory outside the source directory. To me, this meant a directory INSIDE the directory to be compiled because the book command instructions were, for example,
BobNutfield -- I completely understand what you are referring to because I think it's one of the places where the book needs to be rewritten explicitly. What is not mentioned is the following fact: You have to BE IN THE DIRECTORY for that package. For example when you get to the installing gcc-2.3.4 you do a tar xvzf gcc-2.3.4 and it unzips the files into a directory called gcc-2.3.4. Go into that directory with a "cd" command. Now follow the book. Do that for each package and stuff starts working. But yeah, I had the same problem until I tried that experiment and it started working.

I gave up because I just couldn't bare compiling that gigantic list of packages by hand and I can't figure out ALFS. I have a partition just sitting there midway through the second list. one day when I get the energy again, I'm going to finish it.

EDIT-- OOPS I didn't read nykey's answer where he says the same thing.
 
Old 07-03-2006, 08:51 PM   #7
carcassonne
Member
 
Registered: Jul 2005
Distribution: Fedora6 x86_64
Posts: 118

Rep: Reputation: 15
Quote:
Originally Posted by mr.v.
I gave up because I just couldn't bare compiling that gigantic list of packages by hand and I can't figure out ALFS.
I had the same experience with nALFS some time ago. I tried it, couldn't figure it out, then made my own installation process based on a series of integrated shell scripts.

That was some time ago, eg. 2 years. Now I'm coming back to LFS and I'd need to revamp my shell scripts which eventually I'll do, but I gave nALFS another try, from the live CD. It's really quite simple and it works OK. The easiest way is to boot with the live CD, partition/format your LFS target partition, mount it under /mnt/lfs, have a proper kernel config file saved under ~/nALFS[verison]/skeleton/linux-kernel-config (yes, that's from the CDROM), and then do a './runit skeleton' from the nALFS directory. Then press '*' to choose to do everything (you can also press spacebar before to expand the tree) and then 's' to start and 'm' to specify that you want the marked actions (in this case, everything) to be done. Then wait between 3 and 5 hours. Adjust your new fstab file, as well as the grub menu file and reboot (remove the CD). Should be fine, but I give no guarantee.
 
Old 07-03-2006, 08:53 PM   #8
carcassonne
Member
 
Registered: Jul 2005
Distribution: Fedora6 x86_64
Posts: 118

Rep: Reputation: 15
Quote:
Originally Posted by BobNutfield
The only difficulty with the live cd is that you have to set up the paths each time you reboot (just a little hassle, that's all.)
Er, you install from the live CD onto a free partition you have (actually two if you can, one for swap). Once the installaion is done you don't need to use the CD again as your system will boot from the hard disk. Or maybe I didn't understood well what you wrote.
 
  


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
bout to throw in the towel for linus, flashplayer on firefox :( sross Linux - Newbie 2 07-01-2004 05:37 AM
I had to throw in the white towel.... Quivver Slackware 6 02-18-2004 11:35 PM
......I just picked up the now bloody white towel Quivver Slackware 6 02-18-2004 01:52 PM
bout ready to throw in the towel Kdiver58 Linux - Newbie 9 01-22-2003 04:18 PM
M$ Has made so much $$ they are throwing it at me! brangnutux General 8 08-30-2002 03:15 AM

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

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