r8168-8.036.00 fails to compile under 3.11.0-rc7

Bug #1216906 reported by Edb
40
This bug affects 4 people
Affects Status Importance Assigned to Milestone
r8168 (Ubuntu)
Fix Released
Undecided
Edb

Bug Description

When compiling r8168 from source using the code downloaded from the realtek website you are faced with the following errors:
r8168-8.036.00/src/r8168_n.c: In function ‘rtl8168_rx_vlan_skb’:
r8168-8.036.00/src/r8168_n.c:2237:9: error: too few arguments to function ‘__vlan_hwaccel_put_tag’
In file included from r8168-8.036.00/src/r8168_n.c:46:0:
include/linux/if_vlan.h:236:31: note: declared here
r8168-8.036.00/src/r8168_n.c: In function ‘rtl8168_hw_set_features’:
8168-8.036.00/src/r8168_n.c:2298:25: error: ‘NETIF_F_HW_VLAN_RX’ undeclared (first use in this function)
r8168-8.036.00/src/r8168_n.c:2298:25: note: each undeclared identifier is reported only once for each function it appears in
r8168-8.036.00/src/r8168_n.c: In function ‘rtl8168_init_one’:
r8168-8.036.00/src/r8168_n.c:16198:26: error: ‘NETIF_F_HW_VLAN_TX’ undeclared (first use in this function)
r8168-8.036.00/src/r8168_n.c:16198:47: error: ‘NETIF_F_HW_VLAN_RX’ undeclared (first use in this function)
make[3]: *** [r8168-8.036.00/src/r8168_n.o] Error 1

These are as a result of the following breaking changes:
 http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f646968f8f7c624587de729115d802372b9063dd and this http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/include/linux/if_vlan.h?id=86a9bad3ab6b6f858fd4443b48738cabbb6d094c

I'm not sure exactly in which version of the kernel these appeared.

I'm running the latest linux kernel thus I don't think this issue is present on the software center but will be a forthcoming issue. Have attached a non-backward compatible patch fixing the issue (for me). Please review in particular the htons() argument.

lsb_release -rd
Description: Ubuntu 13.04
Release: 13.04

Related branches

Revision history for this message
Edb (homemadejam) wrote :
Changed in r8168 (Ubuntu):
assignee: nobody → Edward Baunton (edbaunton)
Revision history for this message
Edb (homemadejam) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Edb (homemadejam) wrote :

I can confirm that 85 which is available in the package manager right now in r8168-dkms is broken on rc7

rror! Bad return status for module build on kernel: 3.11.0-rc7 (x86_64)
Consult /var/lib/dkms/r8168/8.035.00/build/make.log for more information.
ed@brussels:~/kernel/linux$ cat /var/lib/dkms/r8168/8.035.00/build/make.log
DKMS make.log for r8168-8.035.00 for kernel 3.11.0-rc7 (x86_64)
Tue Aug 27 20:37:23 BST 2013
make: Entering directory `/home/ed/kernel/linux'
  LD /var/lib/dkms/r8168/8.035.00/build/built-in.o
  CC [M] /var/lib/dkms/r8168/8.035.00/build/r8168_n.o
/var/lib/dkms/r8168/8.035.00/build/r8168_n.c: In function ‘rtl8168_rx_vlan_skb’:
/var/lib/dkms/r8168/8.035.00/build/r8168_n.c:2084:3: error: too few arguments to function ‘__vlan_hwaccel_put_tag’
In file included from /var/lib/dkms/r8168/8.035.00/build/r8168_n.c:47:0:
include/linux/if_vlan.h:236:31: note: declared here
/var/lib/dkms/r8168/8.035.00/build/r8168_n.c: In function ‘rtl8168_set_features’:
/var/lib/dkms/r8168/8.035.00/build/r8168_n.c:2143:22: error: ‘NETIF_F_HW_VLAN_RX’ undeclared (first use in this function)
/var/lib/dkms/r8168/8.035.00/build/r8168_n.c:2143:22: note: each undeclared identifier is reported only once for each function it appears in
/var/lib/dkms/r8168/8.035.00/build/r8168_n.c: In function ‘rtl8168_init_one’:
/var/lib/dkms/r8168/8.035.00/build/r8168_n.c:15064:20: error: ‘NETIF_F_HW_VLAN_TX’ undeclared (first use in this function)
/var/lib/dkms/r8168/8.035.00/build/r8168_n.c:15064:41: error: ‘NETIF_F_HW_VLAN_RX’ undeclared (first use in this function)
make[1]: *** [/var/lib/dkms/r8168/8.035.00/build/r8168_n.o] Error 1
make: *** [_module_/var/lib/dkms/r8168/8.035.00/build] Error 2
make: Leaving directory `/home/ed/kernel/linux'

