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 10-18-2001, 01:08 AM   #1
atari303
Member
 
Registered: May 2001
Posts: 34

Rep: Reputation: 15
Unhappy cannot compile tulip.c


hi, please help, I've got a huge headache in my eye

I cannot compile tulip.c on slackware 8.0 as per the instructions found on http://www.scyld.com/expert/modules.html I download the files pci-scan.c pci-scan.h kern_compat.h and tulip.c and try:

gcc -DMODULE -D__KERNEL__ -I/usr/src/linux/net/ -Wall -Wstrict-prototypes -O6 -c tulip.c `[ -f /usr/include/linux/modversions.h ] && echo -DMODVERSIONS`

......and

gcc -DMODULE -D__KERNEL__ -O6 -c tulip.c

and variations of this found on several sites but what I get is this:

In file included from /usr/include/linux/fs.h:15,
from /usr/include/linux/capability.h:17,
from /usr/include/linux/binfmts.h:5,
from /usr/include/linux/sched.h:9,
from tulip.c:119:
/usr/include/linux/net.h:112: parse error before `ssize_t'
/usr/include/linux/net.h:112: warning: no semicolon at end of struct or union
In file included from /usr/include/linux/dcache.h:7,
from /usr/include/linux/fs.h:19,
from /usr/include/linux/capability.h:17,
from /usr/include/linux/binfmts.h:5,
from /usr/include/linux/sched.h:9,
from tulip.c:119:
/usr/include/linux/mount.h:30: parse error before `uid_t'
/usr/include/linux/mount.h:30: warning: no semicolon at end of struct or union
/usr/include/linux/mount.h: In function `mntget':
/usr/include/linux/mount.h:36: dereferencing pointer to incomplete type
/usr/include/linux/mount.h: In function `mntput':
/usr/include/linux/mount.h:45: dereferencing pointer to incomplete type
In file included from /usr/include/linux/string.h:25,
from /usr/include/linux/fs.h:23,
from /usr/include/linux/capability.h:17,
from /usr/include/linux/binfmts.h:5,
from /usr/include/linux/sched.h:9,
from tulip.c:119:
/usr/include/asm/string.h: At top level:
/usr/include/asm/string.h:47: parse error before `size_t'
/usr/include/asm/string.h:48: warning: function declaration isn't a prototype
/usr/include/asm/string.h: In function `strncpy':
/usr/include/asm/string.h:61: `src' undeclared (first use in this function)
/usr/include/asm/string.h:61: (Each undeclared identifier is reported only once
/usr/include/asm/string.h:61: for each function it appears in.)
/usr/include/asm/string.h:61: `dest' undeclared (first use in this function)
/usr/include/asm/string.h:61: `count' undeclared (first use in this function)
/usr/include/asm/string.h:63: warning: control reaches end of non-void function
/usr/include/asm/string.h: At top level:
/usr/include/asm/string.h:83: parse error before `size_t'
/usr/include/asm/string.h:84: warning: function declaration isn't a prototype
/usr/include/asm/string.h: In function `strncat':
/usr/include/asm/string.h:100: `src' undeclared (first use in this function)
/usr/include/asm/string.h:100: `dest' undeclared (first use in this function)
/usr/include/asm/string.h:100: `count' undeclared (first use in this function)
/usr/include/asm/string.h:103: warning: control reaches end of non-void function
/usr/include/asm/string.h: At top level:
/usr/include/asm/string.h:127: parse error before `size_t'
.......................etc

I've recompiled kernel 2.4.5 w/DECchip Tulip (dc21x4x) PCI support loaded as <M> module

cat /proc/modules shows:

tulip 38144 0 (unused)
via-rhine 10336 1
sb 7312 1
sb_lib 34224 0 [sb]
uart401 6256 0 [sb_lib]
sound 57680 1 [sb_lib uart401]
soundcore 3824 4 [sb_lib sound]
ppp_deflate 39008 0 (unused)
ppp_async 6864 0 (unused)
ppp_generic 19280 0 [ppp_deflate ppp_async]
slip 8416 0 (unused)
lp 6096 0 (unused)
parport_pc 19312 1
parport 23776 1 [lp parport_pc]

troubleshooting on the previous link suggests:

cd /usr/src/linux; make include/linux/version.h

but I get:

make: `include/linux/version.h' is up to date.

Once this guy that I used to work with came over, installed the driver, setup eth1 and had ipmasq'ing running in like 2 minutes. He did it so quickly that I couldn't keep track of what he did but this was on Slackware 7.0 running on kernel 2.2.13. I don't know why I wouldn't be able to set this up on kernel 2.2.19 or 2.4.5 or what else I need to do to get this to work.

I've searched some previous posts here but they all seem to suggest getting a different card, but this card was working on 2.2.13 so I know that I'm just doing something wrong. If anyone has gone through this and found a resolution I would be soooooo grateful for any info. lemme know if there is anymore info that I can provide.

sorry for the long post.

thx alot in advance
 
Old 10-19-2001, 06:00 AM   #2
atari303
Member
 
