question about xfreerdp and vncviewer in freebsd14.3 ?

dear all:
i have run "pkg upgrade " in freebsd14.3 . now the xfreerdp and vncviewer can't work normal . error was below .
$xfreerdp
ld-elf.so.1: /usr/local/lib/libswscale.so.7: version LIBSWSCALE_7 required by /usr/local/lib/libfreerdp2.so.2 not defined

$ vncviewer
ld-elf.so.1: /usr/local/lib/libavcodec.so.60: version LIBAVCODEC_60 required by /usr/local/bin/vncviewer not defined

$pkg info ffmpeg
ffmpeg-6.1.2_16,1
Name : ffmpeg
Version : 6.1.2_16,1
Installed on : Wed Oct 8 09:25:51 2025 CST
Origin : multimedia/ffmpeg
Architecture : FreeBSD:14:amd64
Prefix : /usr/local
Categories : audio multimedia net
Licenses : GPLv3+, LGPL3+
Maintainer : multimedia@FreeBSD.org
WWW : https://ffmpeg.org/
Comment : Realtime audio/video encoder/converter and streaming
Shared Libs provided:
libavcodec.so.60
libavdevice.so.60
libavfilter.so.9
libavformat.so.60
libavutil.so.58
libpostproc.so.57
libswresample.so.4
libswscale.so.7

we lost libavcodec.so.60 and libswscale.so.7 , right ?
if yes, how to install those dll in freebsd14.3 ? thanks.
 
we lost libavcodec.so.60 and libswscale.so.7 , right ?
Nope.

Verify that they are in ldconfig(8) path and try again.
Code:
# service ldconfig start
...
# ldconfig -r | grep -E 'lib(avcodec|swscale)'
    729:-lswscale.7 => /usr/local/lib/libswscale.so.7
    822:-lavcodec.60 => /usr/local/lib/libavcodec.so.60

If they are and it doesn't solve, try pkg install -Rf xfreerdp tigervnc-viewer
 
This doesn't look like a dynamic linker search path issue. The shared libraries are missing the embedded version definition.

The version of multimedia/ffmpeg I have installed on my system is the same as fff2024g has, but from a previous "latest" repo build batch (around Oct 13, minus a few days, 2025), which contains the embedded version definition:
Rich (BB code):
% pkg info -E ffmpeg
ffmpeg-6.1.2_16,1

% strings /usr/local/lib/libavcodec.so.60 | grep LIBAVCODEC_60
LIBAVCODEC_60

% strings /usr/local/lib/libswscale.so.7 | grep LIBSWSCALE_7
LIBSWSCALE_7
The current version of those ffmpeg shared libraries from 2025-Oct-29 "latest" [1], and 2025-Oct-30, "quarterly" [2] don't have the version defined.


I have a similar problem with x11-toolkits/libadwaita, upgraded on Oct 13, 2025:
Code:
% gnome-calculator
ld-elf.so.1: /usr/local/lib/libadwaita-1.so.0: version LIBADWAITA_1_0 required by /usr/local/bin/gnome-calculator not defined
Indeed, the libadwaita shared library is missing the embedded version definition:
Rich (BB code):
% pkg info -E libadwaita
libadwaita-1.7.7

% strings /usr/local/lib/libadwaita-1.so.0 | grep LIBADWAITA_1_0

