Driver 8.3.1 netdev mode build error for kernel 3.0

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
F.Benad
Posts: 5
Joined: Tue 21. Jun 2016, 09:23

Driver 8.3.1 netdev mode build error for kernel 3.0

Post by F.Benad » Wed 12. Apr 2017, 10:17

Hello,

building the current PCAN driver 8.3.1 for SUSE Linux Enterprise 11 SP4 kernel 3.0.101 fails when netdev mode is required.

Code: Select all

be23723@test2:~/driver/pcan/peak-linux-driver-8.3.1> make NET=NETDEV_SUPPORT
make[1]: Entering directory `/home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver'
make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
make[1]: Nothing to be done for `depend'.
make[1]: Leaving directory `/home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver'
make[1]: Entering directory `/home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver'
make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
***
*** Host machine kernel version=3.0.101-rt130-65-rt
*** Driver kernel version=3.0.101
*** Path to kernel sources=/lib/modules/3.0.101-rt130-65-rt/build
*** use KBUILD=yes
*** cc version=4.3
***
make -C /lib/modules/3.0.101-rt130-65-rt/build  SUBDIRS=/home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver        EXTRA_CFLAGS="-I/home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver        -DNO_DEBUG -DMODVERSIONS -DPARPORT_SUBSYSTEM -DUSB_SUPPORT -DPCI_SUPPORT -DPCIEC_SUPPORT -DISA_SUPPORT -DDONGLE_SUPPORT -DPCCARD_SUPPORT -DNETDEV_SUPPORT -DNO_RT " V=0 modules
make[2]: Entering directory `/usr/src/linux-3.0.101-rt130-65-rt-obj/x86_64/rt'
make -C ../../../linux-3.0.101-rt130-65-rt O=/usr/src/linux-3.0.101-rt130-65-rt-obj/x86_64/rt/. modules
  CC [M]  /home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_main.o
  CC [M]  /home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_fops.o
In file included from /home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_fops.c:550:
/home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_fops_linux.c:1357:2: warning: #warning "Compiling for __LP64__"
  CC [M]  /home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_fifo.o
  CC [M]  /home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_filter.o
  CC [M]  /home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_parse.o
  CC [M]  /home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_sja1000.o
  CC [M]  /home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_common.o
  CC [M]  /home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_timing.o
  CC [M]  /home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcanfd_core.o
  CC [M]  /home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcanfd_ucan.o
  CC [M]  /home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_pci.o
  CC [M]  /home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcanfd_pci.o
  CC [M]  /home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_pciec.o
  CC [M]  /home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_isa.o
  CC [M]  /home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_dongle.o
  CC [M]  /home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_pccard_core.o
  CC [M]  /home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_pccard.o
  CC [M]  /home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_usb_core.o
  CC [M]  /home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_usb.o
  CC [M]  /home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_usbpro.o
  CC [M]  /home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcanfd_usb.o
  CC [M]  /home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_netdev.o
/home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_netdev.c: In function ‘pcan_netdev_rx’:
/home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_netdev.c:398: error: ‘priv’ undeclared (first use in this function)
/home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_netdev.c:398: error: (Each undeclared identifier is reported only once
/home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_netdev.c:398: error: for each function it appears in.)
/home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_netdev.c: In function ‘pcan_netdev_restart_work’:
/home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_netdev.c:831: error: ‘struct can_priv’ has no member named ‘restart_work’
/home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_netdev.c:831: warning: type defaults to ‘int’ in declaration of ‘__mptr’
/home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_netdev.c:831: warning: initialization from incompatible pointer type
/home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_netdev.c:831: error: ‘struct can_priv’ has no member named ‘restart_work’
/home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_netdev.c: In function ‘pcan_netdev_register’:
/home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_netdev.c:958: error: ‘struct can_priv’ has no member named ‘restart_work’
/home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_netdev.c:958: error: ‘struct can_priv’ has no member named ‘restart_work’
/home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_netdev.c:958: error: ‘struct can_priv’ has no member named ‘restart_work’
/home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_netdev.c:958: error: ‘struct can_priv’ has no member named ‘restart_work’
/home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_netdev.c:958: error: ‘struct can_priv’ has no member named ‘restart_work’
make[5]: *** [/home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver/src/pcan_netdev.o] Error 1
make[4]: *** [_module_/home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver] Error 2
make[3]: *** [sub-make] Error 2
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/linux-3.0.101-rt130-65-rt-obj/x86_64/rt'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/be23723/driver/pcan/peak-linux-driver-8.3.1/driver'
make[1]: Entering directory `/home/be23723/driver/pcan/peak-linux-driver-8.3.1/lib'
make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
cc -o libpcan.so.0.6 -DNO_RT -I. -I../driver -fPIC -shared -Wall   src/libpcan.c  -Wl,-soname,libpcan.so.0
ln -sf libpcan.so.0.6 libpcan.so
cc -o libpcanfd.so.0.1 -DNO_RT -I. -I../driver -fPIC -shared -Wall   -DPCANFD_OLD_STYLE_API src/libpcanfd.c  -Wl,-soname,libpcanfd.so.0
ln -sf libpcanfd.so.0.1 libpcanfd.so
make[1]: Leaving directory `/home/be23723/driver/pcan/peak-linux-driver-8.3.1/lib'
make[1]: Entering directory `/home/be23723/driver/pcan/peak-linux-driver-8.3.1/test'
make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
cc -DNO_RT -g -I. -I../lib -I../driver   src/receivetest.c src/common.c -lpcanfd  -L../lib  -o receivetest
cc -DNO_RT -g -I. -I../lib -I../driver   src/transmitest.cpp src/common.c src/parser.cpp -lpcanfd -lstdc++  -L../lib  -o transmitest
cc -DNO_RT -g -I. -I../lib -I../driver   src/bitratetest.c src/common.c -lpcanfd  -L../lib  -o bitratetest
cc -DNO_RT -g -I. -I../lib -I../driver   src/filtertest.cpp src/common.c -lpcanfd -lstdc++  -L../lib  -o filtertest
cc -DNO_RT -g -I. -I../lib -I../driver   src/pcan-settings.c -lpopt  -L../lib  -g -o pcan-settings
cc -DNO_RT -g -I. -I../lib -I../driver   src/pcanfdtst.c -lpcanfd  -L../lib  -o pcanfdtst
make[1]: Leaving directory `/home/be23723/driver/pcan/peak-linux-driver-8.3.1/test'
It looks like there are some missing ifdef to exclude CAN-FD support for the legacy kernel 3.0.

Thanks.
F.Benad

M.Maidhof
Support
Support
Posts: 1753
Joined: Wed 22. Sep 2010, 14:00

Re: Driver 8.3.1 netdev mode build error for kernel 3.0

Post by M.Maidhof » Wed 12. Apr 2017, 14:03

Hi,

yes, this could be possible. We cannot support every older kernel with our newest driver interface. Simply use an older driver, to prevent this problem. If you want to use FD, you need to use a newer kernel version.

regards

Michael

Post Reply