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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
05-22-2009, 03:51 AM
|
#1
|
Member
Registered: Apr 2009
Posts: 42
Rep:
|
LFS- Adjusting the Toolchain problem
Hi All,
I am following LFS-version 6.4 and the host system is SuSE 11.0.
Everything was successful till installing Glibc(section 5.7).Then I entered the section 5.8 Adjusting the Toolchain.
When I did :
gcc -dumpspecs | sed 's@/lib/ld-linux.so.2@/tools&@g' \
> `dirname $(gcc -print-libgcc-file-name)`/specs
I got the following error :
sed: can't read /mnt/point1/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/specs : No such file or directory.
(NOTE: my LFS partition is /dev/sda4 mounted on /mnt/point1 )
Then I decided to ignore it and went ahead with next instructions.After a while,as soon as I typed:
echo 'main(){}' > dummy.c
cc dummy.c
it showed the error:
cc: unrecognized option '-mtune=generic'
Please tell me what to do.
|
|
|
05-22-2009, 04:00 AM
|
#2
|
LQ Veteran
Registered: Sep 2003
Posts: 10,532
|
Hi,
Did you copy/paste the gcc -dumpspecs | sed 's@..... or type it yourself?
The > in this one-liner is for redirection and _not_ your PS2 prompt.
I personally think it is a bad breakpoint for a one-liner, maybe you should try this instead:
gcc -dumpspecs | sed 's@/lib/ld-linux.so.2@/tools&@g' > `dirname $(gcc -print-libgcc-file-name)`/specs
If that doesn't help, what happens when you execute this: dirname $(gcc -print-libgcc-file-name) (part of the one-liner).
|
|
|
05-22-2009, 04:59 AM
|
#3
|
Member
Registered: Apr 2009
Posts: 42
Original Poster
Rep:
|
Thanks Druuna,
I had typed it and thought that it is a line change.So, it was wrong.Then I copied and pasted it and got error.At last I wrote what you told me to write and it worked ! A specs file was generated.
Then I proceeded to next instruction :
GCC_FIXED=`dirname $(gcc -print-libgcc-file-name)`/include-fixed &&
find ${GCC_FIXED}/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \; &&
rm -vf `grep -l "DO NOT EDIT THIS FILE" ${GCC_FIXED}/*` &&
unset GCC_FIXED
And got the following error :
grep: /mnt/point1/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/include-fixed/ssl
:No such file or directory
I went to that directory and saw that there is broken file called ssl.
Now can you please tell me what went wrong?I tried to type it and copy-paste it.Both cases had same error.
Thanks.
|
|
|
05-22-2009, 07:32 AM
|
#4
|
LQ Veteran
Registered: Sep 2003
Posts: 10,532
|
Hi,
In your first post you mention executing the echo 'main(){}' > dummy.c and cc dummy.c parts. Did you execute the GCC_FIXED=`dirname $(gcc ...... unset GCC_FIXED part as well? If so, you already removed (that's what the GCC_FIXED part does, it removes certain dirs and files) certain parts.
I'm not sure what dirs and files should be removed, but if I take a look at /x/y/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/include-fixed/ there are only 3 files present: README limits.h and syslimits.h. But that is on a box that has a fully functional LFS 6.4.
Maybe you should start over with chapter 5, just to make sure.
BTW: You did check to see if Suse 11.0 is suitable as host?? ( http://www.linuxfromscratch.org/lfs/.../hostreqs.html)
|
|
|
05-25-2009, 12:15 AM
|
#5
|
Member
Registered: Apr 2009
Posts: 42
Original Poster
Rep:
|
Yes, I had executed the "GCC_FIXED=`dirname $(gcc ...... unset GCC_FIXED" part as well. You are right.It might have removed something. Now I am going to start again from chapter 5.
|
|
|
05-26-2009, 02:03 AM
|
#6
|
Member
Registered: Apr 2009
Posts: 42
Original Poster
Rep:
|
Hi All,
I started again and this time I took all the care and went ahead for a loner distance than before.Till section 5.13, there was no problem and everything went without showing errors.Even sanity checks worked this time.
The problem started when I reached section 5.14 Ncurses-5.6 . When I copied and pasted the following command :
./configure --prefix=/tools --with-shared \
--without-debug --without-ada --enable-overwrite
I got the following error :
(these are last few lines, I can provide more if you want)
checking if you want to build a separate terminfo library... no
checking if you want to link with the GPM mouse library... maybe
checking for gpm.h... yes
checking for Gpm_Open in _lgpm... no
configure: error: cannot link with GPM library
What went wrong here? How to solve it?
NOTE: I had deleted all the older build directories.
|
|
|
05-26-2009, 02:17 AM
|
#7
|
LQ Veteran
Registered: Sep 2003
Posts: 10,532
|
Hi,
These errors (both toolchain and ncurses) shouldn't happen. I've installed LFS 6.4 more then once and neven encountered these before.
One thing that I can come up with that could cause all of these problems (and a question you haven't answered yet): Is Suse 11.0 suitable as a base for LFS?
I always use the LFS liveCD as base, maybe you should too. This liveCD was created to be a suitable host.
|
|
|
05-27-2009, 10:18 PM
|
#8
|
Member
Registered: Apr 2009
Posts: 42
Original Poster
Rep:
|
I checked that SuSE 11.0 is good for being a host by running the instructions given in "Host system requirements".
Do you have any other clue about what went wrong?
|
|
|
05-28-2009, 02:32 AM
|
#9
|
LQ Veteran
Registered: Sep 2003
Posts: 10,532
|
Hi,
I do see something in post #6 that shouldn't be there: gpm entries (to be more precise: the linking of gpm).
At this stage gpm should not be available at all and it should skip it with no instead of maybe (checking if you want to link with the GPM mouse library... maybe).
What does the following show you (as lfs user):
echo | gcc -v -x c - 2>&1 | sed -n '/^#include/,/End of search list/p'
The output should be something like:
/home/build/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/include
/tools/include
and
gcc -dumpspecs | grep "ld-linux.so.2"
The output should be:
/tools/lib/ld-linux.so.2
If either of them come up with different/more output, then probably something went wring with gcc pass 2 and/or adjusting the toolchain.
Last edited by anon237; 05-28-2009 at 01:55 PM.
|
|
|
06-02-2009, 01:44 AM
|
#10
|
Member
Registered: Apr 2009
Posts: 42
Original Poster
Rep:
|
I had run the instructions mentioned by you and got totally different outputs. So, I decided to start the second pass of gcc again. This time I got no problems.I did chapter 5 successfully and I am doing now the sixth one.
If I find any problem,I will post it here again.Thank you for the help :-)
|
|
|
06-02-2009, 02:17 AM
|
#11
|
LQ Veteran
Registered: Sep 2003
Posts: 10,532
|
Hi,
Glad to read that things are ok now!
|
|
|
06-04-2009, 03:55 AM
|
#12
|
Member
Registered: Apr 2009
Posts: 42
Original Poster
Rep:
|
Hi !
Now I am in chapter 8.3.1. Installation of the kernel
Here it is told to run the following command :
make LANG=<host_LANG_value> LC_ALL= menuconfig
It also tells to : "Be sure to replace <host_ LANG_ value> by the value of the $LANG variable from your host. If not set, you
could use instead the host's value of $LC_ ALL or $LC_ CTYPE."
I tried to do echo for $LANG,$LC_ALL and $LC_CTYPE.But,nothing was displayed.So, what should I replace "<host_ LANG_ value>" with? I am stuck with this instruction :-(
|
|
|
06-04-2009, 04:06 AM
|
#13
|
LQ Veteran
Registered: Sep 2003
Posts: 10,532
|
Hi,
I do not use the LANG settings at all during the kernel setup step. It is there to enable proper line drawings for the ncurses program (the menu itself).
The steps I take/took are these:
1) unpack kernel source and enter directory
2) make mrproper
3) make menuconfig
4) make
5) make modules_install
6) 'rest' of LFS chapter 8.3
If you have an 'old' working .config stored somewhere that you want to use, do the following between steps 2 and 3
a) copy the old .config file to the linux source directory
b) make oldconfig (just use the defaults given if you are not clear about certain options)
continue with step 3 from this point on.
Hope this clears things up a bit.
|
|
|
06-04-2009, 04:24 AM
|
#14
|
Member
Registered: Apr 2009
Posts: 42
Original Poster
Rep:
|
If we do "make modules_install", will there be need of initrd image? In LFS chapters, nothing is mentioned about initrd. How will it boot if it has modules but no initrd ?
|
|
|
06-04-2009, 04:37 AM
|
#15
|
LQ Veteran
Registered: Sep 2003
Posts: 10,532
|
Hi,
No initrd is needed.
There is an old lfs-hint file ( initrd for LFS) you can look at if you do want/need initrd. Never tried it myself, I never needed initrd.
|
|
|
All times are GMT -5. The time now is 07:06 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|