LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 12-21-2006, 07:42 AM   #1
swil232
LQ Newbie
 
Registered: Dec 2006
Distribution: Debian
Posts: 3

Rep: Reputation: 0
RTL8168 compiling problem


I am having a hard time getting my RTL8168 network card installed on Debian (Sarge, 2.4.27-2-386) I downloaded the drivers from the realtek website (the Linux driver for kernel 2.4.x and 2.6.x one)

I unpacked the files to my /usr/src folder then followed the readme and then ran 'make clean modules' as instructed in the readme. I know there are other threads on this in other places, but I haven't found one that has the same problem that I am getting. The output from 'make clean modules' is as follows:

Code:
make -C src/ clean
make[1]: Entering directory `/usr/src/r1000v1.05/src'
rm -rf *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags .tmp_version
s
make[1]: Leaving directory `/usr/src/r1000v1.05/src'
make -C src/ modules
make[1]: Entering directory `/usr/src/r1000v1.05/src'
make -f Makefile_linux24x
make[2]: Entering directory `/usr/src/r1000v1.05/src'
gcc -DLINUX -D__KERNEL__ -DMODULE -O2 -pipe -Wall -I/lib/modules/2.4.27-2-386/bu
ild/include -I. -DMODVERSIONS -DEXPORT_SYMTAB -include /lib/modules/2.4.27-2-386
/build/include/linux/modversions.h -c r1000_n.c -o r1000_n.o
In file included from /lib/modules/2.4.27-2-386/build/include/linux/spinlock.h:6
,
                 from /lib/modules/2.4.27-2-386/build/include/linux/module.h:12,
                 from r1000.h:1,
                 from r1000_n.c:5:
