Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiling on 5.12 #47

Open
joni909 opened this issue Jun 30, 2021 · 9 comments
Open

compiling on 5.12 #47

joni909 opened this issue Jun 30, 2021 · 9 comments

Comments

@joni909
Copy link

joni909 commented Jun 30, 2021

compiling on 5.12 resulted in this in the terminal (it didn't pass the make phase)

~/D/fl2000_drm-master> make
make CHECK="/usr/bin/sparse" -C /lib/modules/5.12.13-1-MANJARO/build M=/home/joni909/Downloads/fl2000_drm-master modules

make[1]: Entering directory '/usr/lib/modules/5.12.13-1-MANJARO/build'
CC [M] /home/joni909/Downloads/fl2000_drm-master/fl2000_gem.o
/home/joni909/Downloads/fl2000_drm-master/fl2000_gem.c: In function ‘fl2000_gem_prime_import_sg_table’:
/home/joni909/Downloads/fl2000_drm-master/fl2000_gem.c:234:15: error: implicit declaration of function ‘drm_prime_sg_to_page_addr_arrays’; did you mean ‘drm_prime_sg_to_dma_addr_array’? [-Werror=implicit-function-declaration]

234 | ret = drm_prime_sg_to_page_addr_arrays(sgt, obj->pages, NULL, obj->num_pages);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| drm_prime_sg_to_dma_addr_array
/home/joni909/Downloads/fl2000_drm-master/fl2000_gem.c: At top level:
/home/joni909/Downloads/fl2000_drm-master/fl2000_gem.c:270:17: error: initialization of ‘int (*)(struct drm_gem_object *, struct dma_buf_map )’ from incompatible pointer type ‘void * ()(struct drm_gem_object *)’ [-Werror=incompatible-pointer-
types]

270 | .vmap = fl2000_gem_prime_vmap,
| ^~~~~~~~~~~~~~~~~~~~~
/home/joni909/Downloads/fl2000_drm-master/fl2000_gem.c:270:17: note: (near initialization for ‘fl2000_gem_default_funcs.vmap’)
/home/joni909/Downloads/fl2000_drm-master/fl2000_gem.c:271:19: error: initialization of ‘void (*)(struct drm_gem_object *, struct dma_buf_map )’ from incompatible pointer type ‘void ()(struct drm_gem_object *, void *)’ [-Werror=incompatible-pointer-types]

271 | .vunmap = fl2000_gem_prime_vunmap,
| ^~~~~~~~~~~~~~~~~~~~~~~
/home/joni909/Downloads/fl2000_drm-master/fl2000_gem.c:271:19: note: (near initialization for ‘fl2000_gem_default_funcs.vunmap’)
cc1: some warnings being treated as errors

make[2]: *** [scripts/Makefile.build:271: /home/joni909/Downloads/fl2000_drm-master/fl2000_gem.o] Error 1
make[1]: *** [Makefile:1859: /home/joni909/Downloads/fl2000_drm-master] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.12.13-1-MANJARO/build'
make: *** [Makefile:21: modules] Error 2

@AndersonOli
Copy link

same here

@felipejoribeiro
Copy link

same here, with 5.14.2-arch1-2

@Skippythekangoo
Copy link

Skippythekangoo commented Nov 30, 2021

A same issue...

$ LANG=en_US.UTF-8 make
make CHECK="/usr/bin/sparse" -C /lib/modules/5.14.16-arch1-1/build M=/home/skippy/Documents/Yay_AUR/fl2000_drm modules
make[1]: Entering directory '/usr/lib/modules/5.14.16-arch1-1/build'
CC [M] /home/skippy/Documents/Yay_AUR/fl2000_drm/fl2000_gem.o
/home/skippy/Documents/Yay_AUR/fl2000_drm/fl2000_gem.c: In function ‘fl2000_gem_prime_import_sg_table’:
/home/skippy/Documents/Yay_AUR/fl2000_drm/fl2000_gem.c:234:15: error: implicit declaration of function ‘drm_prime_sg_to_page_addr_arrays’; did you mean ‘drm_prime_sg_to_dma_addr_array’? [-Werror=implicit-function-declaration]
234 | ret = drm_prime_sg_to_page_addr_arrays(sgt, obj->pages, NULL, obj->num_pages);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| drm_prime_sg_to_dma_addr_array
/home/skippy/Documents/Yay_AUR/fl2000_drm/fl2000_gem.c: At top level:
/home/skippy/Documents/Yay_AUR/fl2000_drm/fl2000_gem.c:270:17: error: initialization of ‘int (*)(struct drm_gem_object *, struct dma_buf_map )’ from incompatible pointer type ‘void * ()(struct drm_gem_object )’ [-Werror=incompatible-pointer-types]
270 | .vmap = fl2000_gem_prime_vmap,
| ^~~~~~~~~~~~~~~~~~~~~
/home/skippy/Documents/Yay_AUR/fl2000_drm/fl2000_gem.c:270:17: note: (near initialization for ‘fl2000_gem_default_funcs.vmap’)
/home/skippy/Documents/Yay_AUR/fl2000_drm/fl2000_gem.c:271:19: error: initialization of ‘void (
)(struct drm_gem_object *, struct dma_buf_map )’ from incompatible pointer type ‘void ()(struct drm_gem_object *, void *)’ [-Werror=incompatible-pointer-types]
271 | .vunmap = fl2000_gem_prime_vunmap,
| ^~~~~~~~~~~~~~~~~~~~~~~
/home/skippy/Documents/Yay_AUR/fl2000_drm/fl2000_gem.c:271:19: note: (near initialization for ‘fl2000_gem_default_funcs.vunmap’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:271: /home/skippy/Documents/Yay_AUR/fl2000_drm/fl2000_gem.o] Error 1
make[1]: *** [Makefile:1858: /home/skippy/Documents/Yay_AUR/fl2000_drm] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.14.16-arch1-1/build'
make: *** [Makefile:21: modules] Error 2

@MBaltz
Copy link

MBaltz commented Dec 1, 2021

Same here :,(
Please, fix that!

kernel: 5.15.5-arch1-1

image

See this error in text:
make CHECK="/usr/bin/sparse" -C /lib/modules/5.15.5-arch1-1/build M=/tmp/b/fl2000_drm modules
make[1]: Entrando no diretório '/usr/lib/modules/5.15.5-arch1-1/build'

  CC [M]  /tmp/b/fl2000_drm/fl2000_drv.o
  CC [M]  /tmp/b/fl2000_drm/fl2000_registers.o
  CC [M]  /tmp/b/fl2000_drm/fl2000_interrupt.o
  CC [M]  /tmp/b/fl2000_drm/fl2000_streaming.o
  CC [M]  /tmp/b/fl2000_drm/fl2000_i2c.o
  CC [M]  /tmp/b/fl2000_drm/fl2000_gem.o
/tmp/b/fl2000_drm/fl2000_gem.c: In function ‘fl2000_gem_prime_import_sg_table’:
/tmp/b/fl2000_drm/fl2000_gem.c:234:15: error: implicit declaration of function ‘drm_prime_sg_to_page_addr_arrays’; did you mean ‘drm_prime_sg_to_dma_addr_array’? [-Werror=implicit-function-declaration]
  234 |         ret = drm_prime_sg_to_page_addr_arrays(sgt, obj->pages, NULL, obj->num_pages);
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |               drm_prime_sg_to_dma_addr_array
/tmp/b/fl2000_drm/fl2000_gem.c: At top level:
/tmp/b/fl2000_drm/fl2000_gem.c:270:17: error: initialization of ‘int (*)(struct drm_gem_object *, struct dma_buf_map *)’ from incompatible pointer type ‘void * (*)(struct drm_gem_object *)’ [-Werror=incompatible-pointer-types]
  270 |         .vmap = fl2000_gem_prime_vmap,
      |                 ^~~~~~~~~~~~~~~~~~~~~
/tmp/b/fl2000_drm/fl2000_gem.c:270:17: note: (near initialization for ‘fl2000_gem_default_funcs.vmap’)
/tmp/b/fl2000_drm/fl2000_gem.c:271:19: error: initialization of ‘void (*)(struct drm_gem_object *, struct dma_buf_map *)’ from incompatible pointer type ‘void (*)(struct drm_gem_object *, void *)’ [-Werror=incompatible-pointer-types]
  271 |         .vunmap = fl2000_gem_prime_vunmap,
      |                   ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/b/fl2000_drm/fl2000_gem.c:271:19: note: (near initialization for ‘fl2000_gem_default_funcs.vunmap’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:277: /tmp/b/fl2000_drm/fl2000_gem.o] Erro 1
make[1]: *** [Makefile:1868: /tmp/b/fl2000_drm] Erro 2
make[1]: Saindo do diretório '/usr/lib/modules/5.15.5-arch1-1/build'

make: *** [Makefile:21: modules] Erro 2

@Vini98br
Copy link

Vini98br commented Jul 14, 2022

Same here

OS: pop-os 21.04
kernel: 5.15.11-76051511-generic

image

See in text:
make CHECK="/usr/bin/sparse" -C /lib/modules/5.15.11-76051511-generic/build M=/home/vinicius/Downloads/fl2000_drm-master modules make[1]: Entering directory '/usr/src/linux-headers-5.15.11-76051511-generic' CC [M] /home/vinicius/Downloads/fl2000_drm-master/fl2000_gem.o /home/vinicius/Downloads/fl2000_drm-master/fl2000_gem.c: In function ‘fl2000_gem_prime_import_sg_table’: /home/vinicius/Downloads/fl2000_drm-master/fl2000_gem.c:234:8: error: implicit declaration of function ‘drm_prime_sg_to_page_addr_arrays’; did you mean ‘drm_prime_sg_to_dma_addr_array’? [-Werror=implicit-function-declaration] 234 | ret = drm_prime_sg_to_page_addr_arrays(sgt, obj->pages, NULL, obj->num_pages); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | drm_prime_sg_to_dma_addr_array /home/vinicius/Downloads/fl2000_drm-master/fl2000_gem.c: At top level: /home/vinicius/Downloads/fl2000_drm-master/fl2000_gem.c:270:10: error: initialization of ‘int (*)(struct drm_gem_object *, struct dma_buf_map *)’ from incompatible pointer type ‘void * (*)(struct drm_gem_object *)’ [-Werror=incompatible-pointer-types] 270 | .vmap = fl2000_gem_prime_vmap, | ^~~~~~~~~~~~~~~~~~~~~ /home/vinicius/Downloads/fl2000_drm-master/fl2000_gem.c:270:10: note: (near initialization for ‘fl2000_gem_default_funcs.vmap’) /home/vinicius/Downloads/fl2000_drm-master/fl2000_gem.c:271:12: error: initialization of ‘void (*)(struct drm_gem_object *, struct dma_buf_map *)’ from incompatible pointer type ‘void (*)(struct drm_gem_object *, void *)’ [-Werror=incompatible-pointer-types] 271 | .vunmap = fl2000_gem_prime_vunmap, | ^~~~~~~~~~~~~~~~~~~~~~~ /home/vinicius/Downloads/fl2000_drm-master/fl2000_gem.c:271:12: note: (near initialization for ‘fl2000_gem_default_funcs.vunmap’) cc1: some warnings being treated as errors make[2]: *** [scripts/Makefile.build:277: /home/vinicius/Downloads/fl2000_drm-master/fl2000_gem.o] Error 1 make[1]: *** [Makefile:1874: /home/vinicius/Downloads/fl2000_drm-master] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.15.11-76051511-generic' make: *** [Makefile:21: modules] Error 2

@mati75
Copy link

mati75 commented Jul 18, 2022

Fix: rhgndf@7be98c3

@Vini98br
Copy link

Vini98br commented Jul 18, 2022

@mati75 this commit fixed the make command errors but when running the next command of the tutorial: insmod fl2000.ko && insmod it66121.ko, it gave me the following error:

image

And when running only sudo insmod it66121.ko it crashed my entire computer

As my computer crashed I cant show the make command log when i first ran it, but when i run it now, it logs it:

image

@shanez1215
Copy link

shanez1215 commented Aug 6, 2022

This happened to me too

@mati75 this commit fixed the make command errors but when running the next command of the tutorial: insmod fl2000.ko && insmod it66121.ko, it gave me the following error:

image

And when running only sudo insmod it66121.ko it crashed my entire computer

As my computer crashed I cant show the make command log when i first ran it, but when i run it now, it logs it:

image

@petereon
Copy link

Whoops, only reading this now 😅 Apologies to everyone whose computer has crashed on my behalf. I've only made this to compile. This was achieved by including guards around few key functions which have been deprecated in 5.12 and then life got in the way of properly figuring out their replacements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants