Another LFS newb is stuck: Linux API headers won't install
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.
The header files that are needed are in LINUX/include/linux/* and LINUX/include/asm.
You can recursively copy the headers to where they are destined to go.
I do not know about the value of the many other headers of various directories in the kernel. Look them over, and if in doubt, save them as a tar file.
Then continue on your journey through LFS.
Ideally, the makefile in the kernel should be corrected to work correctly for each arch, so the same problem you encountered would no longer exist.
Hi! It seems as if you may have solved this problem already (see quote below), but for others, if you are using ubuntu and you have this error you can do
Code:
sudo apt-get install build-essentials
and this should fix the problem. I am a pretty big newb myself, and I'm not really sure what the package build-essentials contains, but I know it has something to do with compiling and the compiler and can fix alot of errors. hope that helps! Hail ubuntu!
Emery
-----------------
Quote:
Originally Posted by smoochie
Really weird, I started over and now I can't even prepare Binutils for compilation:
Code:
smoochie@smoochie-desktop:/mnt/lfs/sources/binutils-build$ sudo CC="gcc -B/usr/bin/" ../binutils-2.17/configure \
> --prefix=/tools --disable-nls --disable-werror
loading cache ./config.cache
checking host system type... i686-pc-linux-gnulibc1
checking target system type... i686-pc-linux-gnulibc1
checking build system type... i686-pc-linux-gnulibc1
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc -B/usr/bin/
checking whether the C compiler (gcc -B/usr/bin/ ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
Not sure why I keep hitting snags but at this rate I might be more successful writing my own OS from scratch :-/
Thank you everyone, it looks like I finally figured out the problem. Linux is case-sensitive, and some of the header files are in lower case when they should be in caps. The following commands should solve the problem:
Hmm, maybe I spoke too soon. Performing the very last command doesn't work because /tools/include doesn't exist:
Code:
cp -rv dest/include/* /tools/include
And when I try to prepare Glibc for compilation in the very next step, it says the installed linux files (in usr/include/linux and usr/include/asm) are too old.
When building LFS, the builder needs to follow the LFS book EXACTLY, and if
an error occurs, or an unexpected result is obtained, stop, and figure out
why. Do not continue on. Post if you cannot figure it out quickly.
When /tools/include directory does not exist, create the directory, then retry the command.
You should have the linux-2.6.22.5(or newer) header files in the directory
/tools/include/{linux,asm}
Then, continuing on into glibc, run the command EXACTLY.
You would not get the message that /usr/include/linux headers are too old because you gave the headers to use as /tools/include
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.