LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 07-14-2008, 07:45 PM   #1
AlanScott
LQ Newbie
 
Registered: Jul 2008
Distribution: MANY
Posts: 4

Rep: Reputation: 0
Question dummy.c


I'm new to compiling, that's why I'm trying LFS. In the book(v6.3) on the livecd the first time you do the dummy.c test, I get no response. I execute the readelf command and get nothing. Normally I know that's supposed to be a good thing, but the book says I'm supposed to look for something, is it a good thing or a bad thing?
 
Old 07-15-2008, 11:37 AM   #2
clowenstein
LQ Newbie
 
Registered: Feb 2006
Posts: 4

Rep: Reputation: 0
dummy.c

Quote:
Originally Posted by AlanScott View Post
I'm new to compiling, that's why I'm trying LFS. In the book(v6.3) on the livecd the first time you do the dummy.c test, I get no response. I execute the readelf command and get nothing. Normally I know that's supposed to be a good thing, but the book says I'm supposed to look for something, is it a good thing or a bad thing?
Please, nobody here can read over your shoulder to see what you are really doing.

Tell us more about what you did and what you expected to happen. Assume that few of the people who would like to help you are reading the book along with you.
 
Old 07-15-2008, 02:30 PM   #3
Kenarkies
Member
 
Registered: Nov 2007
Location: South Australia
Distribution: Ubuntu 11.10
Posts: 78

Rep: Reputation: 23
Quote:
Originally Posted by AlanScott View Post
I'm new to compiling, that's why I'm trying LFS. In the book(v6.3) on the livecd the first time you do the dummy.c test, I get no response. I execute the readelf command and get nothing. Normally I know that's supposed to be a good thing, but the book says I'm supposed to look for something, is it a good thing or a bad thing?
Hi Alan

Probably there are not many people reading this who are using LFS (I assume this is "Linux from Scratch"). A bit of googling shows that there is another thread which looks at some problems other people were having:

http://www.linuxquestions.org/questi...ummy.c-343288/

so it would be worth looking through the answers given there. At least one customer was happy. Also the book is available separately in pdf form from their site. I haven't yet had a go at compiling the dummy.c, but if you still have trouble this can be the next step. Let us know the command steps you took and the responses from the compiler.

Ken
 
Old 07-15-2008, 09:53 PM   #4
ciotog
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 727
Blog Entries: 2

Rep: Reputation: 43
Quote:
Originally Posted by AlanScott View Post
I'm new to compiling, that's why I'm trying LFS.
What a coincidence! I'm new to running, that's why I entered the Boston Marathon. I'm also new to swimming, so I've decided to cross the English Channel.

 
Old 07-15-2008, 11:51 PM   #5
Kenarkies
Member
 
Registered: Nov 2007
Location: South Australia
Distribution: Ubuntu 11.10
Posts: 78

Rep: Reputation: 23
Quote:
Originally Posted by ciotog View Post
What a coincidence! I'm new to running, that's why I entered the Boston Marathon. I'm also new to swimming, so I've decided to cross the English Channel.

Come on, all you good people. Just a gentle reminder that Linux is supposed to have a reputation for being helpful, particularly to "newcomers".
 
Old 07-16-2008, 06:45 AM   #6
AlanScott
LQ Newbie
 
Registered: Jul 2008
Distribution: MANY
Posts: 4

Original Poster
Rep: Reputation: 0
*Yes - It's linux from scratch, that's why it's on the linux from scratch forum section.

*It's version 6.3 of the book, the same one on the live cd. Chapter 5.7 Adjusting the toolchain.

*Kenarkies on your first post, in that thread, he actually had a return. When i run :

Code:
echo 'main(){}' > dummy.c
cc dummy.c
readelf -l a.out | grep ': /tools'
I get no response, and exit of 0, which everywhere else is a good thing, but here I'm supposed to be getting some kind of output. I have followed the instructions to the letter, su'ing only on the 'make install', Is there somehting else I'm supposed to be doing?

*And Kenarkies, on your second post THANK YOU!
 
