Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#6436 closed enhancement (invalid)

nvenc, nvdec and cuvid should be disabled by configure if ffmpeg is compiled with -static

Reported by: bubbleguuum Owned by:
Priority: wish Component: build system
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Such builds crash when dlopening NVIDIA libraries (libcuda.so, libnvcuvid.so, libnvidia-encode.so) in compat/cuda/dynlink_loader.h

See issue #6431 post #7 for a full explanation and a workaround to make a static build except for the glibc linked dynamically.

Change History (7)

comment:1 by hydra3333, 6 years ago

may I suggest not disabling these ?

comment:2 by Carl Eugen Hoyos, 6 years ago

Resolution: invalid
Status: newclosed

The following seems to indicate that -static works fine at least in some cases:

warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

comment:3 by bubbleguuum, 6 years ago

But they fail in most cases where people build static FFmpeg binaries for others to use, eg https://johnvansickle.com/ffmpeg/, because there is no way users of these binaries are running the same glibc version that the heroic guy that compiled FFmpeg.

in reply to:  3 ; comment:4 by Carl Eugen Hoyos, 6 years ago

Replying to bubbleguuum:

But they fail in most cases where people build static FFmpeg binaries for others to use, eg https://johnvansickle.com/ffmpeg/, because there is no way users of these binaries are running the same glibc version that the heroic guy that compiled FFmpeg.

Indicating there is an issue with his build script: Did you report it?

in reply to:  4 comment:5 by bubbleguuum, 6 years ago

Replying to cehoyos:

Replying to bubbleguuum:

But they fail in most cases where people build static FFmpeg binaries for others to use, eg https://johnvansickle.com/ffmpeg/, because there is no way users of these binaries are running the same glibc version that the heroic guy that compiled FFmpeg.

Indicating there is an issue with his build script: Did you report it?

No as at that time I needed cuvid support urgently in a static build. So I compiled it myself using the workaround I mention in #6431 (post #7) that builds everything statically except the glibc. Such build can used by any user as long as they have a newer version of the glibc than the verison that has been used for compiling.

comment:6 by bubbleguuum, 6 years ago

And as a side note, static builds not excluding the glibc also break name resolution as it relies on libdl not being linked statically.

So with such builds, this would fail

ffmpeg -i http://my.cool.host

comment:7 by Carl Eugen Hoyos, 6 years ago

Works fine here (although not with the sample command line you provided).

Note: See TracTickets for help on using tickets.