A previous version, extracted from it's package, contains the embedded version definition:
Rich (BB code):
% cat +COMPACT_MANIFEST
{"name":"libadwaita","origin":"x11-toolkits/libadwaita","version":"1.7.2", ...

% strings /tmp/libadwaita/usr/local/lib/libadwaita-1.so.0 | grep LIBADWAITA_1_0
LIBADWAITA_1_0
These issues have not been reported in problem reports or mailing lists recently either, at least I couldn't find any. I'm still trying to determine what might be the cause of the missing version definitions.

If someone has an idea, please step forward.


[1] https://pkg.freebsd.org/FreeBSD:14:amd64/latest/All/ffmpeg-6.1.2_16,1.pkg
[2] https://pkg.freebsd.org/FreeBSD:14:amd64/quarterly/All/ffmpeg-6.1.2_16,1.pkg
 
These issues have not been reported in problem reports or mailing lists recently either, at least I couldn't find any. I'm still trying to determine what might be the cause of the missing version definitions.
There is a multitude of PR-s on this topic.
Multiple ports were / are affected, many have a common theme related to environ and __progname.

I think that PR 285401 with 68 comments is the most prominent.
Another informative one (and a slightly different but related issue) is PR 281440
.
 
thanks for all :
i think my question was : ffmpeg upgrade cause.
if i want to return old ffmpeg version. how to do that ?
1. which command can list all ffmpeg old version ,and can be install with pkg command
thanks.
 
Is your ffmpeg built locally from ports?

You might be interested in this https://mail-archive.freebsd.org/cgi/mid.cgi?638730b9-efec-4a3c-ae49-ab720c5c4522
The commit 7f9d8df0bafb from the mail doesn't appear in the official ports tree git log. Is this a commit to a local clone?

Also, patching the ffmpeg port (main ports tree) with the diff from the mail results in a reject, and malformed patch error:
Rich (BB code):
/tmp/ports/multimedia/ffmpeg #  patch  -p  3  <  /tmp/ffmpeg.diff
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile
|index f7c5d80adeac..fd25b9238021 100644
|--- a/multimedia/ffmpeg/Makefile
|+++ b/multimedia/ffmpeg/Makefile
--------------------------
Patching file Makefile using Plan A...
Hunk #1 failed at 28.
1 out of 1 hunks failed--saving rejects to Makefile.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/multimedia/ffmpeg/files/patch-configure
|b/multimedia/ffmpeg/files/patch-configure
|index 9654237228cc..c3a166b984ca 100644
|--- a/multimedia/ffmpeg/files/patch-configure
|+++ b/multimedia/ffmpeg/files/patch-configure
--------------------------
Patching file files/patch-configure using Plan A...
patch: **** malformed patch at line 22: gme_new_emu ||

/tmp/ports/multimedia/ffmpeg #  cat  Makefile.rej
@@ -28,6 +28,7 @@
  SHEBANG_FILES=        doc/texi2pod.pl
  NOPRECIOUSMAKEVARS=   yes # ARCH

+HAS_SYMBOL_VERSION=    ${PREFIX}/lib/libavcodec.so
  PORTSCOUT=    limit:^6\.

  # Option CHROMAPRINT disabled, it cannot work and people are baffled.

ffmpeg.diff: diff copy & paste as is from the mail:
Diff:
diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile
index f7c5d80adeac..fd25b9238021 100644
--- a/multimedia/ffmpeg/Makefile
+++ b/multimedia/ffmpeg/Makefile
@@ -28,6 +28,7 @@ USE_PERL5=    build
  SHEBANG_FILES=        doc/texi2pod.pl
  NOPRECIOUSMAKEVARS=   yes # ARCH

+HAS_SYMBOL_VERSION=    ${PREFIX}/lib/libavcodec.so
  PORTSCOUT=    limit:^6\.

  # Option CHROMAPRINT disabled, it cannot work and people are baffled.
diff --git a/multimedia/ffmpeg/files/patch-configure
b/multimedia/ffmpeg/files/patch-configure
index 9654237228cc..c3a166b984ca 100644
--- a/multimedia/ffmpeg/files/patch-configure
+++ b/multimedia/ffmpeg/files/patch-configure
@@ -28,3 +28,12 @@
                               -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt
-lSPIRV-Tools -lpthread -lstdc++ -lm; }
   enabled libgme            && { check_pkg_config libgme libgme gme/gme.h
gme_new_emu ||
                                  require libgme gme/gme.h gme_new_emu -lgme
-lstdc++; }
+@@ -7307,7 +7301,7 @@
+ EOF
+
+ if enabled proper_dce; then
+-    echo "X { local: *; };" > $TMPV
++    echo "X { global: environ; __progname; local: *; };" > $TMPV
+     if test_ldflags -Wl,${version_script},$TMPV; then
+         append SHFLAGS '-Wl,${version_script},\$(SUBDIR)lib\$(NAME).ver'
+         quotes='""'
 
For your problem, open a PR, report multimedia/ffmpeg.

