Linux From ScratchThis 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.
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.
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
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.
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.
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.
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 :
(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.
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.
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.
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 :-)
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 :-(
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.
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 ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.