LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-19-2008, 06:11 PM   #1
smoochie
LQ Newbie
 
Registered: May 2008
Posts: 10

Rep: Reputation: 0
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.
 
Old 05-26-2008, 04:59 PM   #2
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 92

Rep: Reputation: 20
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.
 
Old 05-27-2008, 11:57 PM   #3
smoochie
LQ Newbie
 
Registered: May 2008
Posts: 10

Original Poster
Rep: Reputation: 0
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
 
Old 05-28-2008, 04:25 PM   #4
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 92

Rep: Reputation: 20
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.
 
Old 05-28-2008, 06:49 PM   #5
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 92

Rep: Reputation: 20
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.
 
Old 05-29-2008, 03:41 AM   #6
dracayr
LQ Newbie
 
Registered: May 2008
Posts: 22

Rep: Reputation: 15
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.
 
Old 05-31-2008, 02:29 PM   #7
smoochie
LQ Newbie
 
Registered: May 2008
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by hoes View Post
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?
 
Old 06-02-2008, 09:39 AM   #8
dracayr
LQ Newbie
 
Registered: May 2008
Posts: 22

Rep: Reputation: 15
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
 
Old 06-02-2008, 02:32 PM   #9
gerald_M2B
Member
 
Registered: Oct 2007
Posts: 34

Rep: Reputation: 15
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
 
Old 06-05-2008, 08:40 PM   #10
smoochie
LQ Newbie
 
Registered: May 2008
Posts: 10

Original Poster
Rep: Reputation: 0
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 :-/
 
Old 06-06-2008, 08:14 AM   #11
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 92

Rep: Reputation: 20
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
Code:
echo $PATH
This way we can check whether the compiler works for C en C++ and whether your shell is able to found gcc.
 
Old 06-08-2008, 06:26 PM   #12
smoochie
LQ Newbie
 
Registered: May 2008
Posts: 10

Original Poster
Rep: Reputation: 0
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.
 
Old 06-08-2008, 07:34 PM   #13
hoes
Member
 
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 92

Rep: Reputation: 20
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.
 
Old 06-08-2008, 08:44 PM   #14
smoochie
LQ Newbie
 
Registered: May 2008
Posts: 10

Original Poster
Rep: Reputation: 0
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...
 
Old 06-10-2008, 08:11 PM   #15
smoochie
LQ Newbie
 
Registered: May 2008
Posts: 10

Original Poster
Rep: Reputation: 0
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 :-(
 
  


Reply


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
Installation of Linux API Headers... crik91 Linux From Scratch 7 01-05-2008 03:11 PM
make headers_check errors [LFS V6.3, Sect 6.7 Linux-2.6.22.5 API Headers] michealoc Linux From Scratch 1 10-11-2007 09:03 AM
Installation of Linux API Headers martinwprior Linux From Scratch 3 09-28-2007 01:19 AM
"make headers_check" gives errors during "5.5.1 Installation of Linux API headers " void_man() Linux From Scratch 3 09-26-2007 09:16 PM
LFS on PPC(linux-headers) DarthBane Linux From Scratch 1 06-05-2004 08:24 PM


All times are GMT -5. The time now is 11:21 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