gstreamer1.0-plugins-bad compilation from sources: missing cuda.h

Asked by Adrian on 2021-06-10

Try to compile gst-plugins-bad1.0 from sources returns the error on Ubuntu 20.04 LTS:

/bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -Wdate-time -D_FORTIFY_SOURCE=2 -I../../gst-libs -I../../gst-libs -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DGST_USE_UNSTABLE_API -fno-strict-aliasing -DG_THREADS_MANDATORY -DG_DISABLE_CAST_CHECKS -Wall -Wdeclaration-after-statement -Wvla -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wwrite-strings -Wformat-security -Wold-style-definition -Winit-self -Wmissing-include-dirs -Waddress -Wno-multichar -Wnested-externs -g -fvisibility=hidden -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -O2 -fdebug-prefix-map=/tmp/gst/gst-plugins-bad1.0-1.16.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wno-error -c -o libgstbluez_la-gstavrcputil.lo `test -f 'gstavrcputil.c' || echo './'`gstavrcputil.c
In file included from nvcuvid.h:38,
                 from gstnvdec.h:33,
                 from gstnvdec.c:32:
cuviddec.h:39:10: fatal error: cuda.h: File not found
   39 | #include <cuda.h>
      | ^~~~~~~~
compilation terminated

Steps to reproduce:
apt source gstreamer1.0-plugins-bad
sudo apt install build-essential
sudo apt build-dep gstreamer1.0-plugins-bad
cd gst-plugins-bad1.0-1.16.2/
debuild -us -uc

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: gstreamer1.0-plugins-bad (not installed)
ProcVersionSignature: Ubuntu 5.4.0-74.83-generic 5.4.114
Uname: Linux 5.4.0-74-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.18
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: GNOME
Date: Thu Jun 10 18:06:15 2021
InstallationDate: Installed on 2018-04-05 (1162 days ago)
InstallationMedia: Ubuntu 16.04.4 LTS "Xenial Xerus" - Release amd64 (20180228)
SourcePackage: gst-plugins-bad1.0
UpgradeStatus: Upgraded to focal on 2020-10-28 (225 days ago)

Question information

English Edit question
Needs information
Ubuntu gst-plugins-bad1.0 Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Daniel Letzeisen (dtl131) said :

I could not reproduce this in my Xubuntu 20.04 VM, so I believe it more of a support request than an actual bug in the package.

Revision history for this message
Daniel Letzeisen (dtl131) said :

Ubuntu's package does not build the nvdec and nvenc plugins (i.e. the plugins that would require cuda.h)
So you must have some CUDA libs/headers on your system that configure detects, but not enough of them to get gstreamer to build with CUDA support.
Is that what you are trying to do here?

Can you help with this problem?

Provide an answer of your own, or ask Adrian for more information if necessary.

To post a message you must log in.