Drivers compilation failure in RedHat7

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
mcabon
Posts: 7
Joined: Mon 9. Sep 2019, 15:39

Drivers compilation failure in RedHat7

Post by mcabon » Mon 9. Sep 2019, 15:49

Hey everyone.

In first time, thanks for your help.
I have a PCAN-USB that I would like to communicate with a VM in Red Hat7.
I downloaded the drivers: peak-linux-driver-8.9.0.

I did this:
- make clean:

Code: Select all

[root@localhost driver]# make clean
rm -f src/*o src/*~ src/.*cmd *o *ko *~ .*cmd  pcan.mod.c Module.symvers modules.order .cache.mk 
-make:

Code: Select all

[root@localhost driver]# make
***
*** Making pcan driver in chardev mode
***
*** Host machine kernel version=3.10.0-862.el7.x86_64
*** Driver kernel version=3.10.0-862.el7.x86_64 (3.10.0)
*** Path to kernel sources=/lib/modules/3.10.0-862.el7.x86_64/build
*** use KBUILD=yes
*** gcc version=4.8.5
***
make -C /lib/modules/3.10.0-862.el7.x86_64/build  EXTRA_CFLAGS="-I/root/Desktop/peak-linux-driver-8.9.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 SUBDIRS=/root/Desktop/peak-linux-driver-8.9.0/driver
make[1] : on entre dans le répertoire « /usr/src/kernels/3.10.0-862.el7.x86_64 »
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_main.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_fops.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_fifo.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_filter.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_parse.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_sja1000.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_common.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_timing.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcanfd_core.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcanfd_ucan.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_usb_core.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_usb.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_usbpro.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcanfd_usb.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_pci.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcanfd_pci.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_pciec.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_isa.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_dongle.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_pccard_core.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_pccard.o
  LD [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/pcan.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: "pcmcia_dev_present" [/root/Desktop/peak-linux-driver-8.9.0/driver/pcan.ko] undefined!
WARNING: "pcmcia_enable_device" [/root/Desktop/peak-linux-driver-8.9.0/driver/pcan.ko] undefined!
WARNING: "pcmcia_register_driver" [/root/Desktop/peak-linux-driver-8.9.0/driver/pcan.ko] undefined!
WARNING: "pcmcia_request_io" [/root/Desktop/peak-linux-driver-8.9.0/driver/pcan.ko] undefined!
WARNING: "pcmcia_loop_config" [/root/Desktop/peak-linux-driver-8.9.0/driver/pcan.ko] undefined!
WARNING: "pcmcia_unregister_driver" [/root/Desktop/peak-linux-driver-8.9.0/driver/pcan.ko] undefined!
WARNING: "pcmcia_disable_device" [/root/Desktop/peak-linux-driver-8.9.0/driver/pcan.ko] undefined!
  CC      /root/Desktop/peak-linux-driver-8.9.0/driver/pcan.mod.o
  LD [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/pcan.ko
make[1] : on quitte le répertoire « /usr/src/kernels/3.10.0-862.el7.x86_64 »
- make install:

Code: Select all

[root@localhost driver]# make install
Info: /lib/modules/3.10.0-862.el7.x86_64/misc exists.
Info: Left current 'pcan'-entry in /etc/modprobe.d/pcan.conf untouched.
Info: Copied 45-pcan.rules to /etc/udev/rules.d.
Info: mainline drivers removed and blacklisted in
      /etc/modprobe.d/blacklist-peak.conf
depmod: ERROR: Could not create index 'modules.dep'. Output is truncated: No space left on device
make: *** [install_udev] Erreur 1
I don't understand why for the error ...

but for - modprobe pcan :

Code: Select all

[root@localhost driver]# modprobe pcan
[root@localhost driver]# 

and if i check with cat /proc/pcan ...

Code: Select all

[root@localhost driver]# cat /proc/pcan
cat: /proc/pcan: Aucun fichier ou dossier de ce type
[root@localhost driver]# 
so ... someone could you help me ?

thanks so much !

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

Re: Drivers compilation failure in RedHat7

Post by S.Grosjean » Mon 9. Sep 2019, 16:38

Hi,

I think it can't be clearer!

Code: Select all

depmod: ERROR: Could not create index 'modules.dep'. Output is truncated: No space left on device
The installation process has failed because because your hard disk is running out of space. You should exit your VM then enlarge the size of the virtual disk.

Regards,
— Stéphane

mcabon
Posts: 7
Joined: Mon 9. Sep 2019, 15:39

Re: Drivers compilation failure in RedHat7

Post by mcabon » Mon 9. Sep 2019, 17:10

hi,
thanks you for your answer ! :)
so I expanded the size of my VM.
but I still have a mistake. I make the make clean/ make install ok but the pcan modprob makes me a mistake...

-make

Code: Select all

[root@localhost driver]# make 
***
*** Making pcan driver in chardev mode
***
*** Host machine kernel version=3.10.0-862.el7.x86_64
*** Driver kernel version=3.10.0-862.el7.x86_64 (3.10.0)
*** Path to kernel sources=/lib/modules/3.10.0-862.el7.x86_64/build
*** use KBUILD=yes
*** gcc version=4.8.5
***
make -C /lib/modules/3.10.0-862.el7.x86_64/build  EXTRA_CFLAGS="-I/root/Desktop/peak-linux-driver-8.9.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 SUBDIRS=/root/Desktop/peak-linux-driver-8.9.0/driver
make[1] : on entre dans le répertoire « /usr/src/kernels/3.10.0-862.el7.x86_64 »
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_main.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_fops.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_fifo.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_filter.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_parse.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_sja1000.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_common.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_timing.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcanfd_core.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcanfd_ucan.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_usb_core.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_usb.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_usbpro.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcanfd_usb.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_pci.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcanfd_pci.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_pciec.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_isa.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_dongle.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_pccard_core.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_pccard.o
  LD [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/pcan.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: "pcmcia_dev_present" [/root/Desktop/peak-linux-driver-8.9.0/driver/pcan.ko] undefined!
WARNING: "pcmcia_enable_device" [/root/Desktop/peak-linux-driver-8.9.0/driver/pcan.ko] undefined!
WARNING: "pcmcia_register_driver" [/root/Desktop/peak-linux-driver-8.9.0/driver/pcan.ko] undefined!
WARNING: "pcmcia_request_io" [/root/Desktop/peak-linux-driver-8.9.0/driver/pcan.ko] undefined!
WARNING: "pcmcia_loop_config" [/root/Desktop/peak-linux-driver-8.9.0/driver/pcan.ko] undefined!
WARNING: "pcmcia_unregister_driver" [/root/Desktop/peak-linux-driver-8.9.0/driver/pcan.ko] undefined!
WARNING: "pcmcia_disable_device" [/root/Desktop/peak-linux-driver-8.9.0/driver/pcan.ko] undefined!
  CC      /root/Desktop/peak-linux-driver-8.9.0/driver/pcan.mod.o
  LD [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/pcan.ko
make[1] : on quitte le répertoire « /usr/src/kernels/3.10.0-862.el7.x86_64 »
-> I have a question: why we have a WARNING with pcmcia ?

-make install

Code: Select all

[root@localhost driver]# make install
Info: /lib/modules/3.10.0-862.el7.x86_64/misc exists.
Info: Left current 'pcan'-entry in /etc/modprobe.d/pcan.conf untouched.
Info: Copied 45-pcan.rules to /etc/udev/rules.d.
Info: mainline drivers removed and blacklisted in
      /etc/modprobe.d/blacklist-peak.conf

-modprobe pcan

Code: Select all

[root@localhost driver]# modprobe pcan
modprobe: ERROR: could not insert 'pcan': Unknown symbol in module, or unknown parameter (see dmesg)
modprobe: ERROR: Error running install command for pcan
modprobe: ERROR: could not insert 'pcan': Operation not permitted
- cat /etc/modprobe.d/pcan.conf

Code: Select all

[root@localhost driver]# cat /etc/modprobe.d/pcan.conf

# pcan - automatic made entry, begin --------
# if required add options and remove comment 
options pcan type=isa,sa irq=10,5 io=0x300, 0x320                      
install pcan modprobe --ignore-install pcan
# pcan - automatic made entry, end ----------

[root@localhost driver]# 
thanks for your helps

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

Re: Drivers compilation failure in RedHat7

Post by M.Maidhof » Mon 9. Sep 2019, 17:28

Hi,

please build the driver without PCMCIA support:

make PCC=NO

regards

Michael

mcabon
Posts: 7
Joined: Mon 9. Sep 2019, 15:39

Re: Drivers compilation failure in RedHat7

Post by mcabon » Mon 9. Sep 2019, 17:36

i build with
make PCC=NO

Code: Select all

[root@localhost driver]# make PCC=NO
***
*** Making pcan driver in chardev mode
***
*** Host machine kernel version=3.10.0-862.el7.x86_64
*** Driver kernel version=3.10.0-862.el7.x86_64 (3.10.0)
*** Path to kernel sources=/lib/modules/3.10.0-862.el7.x86_64/build
*** use KBUILD=yes
*** gcc version=4.8.5
***
make -C /lib/modules/3.10.0-862.el7.x86_64/build  EXTRA_CFLAGS="-I/root/Desktop/peak-linux-driver-8.9.0/driver -DNO_DEBUG -DMODVERSIONS -DPARPORT_SUBSYSTEM -DUSB_SUPPORT -DPCI_SUPPORT -DPCIEC_SUPPORT -DISA_SUPPORT -DDONGLE_SUPPORT -DNO -DNO_NETDEV_SUPPORT -DNO_RT " V=0 modules SUBDIRS=/root/Desktop/peak-linux-driver-8.9.0/driver
make[1] : on entre dans le répertoire « /usr/src/kernels/3.10.0-862.el7.x86_64 »
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_main.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_fops.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_fifo.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_filter.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_parse.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_sja1000.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_common.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_timing.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcanfd_core.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcanfd_ucan.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_usb_core.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_usb.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_usbpro.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcanfd_usb.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_pci.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcanfd_pci.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_pciec.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_isa.o
  CC [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/src/pcan_dongle.o
  LD [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/pcan.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /root/Desktop/peak-linux-driver-8.9.0/driver/pcan.mod.o
  LD [M]  /root/Desktop/peak-linux-driver-8.9.0/driver/pcan.ko
make[1] : on quitte le répertoire « /usr/src/kernels/3.10.0-862.el7.x86_64 »
-make install

Code: Select all

[root@localhost driver]# make install
Info: /lib/modules/3.10.0-862.el7.x86_64/misc exists.
Info: Left current 'pcan'-entry in /etc/modprobe.d/pcan.conf untouched.
Info: Copied 45-pcan.rules to /etc/udev/rules.d.
Info: mainline drivers removed and blacklisted in
      /etc/modprobe.d/blacklist-peak.conf
-modprobe pcan

Code: Select all

[root@localhost driver]# modprobe pcan
modprobe: ERROR: could not insert 'pcan': Invalid argument
modprobe: ERROR: Error running install command for pcan
modprobe: ERROR: could not insert 'pcan': Operation not permitted
[root@localhost driver]# 
i don't understand why modprobe pcan they are error :/
thanks, Mylene

mcabon
Posts: 7
Joined: Mon 9. Sep 2019, 15:39

Re: Drivers compilation failure in RedHat7

Post by mcabon » Tue 10. Sep 2019, 09:00

hi everyone,

i tried this :
- modinfo pcan.ko | grep -e "^depends:"

Code: Select all

[root@localhost driver]# modinfo pcan.ko | grep -e "^depends:"
depends:        i2c-core,parport,i2c-algo-bit
[root@localhost driver]# sudo modprobe i2c-core parport i2c-algo-bit
[root@localhost driver]# sudo insmod pcan.ko
[root@localhost driver]# sudo modprobe pcan
and when i test :
- cat /proc/pcan

Code: Select all

[root@localhost driver]#  cat /proc/pcan
*------------- PEAK-System CAN interfaces (www.peak-system.com) -------------
*------------- Release_20190802_n (8.9.0) Sep 10 2019 08:49:30 --------------
*---------------- [mod] [isa] [pci] [pec] [dng] [par] [usb] -----------------
*--------------------- 1 interfaces @ major 242 found -----------------------
*n -type- -ndev- --base-- irq --btr- --read-- --write- --irqs-- -errors- status
32    usb   -NA- ffffffff 000 0x001c 00000000 00000000 00000000 00000000 0x0000
I thinks it's good :)
thanks for your help

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

Re: Drivers compilation failure in RedHat7

Post by S.Grosjean » Tue 10. Sep 2019, 10:06

Hi,

FYI, you don't have to insmod then modprobe.

Code: Select all

modprobe: ERROR: could not insert 'pcan': Operation not permitted
This kind of error comes from the fact that you don't have the root rights to run the modprobe command. Therefore, to use the modprobe commmand (as well as the insmod one), you have to use the "sudo" command.

Thus,

Code: Select all

# sudo modprobe pcan
is enough.

Regards,
— Stéphane

mcabon
Posts: 7
Joined: Mon 9. Sep 2019, 15:39

Re: Drivers compilation failure in RedHat7

Post by mcabon » Tue 10. Sep 2019, 10:14

hooo, okay :)

Thanks for your explication ! :)

Post Reply