Fedora 31 - cannot build Blackmagic module

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

fredericL

  • Posts: 4
  • Joined: Tue Jun 16, 2020 7:08 pm
  • Real Name: Frédéric Lapeyre

Fedora 31 - cannot build Blackmagic module

PostTue Jun 16, 2020 7:28 pm

Hello,

I looked through the forum and the Internet. Cannot find a working solution for this.

I have downloaded Desktop Video 11.5.1 (blackmagic-11.5.1a14) and the build fails like this :


Code: Select all
sudo dkms build -m blackmagic -v 11.5.1a14

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.6.15-200.fc31.x86_64 KERNELRELEASE=5.6.15-200.fc31.x86_64...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.6.15-200.fc31.x86_64 (x86_64)
Consult /var/lib/dkms/blackmagic/11.5.1a14/build/make.log for more information.


Log says :

Code: Select all
DKMS make.log for blackmagic-11.5.1a14 for kernel 5.6.15-200.fc31.x86_64 (x86_64)
mar. juin 16 21:21:43 CEST 2020
make -C /lib/modules/5.6.15-200.fc31.x86_64/build M=/var/lib/dkms/blackmagic/11.5.1a14/build
make[1] : on entre dans le répertoire « /usr/src/kernels/5.6.16-200.fc31.x86_64 »
  AR      /var/lib/dkms/blackmagic/11.5.1a14/build/built-in.a
  CC [M]  /var/lib/dkms/blackmagic/11.5.1a14/build/blackmagic_serial.o
  CC [M]  /var/lib/dkms/blackmagic/11.5.1a14/build/blackmagic_lib.o
  CC [M]  /var/lib/dkms/blackmagic/11.5.1a14/build/blackmagic_core.o
  CC [M]  /var/lib/dkms/blackmagic/11.5.1a14/build/blackmagic_dma.o
/var/lib/dkms/blackmagic/11.5.1a14/build/blackmagic_lib.c: Dans la fonction « dl_uptime »:
/var/lib/dkms/blackmagic/11.5.1a14/build/blackmagic_lib.c:326:18: erreur: la taille de stockage de « ts » est inconnue
  326 |  struct timespec ts;
      |                  ^~
/var/lib/dkms/blackmagic/11.5.1a14/build/blackmagic_lib.c:327:2: erreur: déclaration implicite de la fonction « getrawmonotonic » [-Werror=implicit-function-declaration]
  327 |  getrawmonotonic(&ts);
      |  ^~~~~~~~~~~~~~~
/var/lib/dkms/blackmagic/11.5.1a14/build/blackmagic_lib.c:326:18: attention: variable inutilisée « ts » [-Wunused-variable]
  326 |  struct timespec ts;
      |                  ^~
/var/lib/dkms/blackmagic/11.5.1a14/build/blackmagic_lib.c: Dans la fonction « dl_get_time_us »:
/var/lib/dkms/blackmagic/11.5.1a14/build/blackmagic_lib.c:337:18: erreur: la taille de stockage de « t » est inconnue
  337 |  struct timespec t;
      |                  ^
/var/lib/dkms/blackmagic/11.5.1a14/build/blackmagic_lib.c:338:2: erreur: déclaration implicite de la fonction « getnstimeofday » [-Werror=implicit-function-declaration]
  338 |  getnstimeofday(&t);
      |  ^~~~~~~~~~~~~~
/var/lib/dkms/blackmagic/11.5.1a14/build/blackmagic_lib.c:337:18: attention: variable inutilisée « t » [-Wunused-variable]
  337 |  struct timespec t;
      |                  ^
/var/lib/dkms/blackmagic/11.5.1a14/build/blackmagic_lib.c: Dans la fonction « dl_pci_map_bar »:
/var/lib/dkms/blackmagic/11.5.1a14/build/blackmagic_lib.c:421:9: erreur: déclaration implicite de la fonction « ioremap_nocache »; vouliez-vous utiliser « ioremap_cache » ? [-Werror=implicit-function-declaration]
  421 |  return ioremap_nocache(base, pci_resource_len(dev, bar));
      |         ^~~~~~~~~~~~~~~
      |         ioremap_cache
