Can't install drivers on Red Hat 6.9

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
rhall
Posts: 2
Joined: Tue 19. Sep 2017, 16:01

Can't install drivers on Red Hat 6.9

Post by rhall » Tue 19. Sep 2017, 16:08

I'm trying to install driver version 8.4.0 on Red Hat 6.9. When I run the make command I get the following errors.

Code: Select all

[root@AEP peak-linux-driver-8.4.0]# make
make[1]: Entering directory `/root/Desktop/peak-linux-driver-8.4.0/driver'
make[1]: Nothing to be done for `depend'.
make[1]: Leaving directory `/root/Desktop/peak-linux-driver-8.4.0/driver'
make[1]: Entering directory `/root/Desktop/peak-linux-driver-8.4.0/driver'
***
*** Host machine kernel version=2.6.32-696.10.1.el6.x86_64
*** Driver kernel version=2.6.32-696.10.1.el6.x86_64 (2.6.32)
*** Path to kernel sources=/lib/modules/2.6.32-696.10.1.el6.x86_64/build
*** use KBUILD=yes
*** cc version=4.4.7
***
make -C /lib/modules/2.6.32-696.10.1.el6.x86_64/build  SUBDIRS=/root/Desktop/peak-linux-driver-8.4.0/driver        EXTRA_CFLAGS="-I/root/Desktop/peak-linux-driver-8.4.0/driver        -DNO_DEBUG -DMODVERSIONS -DPARPORT_SUBSYSTEM -DUSB_SUPPORT -DPCI_SUPPORT -DPCIEC_SUPPORT -DISA_SUPPORT -DDONGLE_SUPPORT -DPCCARD_SUPPORT -DNO_NETDEV_SUPPORT	 -DNO_RT " V=0 modules
make[2]: Entering directory `/usr/src/kernels/2.6.32-696.10.1.el6.x86_64'
  CC [M]  /root/Desktop/peak-linux-driver-8.4.0/driver/src/pcan_main.o
  CC [M]  /root/Desktop/peak-linux-driver-8.4.0/driver/src/pcan_fops.o
In file included from /root/Desktop/peak-linux-driver-8.4.0/driver/src/pcan_fops.c:558:
/root/Desktop/peak-linux-driver-8.4.0/driver/src/pcan_fops_linux.c:903: error: field ‘timestamp’ has incomplete type
/root/Desktop/peak-linux-driver-8.4.0/driver/src/pcan_fops_linux.c:915: error: field ‘tv_init’ has incomplete type
/root/Desktop/peak-linux-driver-8.4.0/driver/src/pcan_fops_linux.c:917: error: expected specifier-qualifier-list before ‘compat_int_t’
/root/Desktop/peak-linux-driver-8.4.0/driver/src/pcan_fops_linux.c: In function ‘pcan_compat_ioctl’:
/root/Desktop/peak-linux-driver-8.4.0/driver/src/pcan_fops_linux.c:1200: error: implicit declaration of function ‘compat_ptr’
/root/Desktop/peak-linux-driver-8.4.0/driver/src/pcan_fops_linux.c:1200: warning: initialization makes pointer from integer without a cast
/root/Desktop/peak-linux-driver-8.4.0/driver/src/pcan_fops_linux.c:1229: error: ‘struct pcanfd_state32’ has no member named ‘bus_state’
/root/Desktop/peak-linux-driver-8.4.0/driver/src/pcan_fops_linux.c:1232: error: ‘struct pcanfd_state32’ has no member named ‘bus_state’
In file included from /root/Desktop/peak-linux-driver-8.4.0/driver/src/pcan_fops.c:558:
/root/Desktop/peak-linux-driver-8.4.0/driver/src/pcan_fops_linux.c:1357:2: warning: #warning "Compiling for __LP64__"
make[3]: *** [/root/Desktop/peak-linux-driver-8.4.0/driver/src/pcan_fops.o] Error 1
make[2]: *** [_module_/root/Desktop/peak-linux-driver-8.4.0/driver] Error 2
make[2]: Leaving directory `/usr/src/kernels/2.6.32-696.10.1.el6.x86_64'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/Desktop/peak-linux-driver-8.4.0/driver'
make[1]: Entering directory `/root/Desktop/peak-linux-driver-8.4.0/lib'
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 `/root/Desktop/peak-linux-driver-8.4.0/lib'
make[1]: Entering directory `/root/Desktop/peak-linux-driver-8.4.0/test'
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 `/root/Desktop/peak-linux-driver-8.4.0/test'
[root@AEP peak-linux-driver-8.4.0]# 
I'm not sure what I'm doing wrong any help is appreciated. Thank you.

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

Re: Can't install drivers on Red Hat 6.9

Post by S.Grosjean » Tue 19. Sep 2017, 16:34

Hi,

You're running a very old Kernel (2.6.32). We try hard to support a large number of Kernels among a large number of distros... We especially are able to compile our driver v8.4.0 against 2.6.32 LTE, which support has been stopped at the beginning of this year...

Anyway, the COMPAT config option in your Kernel seems not working as it should. If you don't plan to run any 32-bit application over the pcan driver, you can try rebuilding it like that:

Code: Select all

$ cd peak-linux-driver-8.4.0/driver
$ make COMPAT_SUPPORT=NO
$ sudo make install
Regards,

Stéphane
— Stéphane

rhall
Posts: 2
Joined: Tue 19. Sep 2017, 16:01

Re: Can't install drivers on Red Hat 6.9

Post by rhall » Mon 2. Oct 2017, 19:00

That worked. Thank you

Post Reply