Bug 269090 - multimedia/emby-server: Update to 4.7.11.0 compiling error
Summary: multimedia/emby-server: Update to 4.7.11.0 compiling error
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Dries Michiels
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-22 02:16 UTC by lbfoo
Modified: 2023-02-12 03:58 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (driesm)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lbfoo 2023-01-22 02:16:41 UTC
libavutil/hwcontext_vulkan.c:363:7: error: use of undeclared identifier 'VK_EXT_VIDEO_DECODE_H264_EXTENSION_NAME'
    { VK_EXT_VIDEO_DECODE_H264_EXTENSION_NAME,                FF_VK_EXT_NO_FLAG                },
      ^
libavutil/hwcontext_vulkan.c:364:7: error: use of undeclared identifier 'VK_EXT_VIDEO_DECODE_H265_EXTENSION_NAME'
    { VK_EXT_VIDEO_DECODE_H265_EXTENSION_NAME,                FF_VK_EXT_NO_FLAG                },
      ^
libavutil/hwcontext_vulkan.c:469:29: error: invalid application of 'sizeof' to an incomplete type 'const VulkanOptExtension []'
        optional_exts_num = FF_ARRAY_ELEMS(optional_device_exts);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavutil/macros.h:53:34: note: expanded from macro 'FF_ARRAY_ELEMS'
#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
                                 ^~~
libavutil/hwcontext_vulkan.c:1434:29: error: invalid application of 'sizeof' to an incomplete type 'const VulkanOptExtension []'
        for (int j = 0; j < FF_ARRAY_ELEMS(optional_device_exts); j++) {
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavutil/macros.h:53:34: note: expanded from macro 'FF_ARRAY_ELEMS'
#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
                                 ^~~
4 errors generated.
gmake[2]: *** [ffbuild/common.mak:79: libavutil/hwcontext_vulkan.o] Error 1

may related to the bundled ffmpeg-2022_05_07 (bug #261302)
Comment 1 Osamu Matsuda 2023-01-25 08:53:34 UTC
(In reply to lbfoo from comment #0)
As an negative approach, we can put --disable_vulkan to CONFIGURE_ARGS in Makefile to build it.

Interestingly, ffmpeg-4.4.3_4,1 of multimedia/ffmpeg can be built with VULKAN option ON.  The sources related to FF_ARRAY_ELEMS look very similar though.
Comment 2 Jan Beich freebsd_committer freebsd_triage 2023-01-25 09:15:29 UTC
Regressed by ports 93b836bc9e65 and fixed upstream by https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/eb0455d64690

Building in a clean environment is not affected:
https://pkg-status.freebsd.org/beefy18/data/main-amd64-default/p9ed8e38cde84_sc52c98e69a/logs/emby-server-4.7.11.0.log
https://pkg-status.freebsd.org/beefy16/data/131amd64-default/9ed8e38cde84/logs/emby-server-4.7.11.0.log
https://pkg-status.freebsd.org/beefy6/data/123amd64-default/9ed8e38cde84/logs/emby-server-4.7.11.0.log

Reproducing in poudriere requires adding BUILD_DEPENDS+=vulkan-headers>0:graphics/vulkan-headers into multimedia/emby-server/Makefile.local in order to simulate dirty environment.
Comment 3 lbfoo 2023-01-25 13:22:24 UTC
(In reply to Osamu Matsuda from comment #1)

unfortunately it failed by simply adding "--disable_vulkan" to CONFIGURE_ARGS in Makefile :

--enable-vaapi \
                --enable-version3 \
                --disable_vulkan

MAKE_ENV=       V=1




 Unknown option "--disable_vulkan".
See ./configure --help for available options.
===>  Script "configure" failed unexpectedly.
Please report the problem to driesm@FreeBSD.org [maintainer] and attach the
"/usr/ports/multimedia/emby-server/work/ffmpeg-2022_05_07_public/config.log"
including the output of the failure of your make command. Also, it might be
a good idea to provide an overview of all packages installed on your system
(e.g. a /usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/multimedia/emby-server
*** Error code 1
Comment 4 Dries Michiels freebsd_committer freebsd_triage 2023-01-25 13:40:21 UTC
Unknown option "--disable_vulkan".

That should be "--disable-vulkan". Ideally you build packages using a clean environment like Poudriere. 

I'll take a look at it somewhere in the coming days. Jan feel free to commit a fix (blanket approval for build fix, although it doesn't actually fail on the clusters given Poudriere is used).

I could in fact disable everything manually that is autodetected in the configure script, is this wanted? I hope to avoid that as it gives more bulk to the configure target.
Comment 5 Osamu Matsuda 2023-01-25 14:54:42 UTC
(In reply to lbfoo from comment #3)
Sorry, it is --disable-vulkan as Dries pointed out.
Comment 6 lbfoo 2023-01-26 02:06:17 UTC
(In reply to Dries Michiels from comment #4)

Great, this works for me.