/var/lib/dkms/blackmagic/11.5.1a14/build/blackmagic_lib.c:421:9: attention: retourner « int » depuis une fonction avec le type de retour « void * » transforme un entier en pointeur sans transtypage [-Wint-conversion]
  421 |  return ioremap_nocache(base, pci_resource_len(dev, bar));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/blackmagic/11.5.1a14/build/blackmagic_lib.c: Dans la fonction « dl_uptime »:
/var/lib/dkms/blackmagic/11.5.1a14/build/blackmagic_lib.c:332:1: attention: le contrôle a atteint la fin d'une fonction non « void » [-Wreturn-type]
  332 | }
      | ^
/var/lib/dkms/blackmagic/11.5.1a14/build/blackmagic_lib.c: Dans la fonction « dl_get_time_us »:
/var/lib/dkms/blackmagic/11.5.1a14/build/blackmagic_lib.c:345:1: attention: le contrôle a atteint la fin d'une fonction non « void » [-Wreturn-type]
  345 | }
      | ^
cc1 : certains avertissements sont traités comme des erreurs
make[2]: *** [scripts/Makefile.build:268: /var/lib/dkms/blackmagic/11.5.1a14/build/blackmagic_lib.o] Error 1
make[2]: *** Attente des tâches non terminées....
make[1]: *** [Makefile:1695: /var/lib/dkms/blackmagic/11.5.1a14/build] Error 2
make[1] : on quitte le répertoire « /usr/src/kernels/5.6.16-200.fc31.x86_64 »
make: *** [Makefile:43: all] Error 2



Makefile includes EXTRA_CFLAGS += -std=gnu99 like this :

Code: Select all
KERNELRELEASE=`uname -r`
KMOD_NAME=blackmagic
EXTRA_CFLAGS +=  -std=gnu99

$(KMOD_NAME)-objs := \
    blackmagic_serial.o blackmagic_core.o blackmagic_lib.o blackmagic_dma.o blackmagic_gate.o bmd-support.o

#
# The final module
#
obj-m += $(KMOD_NAME).o

KERNELDIR ?= /lib/modules/$(KERNELRELEASE)/build
PWD       := $(shell pwd)

all:
   $(MAKE) -C $(KERNELDIR) M=$(PWD)

clean:
   rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions built-in.o Module.symvers Module.markers modules.order


I would appreciate any hint on what I am probably missing. I have an "out of the box" version of Fedora and did install the headers.

Many thanks in advance,
Frederic
Offline
User avatar

VennStone

  • Posts: 55
  • Joined: Sun Sep 29, 2019 6:50 pm
  • Location: Athens
  • Real Name: Ven Stone

Re: Fedora 31 - cannot build Blackmagic module

PostWed Jun 17, 2020 4:19 am

Desktop Video will not compile with a 5.6 kernel. There is a thread about patching 11.5.1 to work with 5.6. viewtopic.php?f=18&t=111612

I tried it on one of our testing and it does work.
Debian 10 / 11
Magewell 11100 Pro
Intensity Pro
Intensity Pro 4K
DeckLink Mini Recorder 4K
DeckLink Quad
Offline

fredericL

  • Posts: 4
  • Joined: Tue Jun 16, 2020 7:08 pm
  • Real Name: Frédéric Lapeyre

Re: Fedora 31 - cannot build Blackmagic module

PostThu Jun 18, 2020 8:07 pm

Hi,

Thank you very mich.

The patch worked, I can now compile and load the modules into the kernel.

The remaining issue is that my device is not detected... lspci | grep magic returns blank.
lsmod | preg magic does return both blackmagic and blackmagic-io.

I'll open a new thread for that.

Cheers.

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 21 guests