Cannot install peak-linux-driver

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
jwillnetwork
Posts: 5
Joined: Mon 14. Jun 2021, 14:30

Cannot install peak-linux-driver

Post by jwillnetwork » Mon 14. Jun 2021, 15:47

I extracted the peak-linux-driver-8.12.0 folder in the home folder

Here's output for sudo make clean all :

Code: Select all

make[1]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/driver'
rm -f src/*o src/*~ src/.*cmd *o *ko *~ .*cmd  pcan.mod.c Module.symvers modules.order .cache.mk
make[1]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/driver'
make[1]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/lib'
rm -f src/*~
rm -rf obj lib obj32 lib32
make[1]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/lib'
make[1]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/test'
rm -f src/*~ src/*.o *~ receivetest transmitest bitratetest filtertest pcanfdtst pcan-settings receivetest_posix transmitest_posix
make[1]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/test'
make[1]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic'
make[2]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/pcanbasic'
rm -f src/*~ out/*.o *~ *.so.* *.so
make[2]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/pcanbasic'
make[2]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/pcaninfo'
rm -f src/*~ src/*.o ../pcanbasic/src/*~ ../pcanbasic/src/*.o *~ *.so.* *.so pcaninfo.1.2.0 pcaninfo
make[2]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/pcaninfo'
make[2]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/examples'
make[3]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/examples/c++'
rm -f src/*~ src/*.o *~ pcanwrite pcanread pcaneventread pcaneventwrite
make[3]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/examples/c++'
make[3]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/examples/python'
rm -f *.pyc
make[3]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/examples/python'
make[2]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/examples'
make[1]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic'
make[1]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/driver'
***
*** Making pcan driver in chardev mode
***
*** Host OS Release=Ubuntu v18.04
*** Host machine kernel version=5.4.0-74-generic
*** Driver kernel version=5.4.0-74-generic (5.4.0)
*** Path to kernel sources=/usr/src/linux-headers-5.4.0-74-generic
*** use KBUILD=yes
*** use DKMS=no
*** gcc version=7
***
make -C /usr/src/linux-headers-5.4.0-74-generic  EXTRA_CFLAGS="-I/home/qo313/peak-linux-driver-8.12.0/driver -DNO_DEBUG -DMODVERSIONS -DNO_PARPORT_SUBSYSTEM -DUSB_SUPPORT -DPCI_SUPPORT -DPCIEC_SUPPORT -DISA_SUPPORT -DNO_DONGLE_SUPPORT -DNO_PCCARD_SUPPORT -DNO_NETDEV_SUPPORT -DNO_RT   -Wno-date-time" V=0 modules M=/home/qo313/peak-linux-driver-8.12.0/driver
make[2]: Entering directory '/usr/src/linux-headers-5.4.0-74-generic'
  CC [M]  /home/qo313/peak-linux-driver-8.12.0/driver/src/pcan_main.o
  CC [M]  /home/qo313/peak-linux-driver-8.12.0/driver/src/pcan_fops.o
  CC [M]  /home/qo313/peak-linux-driver-8.12.0/driver/src/pcan_fifo.o
  CC [M]  /home/qo313/peak-linux-driver-8.12.0/driver/src/pcan_filter.o
  CC [M]  /home/qo313/peak-linux-driver-8.12.0/driver/src/pcan_parse.o
  CC [M]  /home/qo313/peak-linux-driver-8.12.0/driver/src/pcan_sja1000.o
  CC [M]  /home/qo313/peak-linux-driver-8.12.0/driver/src/pcan_common.o
  CC [M]  /home/qo313/peak-linux-driver-8.12.0/driver/src/pcan_timing.o
  CC [M]  /home/qo313/peak-linux-driver-8.12.0/driver/src/pcanfd_core.o
  CC [M]  /home/qo313/peak-linux-driver-8.12.0/driver/src/pcanfd_ucan.o
  CC [M]  /home/qo313/peak-linux-driver-8.12.0/driver/src/pcan_usb_core.o
  CC [M]  /home/qo313/peak-linux-driver-8.12.0/driver/src/pcan_usb.o
  CC [M]  /home/qo313/peak-linux-driver-8.12.0/driver/src/pcan_usbpro.o
  CC [M]  /home/qo313/peak-linux-driver-8.12.0/driver/src/pcanfd_usb.o
  CC [M]  /home/qo313/peak-linux-driver-8.12.0/driver/src/pcan_pci.o
  CC [M]  /home/qo313/peak-linux-driver-8.12.0/driver/src/pcanfd_pci.o
  CC [M]  /home/qo313/peak-linux-driver-8.12.0/driver/src/pcan_pci_spi.o
  CC [M]  /home/qo313/peak-linux-driver-8.12.0/driver/src/pcan_pciec.o
  CC [M]  /home/qo313/peak-linux-driver-8.12.0/driver/src/pcan_isa.o
  LD [M]  /home/qo313/peak-linux-driver-8.12.0/driver/pcan.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC [M]  /home/qo313/peak-linux-driver-8.12.0/driver/pcan.mod.o
  LD [M]  /home/qo313/peak-linux-driver-8.12.0/driver/pcan.ko
make[2]: Leaving directory '/usr/src/linux-headers-5.4.0-74-generic'
make[1]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/driver'
make[1]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/lib'
***
*** Making pcan libraries
***
*** gcc version: 7
***
gcc -DNO_RT -I. -I../driver -fPIC -Wall -Wcast-align -Wredundant-decls  -DPCANFD_OLD_STYLE_API -c src/libpcan.c -o obj/libpcan.o
gcc -shared -Wl,-soname,libpcan.so -o lib/libpcan.so.6 obj/libpcan.o 
cd lib/; ln -sf libpcan.so.6 libpcan.so
gcc -DNO_RT -I. -I../driver -fPIC -Wall -Wcast-align -Wredundant-decls  -DPCANFD_OLD_STYLE_API -c src/libpcanfd.c -o obj/libpcanfd.o
gcc -shared -Wl,-soname,libpcanfd.so -o lib/libpcanfd.so.8 obj/libpcanfd.o 
cd lib/; ln -sf libpcanfd.so.8 libpcanfd.so
ar rcs lib/libpcanfd.a obj/libpcanfd.o

Info: only 64-bit version of libpcan can be built. 32-bit version of libpcan can't because the 32-bit version of libc seems not being installed...

make[1]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/lib'
make[1]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/test'
***
*** Making example and test programs
***
*** gcc version: 7
***
gcc -DNO_RT -I. -I../lib -I../driver  -g src/receivetest.c src/common.c -lpcanfd  -L../lib/lib -Wl,-rpath ../lib/lib -o receivetest
g++ -DNO_RT -I. -I../lib -I../driver  -g src/transmitest.cpp src/common.c src/parser.cpp -lstdc++ -lpcanfd  -L../lib/lib -Wl,-rpath ../lib/lib -o transmitest
gcc -DNO_RT -I. -I../lib -I../driver  -g src/bitratetest.c src/common.c -lpcanfd  -L../lib/lib -Wl,-rpath ../lib/lib -o bitratetest
g++ -DNO_RT -I. -I../lib -I../driver  -g src/filtertest.cpp src/common.c -lstdc++ -lpcanfd  -L../lib/lib -Wl,-rpath ../lib/lib -o filtertest
gcc -DNO_RT -I. -I../lib -I../driver  -g src/pcanfdtst.c -lpcanfd  -L../lib/lib -Wl,-rpath ../lib/lib -lpthread -o pcanfdtst
gcc -DNO_RT -I. -I../lib -I../driver  -g src/pcan-settings.c -lpopt -lpcanfd  -L../lib/lib -Wl,-rpath ../lib/lib -g -o pcan-settings
gcc -DNO_RT -I. -I../lib -I../driver  -g src/receivetest_posix.c src/common.c -lpcanfd  -L../lib/lib -Wl,-rpath ../lib/lib -lpthread -o receivetest_posix
g++ -DNO_RT -I. -I../lib -I../driver  -g src/transmitest_posix.cpp src/common.c src/parser.cpp -lstdc++ -lpcanfd  -L../lib/lib -Wl,-rpath ../lib/lib -lpthread -o transmitest_posix
make[1]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/test'
make[1]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic'
make[2]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/pcanbasic'
***
*** Making PCANBasic library with FD support (PCAN driver >= 8.0)
***
*** target=libpcanbasic
*** version=4.4.2
*** PCAN_ROOT=/home/qo313/peak-linux-driver-8.12.0
*** gcc version=7
***
mkdir -p out
gcc -fPIC -shared "-O2" -Wall -Wcast-align -Wcast-qual -Wimplicit  -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wunused -DNO_RT -I/home/qo313/peak-linux-driver-8.12.0/driver -I/home/qo313/peak-linux-driver-8.12.0/lib   -c src/libpcanbasic.c -o out/libpcanbasic.o
gcc -fPIC -shared "-O2" -Wall -Wcast-align -Wcast-qual -Wimplicit  -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wunused -DNO_RT -I/home/qo313/peak-linux-driver-8.12.0/driver -I/home/qo313/peak-linux-driver-8.12.0/lib   -c src/pcaninfo.c -o out/pcaninfo.o
gcc -fPIC -shared "-O2" -Wall -Wcast-align -Wcast-qual -Wimplicit  -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wunused -DNO_RT -I/home/qo313/peak-linux-driver-8.12.0/driver -I/home/qo313/peak-linux-driver-8.12.0/lib   -c src/pcanlog.c -o out/pcanlog.o
gcc -fPIC -shared "-O2" -Wall -Wcast-align -Wcast-qual -Wimplicit  -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wunused -DNO_RT -I/home/qo313/peak-linux-driver-8.12.0/driver -I/home/qo313/peak-linux-driver-8.12.0/lib   -c src/pcbcore.c -o out/pcbcore.o
gcc -fPIC -shared "-O2" -Wall -Wcast-align -Wcast-qual -Wimplicit  -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wunused -DNO_RT -I/home/qo313/peak-linux-driver-8.12.0/driver -I/home/qo313/peak-linux-driver-8.12.0/lib   -c src/pcblog.c -o out/pcblog.o
gcc -fPIC -shared "-O2" -Wall -Wcast-align -Wcast-qual -Wimplicit  -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wunused -DNO_RT -I/home/qo313/peak-linux-driver-8.12.0/driver -I/home/qo313/peak-linux-driver-8.12.0/lib   -c src/pcbtrace.c -o out/pcbtrace.o
gcc -fPIC -shared "-O2" -Wall -Wcast-align -Wcast-qual -Wimplicit  -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wunused -DNO_RT -I/home/qo313/peak-linux-driver-8.12.0/driver -I/home/qo313/peak-linux-driver-8.12.0/lib   -c /home/qo313/peak-linux-driver-8.12.0/lib/src/libpcanfd.c -o out/libpcanfd.o
gcc -shared -Wl,-soname,libpcanbasic.so -o libpcanbasic.so.4.4.2 out/libpcanbasic.o out/pcaninfo.o out/pcanlog.o out/pcbcore.o out/pcblog.o out/pcbtrace.o out/libpcanfd.o -lm    
ln -sf libpcanbasic.so.4.4.2 libpcanbasic.so
make[2]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/pcanbasic'
make[2]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/pcaninfo'
*** Making PCANINFO
***
*** target=pcaninfo
*** version=1.2.0
*** PCAN_ROOT=/home/qo313/peak-linux-driver-8.12.0
*** gcc version=7
***
gcc src/main.c ../pcanbasic/src/pcanlog.c ../pcanbasic/src/pcblog.c ../pcanbasic/src/pcbtrace.c ../pcanbasic/src/pcbcore.c ../pcanbasic/src/pcaninfo.c /home/qo313/peak-linux-driver-8.12.0/lib/src/libpcanfd.c -O2 -Wall -Wcast-align -Wcast-qual -Wimplicit  -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wunused -DNO_RT -I../pcanbasic/src -I/home/qo313/peak-linux-driver-8.12.0/driver -I/home/qo313/peak-linux-driver-8.12.0/lib  -lm -ldl  -o pcaninfo.1.2.0
ln -sf pcaninfo.1.2.0 pcaninfo
make[2]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/pcaninfo'
make[2]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/examples'
make[3]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/examples/c++'
***
*** Making PCANBasic C++ examples
***
*** target=pcanwrite pcanread pcaneventread pcaneventwrite
*** g++ version=7
*** PCANBASIC_ROOT=../../pcanbasic
***
g++ -I../../pcanbasic -I/home/qo313/peak-linux-driver-8.12.0/driver -DNO_RT src/pcanwrite.cpp -L../../pcanbasic -Wl,-rpath ../../pcanbasic -lpcanbasic -o pcanwrite
g++ -I../../pcanbasic -I/home/qo313/peak-linux-driver-8.12.0/driver -DNO_RT src/pcanread.cpp -L../../pcanbasic -Wl,-rpath ../../pcanbasic -lpcanbasic -o pcanread
g++ -I../../pcanbasic -I/home/qo313/peak-linux-driver-8.12.0/driver -DNO_RT src/pcaneventread.cpp -L../../pcanbasic -Wl,-rpath ../../pcanbasic -lpcanbasic -o pcaneventread
g++ -I../../pcanbasic -I/home/qo313/peak-linux-driver-8.12.0/driver -DNO_RT src/pcaneventwrite.cpp -L../../pcanbasic -Wl,-rpath ../../pcanbasic -lpcanbasic -o pcaneventwrite
make[3]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/examples/c++'
make[3]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/examples/python'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/examples/python'
make[2]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/examples'
make[1]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic'
and then the output for sudo make install

Code: Select all

make[1]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/driver'
Info: Left current 'pcan'-entry in /etc/modprobe.d/pcan.conf untouched.
mkdir -p /usr/local/bin
cp -f udev/pcan_usb_minor_check.bash /usr/local/bin
chmod 744 /usr/local/bin/pcan_usb_minor_check.bash
cp -f udev/45-pcan.rules /etc/udev/rules.d
Info: Copied 45-pcan.rules to /etc/udev/rules.d.
cp -f udev/blacklist-peak.conf /etc/modprobe.d
chmod 644 /etc/modprobe.d/blacklist-peak.conf
Info: mainline drivers removed and blacklisted in
      /etc/modprobe.d/blacklist-peak.conf
udevadm control --reload-rules
- manually installing pcan under /lib/modules/5.4.0-74-generic/misc...
- Building dependencies...
make[1]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/driver'
make[1]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/lib'
mkdir -p /usr/lib
cp -d lib/* /usr/lib
if [ -d lib32 ]; then \
	mkdir -p /usr/lib32; \
	cp -d lib32/* /usr/lib32; \
fi
mkdir -p /usr/include
chmod 644 libpcan.h libpcanfd.h
cp libpcan.h libpcanfd.h /usr/include
/sbin/ldconfig
make[1]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/lib'
make[1]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/test'
cp receivetest transmitest bitratetest filtertest pcanfdtst pcan-settings receivetest_posix transmitest_posix /usr/local/bin
make[1]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/test'
make[1]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic'
make[2]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/pcanbasic'
cp libpcanbasic.so.4.4.2 /usr/lib/libpcanbasic.so.4.4.2
ln -sf /usr/lib/libpcanbasic.so.4.4.2 /usr/lib/libpcanbasic.so.4
ln -sf /usr/lib/libpcanbasic.so.4.4.2 /usr/lib/libpcanbasic.so.0
ln -sf /usr/lib/libpcanbasic.so.4 /usr/lib/libpcanbasic.so
cp PCANBasic.h /usr/include/PCANBasic.h
chmod 644 /usr/include/PCANBasic.h
/sbin/ldconfig
make[2]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/pcanbasic'
make[2]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/pcaninfo'
cp pcaninfo.1.2.0 /usr/local/bin/pcaninfo
chmod 755 /usr/local/bin/pcaninfo
make[2]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/pcaninfo'
make[2]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/examples'
make[3]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/examples/c++'
#cp pcanwrite pcanread pcaneventread pcaneventwrite /usr/local/bin
make[3]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/examples/c++'
make[3]: Entering directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/examples/python'
make[3]: Nothing to be done for 'install'.
make[3]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/examples/python'
make[2]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic/examples'
make[1]: Leaving directory '/home/qo313/peak-linux-driver-8.12.0/libpcanbasic'
How should I debug this?
Last edited by M.Gerber on Mon 14. Jun 2021, 16:50, edited 1 time in total.
Reason: Inserted [code] tags for improved readability and overview

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

Re: Cannot install peak-linux-driver

Post by M.Maidhof » Mon 14. Jun 2021, 16:10

Hi,

as a first step, please build the driver without sudo as written in the manual.

make clean
make
sudo make install
sudo modprobe pcan

than post the output of cat /proc/pcan

Next, what do you want to do?

regards

Michael

jwillnetwork
Posts: 5
Joined: Mon 14. Jun 2021, 14:30

Re: Cannot install peak-linux-driver

Post by jwillnetwork » Mon 14. Jun 2021, 16:48

cat /proc/pcan

Code: Select all

*------------- PEAK-System CAN interfaces (www.peak-system.com) -------------
*------------- Release_20210505_n (8.12.0) Jun 14 2021 10:41:02 --------------
*---------------------- [mod] [isa] [pci] [pec] [usb] -----------------------
*--------------------- 1 interfaces @ major 237 found -----------------------
*n -type- -ndev- --base-- irq --btr- --read-- --write- --irqs-- -errors- status
32    usb   -NA- ffffffff 000 0x011c 00000002 00000000 00045de5 000f1f22 0x0008
---
Thank you, now my Peak adapter initializes.

What is a basic python script to view all CAN messages with the PEAK adapter?
Last edited by M.Gerber on Mon 14. Jun 2021, 16:52, edited 1 time in total.
Reason: Inserted [code] tag for improved readability

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

Re: Cannot install peak-linux-driver

Post by M.Maidhof » Mon 14. Jun 2021, 17:17

Hi,

see python examples in the libpcanbasic/examples directory.

regards

Michael

Post Reply