Old 07-16-2008, 11:06 AM   #7
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 92

Rep: Reputation: 20
change the readelf-line to: readelf -l a.out (so without the second part)
Post that output than we know whats going on.

I think you are compiling against your host and so you don't see the tools directory.

So in conclusion: * change the last command and post the result
* be as specific as you can about when and from what dir you executed the command and also print the result of 'echo $PATH'

Still the problem you have might not be a problem but more a misunderstanding of how it all works.
 
Old 07-17-2008, 01:52 AM   #8
ciotog
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 727
Blog Entries: 2

Rep: Reputation: 43
Quote:
Originally Posted by Kenarkies View Post
Come on, all you good people. Just a gentle reminder that Linux is supposed to have a reputation for being helpful, particularly to "newcomers".
Well I think suggesting that someone is rushing into things when they might not be ready is helpful. Alan, you'd probably get further faster starting with a different distribution (I would recommend Slackware) and start with building applications, then libraries, and so on - rather than jumping in so deep.
 
Old 07-17-2008, 08:25 AM   #9
komodo
Member
 
Registered: Jun 2008
Distribution: linux from scratch, Arch linux
Posts: 39

Rep: Reputation: 15
Hi Alan,

You're right, you should get some output and the fact you're not getting it is a bad thing. It actually means that during compilation of the toolchain, you missed something. I would start by checking you LFS installation of GCC by redoing the sanity check but using gcc instead of cc, as the book suggests. If that works, your cc isn't properly linked to gcc. Just work your way back from there. So, the next step would be to check on the PATH environment variable (echo $PATH). Just follow the suggestions of the book. Each time you take a step back, do the sanity check again with dummy.c and check the output.

Good luck! And, let us know what comes of it.
 
Old 07-21-2008, 07:20 PM   #10
AlanScott
LQ Newbie
 
Registered: Jul 2008
Distribution: MANY
Posts: 4

Original Poster
Rep: Reputation: 0
Question

Ok, I don't know if this has that much to do with it, but when I execute the mv command to move the new ld to the right spot in /tools/bin, it works for the first one. However when i execute


Code:
mv -v /tools/$(gcc -dumpmachine)/bin/{ld-new,ld}

it's using the livecd gcc that has the dumpmachine output of i486, when the ld-new is in the i686 directory. my path is right, but it's not using the right gcc. This may be leading to my other problems.
I get:
Code:
echo $PATH
/tools/bin:/bin:/usr/bin
but it's not using that PATH variable when I'm compiling.

I'm following the directions on the book that's in the livecd to the letter. What is going wrong?
 
Old 07-21-2008, 07:43 PM   #11
ciotog
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 727
Blog Entries: 2

Rep: Reputation: 43
Quote:
Originally Posted by AlanScott View Post
Ok, I don't know if this has that much to do with it, but when I execute the mv command to move the new ld to the right spot in /tools/bin, it works for the first one. However when i execute


Code:
mv -v /tools/$(gcc -dumpmachine)/bin/{ld-new,ld}

it's using the livecd gcc that has the dumpmachine output of i486, when the ld-new is in the i686 directory. my path is right, but it's not using the right gcc. This may be leading to my other problems.
I get:
Code:
echo $PATH
/tools/bin:/bin:/usr/bin
but it's not using that PATH variable when I'm compiling.

I'm following the directions on the book that's in the livecd to the letter. What is going wrong?
This might help:

http://www.linuxfromscratch.org/pipe...er/033815.html

(follow the next few messages in the thread, that is)
 
  


Reply

Tags
help, lfs, linux


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
Dummy X Server? c.d.e Linux - Software 3 06-30-2008 06:19 AM
What Is a Dummy Package? KOTAPAKA Linux - Newbie 1 03-23-2008 03:22 PM
more than one dummy interfaces? kpachopoulos Linux - Networking 3 03-03-2006 06:27 AM
Dummy bong.mau Programming 10 09-01-2005 12:29 PM
dummy terminal frieza Linux - Networking 3 02-27-2002 05:31 PM


All times are GMT -5. The time now is 02:49 PM.

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