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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
05-19-2008, 06:11 PM
|
#1
|
|
LQ Newbie
Registered: May 2008
Posts: 10
Rep:
|
Another LFS newb is stuck: Linux API headers won't install
Thank you to anyone who bothers to read this...I realize I'm not the only one with issues. I've successfully compiled GCC and now am at section 5.5 where I am told to install the linux API headers with the following commands:
make mrproper
make headers_check
make INSTALL_HDR_PATH=dest headers_install
cp -rv dest/include/* /tools/include
I executed these commands in the linux-2.6.22.5 directory, but headers_check leads to the following errors:
make[3]: *** No rule to make target `/mnt/lfs/linux-2.6.22.5/include/linux/netfilter/xt_CONNMARK.h', needed by `/mnt/lfs/linux-2.6.22.5/usr/include/linux/netfilter/xt_CONNMARK.h'. Stop.
make[2]: *** [netfilter] Error 2
make[1]: *** [linux] Error 2
make: *** [headers_install] Error 2
I'd be grateful for any help here.
|
|
|
|
05-26-2008, 04:59 PM
|
#2
|
|
Member
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 86
Rep:
|
This is strange.
You put all the commands on different lines? (must ask)
Could you send some log?
Try running
Code:
make headers_check 2>&1 | tee logfile
That will create a file named logfile containing more info.
Maybe that'll help you and if not paste some of it in this thread.
Paste the lines beginning with the first strange entry or error.
|
|
|
|
05-27-2008, 11:57 PM
|
#3
|
|
LQ Newbie
Registered: May 2008
Posts: 10
Original Poster
Rep:
|
Yes, I put all commands on different lines. The error starts with headers_check. Here's the full text of the command:
Quote:
smoochie@smoochies-desktop:/mnt/lfs/sources/linux-2.6.22.5$ sudo make headers_check
CHK include/linux/version.h
UPD include/linux/version.h
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
HOSTCC scripts/unifdef
MKDIR include
MKDIR include/asm-generic
INSTALL include/asm-generic/errno-base.h
INSTALL include/asm-generic/errno.h
INSTALL include/asm-generic/fcntl.h
INSTALL include/asm-generic/ioctl.h
INSTALL include/asm-generic/ipc.h
INSTALL include/asm-generic/mman.h
INSTALL include/asm-generic/poll.h
INSTALL include/asm-generic/signal.h
INSTALL include/asm-generic/statfs.h
UNIFDEF include/asm-generic/resource.h
UNIFDEF include/asm-generic/siginfo.h
MKDIR include/asm
INSTALL include/asm/boot.h
INSTALL include/asm/debugreg.h
INSTALL include/asm/ldt.h
INSTALL include/asm/msr-index.h
INSTALL include/asm/ptrace-abi.h
INSTALL include/asm/ucontext.h
UNIFDEF include/asm/a.out.h
UNIFDEF include/asm/auxvec.h
UNIFDEF include/asm/byteorder.h
UNIFDEF include/asm/elf.h
UNIFDEF include/asm/errno.h
UNIFDEF include/asm/fcntl.h
UNIFDEF include/asm/ioctl.h
UNIFDEF include/asm/ioctls.h
UNIFDEF include/asm/ipcbuf.h
UNIFDEF include/asm/mman.h
UNIFDEF include/asm/msgbuf.h
UNIFDEF include/asm/msr.h
UNIFDEF include/asm/mtrr.h
UNIFDEF include/asm/page.h
UNIFDEF include/asm/param.h
UNIFDEF include/asm/poll.h
UNIFDEF include/asm/posix_types.h
UNIFDEF include/asm/ptrace.h
UNIFDEF include/asm/resource.h
UNIFDEF include/asm/sembuf.h
UNIFDEF include/asm/setup.h
UNIFDEF include/asm/shmbuf.h
UNIFDEF include/asm/shmparam.h
UNIFDEF include/asm/sigcontext.h
UNIFDEF include/asm/siginfo.h
UNIFDEF include/asm/signal.h
UNIFDEF include/asm/socket.h
UNIFDEF include/asm/sockios.h
UNIFDEF include/asm/stat.h
UNIFDEF include/asm/statfs.h
UNIFDEF include/asm/termbits.h
UNIFDEF include/asm/termios.h
UNIFDEF include/asm/types.h
UNIFDEF include/asm/unistd.h
UNIFDEF include/asm/user.h
UNIFDEF include/asm/vm86.h
MKDIR include/linux
MKDIR include/linux/byteorder
INSTALL include/linux/byteorder/big_endian.h
INSTALL include/linux/byteorder/little_endian.h
UNIFDEF include/linux/byteorder/generic.h
UNIFDEF include/linux/byteorder/swab.h
MKDIR include/linux/dvb
INSTALL include/linux/dvb/ca.h
INSTALL include/linux/dvb/frontend.h
INSTALL include/linux/dvb/net.h
INSTALL include/linux/dvb/osd.h
INSTALL include/linux/dvb/version.h
UNIFDEF include/linux/dvb/audio.h
UNIFDEF include/linux/dvb/dmx.h
UNIFDEF include/linux/dvb/video.h
MKDIR include/linux/hdlc
INSTALL include/linux/hdlc/ioctl.h
MKDIR include/linux/isdn
INSTALL include/linux/isdn/capicmd.h
MKDIR include/linux/netfilter
INSTALL include/linux/netfilter/nf_conntrack_sctp.h
INSTALL include/linux/netfilter/nf_conntrack_tuple_common.h
INSTALL include/linux/netfilter/nfnetlink_conntrack.h
INSTALL include/linux/netfilter/nfnetlink_log.h
INSTALL include/linux/netfilter/nfnetlink_queue.h
INSTALL include/linux/netfilter/xt_CLASSIFY.h
make[3]: *** No rule to make target `/mnt/lfs/sources/linux-2.6.22.5/include/linux/netfilter/xt_CONNMARK.h', needed by `/mnt/lfs/sources/linux-2.6.22.5/usr/include/linux/netfilter/xt_CONNMARK.h'. Stop.
make[2]: *** [netfilter] Error 2
make[1]: *** [linux] Error 2
make: *** [headers_install] Error 2
|
I performed the command you recommended and here's what the logfile says:
Quote:
CHK include/linux/version.h
make[1]: `scripts/unifdef' is up to date.
make[3]: *** No rule to make target `/mnt/lfs/sources/linux-2.6.22.5/include/linux/netfilter/xt_CONNMARK.h', needed by `/mnt/lfs/sources/linux-2.6.22.5/usr/include/linux/netfilter/xt_CONNMARK.h'. Stop.
make[2]: *** [netfilter] Error 2
make[1]: *** [linux] Error 2
make: *** [headers_install] Error 2
|
|
|
|
|
05-28-2008, 04:25 PM
|
#4
|
|
Member
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 86
Rep:
|
Strange, I don't know.
I should look at the Makefile.
You execute the commands with sudo so it's not a permission problem.
Maybe I'll have a look at the Makefile.
If I do I will let you know.
|
|
|
|
05-28-2008, 06:49 PM
|
#5
|
|
Member
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 86
Rep:
|
Okay, I ran your commands too. But found no problem.
Could you maybe extract the file xt_CONNMARK.h from the archive and then try the make command again?
I guess that could do the trick because, I presume the file was accidentally deleted before.
|
|
|
|
05-29-2008, 03:41 AM
|
#6
|
|
LQ Newbie
Registered: May 2008
Posts: 22
Rep:
|
hi,
I have the same problem
EDIT: your solution worked  Although I have no Idea why the xt_CONNMARK.h file wasn't working (it was present)
thanks,
dracayr
Last edited by dracayr; 05-29-2008 at 01:38 PM.
|
|
|
|
05-31-2008, 02:29 PM
|
#7
|
|
LQ Newbie
Registered: May 2008
Posts: 10
Original Poster
Rep:
|
Quote:
Originally Posted by hoes
Could you maybe extract the file xt_CONNMARK.h from the archive and then try the make command again?
|
I'm kinda slow so could you explain where this file is located? What archive are you referring to?
|
|
|
|
06-02-2008, 09:39 AM
|
#8
|
|
LQ Newbie
Registered: May 2008
Posts: 22
Rep:
|
always consult google first 
a quick google search reveals: the file is located at
Linux/include/linux/netfilter/xt_CONNMARK.h in the linux-headers archive
Oh, and of course it's the file you got the error with, and it's location is in the error message too.
dracayr
|
|
|
|
06-02-2008, 02:32 PM
|
#9
|
|
Member
Registered: Oct 2007
Posts: 34
Rep:
|
dracayr> Oh, and of course it's the file you got the error with, and it's location is in the error message too.
No, its location is not in the error message, due to the insertion of "usr/" within the path.
make[3]: *** No rule to make target `/mnt/lfs/sources/linux-2.6.22.5/include/linux/netfilter/xt_CONNMARK.h', needed by `/mnt/lfs/sources/linux-2.6.22.5/usr/include/linux/netfilter/xt_CONNMARK.h'. Stop.
What is the arch that is not working?
Since the error message has a different path than the actual sources, it suggests that the problem is in the kernel build process or the sanitizing of the C headers.
Gerald
|
|
|
|
06-05-2008, 08:40 PM
|
#10
|
|
LQ Newbie
Registered: May 2008
Posts: 10
Original Poster
Rep:
|
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 :-/
|
|
|
|
06-06-2008, 08:14 AM
|
#11
|
|
Member
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 86
Rep:
|
can you compile dummy files with gcc?
try this:
Create two dummy files tot test the C and C++ compiler respectively
Code:
echo "main() {}" > dummy.c
echo "main() {}" > dummy.cc
No compile the files
Code:
gcc -v dummy.c
gcc -v dummy.cc
Post the results of the last two commands here.
And post also the content of PATH
This way we can check whether the compiler works for C en C++ and whether your shell is able to found gcc.
|
|
|
|
06-08-2008, 06:26 PM
|
#12
|
|
LQ Newbie
Registered: May 2008
Posts: 10
Original Poster
Rep:
|
It looks like I solved the compiler problem, but the original headers_check problem is still there. Did you mean I should delete xt_connmark.h? I did so and it didn't solve it.
|
|
|
|
06-08-2008, 07:34 PM
|
#13
|
|
Member
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 86
Rep:
|
No, I meant you should try to extract it from the archive where you extracted the kernel from.
But it's strange that it is there in the first place because make thinks it not judging by the errormessage.
|
|
|
|
06-08-2008, 08:44 PM
|
#14
|
|
LQ Newbie
Registered: May 2008
Posts: 10
Original Poster
Rep:
|
It was already extracted with all the other files in the linux-2.6.22.5 package, so I'm not sure why that would make a difference. I'm using the LFS LiveCD using the packages included, and have read the directions in scrutinizing detail, but I still can't get past headers_check after 3 weeks of trying...
|
|
|
|
06-10-2008, 08:11 PM
|
#15
|
|
LQ Newbie
Registered: May 2008
Posts: 10
Original Poster
Rep:
|
Anyone have any ideas? I'm getting kinda desperate. If the directions don't work on their own custom distro, there must be something wrong with the directions. I hope I'm not the only person who can't get past headers_check :-(
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:11 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
|
|