Bug 275857 - multimedia/emby-server-devel libavutil/hwcontext_vulkan.o Error 1 14.0-STABLE
Summary: multimedia/emby-server-devel libavutil/hwcontext_vulkan.o Error 1 14.0-STABLE
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Dries Michiels
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-20 13:01 UTC by tomasz.sowinski
Modified: 2024-03-08 02:00 UTC (History)
2 users (show)

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


Attachments
Error details, build on host system (81.37 KB, application/pdf)
2023-12-27 13:26 UTC, Kevin Saccullo
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description tomasz.sowinski 2023-12-20 13:01:27 UTC
Good morning guys,

First of all thank you for your effort and time that you spent on maintain this port :)

Unfortunately there is a problem with compilation this port on 14.0-STABLE on my system. I have installed the newest vulkan loader and headers.

vulkan-headers-1.3.274         Headers for the Vulkan graphics API
vulkan-loader-1.3.274          Driver loader for the Vulkan graphics API
ffmpeg-6.1_1,1                 Realtime audio/video encoder/converter and streaming server

The error I currently get during compilation is presented below:  

5 errors generated.
gmake[2]: *** [ffbuild/common.mak:79: libavutil/hwcontext_vulkan.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
strip -x libswscale/x86/output.o
strip -x libavcodec/x86/vp9itxfm.o
gmake[2]: Leaving directory '/var/ports/basejail/usr/ports/multimedia/emby-server-devel/work/ffmpeg-2022_05_07_public'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Any ideas how to fix this issue?
Comment 1 Dries Michiels freebsd_committer freebsd_triage 2023-12-20 14:18:57 UTC
I am running the same base version, STABLE14 and have the same updated vulkan headers, but I can not reproduce in Poudriere. Do you build on the host?
Comment 2 tomasz.sowinski 2023-12-20 20:17:19 UTC
I am not using Poudriere. I prefer rather manual build from ports or using portmaster.
Comment 3 tomasz.sowinski 2023-12-20 20:18:30 UTC
I build this port on my host in jail dedicated for emby.
Comment 4 tomasz.sowinski 2023-12-23 14:15:21 UTC
I was able to double check error that I got during build.

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[]' (aka 'const struct 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[]' (aka 'const struct 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]))
Comment 5 Kevin Saccullo 2023-12-26 14:59:41 UTC
(In reply to tomasz.sowinski from comment #0)

temp fix to your error (I also have the same error).

edit Makefile in /usr/ports/multimedia/emby-server

in the "CONFIGURE_ARGS= --cc="${CC}" \" section of the file add:

--disable-vulkan \
Comment 6 Kevin Saccullo 2023-12-27 13:26:35 UTC
Created attachment 247293 [details]
Error details, build on host system
Comment 7 tomasz.sowinski 2023-12-28 11:17:23 UTC
(In reply to Kevin Saccullo from comment #6)
Thanks Kevin for valuable hint how to solve this problem. I was able to build emby successfully. Issue can be closed.
Comment 8 Patrick McMunn 2024-03-06 19:09:05 UTC
Dries, I request that this bug be reopened because it has not been fixed. The workaround proposed above involves the end user manually editing the Makefile in the ports tree. That is not a proper fix, and the issue still exists.
Comment 9 Dries Michiels freebsd_committer freebsd_triage 2024-03-07 18:30:51 UTC
I misread the issue. Reopening.
Comment 10 commit-hook freebsd_committer freebsd_triage 2024-03-07 18:32:07 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=297331f5a88f554635f79289207c130749b4db2c

commit 297331f5a88f554635f79289207c130749b4db2c
Author:     Dries Michiels <driesm@FreeBSD.org>
AuthorDate: 2024-03-07 18:27:09 +0000
Commit:     Dries Michiels <driesm@FreeBSD.org>
CommitDate: 2024-03-07 18:27:09 +0000

    multimedia/emby-server-(devel): fix autodetect of vulkan

    Vulkan headers are autodetected, meaning if they are installed
    on the host system they are enabled by the configure script
    which is unwanted.

    PR:     275857

 multimedia/emby-server-devel/Makefile | 2 +-
 multimedia/emby-server/Makefile       | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
Comment 11 Dries Michiels freebsd_committer freebsd_triage 2024-03-07 18:33:31 UTC
Fixed :)
Comment 12 Patrick McMunn 2024-03-08 02:00:51 UTC
(In reply to Dries Michiels from comment #11)
You're the man!