Unable to build ffmpeg from ports on FreeBSD 14.0

Hi,

I have a fresh install of FreeBSD 14.0 and tried to build ffmpeg from ports with the alsa, pulseaudio, lame and sdl flags enabled. I have uninstalled the ffmpeg binary package.
Each time I try, it errors out (see transcript from the terminal below).

I have tried the suggested "make MAKE_JOBS_UNSAFE=yes install" without success.

I have successfully built ffmpeg from ports many times previously on FreeBSD 13.0, 13.1, 13.2 and 14.0.

# make config
# make install
# make clean

Not sure if it's a problem with the port or missing dependencies. I don't have the experience to trouble-shoot. I would really appreciate any help. Thanks.


Termial Output:

Code:
./libavutil/vulkan_loader.h:59:11: error: use of undeclared identifier 'VK_KHR_VIDEO_DECODE_AV1_EXTENSION_NAME'
        { VK_KHR_VIDEO_DECODE_AV1_EXTENSION_NAME,          FF_VK_EXT_VIDEO_DECODE_AV1       },

./libavutil/vulkan_loader.h:65:29: error: invalid application of 'sizeof' to an incomplete type 'const struct ExtensionMap[]'
        for (int j = 0; j < FF_ARRAY_ELEMS(extension_map); j++) {

./libavutil/macros.h:53:34: note: expanded from macro 'FF_ARRAY_ELEMS'
#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))

2 errors generated.
gmake[2]: *** [ffbuild/common.mak:81: libavfilter/vf_avgblur_vulkan.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: Leaving directory '/usr/ports/multimedia/ffmpeg/work/ffmpeg-6.1.1'
.===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/multimedia/ffmpeg
*** Error code 1

Stop.
make: stopped in /usr/ports/multimedia/ffmpeg
[root@FreeBSD /usr/ports/multimedia/ffmpeg]#
 
Thanks for the advice. I set all flags to default and tried to build ffmpeg. It stopped building with the same error.
I disabled 'vulkan filters' next. Still refuses to build and delivers the same error message as before. Thoughts?
 
Yes, I have run # make clean every time before attempting a new build. The version in ports is 6.1.1_3,1.
vulkan-headers were up to date however, I forced a reinstall sudo pkg -f upgrade vulkan-headers.

# make clean
# make config
# make install
# make clean
Same error message as before.

I even tried cloning ports from github git clone --depth 1 https://github.com/freebsd/freebsd-ports, and attempting to build ffmpeg from the home directory in case /usr/ports/multimedia/ffmpeg somehow became corrupted during the initial fetch and extract. Same error message.

I then tried building ffmpeg4 (an older version?) from ports which was successful. However, it appeared to lack the functionality of the normal build. Launching WinFF produces an error:
Code:
Could not find either ffplay or avplay.

The thing is, this is the same machine that I have done perhaps a dozen or more FreeBSD installs from 13.0 through to 14.0 and I have never encountered this issue before.
 
Launching WinFF produces an error:
Code:
Could not find either ffplay or avplay.
I get that also and I am using packages. It still works for me. Mayhaps there are some hard coded path names for other systems in there triggering this.
 
Please stop using WinFF and use Handbreak instead which is actively maintained upstream and is aware of "new" (by WinFF's standards) formats which very likely will save you a lot of time if you "must" have a GUI.

The FFmpeg build failure very likely comes from desynced installed ports vs ports tree (wipe everything, start over and stick to one solution), your current approach is not supported and you'll likely to see breakage.
 
Mayhaps there are some hard coded path names for other systems in there triggering this.
This is it.
multimedia/winff/work-gtk2/winff-winff-1.6.2/winff/unit1.pas
Code:
  rsCouldNotFindFFplay = 'Could not find either ffplay or avplay.';

  ffplay := getconfigvalue('unix/ffplay');
  if ffplay = '' then
     begin
       // loop through possibilities ending with the most favorable
       if fileexists('/usr/bin/ffplay') then ffplay:='/usr/bin/ffplay';
       if fileexists('/usr/bin/avplay') then ffplay:='/usr/bin/avplay';
       if fileexists('/usr/local/bin/ffplay') then ffplay:='/usr/local/bin/ffplay';
       if fileexists('/usr/local/bin/avplay') then ffplay:='/usr/local/bin/avplay';
       if ffplay = '' then showmessage(rsCouldNotFindFFPlay);
       setconfigvalue('unix/ffplay',ffplay);
     end;
Edit: multimedia/ffmpeg4 install /usr/local/ffmpeg4/bin/ffplay.
 
Thanks for the notice, but as stated by pkg-message:
Note: WinFF will emit a warning if it cannot find ffplay.
To get it, you need to install ffmpeg with the SDL option.

If you missed it, `pkg info -D multimedia/winff' will remind it.

Remark: if you do not like the ancient GTK2 GUI, you can install a Qt flavor.
 
Back
Top