/lib/modules/2.4.27-2-386/build/include/asm/system.h: In function `__set_64bit_v
ar':
/lib/modules/2.4.27-2-386/build/include/asm/system.h:190: warning: dereferencing
 type-punned pointer will break strict-aliasing rules
/lib/modules/2.4.27-2-386/build/include/asm/system.h:190: warning: dereferencing
 type-punned pointer will break strict-aliasing rules
r1000_n.c:106:1: warning: "IRQ_NONE" redefined
In file included from /lib/modules/2.4.27-2-386/build/include/linux/netdevice.h:
481,
                 from r1000.h:3,
                 from r1000_n.c:5:
/lib/modules/2.4.27-2-386/build/include/linux/interrupt.h:18:1: warning: this is the location of the previous definition
r1000_n.c:107:1: warning: "IRQ_HANDLED" redefined
/lib/modules/2.4.27-2-386/build/include/linux/interrupt.h:19:1: warning: this is the location of the previous definition
r1000_n.c: At top level:
r1000_n.c:1296: error: syntax error before "r1000_tx_action"
r1000_n.c:1296: warning: return type defaults to `int'
r1000_n.c:1296: error: conflicting types for `r1000_tx_action'
r1000_n.c:1295: error: previous declaration of `r1000_tx_action'
r1000_n.c:1345: error: syntax error before "r1000_rx_action"
r1000_n.c:1345: warning: return type defaults to `int'
r1000_n.c:1345: error: conflicting types for `r1000_rx_action'
r1000_n.c:1344: error: previous declaration of `r1000_rx_action'
r1000_n.c: In function `r1000_interrupt':
r1000_n.c:1479: warning: `return' with a value, in function returning void
r1000_n.c:1483: warning: `return' with a value, in function returning void
make[2]: *** [r1000_n.o] Error 1
make[2]: Leaving directory `/usr/src/r1000v1.05/src'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/r1000v1.05/src'
make: *** [modules] Error 2
debian:/usr/src/r1000v1.05#
The first line that it has a problem with is the second line below:

Code:
static void FASTCALL (r1000_tx_action(struct net_device *netdev));
static void fastcall r1000_tx_action(struct net_device *netdev){
When I view the code 'FASTCALL' appears blue, but 'fastcall' doesn't. I tried deleting the 'fastcall' between 'void' and 'r1000..' and it managed to build. Does this mean I am missing some libraries or something?

My output from lspci is as follows:

Code:
0000:00:00.0 Host bridge: Intel Corp.: Unknown device 2770 (rev 02)
0000:00:01.0 PCI bridge: Intel Corp.: Unknown device 2771 (rev 02)
0000:00:1b.0 0403: Intel Corp.: Unknown device 27d8 (rev 01)
0000:00:1c.0 PCI bridge: Intel Corp.: Unknown device 27d0 (rev 01)
0000:00:1c.1 PCI bridge: Intel Corp.: Unknown device 27d2 (rev 01)
0000:00:1d.0 USB Controller: Intel Corp.: Unknown device 27c8 (rev 01)
0000:00:1d.1 USB Controller: Intel Corp.: Unknown device 27c9 (rev 01)
0000:00:1d.2 USB Controller: Intel Corp.: Unknown device 27ca (rev 01)
0000:00:1d.3 USB Controller: Intel Corp.: Unknown device 27cb (rev 01)
0000:00:1d.7 USB Controller: Intel Corp.: Unknown device 27cc (rev 01)
0000:00:1e.0 PCI bridge: Intel Corp. 82801 PCI Bridge (rev e1)
0000:00:1f.0 ISA bridge: Intel Corp.: Unknown device 27b8 (rev 01)
0000:00:1f.1 IDE interface: Intel Corp.: Unknown device 27df (rev 01)
0000:00:1f.2 IDE interface: Intel Corp.: Unknown device 27c0 (rev 01)
0000:00:1f.3 SMBus: Intel Corp.: Unknown device 27da (rev 01)
0000:01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.: Unknown device 8168 (rev 01)
0000:03:00.0 VGA compatible controller: ATI Technologies Inc: Unknown device 724b
0000:03:00.1 Display controller: ATI Technologies Inc: Unknown device 726b
I have no idea what to do to sort this out, any help would be greatly appreciated. Thanks in advance.
 
Old 12-26-2006, 05:09 AM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,475

Rep: Reputation: 87
Don't know about your compiling problem, but I downloaded this same driver (the R1000 one) to get my onboard RTL8168/8111B NIC going. I did get it compiled and installed, but I had endless problems actually getting it to work...

Personally I consider the R1000 driver broken for Linux. I eventually gave up and got myself a normal PCI RTL8139 (which is solidly supported under Linux) NIC and my network setup is working perfectly now.

These old 8139 based NICs are really cheap - why not just disable the other NIC in your BIOS and try an 8139 based one? IF you have an onboard NIC, that is...
 
Old 12-28-2006, 08:08 AM   #3
swil232
LQ Newbie
 
Registered: Dec 2006
Distribution: Debian
Posts: 3

Original Poster
Rep: Reputation: 0
Yeah, I think that is the best solution, thanks.
 
Old 12-28-2006, 07:41 PM   #4
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Why you want a 100 Mb NIC while the NIC you have is a 1 Gb for PCI Express slots. If you have an open standard PCI slot, the Realtek 8169 NIC works just fine. If you do not have any open PCI slot, look into an 100 Mb USB NIC from Linksys model (USB100TX). It is possible that Linksys USB200M can work. Other brands for USB NIC could work too.

The latest kernel version 2.6.19 is very different than 2.6.8 which majority of manufactures program for. it is the same for kernel version 2.4.x. I suggest compile the software with 2.4.26/2.6.8 or lower. The compiler that you should use is 3.3 or 2.95.
 
Old 02-03-2007, 02:44 PM   #5
pansen
LQ Newbie
 
Registered: Mar 2004
Posts: 4

Rep: Reputation: 0
@swil232 - Try to:
1. delete the first declaration at line 13x
2. move the second one (with FASTCALL) up to where the first was

Currently, the driver is either not loaded or not working and the card not recognized.

I'd like to know if it worked with the above changes.
 
Old 02-04-2007, 12:57 PM   #6
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
As of kernel version 2.6.19, Realtek 8168 is in the kernel. If it still does not work, you can try git kernel which is an experimental kernel.
 
Old 02-06-2007, 02:20 PM   #7
swil232
LQ Newbie
 
Registered: Dec 2006
Distribution: Debian
Posts: 3

Original Poster
Rep: Reputation: 0
Hi,

Thanks for the replies.

I tried deleting the lines 136/137 and then moving the ones with FASTCALL to where the original ones were as you said, but it didn't work. Here is the output from "make clean modules".

Code:
make -f Makefile_linux24x
make[1]: Entering directory `/home/simon/r1000_v1.05/src'
gcc -DLINUX -D__KERNEL__ -DMODULE -O2 -pipe -Wall -I/lib/modules/2.4.27-2-386/bu
ild/include -I. -DMODVERSIONS -DEXPORT_SYMTAB -include /lib/modules/2.4.27-2-386
/build/include/linux/modversions.h -c r1000_n.c -o r1000_n.o
In file included from /lib/modules/2.4.27-2-386/build/include/linux/spinlock.h:6
,
                 from /lib/modules/2.4.27-2-386/build/include/linux/module.h:12,
                 from r1000.h:1,
                 from r1000_n.c:5:
