Download raw body.
freerdp fails on latest snapshot
On Thu, 06 Nov 2025 13:24:46 +0100,
Mike Marcott <mike@marcott.net> wrote:
>
> Good morning,
>
> After previously working for the last years through current 7.8 snapshot from around 10/8/2025, a recent update to snapshot OpenBSD 7.8-current has freerdp-2.11.7 failing to connect to multiple win10 boxes withi this error:
>
> xfreerdp:/usr/local/lib/libfreerdp2.so.3.0: undefined symbol 'avcodec_close'
> ld.so: xfreerdp: lazy binding failed!
> Killed
>
> The password negotiation works, the typical window pops up briefly then closes with that error.
>
> OpenBSD 7.8-current (GENERIC.MP) #81: Sat Nov 1 11:07:45 MDT 2025
> deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP mailto:deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
>
> Anyone else seeing this? Thank you
>
This is side effect of switching to ffmpeg8.
Thanks for reporting it.
Upstream fixed it here:
https://github.com/FreeRDP/FreeRDP/commit/726add2a982bfdf4cffef3cc95395c9a4b49385b
But our version is quite old. So, here a diff which compile testing.
May I ask you to try it?
Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/freerdp/Makefile,v
diff -u -p -r1.73 Makefile
--- Makefile 21 May 2024 08:40:53 -0000 1.73
+++ Makefile 6 Nov 2025 13:58:53 -0000
@@ -1,5 +1,6 @@
COMMENT = client for Microsoft RDP (remote desktop protocol)
DISTNAME = freerdp-2.11.7
+REVISION = 0
DPB_PROPERTIES = parallel
CATEGORIES = x11 net
Index: patches/patch-channels_tsmf_client_ffmpeg_tsmf_ffmpeg_c
===================================================================
RCS file: patches/patch-channels_tsmf_client_ffmpeg_tsmf_ffmpeg_c
diff -N patches/patch-channels_tsmf_client_ffmpeg_tsmf_ffmpeg_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-channels_tsmf_client_ffmpeg_tsmf_ffmpeg_c 6 Nov 2025 13:58:53 -0000
@@ -0,0 +1,22 @@
+Index: channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
+--- channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c.orig
++++ channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
+@@ -624,11 +624,18 @@ static void tsmf_ffmpeg_free(ITSMFDecoder* decoder)
+
+ if (mdecoder->codec_context)
+ {
++
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55, 69, 100)
+ if (mdecoder->prepared)
+ avcodec_close(mdecoder->codec_context);
++#endif
+
+ free(mdecoder->codec_context->extradata);
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55, 69, 100)
++ avcodec_free_context(&mdecoder->codec_context);
++#else
+ av_free(mdecoder->codec_context);
++#endif
+ }
+
+ free(decoder);
Index: patches/patch-libfreerdp_codec_h264_ffmpeg_c
===================================================================
RCS file: patches/patch-libfreerdp_codec_h264_ffmpeg_c
diff -N patches/patch-libfreerdp_codec_h264_ffmpeg_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-libfreerdp_codec_h264_ffmpeg_c 6 Nov 2025 13:58:53 -0000
@@ -0,0 +1,15 @@
+Index: libfreerdp/codec/h264_ffmpeg.c
+--- libfreerdp/codec/h264_ffmpeg.c.orig
++++ libfreerdp/codec/h264_ffmpeg.c
+@@ -100,10 +100,10 @@ static void libavcodec_destroy_encoder(H264_CONTEXT* h
+
+ if (sys->codecEncoderContext)
+ {
+- avcodec_close(sys->codecEncoderContext);
+ #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55, 69, 100)
+ avcodec_free_context(&sys->codecEncoderContext);
+ #else
++ avcodec_close(sys->codecEncoderContext);
+ av_free(sys->codecEncoderContext);
+ #endif
+ }
--
wbr, Kirill
freerdp fails on latest snapshot