[solved] Linux 6.9.1 and blackmagic-io-14.0a1 module

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

goldyfruit

  • Posts: 38
  • Joined: Mon Apr 26, 2021 6:47 pm
  • Location: Montreal
  • Real Name: Gaëtan Trellu

[solved] Linux 6.9.1 and blackmagic-io-14.0a1 module

PostSun May 26, 2024 2:36 pm

I'm running openSUSE Tumbleweed and the latest module doesn't compile on kernel 6.9.1.

Code: Select all
> cat /var/lib/dkms/blackmagic-io/14.0a1/build/make.log
DKMS make.log for blackmagic-io-14.0a1 for kernel 6.9.1-1-default (x86_64)
Sun May 26 10:32:19 EDT 2024
touch .blackmagic.o.cmd
make -C /lib/modules/6.9.1-1-default/build M=/var/lib/dkms/blackmagic-io/14.0a1/build
make[1]: Entering directory '/usr/src/linux-6.9.1-1-obj/x86_64/default'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (SUSE Linux) 13.2.1 20240509 [revision b7a2697733d19a093cbdd0e200ffce069a4bc812]
  You are using:           gcc (SUSE Linux) 13.3.0
  CC [M]  /var/lib/dkms/blackmagic-io/14.0a1/build/bmio_client.o
  CC [M]  /var/lib/dkms/blackmagic-io/14.0a1/build/bmio_dev.o
  CC [M]  /var/lib/dkms/blackmagic-io/14.0a1/build/bmio_device.o
  CC [M]  /var/lib/dkms/blackmagic-io/14.0a1/build/bmio_driver.o
  CC [M]  /var/lib/dkms/blackmagic-io/14.0a1/build/bmio_serial.o
  CC [M]  /var/lib/dkms/blackmagic-io/14.0a1/build/bmio_export.o
  CC [M]  /var/lib/dkms/blackmagic-io/14.0a1/build/bmio_pci_ids.o
  CC [M]  /var/lib/dkms/blackmagic-io/14.0a1/build/bm_locks.o
  CC [M]  /var/lib/dkms/blackmagic-io/14.0a1/build/bm_mm.o
  CC [M]  /var/lib/dkms/blackmagic-io/14.0a1/build/bm_pci.o
  CC [M]  /var/lib/dkms/blackmagic-io/14.0a1/build/bm_util.o
  COPY    /var/lib/dkms/blackmagic-io/14.0a1/build/blackmagic.o
  CC [M]  /var/lib/dkms/blackmagic-io/14.0a1/build/bmio_audio.o
/var/lib/dkms/blackmagic-io/14.0a1/build/bm_locks.c: In function ‘bm_mutex_alloc’:
/var/lib/dkms/blackmagic-io/14.0a1/build/bm_locks.c:178:9: error: implicit declaration of function ‘mutex_init’; did you mean ‘bm_util_init’? [-Werror=implicit-function-declaration]
  178 |         mutex_init(mutex);
      |         ^~~~~~~~~~
      |         bm_util_init
/var/lib/dkms/blackmagic-io/14.0a1/build/bm_locks.c: In function ‘bm_mutex_lock’:
/var/lib/dkms/blackmagic-io/14.0a1/build/bm_locks.c:189:9: error: implicit declaration of function ‘mutex_lock’; did you mean ‘bm_mutex_lock’? [-Werror=implicit-function-declaration]
  189 |         mutex_lock(mutex);
      |         ^~~~~~~~~~
      |         bm_mutex_lock
/var/lib/dkms/blackmagic-io/14.0a1/build/bm_util.c: In function ‘bm_alloc_aligned’:
/var/lib/dkms/blackmagic-io/14.0a1/build/bm_util.c:140:37: error: ‘MAX_ORDER’ undeclared (first use in this function)
  140 |         if (get_order(alloc_size) < MAX_ORDER)
      |                                     ^~~~~~~~~
