Opened 4 weeks ago

Last modified 4 weeks ago

#7453 new defect

configure doesn't find ffnvcodec headers on hackintosh

Reported by: w4t3r Owned by:
Priority: normal Component: build system
Version: git-master Keywords: cuda nvenc
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
Unable to compile ffmpeg on macOS 10.13.6 with Nvidia GPU acceleration support. I'm using a GTX 1080ti on a hackintosh.
How to reproduce:

Run configure:

Daniels-iMac:ffmpeg daniel$ ./configure --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp  --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib
ERROR: cuda requested, but not all dependencies are satisfied: ffnvcodec
 
If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.

As you can see it fails.
Proof that nvenc headers are there:

Daniels-iMac:ffmpeg daniel$ pkg-config --cflags ffnvcodec
-I/usr/local/include
Daniels-iMac:ffmpeg daniel$ pkg-config ffnvcodec
Daniels-iMac:ffmpeg daniel$ echo $?
0
Daniels-iMac:ffmpeg daniel$ ls /usr/local/include/ffnvcodec/
dynlink_cuda.h      dynlink_cuviddec.h  dynlink_loader.h    dynlink_nvcuvid.h   nvEncodeAPI.h
Daniels-iMac:ffmpeg daniel$

ffbuild/config.log: https://lfil.es/f/65f3a96b

Also, the last piece of code contained in the config.log file, compiled manually, exits 0

Attachments (1)

config.log (515.9 KB) - added by w4t3r 4 weeks ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 4 weeks ago by w4t3r

Proof that nvenc headers are there:

Sorry, I meant ffnvcodec

comment:2 Changed 4 weeks ago by cehoyos

  • Keywords cuda added; hackintosh nvidia gpu gpu acceleration pkgconfig configure removed

Please attach config.log here.

comment:3 Changed 4 weeks ago by oromit

OSX is not a supported os of the video codec sdk.

Changed 4 weeks ago by w4t3r

comment:4 Changed 4 weeks ago by w4t3r

@oromit: Oh, I see, but does that mean it won't work? Because

a) I built it yesterday with ubuntu, following this guide: https://developer.nvidia.com/ffmpeg and I never had to download the video codec sdk. Only drivers+CUDA toolkit
b) I'm not having issues with configure not finding the video codec sdk but with configure not finding headers that clearly are there

@cehoyos: Sorry, I thought a link would also work. Attached the file now.

It would be amazing if it would be possible to get this working, as encoding is 5x faster on my GPU and it sucks to reboot everytime to convert a video

comment:5 Changed 4 weeks ago by oromit

Apple has their own APIs for video de/encoding on OSX. Nothing else is supported there.

comment:6 Changed 4 weeks ago by w4t3r

Would ffmpeg utilize the graphics card through videotoolbox?

It doesn't have to be supported as long as it works.
The last test snippet in config.log compiles and exits successfully, so where does it say that it needs video codec sdk headers?

I mean if we could fix that it doesn't find the ffnvcodec headers maybe it would compile with CUDA toolkit?

comment:7 Changed 4 weeks ago by oromit

It finds the headers but configure is hard wired to disable anything cuda related anywhere but on Windows and Linux, since those are the only platforms it works on.
No idea about VT, but there is code for it in ffmpeg and you can probably use it to do stuff.

comment:8 Changed 4 weeks ago by w4t3r

That sucks.
Is configure generated somehow? Would it be possible to temporarily disable those checks, because maaaaaybe it would work and simply nobody has tried it on a mac with a nvidia card yet?

However it turns out, thank you for your help!

Note: See TracTickets for help on using tickets.