Cobra Forum

Linux => New to Ubuntu => Topic started by: mahesh on Aug 15, 2023, 08:28 AM

Title: Broken CH340 drivers and issue with the Make command
Post by: mahesh on Aug 15, 2023, 08:28 AM
Having a hell of a time trying to get my machine to talk to any device with a CH340 serial IC

Seems that any help thread I follow fails at some point, mostly when I attempt to run the make file/command/whatever.
I've just followed these steps, as describers here: https://gist.github.com/dattasaurabh...358c5e605ce4fd
get the latest kernel
install build tools
git clone the CH340 drivers


but the "make" results in this -

     Code:
~/CH341SER$ sudo make
make -C /lib/modules/6.0.9-060009-generic/build  M=/home/carterk/CH341SER
make[1]: Entering directory '/usr/src/linux-headers-6.0.9-060009-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.2.0-9ubuntu1) 12.2.0
  You are using:           gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
  CC [M]  /home/carterk/CH341SER/ch34x.o
gcc: error: unrecognized command-line option '-ftrivial-auto-var-init=zero'
make[2]: *** [scripts/Makefile.build:249: /home/carterk/CH341SER/ch34x.o] Error 1
make[1]: *** [Makefile:1858: /home/carterk/CH341SER] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.0.9-060009-generic'
make: *** [Makefile:7: default] Error 2

And I'm at a loss as to where to go from here. I seem to be having this error across multiple machines with fresh installs - nothing works out of the box with this OS.

Any help at all would be hugely appreciated, cheers!