Opened 18 months ago

Closed 7 months ago

Last modified 7 months 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 Changed 7 months ago by hydra3333

may I suggest not disabling these ?

comment:2 Changed 7 months ago by cehoyos

  • Resolution set to invalid
  • Status changed from new to closed

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 follow-up: Changed 7 months ago by 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.

comment:4 in reply to: ↑ 3 ; follow-up: Changed 7 months ago by 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?

comment:5 in reply to: ↑ 4 Changed 7 months ago by bubbleguuum

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 Changed 7 months ago by bubbleguuum

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 Changed 7 months ago by cehoyos

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

Note: See TracTickets for help on using tickets.