Moderator Control Panel ]

Drivers won't build (make fails) after Ubuntu kernel update

It's important to keep your driver and software updated.

Re: Drivers won't build (make fails) after Ubuntu kernel upd

Postby BlueSky » Sun Mar 31, 2019 1:58 pm

In case anyone is wondering, this is where make fails if you try to build the drivers in the 4.15.0-46-generic kernel:

Code: Select all
  CC [M]  /home/backend/Drivers/linux-tbs-drivers/v4l/saa7146_video.o
/home/backend/Drivers/linux-tbs-drivers/v4l/saa7146_video.c: In function 'video_init':
/home/backend/Drivers/linux-tbs-drivers/v4l/saa7146_video.c:1307:2: error: implicit declaration of function 'init_timer' [-Werror=implicit-function-declaration]
/home/backend/Drivers/linux-tbs-drivers/v4l/saa7146_video.c:1308:31: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
  vv->video_q.timeout.function = saa7146_buffer_timeout;
/home/backend/Drivers/linux-tbs-drivers/v4l/saa7146_video.c:1309:21: error: 'struct timer_list' has no member named 'data'
  vv->     = (unsigned long)(&vv->video_q);
cc1: some warnings being treated as errors
scripts/ recipe for target '/home/backend/Drivers/linux-tbs-drivers/v4l/saa7146_video.o' failed
make[3]: *** [/home/backend/Drivers/linux-tbs-drivers/v4l/saa7146_video.o] Error 1
Makefile:1551: recipe for target '_module_/home/backend/Drivers/linux-tbs-drivers/v4l' failed
make[2]: *** [_module_/home/backend/Drivers/linux-tbs-drivers/v4l] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-4.15.0-46-generic'
Makefile:51: recipe for target 'default' failed
make[1]: *** [default] Error 2
make[1]: Leaving directory '/home/backend/Drivers/linux-tbs-drivers/v4l'
Makefile:26: recipe for target 'all' failed
make: *** [all] Error 2
Error running make

This is obviously a different issue than the one I wrote about in my original post. As long as you are not running the HWE kernel in Ubuntu 16.04 you probably won't see this issue. I only had this kernel because I had done

sudo apt-get install --install-recommends linux-generic-hwe-16.04

in an attempt to resolve this issue, but obviously that only made things worse. So to remove it I did this:

sudo apt remove --purge linux-generic-hwe-16.04 linux-headers-generic-hwe-16.04 linux-headers-4.15.0-46 linux-headers-4.15.0-46-generic linux-image-4.15.0-46-generic linux-modules-4.15.0-46-generic linux-modules-extra-4.15.0-46-generic
sudo update-grub2
sudo reboot

CAUTION!!! DON'T DO THAT if you don't have any non-HWE kernels installed, or you will render your system unbootable (also if any time has passed since I posted this, your 4.15.* kernel files are probably a different version, and/or you may have multiple 4.15.* kernel versions). Basically don't do that if you aren't absolutely certain you know what you are doing!!! See ... l-of-16-04 for a bit more info on this subject, and if you choose to do this anyway and bork your system you'll have my sympathy, but unfortunately I don't know enough about Linux to help dig you out of that hole.

I'm perfectly happy staying with the non-HWE (4.4.*) kernel series for now. Not sure what I am going to do in two years when support for Ubuntu 16.04 ceases but will cross that bridge when I come to it.

If you want to see what HWE kernels you have installed you can run commands like
apt list --installed | grep hwe
apt list --installed | grep 4.15.

Note especially on that last one you may also see some non-kernel-related items. Similarly you can show the non-HWE kernels using
apt list --installed | grep 4.4.

But again you will see some non-kernel-related items that also happen to have a 4.4. in their version number. If you don't see anything starting with linux-headers-, linux-image-, linux-image-extra-, etc. then you don't have any non-HWE kernels and in that case you most certainly DO NOT want to remove your HWE kernel(s) until you rectify that situation! Another way to tell is to hold down the shift key while booting and then select Advanced options for Ubuntu in the grub menu, then it should list all the kernels you can boot into and again if there are no 4.4. kernels and only 4.15 kernels then you don't have any non-HWE kernels installed, and in that case you definitely don't want to remove your HWE kernels (but note that it is unlikely but possible for grub to show old kernels that have been removed, so I'd check both ways to be absolutely certain, or select a 4.4 series kernel from the grub menu and make sure you can actually boot into it and that your system runs normally, and that running uname -a shows that you're running a 4.4 series kernel).
Posts: 27
Joined: Sat Nov 08, 2014 12:46 pm

Re: Drivers won't build (make fails) after Ubuntu kernel upd

Postby Steve77g » Tue Apr 16, 2019 10:02 pm

Thank you to BlueSky. I have Ubuntu 16.04.10 with the Linux 4.4.0 kernel and have been using TBS drivers v160630 successfully for the past 3 years. Of course this stopped after -142.
I downloaded the 4 files directly from the CrazyCat site but the files were 5 times larger and contained a block of corrupted code. So, I tried the links on your post which gave me the correct source code files. After copying carefully into the correct place they compiled first time and I now have my TBS6280 working again. WhooHoo!

TBS - I hope you can incorporate these straightforward changes into your Linux driver files ASAP so that more people can enjoy your product which is technically of excellent quality.
Posts: 1
Joined: Mon Apr 15, 2019 7:25 pm

Re: Drivers won't build (make fails) after Ubuntu kernel upd

Postby easydoor » Tue Apr 30, 2019 10:19 am

For me only command:
Code: Select all
apt-get install --install-recommends linux-generic-hwe-16.04

helped me to compile driver for TBS6909 from file:
Code: Select all
TBS Open Source Linux Driver Offline Package V190415

I had installed kernel but with that version I had error and coudn't compile.
After update to newest version of kernel what is now compile passing without problem.
Posts: 2
Joined: Tue Apr 30, 2019 12:05 am

Re: Drivers won't build (make fails) after Ubuntu kernel upd

Postby avasthisamar » Tue Apr 30, 2019 2:59 pm

Thanks for the update and the information.
android training institute
Last edited by avasthisamar on Thu May 02, 2019 12:21 pm, edited 1 time in total.
Posts: 1
Joined: Tue Apr 30, 2019 2:19 pm

Re: Drivers won't build (make fails) after Ubuntu kernel upd

Postby easydoor » Wed May 01, 2019 9:35 am

Something else I forgot to tell..
It is that it reject to compile till u do not update compiler. This is in case after I updated the kernel.
The command for kernel 4.15.0-48-generic is:
Code: Select all
apt-get install gcc-8 g++-8 -y

I tried to compile even from git:
Code: Select all
git clone
git clone --depth=1 -b latest ./media

and it passed!
Posts: 2
Joined: Tue Apr 30, 2019 12:05 am

Re: Drivers won't build (make fails) after Ubuntu kernel upd

Postby JuhaFinland » Sun Feb 16, 2020 11:43 pm

I have kernel 5.5 and it this patches still valid. How manufacture do not provide adequate driver? In fact I am using SilverBlue Fedora and try open and fork driver and same error. Is there .rpm drivers for a product. Iam ready to give up and find some other manufacture card.
Posts: 2
Joined: Mon Feb 10, 2020 4:43 am


Return to Driver & Software Update

Who is online

Users browsing this forum: No registered users and 2 guests