LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   RTL8168 compiling problem (http://www.linuxquestions.org/questions/linux-hardware-18/rtl8168-compiling-problem-512554/)

swil232 12-21-2006 08:42 AM

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.

rylan76 12-26-2006 06:09 AM

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...

swil232 12-28-2006 09:08 AM

Yeah, I think that is the best solution, thanks.

Electro 12-28-2006 08:41 PM

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.

pansen 02-03-2007 03:44 PM

@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.

Electro 02-04-2007 01:57 PM

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.

swil232 02-06-2007 03:20 PM

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.

CEU 04-03-2007 11:54 AM

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.


jay73 04-03-2007 12:31 PM

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.


All times are GMT -5. The time now is 05:28 PM.