Coder Social home page Coder Social logo

`make` error on Linux Mint 20.2 about ch341ser HOT 24 OPEN

ipsod avatar ipsod commented on July 23, 2024
`make` error on Linux Mint 20.2

from ch341ser.

Comments (24)

yamelsenih avatar yamelsenih commented on July 23, 2024

Hi, the same error for me. Someone know a way for resolve it?

Best regards

from ch341ser.

yamelsenih avatar yamelsenih commented on July 23, 2024

I tasted with Ubuntu 20.04 LTS

from ch341ser.

yamelsenih avatar yamelsenih commented on July 23, 2024

Hi, maybe someone can help me

from ch341ser.

yamelsenih avatar yamelsenih commented on July 23, 2024

make

make -C /lib/modules/5.15.0-53-generic/build  M=/tmp/CH341SER 
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-53-generic'
  CC [M]  /tmp/CH341SER/ch34x.o
/tmp/CH341SER/ch34x.c:1300:20: error: initialization of ‘unsigned int (*)(struct tty_struct *)’ from incompatible pointer type ‘int (*)(struct tty_struct *)’ [-Werror=incompatible-pointer-types]
 1300 |  .write_room     = ch34x_write_room,
      |                    ^~~~~~~~~~~~~~~~
/tmp/CH341SER/ch34x.c:1300:20: note: (near initialization for ‘ch34x_device.write_room’)
/tmp/CH341SER/ch34x.c:1301:21: error: initialization of ‘unsigned int (*)(struct tty_struct *)’ from incompatible pointer type ‘int (*)(struct tty_struct *)’ [-Werror=incompatible-pointer-types]
 1301 |  .chars_in_buffer = ch34x_chars_in_buffer,
      |                     ^~~~~~~~~~~~~~~~~~~~~
/tmp/CH341SER/ch34x.c:1301:21: note: (near initialization for ‘ch34x_device.chars_in_buffer’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:297: /tmp/CH341SER/ch34x.o] Error 1
make[1]: *** [Makefile:1903: /tmp/CH341SER] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-53-generic'
make: *** [Makefile:7: default] Error 2

from ch341ser.

juliagoda avatar juliagoda commented on July 23, 2024

Hi! First of all sorry for late response. Check out updated README that contains "Tutorial on Ubuntu" (Thanks @ensismoebius ). If this does not help, we will think about it some more, ok?

from ch341ser.

ensismoebius avatar ensismoebius commented on July 23, 2024

Ok, thank you too and congrats for the job!

from ch341ser.

EddyMercier avatar EddyMercier commented on July 23, 2024

Hello,
I have the same problem on Ubuntu 20.4 (x86_64) kernel 5.15.0-56...
SecureBoot is not active and brltty is not installed.
Tell me if you need information about my configuration.
__Teddy__

from ch341ser.

juliagoda avatar juliagoda commented on July 23, 2024

As I remember there are mismatches between Arch and Ubuntu and there were already conflicts with it (one solution worked for Arch, but did not work for Ubuntu and vice versa), so I created a separate "ubuntu" branch. Try typing this:

git clone -b ubuntu https://github.com/juliagoda/CH341SER.git

and do the rest according to the tutorial and let me know what came out

from ch341ser.

ensismoebius avatar ensismoebius commented on July 23, 2024

@EddyMercier can you post the compiler log?

from ch341ser.

EddyMercier avatar EddyMercier commented on July 23, 2024

Hello,

I have the same error message with the ubuntu branch !
I don't understand the message because 'ch34x_write_room' is well declared as unsigned (but I am a professional in C++...)
Meaby the problem is that the var "room" is not a 'unsigned int' but a 'int' (but I am a professional in C++...)

Thanks for your job !

from ch341ser.

juliagoda avatar juliagoda commented on July 23, 2024

could you put here the results anyway? C language differs often when it comes to types behaviour. Are you sure 100% you are using the branch? I don't have Ubuntu, so I have to rely on someone else's results

from ch341ser.

juliagoda avatar juliagoda commented on July 23, 2024

No need to put anything, I'll try it on workflow with ubuntu

from ch341ser.

juliagoda avatar juliagoda commented on July 23, 2024

Ok. Try again

from ch341ser.

yamelsenih avatar yamelsenih commented on July 23, 2024

Thanks @juliagoda let me test it in Ubuntu branch

from ch341ser.

suryasarafe avatar suryasarafe commented on July 23, 2024

hi, I try with the ubuntu branch, but this happend.

asep@sholeh:~/Downloads/installer$ git clone -b ubuntu https://github.com/juliagoda/CH341SER.git
Cloning into 'CH341SER'...
remote: Enumerating objects: 180, done.
remote: Counting objects: 100% (112/112), done.
remote: Compressing objects: 100% (54/54), done.
remote: Total 180 (delta 81), reused 58 (delta 54), pack-reused 68
Receiving objects: 100% (180/180), 424.43 KiB | 471.00 KiB/s, done.
Resolving deltas: 100% (97/97), done.
asep@sholeh:~/Downloads/installer$ cd CH341SER/
asep@sholeh:~/Downloads/installer/CH341SER$ make
make -C /lib/modules/5.15.0-41-generic/build  M=/home/asep/Downloads/installer/CH341SER 
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-41-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
  You are using:           gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
  CC [M]  /home/asep/Downloads/installer/CH341SER/ch34x.o
  MODPOST /home/asep/Downloads/installer/CH341SER/Module.symvers
  CC [M]  /home/asep/Downloads/installer/CH341SER/ch34x.mod.o
  LD [M]  /home/asep/Downloads/installer/CH341SER/ch34x.ko
  BTF [M] /home/asep/Downloads/installer/CH341SER/ch34x.ko