/lib/modules/2.4.27-2-386/build/include/asm/system.h: In function `__set_64bit_v
ar':
/lib/modules/2.4.27-2-386/build/include/asm/system.h:190: warning: dereferencing
 type-punned pointer will break strict-aliasing rules
/lib/modules/2.4.27-2-386/build/include/asm/system.h:190: warning: dereferencing
 type-punned pointer will break strict-aliasing rules
r1000_n.c:106:1: warning: "IRQ_NONE" redefined
In file included from /lib/modules/2.4.27-2-386/build/include/linux/netdevice.h:
481,
                 from r1000.h:3,
                 from r1000_n.c:5:
/lib/modules/2.4.27-2-386/build/include/linux/interrupt.h:18:1: warning: this is the location of the previous definition
r1000_n.c:107:1: warning: "IRQ_HANDLED" redefined
/lib/modules/2.4.27-2-386/build/include/linux/interrupt.h:19:1: warning: this is the location of the previous definition
r1000_n.c: At top level:
r1000_n.c:1296: error: syntax error before "r1000_tx_action"
r1000_n.c:1296: warning: return type defaults to `int'
r1000_n.c:1296: error: conflicting types for `r1000_tx_action'
r1000_n.c:136: error: previous declaration of `r1000_tx_action'
r1000_n.c:1345: error: syntax error before "r1000_rx_action"
r1000_n.c:1345: warning: return type defaults to `int'
r1000_n.c:1345: error: conflicting types for `r1000_rx_action'
r1000_n.c:137: error: previous declaration of `r1000_rx_action'
r1000_n.c: In function `r1000_interrupt':
r1000_n.c:1479: warning: `return' with a value, in function returning void
r1000_n.c:1483: warning: `return' with a value, in function returning void
make[1]: *** [r1000_n.o] Error 1
make[1]: Leaving directory `/home/simon/r1000_v1.05/src'
make: *** [modules] Error 2
Since originally posting this topic I found an old network card that was in my house, so I can use the internet on Debian at the moment, but I wouldn't mind still getting this problem sorted out.
I might try updating to a newer kernel version at some point, but I don't really want to do that at the moment, because I haven't really got time to sort everything out if it gets messed up like last time I tried.
 
Old 04-03-2007, 10:54 AM   #8
CEU
LQ Newbie
 
Registered: Apr 2007
Posts: 1

Rep: Reputation: 0
fastcall conflicting types realtek driver

pansen's suggestion worked for me.

comment out first declaration that does not have fastcall macro and move the second declaration that does have the fastcall macro up.



Quote:
Originally Posted by swil232
Hi,

Thanks for the replies.

I tried deleting the lines 136/137 and then moving the ones with FASTCALL to where the original ones were as you said, but it didn't work. Here is the output from "make clean modules".

Code:
make -f Makefile_linux24x
make[1]: Entering directory `/home/simon/r1000_v1.05/src'
gcc -DLINUX -D__KERNEL__ -DMODULE -O2 -pipe -Wall -I/lib/modules/2.4.27-2-386/bu
ild/include -I. -DMODVERSIONS -DEXPORT_SYMTAB -include /lib/modules/2.4.27-2-386
/build/include/linux/modversions.h -c r1000_n.c -o r1000_n.o
In file included from /lib/modules/2.4.27-2-386/build/include/linux/spinlock.h:6
,
                 from /lib/modules/2.4.27-2-386/build/include/linux/module.h:12,
                 from r1000.h:1,
                 from r1000_n.c:5:
