Page 16 of 16
Re: Recipe for target 'all' failed
Posted: Thu 11. Oct 2018, 15:37
by PEAK-Support
Please see
here
It´s always the best to use the search function first. We also will move your thread to the correct section.
[2018-10-15 M.Gerber: Merged thread into the linked one.]
Re: PEAK-Linux Driver on Raspberry Pi
Posted: Mon 27. Jan 2020, 22:48
by jchah090
Hi i am having issue with installing the modprobe pcan on my rasberrypi,
This is what i get when i run the command.
$ modprobe pcan
modprobe: ERROR: ../libkmod/libkmod-module.c:832 kmod_module_insert_module() could not find module by name='pcan'
modprobe: ERROR: could not insert 'pcan': Unknown symbol in module, or unknown parameter (see dmesg)
modprobe: ERROR: ../libkmod/libkmod-module.c:979 command_do() Error running install command for pcan
modprobe: ERROR: could not insert 'pcan': Operation not permitted
Any help would be greatly appreciated ! Thanks in advance.
Re: PEAK-Linux Driver on Raspberry Pi
Posted: Tue 28. Jan 2020, 11:28
by PEAK-Support
We only see the result of modprobe pcan , but no info what you have done before. So we are sorry - looks like you did not install the driver - please beginn at the start of this thread nad if you run in problöems post exact the result of the step where you have problems..
Re: PEAK-Linux Driver on Raspberry Pi
Posted: Tue 28. Jan 2020, 16:51
by jchah090
I am having trouble configuring the driver for pcan
Here are the outputs for "make clean", "make PCC=NO PCI=NO ISA=NO DNG=NO", "sudo make inistall" and "modprobe pcan"
Code: Select all
pi@raspberrypi:~/peak-linux-driver-8.9.3 $ make clean
make[1]: Entering directory '/home/pi/peak-linux-driver-8.9.3/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/pi/peak-linux-driver-8.9.3/driver'
make[1]: Entering directory '/home/pi/peak-linux-driver-8.9.3/lib'
rm -f src/*~
rm -rf obj lib obj32 lib32
make[1]: Leaving directory '/home/pi/peak-linux-driver-8.9.3/lib'
make[1]: Entering directory '/home/pi/peak-linux-driver-8.9.3/test'
rm -f src/*~ src/*.o *~ receivetest transmitest bitratetest filtertest pcanfdtst pcan-settings receivetest_posix transmitest_posix
make[1]: Leaving directory '/home/pi/peak-linux-driver-8.9.3/test'
make[1]: Entering directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic'
make[2]: Entering directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/pcanbasic'
rm -f src/*~ out/*.o *~ *.so.* *.so
make[2]: Leaving directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/pcanbasic'
make[2]: Entering directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/pcaninfo'
rm -f src/*~ src/*.o ../pcanbasic/src/*~ ../pcanbasic/src/*.o *~ *.so.* *.so pcaninfo.1.0.3 pcaninfo
make[2]: Leaving directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/pcaninfo'
make[2]: Entering directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/examples'
make[3]: Entering directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/examples/python'
rm -f *.pyc
make[3]: Leaving directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/examples/python'
make[3]: Entering directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/examples/c++'
rm -f src/*~ src/*.o *~ pcanwrite pcanread pcaneventread pcaneventwrite
make[3]: Leaving directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/examples/c++'
make[2]: Leaving directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/examples'
make[1]: Leaving directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic'
Code: Select all
pi@raspberrypi:~/peak-linux-driver-8.9.3 $ make PCC=NO PCI=NO ISA=NO DNG=NO
make[1]: Entering directory '/home/pi/peak-linux-driver-8.9.3/driver'
***
*** Making pcan driver in chardev mode
***
*** Host machine kernel version=4.19.75-v7l+
*** Driver kernel version=4.19.93-v7l+ (4.19.93)
*** Path to kernel sources=/usr/src/linux-headers-4.19.93-v7l+/
*** use KBUILD=yes
*** gcc version=8
***
make -C /usr/src/linux-headers-4.19.93-v7l+/ EXTRA_CFLAGS="-I/home/pi/peak-linux-driver-8.9.3/driver -DNO_DEBUG -DMODVERSIONS -DPARPORT_SUBSYSTEM -DUSB_SUPPORT -DNO -DNO_PCIEC_SUPPORT -DNO -DNO -DNO -DNO_NETDEV_SUPPORT -DNO_RT -Wno-date-time" V=0 modules SUBDIRS=/home/pi/peak-linux-driver-8.9.3/driver
make[2]: Entering directory '/usr/src/linux-headers-4.19.93-v7l+'
CC [M] /home/pi/peak-linux-driver-8.9.3/driver/src/pcan_main.o
CC [M] /home/pi/peak-linux-driver-8.9.3/driver/src/pcan_fops.o
CC [M] /home/pi/peak-linux-driver-8.9.3/driver/src/pcan_fifo.o
CC [M] /home/pi/peak-linux-driver-8.9.3/driver/src/pcan_filter.o
CC [M] /home/pi/peak-linux-driver-8.9.3/driver/src/pcan_parse.o
CC [M] /home/pi/peak-linux-driver-8.9.3/driver/src/pcan_sja1000.o
CC [M] /home/pi/peak-linux-driver-8.9.3/driver/src/pcan_common.o
CC [M] /home/pi/peak-linux-driver-8.9.3/driver/src/pcan_timing.o
CC [M] /home/pi/peak-linux-driver-8.9.3/driver/src/pcanfd_core.o
CC [M] /home/pi/peak-linux-driver-8.9.3/driver/src/pcanfd_ucan.o
CC [M] /home/pi/peak-linux-driver-8.9.3/driver/src/pcan_usb_core.o
CC [M] /home/pi/peak-linux-driver-8.9.3/driver/src/pcan_usb.o
CC [M] /home/pi/peak-linux-driver-8.9.3/driver/src/pcan_usbpro.o
CC [M] /home/pi/peak-linux-driver-8.9.3/driver/src/pcanfd_usb.o
LD [M] /home/pi/peak-linux-driver-8.9.3/driver/pcan.o
Building modules, stage 2.
MODPOST 1 modules
CC /home/pi/peak-linux-driver-8.9.3/driver/pcan.mod.o
LD [M] /home/pi/peak-linux-driver-8.9.3/driver/pcan.ko
make[2]: Leaving directory '/usr/src/linux-headers-4.19.93-v7l+'
make[1]: Leaving directory '/home/pi/peak-linux-driver-8.9.3/driver'
make[1]: Entering directory '/home/pi/peak-linux-driver-8.9.3/lib'
***
*** Making pcan libraries
***
*** gcc version: 8
***
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
make[1]: Leaving directory '/home/pi/peak-linux-driver-8.9.3/lib'
make[1]: Entering directory '/home/pi/peak-linux-driver-8.9.3/test'
***
*** Making example and test programs
***
*** gcc version: 8
***
gcc -DNO_RT -g -I. -I../lib -I../driver src/receivetest.c src/common.c -lpcanfd -L../lib/lib -Wl,-rpath ../lib/lib -o receivetest
g++ -DNO_RT -g -I. -I../lib -I../driver src/transmitest.cpp src/common.c src/parser.cpp -lstdc++ -lpcanfd -L../lib/lib -Wl,-rpath ../lib/lib -o transmitest
gcc -DNO_RT -g -I. -I../lib -I../driver src/bitratetest.c src/common.c -lpcanfd -L../lib/lib -Wl,-rpath ../lib/lib -o bitratetest
g++ -DNO_RT -g -I. -I../lib -I../driver src/filtertest.cpp src/common.c -lstdc++ -lpcanfd -L../lib/lib -Wl,-rpath ../lib/lib -o filtertest
gcc -DNO_RT -g -I. -I../lib -I../driver src/pcanfdtst.c -lpcanfd -L../lib/lib -Wl,-rpath ../lib/lib -lpthread -o pcanfdtst
gcc -DNO_RT -g -I. -I../lib -I../driver src/pcan-settings.c -lpopt -lpcanfd -L../lib/lib -Wl,-rpath ../lib/lib -g -o pcan-settings
gcc -DNO_RT -g -I. -I../lib -I../driver src/receivetest_posix.c src/common.c -lpcanfd -L../lib/lib -Wl,-rpath ../lib/lib -lpthread -o receivetest_posix
g++ -DNO_RT -g -I. -I../lib -I../driver 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/pi/peak-linux-driver-8.9.3/test'
make[1]: Entering directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic'
make[2]: Entering directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/pcanbasic'
***
*** Making PCANBasic library with FD support (PCAN driver >= 8.0)
***
*** target=libpcanbasic
*** version=4.3.1
*** PCAN_ROOT=/home/pi/peak-linux-driver-8.9.3
*** gcc version=8
***
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/pi/peak-linux-driver-8.9.3/driver -I/home/pi/peak-linux-driver-8.9.3/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/pi/peak-linux-driver-8.9.3/driver -I/home/pi/peak-linux-driver-8.9.3/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/pi/peak-linux-driver-8.9.3/driver -I/home/pi/peak-linux-driver-8.9.3/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/pi/peak-linux-driver-8.9.3/driver -I/home/pi/peak-linux-driver-8.9.3/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/pi/peak-linux-driver-8.9.3/driver -I/home/pi/peak-linux-driver-8.9.3/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/pi/peak-linux-driver-8.9.3/driver -I/home/pi/peak-linux-driver-8.9.3/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/pi/peak-linux-driver-8.9.3/driver -I/home/pi/peak-linux-driver-8.9.3/lib -c /home/pi/peak-linux-driver-8.9.3/lib/src/libpcanfd.c -o out/libpcanfd.o
gcc -shared -Wl,-soname,libpcanbasic.so -o libpcanbasic.so.4.3.1 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.3.1 libpcanbasic.so
make[2]: Leaving directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/pcanbasic'
make[2]: Entering directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/pcaninfo'
*** Making PCANINFO
***
*** target=pcaninfo
*** version=1.0.3
*** PCAN_ROOT=/home/pi/peak-linux-driver-8.9.3
*** gcc version=8
***
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/pi/peak-linux-driver-8.9.3/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/pi/peak-linux-driver-8.9.3/driver -I/home/pi/peak-linux-driver-8.9.3/lib -lm -o pcaninfo.1.0.3
ln -sf pcaninfo.1.0.3 pcaninfo
make[2]: Leaving directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/pcaninfo'
make[2]: Entering directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/examples'
make[3]: Entering directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/examples/python'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/examples/python'
make[3]: Entering directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/examples/c++'
***
*** Making PCANBasic C++ examples
***
*** target=pcanwrite pcanread pcaneventread pcaneventwrite
*** g++ version=8
*** PCANBASIC_ROOT=../../pcanbasic
***
g++ -I../../pcanbasic -I/home/pi/peak-linux-driver-8.9.3/driver -DNO_RT src/pcanwrite.cpp -L../../pcanbasic -Wl,-rpath ../../pcanbasic -lpcanbasic -o pcanwrite
g++ -I../../pcanbasic -I/home/pi/peak-linux-driver-8.9.3/driver -DNO_RT src/pcanread.cpp -L../../pcanbasic -Wl,-rpath ../../pcanbasic -lpcanbasic -o pcanread
g++ -I../../pcanbasic -I/home/pi/peak-linux-driver-8.9.3/driver -DNO_RT src/pcaneventread.cpp -L../../pcanbasic -Wl,-rpath ../../pcanbasic -lpcanbasic -o pcaneventread
g++ -I../../pcanbasic -I/home/pi/peak-linux-driver-8.9.3/driver -DNO_RT src/pcaneventwrite.cpp -L../../pcanbasic -Wl,-rpath ../../pcanbasic -lpcanbasic -o pcaneventwrite
make[3]: Leaving directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/examples/c++'
make[2]: Leaving directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/examples'
make[1]: Leaving directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic'
Code: Select all
pi@raspberrypi:~/peak-linux-driver-8.9.3 $ sudo make install
make[1]: Entering directory '/home/pi/peak-linux-driver-8.9.3/driver'
Info: /lib/modules/4.19.93-v7l+/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
make[1]: Leaving directory '/home/pi/peak-linux-driver-8.9.3/driver'
make[1]: Entering directory '/home/pi/peak-linux-driver-8.9.3/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/pi/peak-linux-driver-8.9.3/lib'
make[1]: Entering directory '/home/pi/peak-linux-driver-8.9.3/test'
cp receivetest transmitest bitratetest filtertest pcanfdtst pcan-settings receivetest_posix transmitest_posix /usr/local/bin
make[1]: Leaving directory '/home/pi/peak-linux-driver-8.9.3/test'
make[1]: Entering directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic'
make[2]: Entering directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/pcanbasic'
cp libpcanbasic.so.4.3.1 /usr/lib/libpcanbasic.so.4.3.1
ln -sf /usr/lib/libpcanbasic.so.4.3.1 /usr/lib/libpcanbasic.so.4
ln -sf /usr/lib/libpcanbasic.so.4.3.1 /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/pi/peak-linux-driver-8.9.3/libpcanbasic/pcanbasic'
make[2]: Entering directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/pcaninfo'
cp pcaninfo.1.0.3 /usr/local/bin/pcaninfo
chmod 755 /usr/local/bin/pcaninfo
make[2]: Leaving directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/pcaninfo'
make[2]: Entering directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/examples'
make[3]: Entering directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/examples/python'
make[3]: Nothing to be done for 'install'.
make[3]: Leaving directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/examples/python'
make[3]: Entering directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/examples/c++'
#cp pcanwrite pcanread pcaneventread pcaneventwrite /usr/local/bin
make[3]: Leaving directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/examples/c++'
make[2]: Leaving directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic/examples'
make[1]: Leaving directory '/home/pi/peak-linux-driver-8.9.3/libpcanbasic'
Code: Select all
pi@raspberrypi:~/peak-linux-driver-8.9.3 $ modprobe pcan
modprobe: ERROR: ../libkmod/libkmod-module.c:832 kmod_module_insert_module() could not find module by name='pcan'
modprobe: ERROR: could not insert 'pcan': Unknown symbol in module, or unknown parameter (see dmesg)
modprobe: ERROR: ../libkmod/libkmod-module.c:979 command_do() Error running install command for pcan
modprobe: ERROR: could not insert 'pcan': Operation not permitted
Re: PEAK-Linux Driver on Raspberry Pi
Posted: Tue 28. Jan 2020, 17:18
by M.Maidhof
Hi,
looks like your kernel source doesn't fit to your used kernel version.
*** Making pcan driver in chardev mode
***
*** Host machine kernel version=4.19.75-v7l+
*** Driver kernel version=4.19.93-v7l+ (4.19.93)
*** Path to kernel sources=/usr/src/linux-headers-4.19.93-v7l+/
*** use KBUILD=yes
*** gcc version=8
Please reboot your system once, and install the kernel headers. See also info here:
viewtopic.php?f=59&t=3381
regards
Michael
Re: PEAK-Linux Driver on Raspberry Pi
Posted: Tue 28. Jan 2020, 17:29
by jchah090
M.Maidhof wrote: ↑Tue 28. Jan 2020, 17:18
Hi,
looks like your kernel source doesn't fit to your used kernel version.
*** Making pcan driver in chardev mode
***
*** Host machine kernel version=4.19.75-v7l+
*** Driver kernel version=4.19.93-v7l+ (4.19.93)
*** Path to kernel sources=/usr/src/linux-headers-4.19.93-v7l+/
*** use KBUILD=yes
*** gcc version=8
Please reboot your system once, and install the kernel headers. See also info here:
viewtopic.php?f=59&t=3381
regards
Michael
Thanks for the quick reply Micheal.
I just rebooted my system and did the command "sudo apt-get install raspberrypi-kernel-headers" and the output was as following:
$ sudo apt-get install raspberrypi-kernel-headers
Reading package lists... Done
Building dependency tree
Reading state information... Done
raspberrypi-kernel-headers is already the newest version (1.20200114-1).
0 upgraded, 0 newly installed, 0 to remove and 163 not upgraded.
And then i did modprobe pcan and got the exact same output as I posted before.
Seems like its already to the latest version and updated. As for the link you sent me, thats the one i used to install my driver, all steps were followed as mentioned in that post.
Any info on how to match the kernel versions ?
Re: PEAK-Linux Driver on Raspberry Pi
Posted: Wed 29. Jan 2020, 10:52
by M.Maidhof
Hi,
did you use rpi-update on your PI system? If yes, you will get a kernel version for which you won't get the kernel headers with apt. Start from the scratch, or google on how to remove that kernel again, there are solutions using a commit number. See also:
viewtopic.php?f=59&t=3381&p=11967&hilit ... ate#p11967
regards
Michael