Skipping BTF generation for /home/asep/Downloads/installer/CH341SER/ch34x.ko due to unavailability of vmlinux
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-41-generic'
asep@sholeh:~/Downloads/installer/CH341SER$ sudo make load
modprobe usbserial
insmod ch34x.ko
insmod: ERROR: could not insert module ch34x.ko: Operation not permitted
make: *** [Makefile:12: load] Error 1

I just migrate to Linux Mint 21 "Vanessa" from windows few days ago, and don't still don't know how to resolve this.
Thank you

from ch341ser.

yamelsenih avatar yamelsenih commented on July 23, 2024

hi, I try with the ubuntu branch, but this happend.

asep@sholeh:~/Downloads/installer$ git clone -b ubuntu https://github.com/juliagoda/CH341SER.git
Cloning into 'CH341SER'...
remote: Enumerating objects: 180, done.
remote: Counting objects: 100% (112/112), done.
remote: Compressing objects: 100% (54/54), done.
remote: Total 180 (delta 81), reused 58 (delta 54), pack-reused 68
Receiving objects: 100% (180/180), 424.43 KiB | 471.00 KiB/s, done.
Resolving deltas: 100% (97/97), done.
asep@sholeh:~/Downloads/installer$ cd CH341SER/
asep@sholeh:~/Downloads/installer/CH341SER$ make
make -C /lib/modules/5.15.0-41-generic/build  M=/home/asep/Downloads/installer/CH341SER 
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-41-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
  You are using:           gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
  CC [M]  /home/asep/Downloads/installer/CH341SER/ch34x.o
  MODPOST /home/asep/Downloads/installer/CH341SER/Module.symvers
  CC [M]  /home/asep/Downloads/installer/CH341SER/ch34x.mod.o
  LD [M]  /home/asep/Downloads/installer/CH341SER/ch34x.ko
  BTF [M] /home/asep/Downloads/installer/CH341SER/ch34x.ko
Skipping BTF generation for /home/asep/Downloads/installer/CH341SER/ch34x.ko due to unavailability of vmlinux
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-41-generic'
asep@sholeh:~/Downloads/installer/CH341SER$ sudo make load
modprobe usbserial
insmod ch34x.ko
insmod: ERROR: could not insert module ch34x.ko: Operation not permitted
make: *** [Makefile:12: load] Error 1

I just migrate to Linux Mint 21 "Vanessa" from windows few days ago, and don't still don't know how to resolve this. Thank you

Hi, this is because you have secure boot.

from ch341ser.

yamelsenih avatar yamelsenih commented on July 23, 2024

I tasted it for Ubuntu and all right but never is loaded the driver when I connect the device. All test was over Ubuntu branch

Also I tasted for Raspbian with main branch and all also is ok but the driver never is loaded for device

from ch341ser.

juliagoda avatar juliagoda commented on July 23, 2024

Is there any log/message about this that can be copied here? If not, maybe a screenshot using scrot -d? Additionally, is there at least one person for whom this driver under Linux Mint/Ubuntu works? If so, please provide some kind of response.

from ch341ser.

juliagoda avatar juliagoda commented on July 23, 2024

after trying to upload driver, attach the file here, which has the content of the result :

sudo dmesg

from ch341ser.

linker3000 avatar linker3000 commented on July 23, 2024

Linux Linux Mint 21.1 Cinnamon with Kernel 5.15.0-56-generic #62-Ubuntu SMP using Ubuntu branch:

make -C /lib/modules/5.15.0-56-generic/build M=/root/Downloads/CH341SER make[1]: Entering directory '/usr/src/linux-headers-5.15.0-56-generic' CC [M] /root/Downloads/CH341SER/ch34x.o /root/Downloads/CH341SER/ch34x.c:1294:27: error: initialization of ‘void (*)(struct tty_struct *, struct usb_serial_port *, struct ktermios *)’ from incompatible pointer type ‘void (*)(struct tty_struct *, struct usb_serial_port *, const struct ktermios *)’ [-Werror=incompatible-pointer-types] 1294 | .set_termios = ch34x_set_termios, | ^~~~~~~~~~~~~~~~~ /root/Downloads/CH341SER/ch34x.c:1294:27: note: (near initialization for ‘ch34x_device.set_termios’) cc1: some warnings being treated as errors make[2]: *** [scripts/Makefile.build:297: /root/Downloads/CH341SER/ch34x.o] Error 1 make[1]: *** [Makefile:1903: /root/Downloads/CH341SER] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-56-generic' make: *** [Makefile:7: default] Error 2

from ch341ser.

jd-apprentice avatar jd-apprentice commented on July 23, 2024

Have anyone solved this? I'm on Ubuntu 22.04 lts, kernel 5.15.0-58-generic EDIT: Yes i'm using ubuntu branch

from ch341ser.

mattm-boop avatar mattm-boop commented on July 23, 2024

I have the same error using the ubuntu branch on ubuntu 20.04, kernel 5.15.0-58-generic. The output looks exactly the same as linker3000 reported above.

from ch341ser.

jd-apprentice avatar jd-apprentice commented on July 23, 2024

For anyone trying to use a chinese arduino (CH340g) I made it work downloading the installer of the 1.8 then using the 2.0+ I wrote a simple guide about it ->

https://gist.github.com/jd-apprentice/f1d1a9a526b42c8313ddb021c968ece7

from ch341ser.

JacobKan avatar JacobKan commented on July 23, 2024

I am using Ubuntu 18.04, and meet the same issue.
However, I make it successfully after I change to main branch.....

from ch341ser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.