Build issues with 8.10.1 driver against kernel 5.6.8

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
PlasticJesus
Posts: 2
Joined: Tue 23. Jun 2020, 01:53

Build issues with 8.10.1 driver against kernel 5.6.8

Post by PlasticJesus » Tue 23. Jun 2020, 02:04

Hi all.

I just tired to build the 8.10.1 driver on my newly updated Fedora and got a load of errors related to struct timeval. After doing a bunch of digging, it looks like the issues are related to some of the first load of 2038 time rollover fixes introduced into the mainline kernel - specifically, the deprecation of many of the timekeeping functions. https://www.kernel.org/doc/html/latest/ ... eping.html

The symptom is a bunch of errors like this:

Code: Select all

In file included from /home/spunak/tmp/peak-linux-driver-8.10.1/driver/src/pcan_main.c:36:
/home/spunak/tmp/peak-linux-driver-8.10.1/driver/src/pcan_common.h:126:40: warning: ‘struct timeval’ declared inside parameter list will not be visible outside of this definition or declaration
  126 | static inline u64 timeval_to_us(struct timeval *tv)
      |                                        ^~~~~~~
/home/spunak/tmp/peak-linux-driver-8.10.1/driver/src/pcan_common.h: In function ‘timeval_to_us’:
/home/spunak/tmp/peak-linux-driver-8.10.1/driver/src/pcan_common.h:128:18: error: dereferencing pointer to incomplete type ‘struct timeval’
  128 |  return ((u64 )tv->tv_sec * USEC_PER_SEC) + tv->tv_usec;
I'm not sure if others have encountered these issues yet, or if they are already being addressed in new driver code. Please let me know.

Regards,
SP

User avatar
S.Grosjean
Software Development
Software Development
Posts: 357
Joined: Wed 4. Jul 2012, 17:02

Re: Build issues with 8.10.1 driver against kernel 5.6.8

Post by S.Grosjean » Tue 23. Jun 2020, 12:21

Hi,

5.8 includes lots of other changes. We're on our way to include them to release a new version of the pcan driver asap.

Stay tuned!
— Stéphane

PlasticJesus
Posts: 2
Joined: Tue 23. Jun 2020, 01:53

Re: Build issues with 8.10.1 driver against kernel 5.6.8

Post by PlasticJesus » Fri 26. Jun 2020, 23:27

Thanks for the reply Stephane.
5.8 includes lots of other changes.
Just to be clear, this is not a kernel 5.8 problem only. It will not build against 5.6.8.
5.5 hit end of life a few weeks ago, so for now the workaround is to build it against the EOL 5.5 kernel.
We're on our way to include them to release a new version of the pcan driver asap.
Any idea on time frame (weeks vs. months)? If it is way down the road, I may be able to make the changes myself.

Regards,
SP

User avatar
S.Grosjean
Software Development
Software Development
Posts: 357
Joined: Wed 4. Jul 2012, 17:02

Re: Build issues with 8.10.1 driver against kernel 5.6.8

Post by S.Grosjean » Mon 29. Jun 2020, 15:27

Hi,

Yep, we're talking about 5.8 but we've seen that your problem comes with 5.6.8.

The next release of the driver should come during this week. This version will also support the incoming 5.8 in which lots of codes have been changed and/or removed. Therefore we must take care of what we will provide.

Stay tuned!

Regards,
— Stéphane

Post Reply