There is a bug report with the same problem on multimedia/mplayer , fixed with a ffmpeg update (Comment # 3).

Bug 283816 - multimedia/mplayer: needs a bump after multimedia/ffmpeg
Code:
$ mplayer                           
ld-elf.so.1: /usr/local/lib/libswscale.so.7: version LIBSWSCALE_7 required by /usr/local/bin/mplayer not defined



if i want to return old ffmpeg version. how to do that ?
You need to build it from ports, after cloning a local copy of the ports tree, and checkout a previous ffmpeg version. But I donn't know if a older version will solve the problem.

1. which command can list all ffmpeg old version
There is no command to list older package version, as there are no official package repositories storing older versions.

There are one or two package repositories for each branch, RELEASE (and STABLE I believe) has "quarterly" and "latest" repositories, CURRENT has one "latest". Every time the repositories are updated, older package versions are deleted.

Here are the repositories for FreeBSD:14:amd64:
Rich (BB code):
% lynx --dump https://pkg.freebsd.org/FreeBSD:14:amd64/quarterly
                     Index of /FreeBSD:14:amd64/quarterly/

   [1]File Name [2] ↓   [3]File Size [4] ↓   [5]Date [6] ↓
   [7]Parent directory/ -                   -
   [8]All/              -                   2025-Nov-01 18:50
   [9]Latest/           -                   2025-Nov-01 18:33
   [10]data.pkg         10560607            2025-Nov-01 18:17
   [11]data.tzst        10560607            2025-Nov-01 18:17
   [12]logs             47                  2025-Nov-01 01:02
   [13]meta             179                 2025-Jan-23 21:01
   [14]meta.conf        179                 2025-Jan-23 21:01
   [15]packagesite.pkg  10561533            2025-Nov-01 18:17
   [16]packagesite.tzst 10561533            2025-Nov-01 18:17

% lynx --dump https://pkg.freebsd.org/FreeBSD:14:amd64/latest
                       Index of /FreeBSD:14:amd64/latest/

   [1]File Name [2] ↓   [3]File Size [4] ↓   [5]Date [6] ↓
   [7]Parent directory/ -                   -
   [8]All/              -                   2025-Nov-01 20:07
   [9]Latest/           -                   2025-Nov-01 20:07
   [10]data.pkg         10730345            2025-Nov-01 19:16
   [11]data.tzst        10730345            2025-Nov-01 19:16
   [12]logs             45                  2025-Nov-01 01:02
   [13]meta             179                 2025-Jan-23 21:01
   [14]meta.conf        179                 2025-Jan-23 21:01
   [15]packagesite.pkg  10730013            2025-Nov-01 19:16
   [16]packagesite.tzst 10730013            2025-Nov-01 19:16
Under the "All" directory are all the packages stored. That directory is not accessible for browsing by web browser or other directory listing utilities (403 Forbidden).
Rich (BB code):
% lynx --dump https://pkg.freebsd.org/FreeBSD:14:amd64/latest/All
                                403 Forbidden
     __________________________________________________________________

                                    nginx

But you can download individual packages from that directory, for example:
Code:
fetch  https://pkg.freebsd.org/FreeBSD:14:amd64/quarterly/All/ffmpeg-6.1.2_16,1.pkg

wget  https://pkg.freebsd.org/FreeBSD:14:amd64/quarterly/All/ffmpeg-6.1.2_16,1.pkg

pkg  fetch -o /tmp ffmpeg-6.1.2_16,1.pkg
 
I just manually applied this patch to the latest ffmpeg port (the port has changed since the patch made in the email), it worked like a charm, vncviewer works again. Hope this can be merged to the port tree soon.
Dear hanwen :
i have reinstall ffmpeg from ports, why i still not solve my question ? i am new guy.
please show me how to fix this issue step by step ... thanks.
 
i have reinstall ffmpeg from ports, why i still not solve my question ?
The required changes haven't been applied to the port, naturally the port won't build then ffmpeg with the LIBSWSCALE_7 and LIBAVCODEC_60 symbols, necessary for xfreerdp and vncviewer.

This issue seems not be reported yet on https://bugs.freebsd.org. To get the issue solved in the ports tree, open a problem report.

Meanwhile, try the patch below. Since hanwen seems to have success with manual patching, I applied the differences from Andriy's patch manually as well and created a new diff file.

Diff:
diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile
index f7c5d80adea..e18b6797a01 100644
--- a/multimedia/ffmpeg/Makefile
+++ b/multimedia/ffmpeg/Makefile
@@ -28,6 +28,8 @@ USE_PERL5=    build
 SHEBANG_FILES=    doc/texi2pod.pl
 NOPRECIOUSMAKEVARS=    yes # ARCH
 
+HAS_SYMBOL_VERSION=    ${PREFIX}/lib/libavcodec.so
+
 PORTSCOUT=    limit:^6\.
 
 # Option CHROMAPRINT disabled, it cannot work and people are baffled.
diff --git a/multimedia/ffmpeg/files/patch-configure b/multimedia/ffmpeg/files/patch-configure
index 68b483a630e..0d540c0ca35 100644
--- a/multimedia/ffmpeg/files/patch-configure
+++ b/multimedia/ffmpeg/files/patch-configure
@@ -37,4 +37,15 @@
 +fi
  enabled libgme            && { check_pkg_config libgme libgme gme/gme.h gme_new_emu ||
                                 require libgme gme/gme.h gme_new_emu -lgme -lstdc++; }
+
++@@ -7307,7 +7301,7 @@
++ EOF
++
++ if enabled proper_dce; then
++-    echo "X { local: *; };" > $TMPV
+++    echo "X { global: environ; __progname; local: *; };" > $TMPV
++     if test_ldflags -Wl,${version_script},$TMPV; then
++         append SHFLAGS '-Wl,${version_script},\$(SUBDIR)lib\$(NAME).ver'
++         quotes='""'
+
  enabled libgsm            && { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do

Save the code, apply patch.

Apply patch using git-apply(1)
Code:
/usr/ports # git apply /path/to/ffmpeg.patch

If you want to reverse the patch after building the port with the patch:
Code:
/usr/ports # git apply -R  /path/to/ffmpeg.patch

Apply patch with patch(1)
Code:
ports/multimedia/ffmpeg # patch -p 3  <  /path/to/ffmpeg.patch

Reverse the patch:
Code:
ports/multimedia/ffmpeg # patch -R -p 3  <  /path/to/ffmpeg.patch
 
DEar T-Daemon :
thanks for your help... below was the error ..

copy diff content as a file ffmpeg.patch. then run..
# git apply /root/patch_for_ffmpeg/ffmpeg.patch
error: multimedia/ffmpeg/Makefile: No such file or directory
error: multimedia/ffmpeg/files/patch-configure: No such file or directory

please help again. thanks.
 
Back
Top