/lib/modules/2.4.27-2-386/build/include/asm/system.h: In function `__set_64bit_v
ar':
/lib/modules/2.4.27-2-386/build/include/asm/system.h:190: warning: dereferencing
 type-punned pointer will break strict-aliasing rules
/lib/modules/2.4.27-2-386/build/include/asm/system.h:190: warning: dereferencing
 type-punned pointer will break strict-aliasing rules
r1000_n.c:106:1: warning: "IRQ_NONE" redefined
In file included from /lib/modules/2.4.27-2-386/build/include/linux/netdevice.h:
481,
                 from r1000.h:3,
                 from r1000_n.c:5:
/lib/modules/2.4.27-2-386/build/include/linux/interrupt.h:18:1: warning: this is the location of the previous definition
r1000_n.c:107:1: warning: "IRQ_HANDLED" redefined
/lib/modules/2.4.27-2-386/build/include/linux/interrupt.h:19:1: warning: this is the location of the previous definition
r1000_n.c: At top level:
r1000_n.c:1296: error: syntax error before "r1000_tx_action"
r1000_n.c:1296: warning: return type defaults to `int'
r1000_n.c:1296: error: conflicting types for `r1000_tx_action'
r1000_n.c:136: error: previous declaration of `r1000_tx_action'
r1000_n.c:1345: error: syntax error before "r1000_rx_action"
r1000_n.c:1345: warning: return type defaults to `int'
r1000_n.c:1345: error: conflicting types for `r1000_rx_action'
r1000_n.c:137: error: previous declaration of `r1000_rx_action'
r1000_n.c: In function `r1000_interrupt':
r1000_n.c:1479: warning: `return' with a value, in function returning void
r1000_n.c:1483: warning: `return' with a value, in function returning void
make[1]: *** [r1000_n.o] Error 1
make[1]: Leaving directory `/home/simon/r1000_v1.05/src'
make: *** [modules] Error 2
Since originally posting this topic I found an old network card that was in my house, so I can use the internet on Debian at the moment, but I wouldn't mind still getting this problem sorted out.
I might try updating to a newer kernel version at some point, but I don't really want to do that at the moment, because I haven't really got time to sort everything out if it gets messed up like last time I tried.
 
Old 04-03-2007, 11:31 AM   #9
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
I don't know what's happening. I can only confirm that I have one of those Realtek 8111/8168 NICs and the driver compiled without a problem on both Debian and Fedora. I'll have a look at the error messages again later again this evening.

Edit: I see you're still using Sarge. I nearly killed myself over that one. Tried everything for a month and gave up. Thank God for Etch.

Last edited by jay73; 04-03-2007 at 11:33 AM.
 
  


Reply

Tags
compiling, debian, network


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
Realtek rtl8168 Kuma Mandriva 23 10-11-2006 01:13 AM
RTL8168 driver on FC5? liuzexi2002 Linux - General 1 09-17-2006 07:10 AM
compiling problem? kalleanka Programming 7 08-26-2006 07:45 AM
compiling problem manicman Linux - Newbie 8 01-19-2006 11:54 AM
compiling problem ... chaks Programming 2 03-29-2004 09:14 AM


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

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