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

While compiling ffmpeg with --enable-cuda-llvm on macos, it shows ERROR: cuda_llvm requested but not found #485

Open
Aniark opened this issue Mar 15, 2025 · 3 comments

Comments

@Aniark
Copy link

Aniark commented Mar 15, 2025

ffmpeg version: latest git from master branch

llvm-mingw version : nightly and 20.1.0 final has been tried

error information from ffbuild/config.log:

BEGIN /var/folders/0j/bwqcs4y508s2n4ck4dhf3rpc0000gn/T//ffconf.cGW7qct2/test.c
    1   #include <stdbit.h>
    2   #include <assert.h>
    3   int main(void) { static_assert(__STDC_VERSION_STDBIT_H__ >= 202311L, "Compiler lacks stdbit.h"); return 0; }
END /var/folders/0j/bwqcs4y508s2n4ck4dhf3rpc0000gn/T//ffconf.cGW7qct2/test.c
x86_64-w64-mingw32-gcc -D_ISOC11_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DWIN32_LEAN_AND_MEAN -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1 -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -std=c17 -fomit-frame-pointer -I/usr/local/include -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-unused-const-variable -Wno-bool-operation -Wno-char-subscripts -Wno-implicit-const-int-float-conversion -O3 -fno-math-errno -fno-signed-zeros -mstack-alignment=16 -Qunused-arguments -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -c -o /var/folders/0j/bwqcs4y508s2n4ck4dhf3rpc0000gn/T//ffconf.cGW7qct2/test.o /var/folders/0j/bwqcs4y508s2n4ck4dhf3rpc0000gn/T//ffconf.cGW7qct2/test.c
/var/folders/0j/bwqcs4y508s2n4ck4dhf3rpc0000gn/T//ffconf.cGW7qct2/test.c:1:10: fatal error: 'stdbit.h' file not found
    1 | #include <stdbit.h>
      |          ^~~~~~~~~~
1 error generated.
ERROR: cuda_llvm requested but not found

windows and linux do not have this issue

@mstorsjo
Copy link
Owner

Please provide exact instructions for how to reproduce this. I tried configuring with --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-cuda-llvm on macOS, with the latest llvm-mingw release added in $PATH, and it configured and built fine. Does one need to have some CUDA SDK installed as well, in order to hit this?

@Andarwinux
Copy link
Contributor

As far as I know cuda-llvm only needs clang with nvtpx supported and ffnvcodec headers.

The errors shown in your config.log are not directly related to cuda-llvm, but that's understandable, ffmpeg's config.log often has misleading, irrelevant output, and you'd need to read the whole config.log to know what's really going on.

@Aniark
Copy link
Author

Aniark commented Mar 16, 2025

@mstorsjo I'm tested on github actions, macos-13 macos-14 macos-15 all os above didn't work.

To reproduce, just try to compile on those runner os with latest or nightly llvm-mingw

git clone https://github.com/FFmpeg/FFmpeg
cd FFmpeg
./configure --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-cuda-llvm

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

3 participants