RPM failing to build in mock because of a build id

I’m trying to build an RPM for MakeMKV and am currently getting stuck on an this error, not sure what to do. This is a precompiled binary as well, not an oss one that I can patch or recompile:
error: build-id found in /builddir/build/BUILDROOT/makemkv-1.17.6-1.fc39.x86_64/usr/bin/makemkvcon too small
error: Generating build-id links failed
build-id found in /builddir/build/BUILDROOT/makemkv-1.17.6-1.fc39.x86_64/usr/bin/makemkvcon too small
Generating build-id links failed

Here is the output of $ eu-readelf -n makemkvcon:
Note section [ 2] ‘.note.ABI-tag’ of 32 bytes at offset 0x2c4:
Owner Data size Type
GNU 16 GNU_ABI_TAG
OS: Linux, ABI: 3.2.0

Note section [ 3] ‘.note.gnu.build-id’ of 24 bytes at offset 0x2e4:
Owner Data size Type
GNU 8 GNU_BUILD_ID
Build ID: c9ab7184035b71af

And here is my spec:
Name: makemkv
Version: 1.17.6
Release: 1%{?dist}
Summary: DVD and Blu-ray to MKV converter

License: GuinpinSoft Inc EULA AND LGPL-2.1-or-later AND MPL
URL: https://www.makemkv.com
Source0: %{URL}/download/%{NAME}-bin-%{VERSION}.tar.gz
Source1: %{URL}/download/%{NAME}-oss-%{VERSION}.tar.gz
Source2: %{URL}/download/%{NAME}-sha-%{VERSION}.txt
Source3: makemkv.keyring

BuildRequires: coreutils
BuildRequires: desktop-file-utils
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: glibc-devel
BuildRequires: gnupg2
BuildRequires: libavcodec-free-devel
BuildRequires: make
BuildRequires: mesa-libGL-devel
BuildRequires: pkgconf
BuildRequires: pkgconfig(expat)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(zlib)
BuildRequires: qt5-qtbase-devel

%description
MakeMKV is your one-click solution to convert video that you own into free and patents-unencumbered format that can be played everywhere. MakeMKV is a format converter, otherwise called “transcoder”. It converts the video clips from proprietary (and usually encrypted) disc into a set of MKV files, preserving most information but not changing it in any way. The MKV format can store multiple video/audio tracks with all meta-information and preserve chapters. There are many players that can play MKV files nearly on all platforms, and there are tools to convert MKV files to many formats, including DVD and Blu-ray discs.

Additionally MakeMKV can instantly stream decrypted video without intermediate conversion to wide range of players, so you may watch Blu-ray and DVD discs with your favorite player on your favorite OS or on your favorite device.

%package libs
Summary: Libraries required by MakeMKV
Requires: libavcodec-free
Requires: libavutil-free

%description libs
This package contains libraries for MakeMKV

%package cli
Summary: MakeMKV cli
Requires: ffmpeg-free
Requires: makemkv-libs

%description cli
This package contains MakeMKV cli tools

%package gui
Summary: MakeMKV gui
Requires: makemk-cli
Requires: qt5-qtbase
Recommends: jre-1.8.0

%description gui
This package contains the MakeMKV gui

%prep
gpgv --keyring ‘%{SOURCE3}’ ‘%{SOURCE2}’

Will add sha256sum verification when I can figure out how to

%autosetup -b 0 -n %{NAME}-bin-%{VERSION}
%autosetup -b 1 -n %{NAME}-oss-%{VERSION}

%build
cd %{_builddir}/%{NAME}-oss-%{VERSION}
%configure
%make_build
cd %{_builddir}/%{NAME}-bin-%{VERSION}
install -d tmp
echo accepted > tmp/eula_accepted
%make_build

%install
cd %{_builddir}/%{NAME}-oss-%{VERSION}
%make_install
cd %{_builddir}/%{NAME}-bin-%{VERSION}
%make_install

%check
desktop-file-validate %{buildroot}%{_datadir}/applications/makemkv.desktop

%files libs
%{_libdir}/libdriveio.so.0
%{_libdir}/libmakemkv.so.1
%{_libdir}/libmmbd.so.0

%files cli
%{_bindir}/makemkvcon
%{_bindir}/mmccextr
%{_bindir}/mmgplsrv
%{_bindir}/sdftool
%dir %{_datadir}/MakeMKV
%{_datadir}/MakeMKV/appdata.tar
%{_datadir}/MakeMKV/blues.jar
%{_datadir}/MakeMKV/blues.policy

%files gui
%{_bindir}/makemkv
%{_datadir}/applications/makemkv.desktop
%{_iconsdir}/hicolor/16x16/apps/makemkv.png
%{_iconsdir}/hicolor/22x22/apps/makemkv.png
%{_iconsdir}/hicolor/32x32/apps/makemkv.png
%{_iconsdir}/hicolor/64x64/apps/makemkv.png
%{_iconsdir}/hicolor/128x128/apps/makemkv.png
%{_iconsdir}/hicolor/256x256/apps/makemkv.png

%changelog

  • Initial RPM Release

I don’t know much about spec files, but in this version I found on GitHub …

Edit: Actually, it is probably that first line that prevents that error. At least, that is what the comment appears to indicate.

# Disable debuginfo, since we package a stripped upstream binary.
%global debug_package %{nil}

Thanks, that helped a lot. Turned the error into a warning and it built as expected :slight_smile: If you or anyone else knows how to get rid of the warning completely(everything I found so far went over my head), that solution is still welcome.