Registered: May 2001
Posts: 34

Original Poster
Rep: Reputation: 15
ok, I think that I found the right tulip driver and the kernel seems to like everything on boot, dmesg | tail shows:

via-rhine.c:v1.08b-LK1.1.8 4/17/2000 Written by Donald Becker
http://www.scyld.com/network/via-rhine.html
PCI: Found IRQ 11 for device 00:0f.0
eth0: VIA VT3043 Rhine at 0xe800, 00:50:ba:04:37:83, IRQ 11.
eth0: MII PHY found at address 8, status 0x782d advertising 05e1 Link 0000.
Linux Tulip driver version 0.9.15-pre2 (May 16, 2001)
PCI: Found IRQ 5 for device 00:0b.0
eth1: ADMtek Comet rev 17 at 0xe400, 00:03:6D:10:E9:F2, IRQ 5.

but what I was wondering now is how do I make these changes stick so that when I do an ifconfig, I get eth1 also. As it is now, when I do ifconfig I only get lo and eth0.

I have tried putting:

alias eth0 via-rhine
alias eth1 tulip

into my modules.conf file and I also have:

append = "ether=0,0,eth1"

at the beginning of the lilo.conf file (even though I've read that this is for built in drivers and I've compiled the kernel for these drivers to load as modules, it was a big mess the other way) but still no luck. I can do an ifconfig eth1 up but then if I try to netconfig eth1, it will still only configure eth0. Does anyone know how to configure so that eth1 is present upon boot and how I can configure that card once it's present?

still using slackware, still using kernel 2.4.5

thx alot in advance
 
Old 10-19-2001, 08:09 AM   #3
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
You will need to edit /etc/rc.d/rc.inet1 and add the ifconfig lines to assign that interface and IP address at boot time. That should sort you out.

HTH

Jamie...
 
Old 10-19-2001, 09:30 AM   #4
Aussie
Senior Member
 
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590

Rep: Reputation: 58
Quote:
Originally posted by jharris
You will need to edit /etc/rc.d/rc.inet1 and add the ifconfig lines to assign that interface and IP address at boot time. That should sort you out.

HTH

Jamie...
what he said ^
 
Old 10-19-2001, 07:22 PM   #5
atari303
Member
 
Registered: May 2001
Posts: 34

Original Poster
Rep: Reputation: 15
hells yeah, that totally sorted my *** out, you kids are really on this ****

before I reinstalled I saved my entire /etc direcory from 2.2.13 Slack 7 and when I looked at rc.inet1 and there was no info anywhere on the second NIC but I found out that my friend had put

ifconfig eth1 <ipaddy> <netmask>
etc....

on rc.local instead so I was totally confused.

ok, so no matter where I put it, it werks, coolio, then I proceeded to tell the script to look at rc.firewall and grab my old rc.firewall script and chmod 700 rc.firewall but now when I start up, I see:

modprobe: Can't locate moduel ip_masq_raudio
ipchains: setting MASQ timouts failed: protocol not available
ipchains: Protocol not available
ipchains: Protocol not available

so I look at my poor kernel that's probably so sick of being recompiled and under:

Networking Options
IP: Netfilter Configuration
ipchains (2.2-style) support
ipfwadm (2.0-style) support

are loaded as modules and also

IP tables support

which I hear kernel 2.4.x now uses.

I guess I will try to figure out how to use iptables if that's what I should be using for kernel 2.4.5 but I wonder why ipchains wouldn't work if it's set to load as module in my kernel.

thx again jharris and aussie, you folks have saved me lots of frustration and hair loss in the past.
 
Old 10-19-2001, 08:41 PM   #6
Aussie
Senior Member
 
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590

Rep: Reputation: 58
There is some bedside reading about iptables here.
 
Old 10-21-2001, 05:29 AM   #7
atari303
Member
 
Registered: May 2001
Posts: 34

Original Poster
Rep: Reputation: 15
thx, great site Aussie, I read everything that applied to me but now I'm getting:

iptables v1.2.3: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)Perhaps iptables or your kernel needs to be upgraded.

when I boot or try iptables -L

I've comiled kernel 2.4.9 according to this site: http://www.skyfree.org/linux/netfilter.html

and everything went ok woth the make install of iptables 1.2.3 but here it is 3:25am and cannot figure out why I'm now getting this error. Have any of you seen this before?

thx alot in advance.
 
  


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
How do I compile Tulip c. for linksys Nc100 v2.1 Tis Linux - Networking 2 02-21-2005 09:06 PM
Compile tulip.c to tulip.o? WKoepp Linux - General 10 11-06-2003 09:15 AM
tulip with redhat 9 eromalloc Linux - Networking 2 08-10-2003 08:06 PM
using gcc to compile tulip.c Zeke Linux - Networking 3 03-22-2003 06:27 PM
tulip.c compile errors? Chypmunk Linux - Software 5 01-31-2002 04:58 PM

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

All times are GMT -5. The time now is 10:34 AM.

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