/var/lib/dkms/blackmagic-io/14.0a1/build/bm_util.c:140:37: note: each undeclared identifier is reported only once for each function it appears in
/var/lib/dkms/blackmagic-io/14.0a1/build/bm_util.c: At top level:
/var/lib/dkms/blackmagic-io/14.0a1/build/bm_util.c:535:13: warning: no previous prototype for ‘get_event’ [-Wmissing-prototypes]
  535 | bm_event_t* get_event(void* event, bool create)
      |             ^~~~~~~~~
/var/lib/dkms/blackmagic-io/14.0a1/build/bm_util.c:575:6: warning: no previous prototype for ‘put_event’ [-Wmissing-prototypes]
  575 | void put_event(bm_event_t* ev)
      |      ^~~~~~~~~
/var/lib/dkms/blackmagic-io/14.0a1/build/bm_locks.c: In function ‘bm_mutex_trylock’:
/var/lib/dkms/blackmagic-io/14.0a1/build/bm_locks.c:194:17: error: implicit declaration of function ‘mutex_trylock’; did you mean ‘bm_mutex_trylock’? [-Werror=implicit-function-declaration]
  194 |         return (mutex_trylock(mutex) != 0);
      |                 ^~~~~~~~~~~~~
      |                 bm_mutex_trylock
/var/lib/dkms/blackmagic-io/14.0a1/build/bm_locks.c: In function ‘bm_mutex_unlock’:
/var/lib/dkms/blackmagic-io/14.0a1/build/bm_locks.c:199:9: error: implicit declaration of function ‘mutex_unlock’; did you mean ‘bm_mutex_unlock’? [-Werror=implicit-function-declaration]
  199 |         mutex_unlock(mutex);
      |         ^~~~~~~~~~~~
      |         bm_mutex_unlock
make[3]: *** [/usr/src/linux-6.9.1-1/scripts/Makefile.build:245: /var/lib/dkms/blackmagic-io/14.0a1/build/bm_util.o] Error 1
make[3]: *** Waiting for unfinished jobs....
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-6.9.1-1/scripts/Makefile.build:245: /var/lib/dkms/blackmagic-io/14.0a1/build/bm_locks.o] Error 1
In file included from /usr/src/linux-6.9.1-1/include/linux/pci.h:2693,
                 from /var/lib/dkms/blackmagic-io/14.0a1/build/bm_mm.c:31:
/var/lib/dkms/blackmagic-io/14.0a1/build/bm_mm.c: In function ‘bm_dma_sg_bus_map’:
/var/lib/dkms/blackmagic-io/14.0a1/build/bm_mm.c:240:84: warning: implicit conversion from ‘bm_dma_direction_t’ {aka ‘enum bm_dma_direction’} to ‘enum dma_data_direction’ [-Wenum-conversion]
  240 |         int nents = dma_map_sg(&pci->pdev->dev, sgTable->sgl, sgTable->orig_nents, dir);
      |                                                                                    ^~~
/usr/src/linux-6.9.1-1/include/linux/dma-mapping.h:419:58: note: in definition of macro ‘dma_map_sg’
  419 | #define dma_map_sg(d, s, n, r) dma_map_sg_attrs(d, s, n, r, 0)
      |                                                          ^
/var/lib/dkms/blackmagic-io/14.0a1/build/bm_mm.c: In function ‘bm_dma_sg_bus_unmap’:
/var/lib/dkms/blackmagic-io/14.0a1/build/bm_mm.c:257:74: warning: implicit conversion from ‘bm_dma_direction_t’ {aka ‘enum bm_dma_direction’} to ‘enum dma_data_direction’ [-Wenum-conversion]
  257 |         dma_unmap_sg(&pci->pdev->dev, sgTable->sgl, sgTable->orig_nents, dir);
      |                                                                          ^~~
/usr/src/linux-6.9.1-1/include/linux/dma-mapping.h:420:62: note: in definition of macro ‘dma_unmap_sg’
  420 | #define dma_unmap_sg(d, s, n, r) dma_unmap_sg_attrs(d, s, n, r, 0)
      |                                                              ^
