LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-15-2005, 10:52 PM   #1
joirnange
Member
 
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Rep: Reputation: 15
Question cp linux-libc-headers to ???


i just download the linux-libc-headers from http://ep09.pld-linux.org/~mmazur/linux-libc-headers/

what should i do next??
i got 2 version of steps:

**************************************************************************************************
version 1:

cp -R include/asm-i386 /tools/include/asm
cp -R include/linux /tools/include

&&&&&&&&&&&&&&&&&&&&&&&&&&&&

version 2:

cp -R include/asm-i386 /usr/include/asm
cp -R include/linux /usr/include

chown -R root:root /usr/include/{asm,linux}

find /usr/include/{asm,linux} -type d -exec chmod 755 {} \;
find /usr/include/{asm,linux} -type f -exec chmod 644 {} \;
*************************************************************************************************

i tried version 1:
[root@jin linux-libc-headers-2.6.5.1]# cp -R include/asm-i386 /tools/include/asm
cp: cannot create directory `/tools/include/asm': No such file or directory

where is the tools directory??
should i use the version 2 step???
whats the difference between these 2 steps??

I am newbie..so alot of thing dono..hope some1 can guide...thanks.
 
Old 01-15-2005, 11:13 PM   #2
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
are you using a Linux From Scratch guide? For your distro theres probably a package named libc-devel or something similar you need to install.
 
Old 01-15-2005, 11:45 PM   #3
joirnange
Member
 
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Original Poster
Rep: Reputation: 15
can i use the step from version 2???

cp -R include/asm-i386 /usr/include/asm
cp -R include/linux /usr/include

chown -R root:root /usr/include/{asm,linux}

find /usr/include/{asm,linux} -type d -exec chmod 755 {} \;
find /usr/include/{asm,linux} -type f -exec chmod 644 {} \;

i afraid i do something wrong......
i m using fedora core 2.
 
Old 01-16-2005, 12:09 AM   #4
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
what do you mean by version 2????

if you already have these includes (from a different version) and overwright them it could cause problems down the road. Generally, you always stick the the headers the glibc that came with the system was built against.

Why are you trying to install these anyway?
 
Old 01-16-2005, 12:53 AM   #5
joirnange
Member
 
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Original Poster
Rep: Reputation: 15
i want to replace the include because i face this problem :

[root@jin iptables-1.2.9]# make KERNEL_DIR=/usr/src/linux-2.6.5-1.358/
In file included from /usr/src/linux-2.6.5-1.358/include/linux/netfilter_ipv4.h:8,
from /usr/src/linux-2.6.5-1.358/include/linux/netfilter_ipv4/ip_tables.h:25,
from include/libiptc/libiptc.h:6,
from include/iptables.h:5,
from extensions/libipt_layer7.c:26:
/usr/src/linux-2.6.5-1.358/include/linux/config.h:6:2: #error including kernel header in userspace; use the glibc headers instead!
Extensions found: IPv4:layer7 IPv4:recent IPv6:ah IPv6:esp IPv6:frag IPv6:ipv6header IPv6:hbh IPv6:dst IPv6:rt
cc -O2 -Wall -Wunused -I/usr/src/linux-2.6.5-1.358//include -Iinclude/ -DIPTABLES_VERSION=\"1.2.9\" -fPIC -o extensions/libipt_layer7_sh.o -c extensions/libipt_layer7.c
In file included from /usr/src/linux-2.6.5-1.358/include/linux/netfilter_ipv4.h:8,
from /usr/src/linux-2.6.5-1.358/include/linux/netfilter_ipv4/ip_tables.h:25,
from include/libiptc/libiptc.h:6,
from include/iptables.h:5,
from extensions/libipt_layer7.c:26:
/usr/src/linux-2.6.5-1.358/include/linux/config.h:6:2: #error including kernel header in userspace; use the glibc headers instead!
make: *** [extensions/libipt_layer7_sh.o] Error 1


After i search from Googles, i got a solution, there is :

You need the cleaned up 2.6 kernel headers maintained by
Mariusz Mazur <mmazur_at_kernel.pl> which you can download from:
http://ep09.pld-linux.org/~mmazur/linux-libc-headers/


Then i download the header and now intend to replace the into include.

So..CAN I do this after i download the header file? :

cp -R include/asm-i386 /usr/include/asm
cp -R include/linux /usr/include

chown -R root:root /usr/include/{asm,linux}

find /usr/include/{asm,linux} -type d -exec chmod 755 {} \;
find /usr/include/{asm,linux} -type f -exec chmod 644 {} \;
 
Old 01-16-2005, 01:35 AM   #6
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
you *could* but if you look at the last cc command, it is specifically telling it to link to /usr/src/linux-2.6.....
so you would have to force the compiler to link with the includes to /usr/include. again, If you replace the includes in /usr/include with those I don't know what it will break down the line if you try to compile anything else. Was iptables configure into your kernel?
 
Old 01-16-2005, 02:02 AM   #7
joirnange
Member
 
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Original Poster
Rep: Reputation: 15
how to force the compiler to link with the includes to /usr/include.??(what should do)

what do u mean by : Was iptables configure into your kernel?(what command to type)

I am so sorry if i asking too many newbie question or easy question...caz i really new in linux.

Do u mind to take a look at this site??
http://www.linuxquestions.org/questi...hreadid=277739

Actually i am doing this project...
http://l7-filter.sourceforge.net/L7-HOWTO-Netfilter

but i faced the error when i try to patch the iptables.

THANKS
 
Old 01-16-2005, 02:16 AM   #8
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
ok, on the link you wanted me to look at Capt_Caveman's second link you should take a look at. The glibc headers should stay no matter what kernel you are running. ( There are a lot of "workarounds" in linux that you read (for example someone says they got it working this or that way) but some of them will break your system.

did you patch and compile the kernel already?
and what errors are you having patching iptables (what command are you using to patch)?

Don't worry about asking questions after all thats what this place is for.
 
Old 01-16-2005, 02:33 AM   #9
joirnange
Member
 
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Original Poster
Rep: Reputation: 15
yes. i just download the rpm
then fire these commnad for compiling the kernel....i dono correct or not....

rpm -i kernel*.src.rpm
cd /usr/src/redhat/SPECS
rpmbuild -ba kernel*.spec

i think in compliing the kernel here....i miss something???

The error i face when i compile the iptable is :

[root@jin iptables-1.2.9]# patch -p1 < iptables-layer7-0.9.0.patch
patching file extensions/.layer7-test
patching file extensions/libipt_layer7.c
patching file extensions/libipt_layer7.man

[root@jin iptables-1.2.9]# chmod +x extensions/.layer7-test

[root@jin iptables-1.2.9]# make KERNEL_DIR=/usr/src/linux-2.6.5-1.358
In file included from /usr/src/linux-2.6.5-1.358/include/linux/netfilter_ipv4.h:8,
from /usr/src/linux-2.6.5-1.358/include/linux/netfilter_ipv4/ip_tables.h:25,
from include/libiptc/libiptc.h:6,
from include/iptables.h:5,
from extensions/libipt_layer7.c:26:
/usr/src/linux-2.6.5-1.358/include/linux/config.h:6:2: #error including kernel header in userspace; use the glibc headers instead!
Extensions found: IPv4:layer7 IPv4:recent IPv6:ah IPv6:esp IPv6:frag IPv6:ipv6header IPv6:hbh IPv6:dst IPv6:rt
cc -O2 -Wall -Wunused -I/usr/src/linux-2.6.5-1.358/include -Iinclude/ -DIPTABLES_VERSION=\"1.2.9\" -fPIC -o extensions/libipt_layer7_sh.o -c extensions/libipt_layer7.c
In file included from /usr/src/linux-2.6.5-1.358/include/linux/netfilter_ipv4.h:8,
from /usr/src/linux-2.6.5-1.358/include/linux/netfilter_ipv4/ip_tables.h:25,
from include/libiptc/libiptc.h:6,
from include/iptables.h:5,
from extensions/libipt_layer7.c:26:
/usr/src/linux-2.6.5-1.358/include/linux/config.h:6:2: #error including kernel h eader in userspace; use the glibc headers instead!
make: *** [extensions/libipt_layer7_sh.o] Error 1


[root@jin iptables-1.2.9]# make install KERNEL_DIR=/usr/src/linux-2.6.5-1.358
cc -O2 -Wall -Wunused -I/usr/src/linux-2.6.5-1.358/include -Iinclude/ -DIPTABLES _VERSION=\"1.2.9\" -fPIC -o extensions/libipt_layer7_sh.o -c extensions/libipt _layer7.c
In file included from /usr/src/linux-2.6.5-1.358/include/linux/netfilter_ipv4.h: 8,
from /usr/src/linux-2.6.5-1.358/include/linux/netfilter_ipv4/ip _tables.h:25,
from include/libiptc/libiptc.h:6,
from include/iptables.h:5,
from extensions/libipt_layer7.c:26:
/usr/src/linux-2.6.5-1.358/include/linux/config.h:6:2: #error including kernel h eader in userspace; use the glibc headers instead!
make: *** [extensions/libipt_layer7_sh.o] Error 1


if i did something wrong...can u guide me from the beggining again??
for doing this project....( i have to pass it up next week).....
 
Old 01-16-2005, 02:42 AM   #10
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
the directions you are following are for 2.6.9 or later ( your running 2.6.5). So your either going to have to compile a new kernel (2.6.10 is the latest, available from www.kernel.org) or adjust slightly as the directions suggest ( I have no idea what to adjust but lets try it out). Without the patched kernel it will probably not work so first step is to go get the kernel source from www.kernel.org and the patch from the guide. make a directory in your home folder like /home/joirnange/kernels and download the kernel there. unzip it and cd into that folder. then we patch but first get the kernel and unpack it.
 
Old 01-16-2005, 03:08 AM   #11
joirnange
Member
 
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Original Poster
Rep: Reputation: 15
I have to bring my Pc to my friend house to download the patch and kernel..caz my connection is very slow now....
so i will come to this forum again after 1 hour. will u (___J)still in this forum after an hour?
Do u mind to give me ur email address ? i afraid to loose u.......caz i got no friend to help me anymore....Thanks
 
Old 01-16-2005, 03:11 AM   #12
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
yeah I'll be around.
by the way I just patched a 2.6.10 and compiled iptables according to the guide and it compiled and installed fine (though I'm running slackware 10.0) but hopefully we can get this working.
 
  


Reply



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-Libc-Headers problems Damon Spector Linux From Scratch 12 10-29-2005 10:09 AM
about linux-libc-headers-2.6.12... ParticleHunter Linux From Scratch 3 09-05-2005 09:23 AM
linux-libc-headers-2.6.8.1 trouble obsidianblackha Linux From Scratch 1 12-03-2004 06:30 PM
libc.so.6(GLIBC_2.3), libc.so.6(GLIBC_2.3.2) needed for Linux 7.3.1 vivek_thampy Linux - Software 1 08-09-2004 04:12 PM
libc.so verse libc.so.5 markstevens Linux - Software 4 06-19-2003 11:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:52 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration