Make: error: implicit declaration of functions (on 3.16 kernel versions)

Bug #1363072 reported by Pro Backup
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
r8168 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Situation: testing machine with multiple (developer/mainline) kernels installed

# uname -a
Linux ubuntu 3.13.0-35-generic #62-Ubuntu SMP Fri Aug 15 01:58:42 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
# apt-get install r8168-dkms
...
Building initial module for 3.16.0-999-generic
ERROR (dkms apport): kernel package linux-headers-3.16.0-999-generic is not supported
Error! Bad return status for module build on kernel: 3.16.0-999-generic (x86_64)
Consult /var/lib/dkms/r8168/8.037.00/build/make.log for more information.
Processing triggers for initramfs-tools (0.103ubuntu4.2) ...
update-initramfs: Generating /boot/initrd.img-3.16.0-999-generic

My guess is that when running newer not yet released kernels like 3.16.0-031600rc6 or mainline 3.16.0-999 that compiler warnings are treated as errors.

I hope the upsteam r8168 driver code will be fixed to remove any warnings, like:

# cat /var/lib/dkms/r8168/8.037.00/build/make.log
DKMS make.log for r8168-8.037.00 for kernel 3.16.0-999-generic (x86_64)
Fri Aug 29 14:21:47 CEST 2014
make: Entering directory `/usr/src/linux-headers-3.16.0-999-generic'
  LD /var/lib/dkms/r8168/8.037.00/build/built-in.o
  CC [M] /var/lib/dkms/r8168/8.037.00/build/r8168_n.o
/var/lib/dkms/r8168/8.037.00/build/r8168_n.c: In function 'rtl8168_init_one':
/var/lib/dkms/r8168/8.037.00/build/r8168_n.c:17103:5: error: implicit declaration of function 'SET_ETHTOOL_OPS' [-Werror=implicit-function-declaration]
     SET_ETHTOOL_OPS(dev, &rtl8168_ethtool_ops);
     ^
/var/lib/dkms/r8168/8.037.00/build/r8168_n.c: In function 'rtl8168_schedule_work':
/var/lib/dkms/r8168/8.037.00/build/r8168_n.c:18674:5: error: implicit declaration of function 'PREPARE_DELAYED_WORK' [-Werror=implicit-function-declaration]
     PREPARE_DELAYED_WORK(&tp->task, task);
     ^
cc1: some warnings being treated as errors
make[1]: *** [/var/lib/dkms/r8168/8.037.00/build/r8168_n.o] Error 1
make: *** [_module_/var/lib/dkms/r8168/8.037.00/build] Error 2
make: Leaving directory `/usr/src/linux-headers-3.16.0-999-generic'

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in r8168 (Ubuntu):
status: New → Confirmed
Revision history for this message
Pro Backup (2010-s) wrote :

The workaround to no longer error out the Make process is to comment the line:

     -Werror-implicit-function-declaration \

in file:

/usr/src/linux-headers-3.17.0-999-generic/Makefile

However that still does not built a module that runs with kernel 3.17:
insmod /lib/modules/3.17.0-999-generic/updates/dkms/r8618.ko
r8168: Unknown symbol PREPARE_DELAYED_WORK (err 0)
r8168: Unknown symbol SET_ETHTOOL_OPS (err 0)
modprobe: ERROR: could not insert 'r8168': Unknown symbol in module, or unknown parameter (see dmesg)

Revision history for this message
jose (o1485726) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package r8168 - 8.039.00-1

---------------
r8168 (8.039.00-1) unstable; urgency=medium

  * New upstream release 8.039.00 (2014-09-18).
    (Closes: #760980, #743399, #756183) (LP: #1363072)

 -- Andreas Beckmann <email address hidden> Sun, 28 Sep 2014 04:22:52 +0200

Changed in r8168 (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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