Revision history for this message
Edb (homemadejam) wrote :
Revision history for this message
Mike Johnson (yuyuyak) wrote :

Hello all. Thanks so much to <email address hidden> for the patch, unfortunately it doesn't work due to source code changes on the latest driver from Realtek, r8168-8.036.00. This week.
By way of my usual method of sheer doggedness rather than brilliance I was able to create one that does work using damian.w...'s patch and it works here on kernel 3.10.10.
I don't have an account on google code, so hopefully someone who does can reference this there.

Revision history for this message
Mike Johnson (yuyuyak) wrote :

patch for r8168-8.036.00

Revision history for this message
Edb (homemadejam) wrote :

Mike - I have just run into that very same problem. Your patch corrected it. Thanks. What needs to be done here? Mike do you need to submit your patch via bazaar?

Revision history for this message
Edb (homemadejam) wrote :

Mike - what exactly is the change you made to Damian's patch to make it compile? Thanks.

Revision history for this message
Robie Basak (racb) wrote :

Thank you for reporting this bug and helping to make Ubuntu better.

I've can reproduce this neither on Raring (8.035.00-1ubuntu1) nor Saucy (8.036.00-2). I can successfully install r8168-dkms on both releases, so it's not clear to me what needs to be done in Ubuntu with respect to this bug. DKMS build logs attached.

If you are still having an issue with an Ubuntu release specifically, please post exact steps to reproduce, expected results and actual results, and set the bug status back to New.

Or perhaps something has changed in the kernel that allows the original 8.035.00-1ubuntu1and 8.036.00-2 sources to build again? In this case please change the status back to Fix Released.

If I've misunderstood you, please can you explain exactly what is broken specifically in Ubuntu that you want fixed? Then change the bug status back to New. Thanks!

Changed in r8168 (Ubuntu):
status: New → Incomplete
Revision history for this message
Robie Basak (racb) wrote :
Revision history for this message
Robie Basak (racb) wrote :
Revision history for this message
Edb (homemadejam) wrote :

It doesn't affect the current build but when the new kernel is incorporated into ubuntu it will become a problem

Revision history for this message
Jabba56 (uzimm) wrote :

The problem also appears with the JMicron JMC250 PCI Express Driver, see Bug #880316
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/880316
"Failure to make jmicron drivers"

Jabba56 (uzimm)
Changed in r8168 (Ubuntu):
status: Incomplete → New
status: New → Incomplete
Revision history for this message
Graham Inggs (ginggs) wrote :

Fix released in r8168 8.037.00-1 in Trusty.

Changed in r8168 (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Tony Maro (tonymaro) wrote :

The fix doesn't fix it - just installed Trusty LTS with 8.037.00-1 of r8168-dkms and it fails to build.

I tried installing linux-image-generic and linux-headers-generic and building for it to no avail.

root@assist1:~# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.3 LTS"

root@assist1:~# uname -a
Linux assist1 3.16.0-49-generic #65~14.04.1-Ubuntu SMP Wed Sep 9 10:03:23 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

------------------------------
Deleting module version: 8.037.00
completely from the DKMS tree.
------------------------------
Done.
Loading new r8168-8.037.00 DKMS files...
Building only for 3.16.0-49-generic
Building initial module for 3.16.0-49-generic
Error! Bad return status for module build on kernel: 3.16.0-49-generic (x86_64)
Consult /var/lib/dkms/r8168/8.037.00/build/make.log for more information.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.