/var/lib/dkms/blackmagic-io/14.0a1/build/bm_mm.c: In function ‘bm_dma_bus_map_kernel_subpage’:
/var/lib/dkms/blackmagic-io/14.0a1/build/bm_mm.c:344:72: warning: implicit conversion from ‘bm_dma_direction_t’ {aka ‘enum bm_dma_direction’} to ‘enum dma_data_direction’ [-Wenum-conversion]
  344 |         subpage->busAddr = dma_map_single(&pci->pdev->dev, addr, size, dir);
      |                                                                        ^~~
/usr/src/linux-6.9.1-1/include/linux/dma-mapping.h:417:66: note: in definition of macro ‘dma_map_single’
  417 | #define dma_map_single(d, a, s, r) dma_map_single_attrs(d, a, s, r, 0)
      |                                                                  ^
/var/lib/dkms/blackmagic-io/14.0a1/build/bm_mm.c: In function ‘bm_dma_bus_unmap_kernel_subpage’:
/var/lib/dkms/blackmagic-io/14.0a1/build/bm_mm.c:357:76: warning: implicit conversion from ‘bm_dma_direction_t’ {aka ‘enum bm_dma_direction’} to ‘enum dma_data_direction’ [-Wenum-conversion]
  357 |         dma_unmap_single(&pci->pdev->dev, subpage->busAddr, subpage->size, dir);
      |                                                                            ^~~
/usr/src/linux-6.9.1-1/include/linux/dma-mapping.h:418:70: note: in definition of macro ‘dma_unmap_single’
  418 | #define dma_unmap_single(d, a, s, r) dma_unmap_single_attrs(d, a, s, r, 0)
      |                                                                      ^
make[2]: *** [/usr/src/linux-6.9.1-1/Makefile:1936: /var/lib/dkms/blackmagic-io/14.0a1/build] Error 2
make[1]: *** [../../../linux-6.9.1-1/Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-6.9.1-1-obj/x86_64/default'
make: *** [Makefile:47: all] Error 2
Last edited by goldyfruit on Wed May 29, 2024 3:41 pm, edited 1 time in total.
Offline

NVieville

  • Posts: 15
  • Joined: Tue Mar 12, 2019 9:29 am
  • Real Name: Nicolas Viéville

Re: Linux 6.9.1 and blackmagic-io-14.0a1 module

PostMon May 27, 2024 8:00 am

Hello goldyfruit,

Sorry for this response that can be of no help at all, but did you try to apply the proposed patch in discussion (some of the errors you reported should be addressed by this patch):

viewtopic.php?f=12&t=199022#p1036982

Adapting the method to make the paths corresponding to your current BlackMagic driver version with sed, as explained in post 14, should help to apply it.

As my workstation don't have kernel 6.9.x yet (Fedora 40), it is just a shot in the night, as I can't give a try to what I suggested. :)
Any feedback is welcome.

Cordially,


--
NVieville
Offline

goldyfruit

  • Posts: 38
  • Joined: Mon Apr 26, 2021 6:47 pm
  • Location: Montreal
  • Real Name: Gaëtan Trellu

Re: Linux 6.9.1 and blackmagic-io-14.0a1 module

PostWed May 29, 2024 3:41 pm

Indeed, the same patch works for this version.

Thanks NVieville!
Offline

jakarr

  • Posts: 5
  • Joined: Wed May 09, 2018 4:57 pm
  • Real Name: Jake Harr

Re: [solved] Linux 6.9.1 and blackmagic-io-14.0a1 module

PostFri May 31, 2024 9:28 pm

Thanks for the link to the patch, NVieville! The good old missing-header-that-used-to-be-included-transitively problem. Love it.

Does anyone know when this might make its way into a release? I just noticed this problem when upgrading to Ubuntu 24.04 a few days.
Offline

jakarr

  • Posts: 5
  • Joined: Wed May 09, 2018 4:57 pm
  • Real Name: Jake Harr

Re: [solved] Linux 6.9.1 and blackmagic-io-14.0a1 module

PostMon Jun 03, 2024 7:06 pm

jakarr wrote:Does anyone know when this might make its way into a release? I just noticed this problem when upgrading to Ubuntu 24.04 a few days.

Question answered with 14.0.1. That works perfectly on my machine with Ubuntu 24.04. Thanks everyone!

Return to Software Developers

Who is online

Users browsing this forum: niharvanjara and 8 guests