PCAN-USB in Windows Subsystem for Linux WSL2, Ubuntu 20.04

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
eALduderino
Posts: 2
Joined: Thu 23. Mar 2023, 20:47

PCAN-USB in Windows Subsystem for Linux WSL2, Ubuntu 20.04

Post by eALduderino » Thu 23. Mar 2023, 21:40

Hi there,
should the Linux default drivers run in WSL2 Ubuntu 20.04 with Microsoft's custom Linux Kernel?
WSL2-Linux-Kernel-linux-msft-wsl-5.15.90.1
Also, should the proprietary driver package be buildable and installable in WSL2? So far I managed to build and install the custom Kernel and connect USB devices to WSL2 but I didn't manage to get my PCAN-USB to work in WSL since I couldn't initialize the default driver and/or install the proprietary one. I'd appreciate it if anyone could share some knowledge or point me in the right direction to get it to work.
When I tried to build the driver package the following errors occurred. Thanks for your help.

Code: Select all

eal@ealwsl2:~/drivers/peak-linux-driver-8.15.2$ make clean all
make[1]: Entering directory '/home/eal/drivers/peak-linux-driver-8.15.2/driver'
/bin/sh: 1: Syntax error: end of file unexpected
/bin/sh: 1: Syntax error: end of file unexpected
/bin/sh: 1: Syntax error: end of file unexpected
/bin/sh: 1: Syntax error: end of file unexpected
/bin/sh: 1: Syntax error: end of file unexpected (expecting "then")
/bin/sh: 1: Syntax error: end of file unexpected
/bin/sh: 1: Syntax error: end of file unexpected
/bin/sh: 1: Syntax error: end of file unexpected
/bin/sh: 1: Syntax error: end of file unexpected (expecting "then")
/bin/sh: 1: Syntax error: end of file unexpected
/bin/sh: 1: [: missing ]
/bin/sh: 1: Syntax error: end of file unexpected
rm -f src/*o src/*~ src/.*cmd *o *ko *~ .*cmd  pcan.mod.c Module.symvers modules.order .cache.mk
make[1]: Leaving directory '/home/eal/drivers/peak-linux-driver-8.15.2/driver'
make[1]: Entering directory '/home/eal/drivers/peak-linux-driver-8.15.2/lib'
rm -f src/*~
rm -rf obj lib obj32 lib32
make[1]: Leaving directory '/home/eal/drivers/peak-linux-driver-8.15.2/lib'
make[1]: Entering directory '/home/eal/drivers/peak-linux-driver-8.15.2/test'
rm -f src/*~ src/*.o *~ receivetest transmitest bitratetest filtertest pcanfdtst pcan-settings receivetest_posix transmitest_posix
make[1]: Leaving directory '/home/eal/drivers/peak-linux-driver-8.15.2/test'
make[1]: Entering directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic'

***
*** Processing 'pcanbasic' directory...
***
make[2]: Entering directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/pcanbasic'

***
*** Cleaning PCANBasic library...
***
rm -f src/*~ out/*.o out/*.gcno *~ *.so.* *.so lib/*~ lib/*.so.* lib/*.so lib32/*~ lib32/*.so.* lib32/*.so out32/*.o out32/*.gcno
make[2]: Leaving directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/pcanbasic'

***
*** Processing 'pcaninfo' directory...
***
make[2]: Entering directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/pcaninfo'

***
*** Cleaning pcaninfo...
***
rm -f src/*~ src/*.o ../pcanbasic/src/*~ ../pcanbasic/src/*.o *~ *.so.* *.so pcaninfo.1.3.1 pcaninfo
make[2]: Leaving directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/pcaninfo'

***
*** Processing 'examples' directory...
***
make[2]: Entering directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples'

***
*** Processing examples 'console' directory...
***
make[3]: Entering directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/console'

***
*** Processing 'C' directory (console examples)...
***
make[4]: Entering directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/console/c'

***
*** Cleaning PCANBasic C examples
rm -f src/*~ src/*.o *~ pcanwrite pcanread pcaneventread pcaneventwrite
make[4]: Leaving directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/console/c'

***
*** Processing 'NativeC++' directory (console examples)...
***
make[4]: Entering directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/console/NativeC++'

***
*** Cleaning PCANBasic C++ examples...
***
make[5]: Entering directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/console/NativeC++/01_LookUpChannel'
rm -f *.o *~ ../LookUpChannel
make[5]: Leaving directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/console/NativeC++/01_LookUpChannel'
make[5]: Entering directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/console/NativeC++/02_GetSetParameter'
rm -f *.o *~ ../GetSetParameter
make[5]: Leaving directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/console/NativeC++/02_GetSetParameter'
make[5]: Entering directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/console/NativeC++/03_ManualRead'
rm -f *.o *~ ../ManualRead
make[5]: Leaving directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/console/NativeC++/03_ManualRead'
make[5]: Entering directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/console/NativeC++/04_ManualWrite'
rm -f *.o *~ ../ManualWrite
make[5]: Leaving directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/console/NativeC++/04_ManualWrite'
make[5]: Entering directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/console/NativeC++/05_TimerRead'
rm -f *.o *~ ../TimerRead
make[5]: Leaving directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/console/NativeC++/05_TimerRead'
make[5]: Entering directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/console/NativeC++/06_TimerWrite'
rm -f *.o *~ ../TimerWrite
make[5]: Leaving directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/console/NativeC++/06_TimerWrite'
make[5]: Entering directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/console/NativeC++/07_ThreadRead'
rm -f *.o *~ ../ThreadRead
make[5]: Leaving directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/console/NativeC++/07_ThreadRead'
make[5]: Entering directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/console/NativeC++/08_EventDrivenRead'
rm -f *.o *~ ../EventDrivenRead
make[5]: Leaving directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/console/NativeC++/08_EventDrivenRead'
make[5]: Entering directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/console/NativeC++/09_TraceFiles'
rm -f *.o *~ ../TraceFiles
make[5]: Leaving directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/console/NativeC++/09_TraceFiles'
make[4]: Leaving directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/console/NativeC++'
make[3]: Leaving directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/console'

***
*** Processing examples 'gui' directory...
***
make[3]: Entering directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/gui'

***
*** Processing 'python' directory (GUI examples)...
***
make[4]: Entering directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/gui/python'
rm -f *.pyc
make[4]: Leaving directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/gui/python'
make[3]: Leaving directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples/gui'
make[2]: Leaving directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic/examples'
make[1]: Leaving directory '/home/eal/drivers/peak-linux-driver-8.15.2/libpcanbasic'
make[1]: Entering directory '/home/eal/drivers/peak-linux-driver-8.15.2/driver'
/bin/sh: 1: Syntax error: end of file unexpected
/bin/sh: 1: Syntax error: end of file unexpected
/bin/sh: 1: Syntax error: end of file unexpected
/bin/sh: 1: Syntax error: end of file unexpected
/bin/sh: 1: Syntax error: end of file unexpected (expecting "then")
/bin/sh: 1: Syntax error: end of file unexpected
/bin/sh: 1: Syntax error: end of file unexpected
/bin/sh: 1: Syntax error: end of file unexpected
/bin/sh: 1: Syntax error: end of file unexpected (expecting "then")
/bin/sh: 1: Syntax error: end of file unexpected
/bin/sh: 1: [: missing ]
/bin/sh: 1: Syntax error: end of file unexpected
/bin/sh: 1: Syntax error: end of file unexpected
***
*** Making pcan driver in chardev mode
***
*** Host OS Release=Ubuntu v20.04
*** Host machine kernel version=5.15.90.1-microsoft-standard-WSL2
*** Driver kernel version=5.15.90.1-microsoft-standard-WSL2 (5.15.90)
/bin/sh: 1: Syntax error: Unterminated quoted string
make[1]: *** [Makefile:774: message] Error 2
make[1]: Leaving directory '/home/eal/drivers/peak-linux-driver-8.15.2/driver'
make: *** [Makefile:84: all] Error 2

G.Lang
Support
Support
Posts: 155
Joined: Wed 22. Sep 2010, 14:58

Re: PCAN-USB in Windows Subsystem for Linux WSL2, Ubuntu 20.04

Post by G.Lang » Fri 24. Mar 2023, 07:23

Windows Subsystem for Linux (WSL) is not a real fully working Linux system (it´s a virtualized Linux with special kernel) and therefore the PCAN-USB will not work. Please install a real Linux distribution and then the PCAN-USB will properly work.

eALduderino
Posts: 2
Joined: Thu 23. Mar 2023, 20:47

Re: PCAN-USB in Windows Subsystem for Linux WSL2, Ubuntu 20.04

Post by eALduderino » Fri 24. Mar 2023, 10:11

I was afraid this is the case. Thanks for your quick reply.

Post Reply