Bad exit status from /var/tmp/rpm-tmp.t40hoV (%build) - Mesa - fedora

I am trying to build specific versions of Mesa that have llvm10 for a specific purpose. Downloaded the srpm from a dev's repo (https://copr.fedorainfracloud.org/coprs/xxmitsu/playground/) and from Fedora repo (https://kojipkgs.fedoraproject.org//packages/mesa/20.1.9/1.fc32/src/). I am doing it on Fedora 34 and am building for the same distro. I have tried both mock and rpmbuild. In both these cases, I have the same error.
This is the spec file I am using:-
%define package_name mesa
%global build_branch master
%global _default_patch_fuzz 2
%global __meson_auto_features disabled
%global build_repo https://github.com/mesa3d/mesa
%define version_string 21.3.0
%define commit ba74e1be22f646f9639e85b12c7707e96351a075
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global commit_date 20210129.14
%global gitrel .%{commit_date}.%{shortcommit}
### LTO and debugpackages are not working together
%if 0%{?fedora} >= 27
%global debug_package %{nil}
%endif
%ifnarch s390x
%global with_hardware 1
%global with_vdpau 1
%global with_vaapi 1
%global with_nine 1
%global with_omx 1
%global with_opencl 1
%global base_drivers nouveau,r100,r200
%endif
%ifarch %{ix86} x86_64
%global platform_drivers ,i915,i965
%global with_vmware 1
%global with_xa 1
%global with_zink 1
%global vulkan_drivers intel,amd
%else
%ifnarch s390x
%global vulkan_drivers amd
%endif
%endif
%ifarch %{arm} aarch64
%global with_etnaviv 1
%global with_freedreno 1
%global with_kmsro 1
%global with_lima 1
%global with_panfrost 1
%global with_tegra 1
%global with_vc4 1
%global with_xa 1
%endif
%ifnarch %{arm} s390x
%global with_radeonsi 1
%global with_iris 1
%endif
%ifnarch %{x86}
%global with_asm 1
%endif
%ifarch %{valgrind_arches}
%bcond_without valgrind
%else
%bcond_with valgrind
%endif
%global with_vulkan_overlay 1
%global dri_drivers %{?base_drivers}%{?platform_drivers}
%global sanitize 1
Name: %{package_name}
Summary: Mesa 3D Graphics Library, git version
Version: %{version_string}
Release: 0.3%{?gitrel}%{?dist}
License: MIT
URL: http://www.mesa3d.org
Source0: %{build_repo}/archive/%{commit}.tar.gz#/mesa-%{commit}.tar.gz
# src/gallium/auxiliary/postprocess/pp_mlaa* have an ... interestingly worded license.
# Source1 contains email correspondence clarifying the license terms.
# Fedora opts to ignore the optional part of clause 2 and treat that code as 2 clause BSD.
Source1: Mesa-MLAA-License-Clarification-Email.txt
Patch3: 0003-evergreen-big-endian.patch
# Disable rgb10 configs by default:
# https://bugzilla.redhat.com/show_bug.cgi?id=1560481
#Patch7: 0001-gallium-Disable-rgb10-configs-by-default.patch
BuildRequires: meson >= 0.45
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: gettext
%if 0%{?with_hardware}
BuildRequires: kernel-headers
%endif
%ifarch %{ix86} x86_64
BuildRequires: pkgconfig(libdrm_intel) >= 2.4.75
%endif
%if 0%{?with_radeonsi}
BuildRequires: pkgconfig(libdrm_amdgpu) >= 2.4.97
%endif
BuildRequires: pkgconfig(libdrm_radeon) >= 2.4.71
BuildRequires: pkgconfig(libdrm_nouveau) >= 2.4.66
%if 0%{?with_etnaviv}
BuildRequires: pkgconfig(libdrm_etnaviv) >= 2.4.89
%endif
%if 0%{?with_vc4}
BuildRequires: pkgconfig(libdrm) >= 2.4.89
%endif
BuildRequires: pkgconfig(expat)
BuildRequires: pkgconfig(zlib) >= 1.2.3
BuildRequires: pkgconfig(libselinux)
BuildRequires: pkgconfig(wayland-scanner)
BuildRequires: pkgconfig(wayland-protocols) >= 1.8
BuildRequires: pkgconfig(wayland-client) >= 1.11
BuildRequires: pkgconfig(wayland-server) >= 1.11
BuildRequires: pkgconfig(wayland-egl-backend) >= 3
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xdamage) >= 1.1
BuildRequires: pkgconfig(xfixes)
BuildRequires: pkgconfig(xcb-glx) >= 1.8.1
BuildRequires: pkgconfig(xxf86vm)
BuildRequires: pkgconfig(xcb)
BuildRequires: pkgconfig(x11-xcb)
BuildRequires: pkgconfig(xcb-dri2) >= 1.8
BuildRequires: pkgconfig(xcb-dri3)
BuildRequires: pkgconfig(xcb-present)
BuildRequires: pkgconfig(xcb-sync)
BuildRequires: pkgconfig(xshmfence) >= 1.1
BuildRequires: pkgconfig(dri2proto) >= 2.8
BuildRequires: pkgconfig(glproto) >= 1.4.14
BuildRequires: pkgconfig(xcb-xfixes)
BuildRequires: pkgconfig(xcb-randr)
BuildRequires: pkgconfig(xrandr) >= 1.3
BuildRequires: pkgconfig(libunwind)
BuildRequires: bison
BuildRequires: flex
%if 0%{?with_vdpau}
BuildRequires: pkgconfig(vdpau) >= 1.1
%endif
%if 0%{?with_vaapi}
BuildRequires: pkgconfig(libva) >= 0.38.0
%endif
%if 0%{?with_omx}
BuildRequires: pkgconfig(libomxil-bellagio)
%endif
BuildRequires: pkgconfig(libelf)
BuildRequires: pkgconfig(libglvnd) >= 0.2.0
BuildRequires: llvm-devel >= 7.0.0
%if 0%{?with_opencl}
BuildRequires: clang-devel
BuildRequires: pkgconfig(libclc)
%endif
%if %{with valgrind}
BuildRequires: pkgconfig(valgrind)
%endif
BuildRequires: python3-devel
BuildRequires: python3-mako
%if 0%{?with_hardware}
BuildRequires: vulkan-headers
%endif
## vulkan hud requires
%if 0%{?with_vulkan_overlay}
BuildRequires: glslang
BuildRequires: lm_sensors-devel
BuildRequires: /usr/bin/pathfix.py
%endif
%if 0%{?with_zink}
BuildRequires: pkgconfig(vulkan)
%endif
%description
%{summary}.
%package filesystem
Summary: Mesa driver filesystem
Provides: mesa-dri-filesystem = %{?epoch:%{epoch}:}%{version}-%{release}
Obsoletes: mesa-dri-filesystem < %{?epoch:%{epoch}:}%{version}-%{release}
%description filesystem
%{summary}.
%package libGL
Summary: Mesa libGL runtime libraries
Requires: %{name}-libglapi%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: libglvnd-glx%{?_isa} >= 1:1.0.1-0.6.99
%description libGL
%{summary}.
%package libGL-devel
Summary: Mesa libGL development package
Requires: %{name}-libGL%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: libglvnd-devel%{?_isa}
Provides: libGL-devel
Provides: libGL-devel%{?_isa}
%description libGL-devel
%{summary}.
%package libEGL
Summary: Mesa libEGL runtime libraries
Requires: libglvnd-egl%{?_isa}
Obsoletes: egl-icd < %{?epoch:%{epoch}:}%{version}-%{release}
%description libEGL
%{summary}.
%package libEGL-devel
Summary: Mesa libEGL development package
Requires: %{name}-libEGL%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: libglvnd-devel%{?_isa}
Requires: %{name}-khr-devel%{?_isa}
Provides: libEGL-devel
Provides: libEGL-devel%{?_isa}
%description libEGL-devel
%{summary}.
%package dri-drivers
Summary: Mesa-based DRI drivers
Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%description dri-drivers
%{summary}.
%if 0%{?with_omx}
%package omx-drivers
Summary: Mesa-based OMX drivers
Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%description omx-drivers
%{summary}.
%endif
%if 0%{?with_vdpau}
%package vdpau-drivers
Summary: Mesa-based VDPAU drivers
Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%description vdpau-drivers
%{summary}.
%endif
%package libOSMesa
Summary: Mesa offscreen rendering libraries
Requires: %{name}-libglapi%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: libOSMesa
Provides: libOSMesa%{?_isa}
%description libOSMesa
%{summary}.
%package libOSMesa-devel
Summary: Mesa offscreen rendering development package
Requires: %{name}-libOSMesa%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%description libOSMesa-devel
%{summary}.
%package libgbm
Summary: Mesa gbm runtime library
Provides: libgbm
Provides: libgbm%{?_isa}
%description libgbm
%{summary}.
%package libgbm-devel
Summary: Mesa libgbm development package
Requires: %{name}-libgbm%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: libgbm-devel
Provides: libgbm-devel%{?_isa}
%description libgbm-devel
%{summary}.
%if 0%{?with_xa}
%package libxatracker
Summary: Mesa XA state tracker
Provides: libxatracker
Provides: libxatracker%{?_isa}
%description libxatracker
%{summary}.
%package libxatracker-devel
Summary: Mesa XA state tracker development package
Requires: %{name}-libxatracker%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: libxatracker-devel
Provides: libxatracker-devel%{?_isa}
%description libxatracker-devel
%{summary}.
%endif
%package libglapi
Summary: Mesa shared glapi
Provides: libglapi
Provides: libglapi%{?_isa}
%description libglapi
%{summary}.
%if 0%{?with_opencl}
%package libOpenCL
Summary: Mesa OpenCL runtime library
Requires: ocl-icd%{?_isa}
Requires: libclc%{?_isa}
Requires: %{name}-libgbm%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: opencl-filesystem
%description libOpenCL
%{summary}.
%package libOpenCL-devel
Summary: Mesa OpenCL development package
Requires: %{name}-libOpenCL%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%description libOpenCL-devel
%{summary}.
%endif
%if 0%{?with_nine}
%package libd3d
Summary: Mesa Direct3D9 state tracker
%description libd3d
%{summary}.
%package libd3d-devel
Summary: Mesa Direct3D9 state tracker development package
Requires: %{name}-libd3d%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%description libd3d-devel
%{summary}.
%endif
%package vulkan-drivers
Summary: Mesa Vulkan drivers
Requires: vulkan%{_isa}
%description vulkan-drivers
The drivers with support for the Vulkan API.
%package vulkan-devel
Summary: Mesa Vulkan development files
Requires: %{name}-vulkan-drivers%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: vulkan-devel
%description vulkan-devel
Headers for development with the Vulkan API.
%prep
%setup -q -c
%autosetup -n mesa-%{commit} -p1
cp %{SOURCE1} docs/
%build
## enable LTO
export CFLAGS="%{build_cflags}"
export CXXFLAGS="%{build_cxxflags}"
export LDFLAGS="%{build_ldflags}"
LTO_FLAGS="-fcommon -g0 -ffat-lto-objects -flto-odr-type-merging"
export CFLAGS="$CFLAGS -falign-functions=32 -fno-semantic-interposition $LTO_FLAGS "
export FCFLAGS="$CFLAGS -falign-functions=32 -fno-semantic-interposition $LTO_FLAGS "
export FFLAGS="$CFLAGS -falign-functions=32 -fno-semantic-interposition $LTO_FLAGS "
export CXXFLAGS="$CXXFLAGS -std=c++14 -falign-functions=32 -fno-semantic-interposition $LTO_FLAGS "
export LDFLAGS="$LDFLAG0S -flto=8 "
%meson -Dcpp_std=gnu++14 \
-D platforms=x11,wayland \
-D dri-drivers=%{?dri_drivers} \
%if 0%{?with_hardware}
-D gallium-drivers=swrast,virgl,r300,nouveau%{?with_vmware:,svga}%{?with_radeonsi:,radeonsi,r600}%{?with_iris:,iris}%{?with_freedreno:,freedreno}%{?with_etnaviv:,etnaviv}%{?with_tegra:,tegra}%{?with_vc4:,vc4}%{?with_kmsro:,kmsro}%{?with_lima:,lima}%{?with_panfrost:,panfrost}%{?with_zink:,zink} \
%else
-D gallium-drivers=swrast,virgl \
%endif
-D vulkan-drivers=%{?vulkan_drivers} \
-D dri3=enabled \
-D egl=enabled \
-D gallium-extra-hud=%{?with_gallium_extra_hud:true}%{!?with_gallium_extra_hud:false} \
-D gallium-nine=%{?with_nine:true}%{!?with_nine:false} \
-D gallium-omx=%{?with_omx:bellagio}%{!?with_omx:disabled} \
-D gallium-va=%{?with_vaapi:true}%{!?with_vaapi:false} \
-D gallium-vdpau=%{?with_vdpau:enabled}%{!?with_vdpau:disabled} \
-D gallium-xa=enabled \
-D gallium-xvmc=disabled \
-D gbm=enabled \
-D gles1=disabled \
-D gles2=enabled \
-D glvnd=true \
-D glx=dri \
-D libunwind=true \
-D llvm=true \
-Dshared-llvm=true \
-Dvalgrind=%{?with_valgrind:true}%{!?with_valgrind:false} \
-Dbuild-tests=false \
-Dselinux=true \
-D lmsensors=true \
-D osmesa=true \
-D shared-glapi=enabled \
-D gallium-opencl=%{?with_opencl:icd}%{!?with_opencl:disabled} \
-D vulkan-layers=device-select%{?with_vulkan_overlay:,overlay} \
-D tools=[]
%{nil}
%meson_build
%install
%meson_install
# libvdpau opens the versioned name, don't bother including the unversioned
rm -vf %{buildroot}%{_libdir}/vdpau/*.so
# likewise glvnd
rm -vf %{buildroot}%{_libdir}/libGLX_mesa.so
rm -vf %{buildroot}%{_libdir}/libEGL_mesa.so
# XXX can we just not build this
rm -vf %{buildroot}%{_libdir}/libGLES*
# glvnd needs a default provider for indirect rendering where it cannot
# determine the vendor
ln -s %{_libdir}/libGLX_mesa.so.0 %{buildroot}%{_libdir}/libGLX_system.so.0
# this keeps breaking, check it early. note that the exit from eu-ftr is odd.
pushd %{buildroot}%{_libdir}
for i in libOSMesa*.so libGL.so ; do
eu-findtextrel $i && exit 1
done
popd
%files filesystem
%doc docs/Mesa-MLAA-License-Clarification-Email.txt
%dir %{_libdir}/dri
%if 0%{?with_hardware}
%if 0%{?with_vdpau}
%dir %{_libdir}/vdpau
%endif
%endif
%files libGL
%{_libdir}/libGLX_mesa.so.0*
%{_libdir}/libGLX_system.so.0*
%files libGL-devel
%{_includedir}/GL/*
%{_libdir}/pkgconfig/dri.pc
%{_libdir}/libglapi.so
%files libEGL
%{_datadir}/glvnd/egl_vendor.d/50_mesa*.json
%{_libdir}/libEGL_mesa.so.0*
%files libEGL-devel
%dir %{_includedir}/EGL
%{_includedir}/EGL/eglmesaext.h
%{_includedir}/EGL/eglextchromium.h
%ldconfig_scriptlets libglapi
%files libglapi
%{_libdir}/libglapi.so.0
%{_libdir}/libglapi.so.0.*
%ldconfig_scriptlets libOSMesa
%files libOSMesa
%{_libdir}/libOSMesa.so.8*
%files libOSMesa-devel
%dir %{_includedir}/GL
%{_includedir}/GL/osmesa.h
%{_libdir}/libOSMesa.so
%{_libdir}/pkgconfig/osmesa.pc
%ldconfig_scriptlets libgbm
%files libgbm
%{_libdir}/libgbm.so.1
%{_libdir}/libgbm.so.1.*
%files libgbm-devel
%{_libdir}/libgbm.so
%{_includedir}/gbm.h
%{_libdir}/pkgconfig/gbm.pc
%if 0%{?with_xa}
%ldconfig_scriptlets libxatracker
%files libxatracker
%if 0%{?with_hardware}
%{_libdir}/libxatracker.so.2
%{_libdir}/libxatracker.so.2.*
%endif
%files libxatracker-devel
%if 0%{?with_hardware}
%{_libdir}/libxatracker.so
%{_includedir}/xa_tracker.h
%{_includedir}/xa_composite.h
%{_includedir}/xa_context.h
%{_libdir}/pkgconfig/xatracker.pc
%endif
%endif
%if 0%{?with_opencl}
%ldconfig_scriptlets libOpenCL
%files libOpenCL
%{_libdir}/libMesaOpenCL.so.*
%{_sysconfdir}/OpenCL/vendors/mesa.icd
%files libOpenCL-devel
%{_libdir}/libMesaOpenCL.so
%endif
%if 0%{?with_nine}
%files libd3d
%dir %{_libdir}/d3d/
%{_libdir}/d3d/*.so.*
%files libd3d-devel
%{_libdir}/pkgconfig/d3d.pc
%{_includedir}/d3dadapter/
%{_libdir}/d3d/*.so
%endif
%files dri-drivers
%dir %{_datadir}/drirc.d
%{_datadir}/drirc.d/00-mesa-defaults.conf
%if 0%{?with_hardware}
%{_libdir}/dri/radeon_dri.so
%{_libdir}/dri/r200_dri.so
%{_libdir}/dri/nouveau_vieux_dri.so
%{_libdir}/dri/r300_dri.so
%if 0%{?with_radeonsi}
%{_libdir}/dri/r600_dri.so
%{_libdir}/dri/radeonsi_dri.so
%endif
%ifarch %{ix86} x86_64
%{_libdir}/dri/i830_dri.so
%{_libdir}/dri/i915_dri.so
%{_libdir}/dri/i965_dri.so
%endif
%if 0%{?with_vc4}
%{_libdir}/dri/vc4_dri.so
%endif
%if 0%{?with_freedreno}
%{_libdir}/dri/kgsl_dri.so
%{_libdir}/dri/msm_dri.so
%endif
%if 0%{?with_etnaviv}
%{_libdir}/dri/etnaviv_dri.so
%{_libdir}/dri/imx-drm_dri.so
%endif
%if 0%{?with_tegra}
%{_libdir}/dri/tegra_dri.so
%endif
%if 0%{?with_lima}
%{_libdir}/dri/lima_dri.so
%endif
%if 0%{?with_panfrost}
%{_libdir}/dri/panfrost_dri.so
%endif
%{_libdir}/dri/nouveau_dri.so
%if 0%{?with_vmware}
%{_libdir}/dri/vmwgfx_dri.so
%endif
%{_libdir}/dri/nouveau_drv_video.so
%if 0%{?with_radeonsi}
%{_libdir}/dri/r600_drv_video.so
%{_libdir}/dri/radeonsi_drv_video.so
%endif
%if 0%{?with_iris}
%{_libdir}/dri/iris_dri.so
%endif
%if 0%{?with_zink}
%{_libdir}/dri/zink_dri.so
%endif
%endif
%if 0%{?with_hardware}
%dir %{_libdir}/gallium-pipe
%{_libdir}/gallium-pipe/*.so
%endif
%if 0%{?with_kmsro}
%{_libdir}/dri/armada-drm_dri.so
%{_libdir}/dri/exynos_dri.so
%{_libdir}/dri/hx8357d_dri.so
%{_libdir}/dri/ili9225_dri.so
%{_libdir}/dri/ili9341_dri.so
%{_libdir}/dri/meson_dri.so
%{_libdir}/dri/mi0283qt_dri.so
%{_libdir}/dri/pl111_dri.so
%{_libdir}/dri/repaper_dri.so
%{_libdir}/dri/rockchip_dri.so
%{_libdir}/dri/st7586_dri.so
%{_libdir}/dri/st7735r_dri.so
%{_libdir}/dri/sun4i-drm_dri.so
%endif
%{_libdir}/dri/kms_swrast_dri.so
%{_libdir}/dri/swrast_dri.so
%{_libdir}/dri/virtio_gpu_dri.so
%if 0%{?with_hardware}
%if 0%{?with_omx}
%files omx-drivers
%{_libdir}/bellagio/libomx_mesa.so
%endif
%if 0%{?with_vdpau}
%files vdpau-drivers
%{_libdir}/vdpau/libvdpau_nouveau.so.1*
%{_libdir}/vdpau/libvdpau_r300.so.1*
%if 0%{?with_radeonsi}
%{_libdir}/vdpau/libvdpau_r600.so.1*
%{_libdir}/vdpau/libvdpau_radeonsi.so.1*
%endif
%endif
%endif
%files vulkan-drivers
%if 0%{?with_hardware}
%ifarch %{ix86} x86_64
%{_libdir}/libvulkan_intel.so
%{_datadir}/vulkan/icd.d/intel_icd.*.json
%endif
%{_libdir}/libvulkan_radeon.so
%{_datadir}/vulkan/icd.d/radeon_icd.*.json
%endif
%if 0%{?with_vulkan_overlay}
%{_bindir}/mesa-overlay-control.py
%{_libdir}/libVkLayer_MESA_overlay.so
%{_datadir}/vulkan/explicit_layer.d/VkLayer_MESA_overlay.json
%endif
%{_libdir}/libVkLayer_MESA_device_select.so
%{_datadir}/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json
%files vulkan-devel
%changelog
* Tue Jun 15 2021 Mihai Vultur <xanto#egaming.ro>
- Partially revert the modifications done in Apr 11:
- Regenerate vulkan-devel package but with no files
- This provides a lean upgrade path
* Wed May 05 2021 Mihai Vultur <xanto#egaming.ro>
- After https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10554
- also consider i830_dri.so
* Sun Apr 11 2021 Mihai Vultur <xanto#egaming.ro>
- Don't generate a separate vulkan-devel package anymore
- Since upstream commit:
- commit 5e6db1916860ec217eac60903e0a9d10189d1c53
- Author: Chad Versace <chad#kiwitree.net>
- Message:
- anv: Remove vkCreateDmaBufINTEL (v4)
* Fri Mar 26 2021 Mihai Vultur <xanto#egaming.ro>
- Set vulkan-layers=device-select,overlay since upstream commit 54fe5b04
* Fri Dec 11 2020 Mihai Vultur <xanto#egaming.ro>
- Set osmesa=true since upstream commit ee802372180a2b4460cc7abb53438e45c6b6f1e4
* Wed Nov 25 2020 Mihai Vultur <xanto#egaming.ro>
- meson: __meson_auto_features default to disabled
- Issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3873
* Mon Nov 23 2020 Mihai Vultur <xanto#egaming.ro>
- meson: drop deprecated EGL platform build options.
- Consequence of MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5844
* Mon Apr 20 2020 Mihai Vultur <xanto#egaming.ro>
- Enable vulkan-device-select-layer.
* Sun Feb 09 2020 Mihai Vultur <xanto#egaming.ro>
- Enable zink.
* Sat Feb 08 2020 Mikhail Gavrilov <mikhail.v.gavrilov#gmail.com>
- Prevent radeonsi crashing when compiled with GCC10 on Rawhide.
* Thu Jan 23 2020 Tom Stellard <tstellar#redhat.com>
- Link against libclang-cpp.so
- https://fedoraproject.org/wiki/Changes/Stop-Shipping-Individual-Component-Libraries-In-clang-lib-Package
* Sat Dec 14 2019 Mihai Vultur <xanto#egaming.ro>
- new mesa-overlay-control.py script added to the install list
* Sun Nov 03 2019 Peter Robinson <pbrobinson#gmail.com>
- adjust mesa-khr-devel requires now provided by libglvnd
* Sun Oct 06 2019 Mihai Vultur <xanto#egaming.ro>
- Architecture specific builds might run asynchronous.
- This might cause that same package build for x86_64 will be different when
- built for i686. This is problematic when we want to install multilib packages.
- Convert the specfile to template and use it to generate the actual script.
- This will prevent the random failues and mismatch between arch versions.
* Sun Sep 08 2019 Mihai Vultur <xanto#egaming.ro>
- Merge the two implementations.
* Sun Jul 07 2019 Mihai Vultur <xanto#egaming.ro>
- Implement some version autodetection to reduce maintenance work.
* Thu Jul 04 2019 Mihai Vultur <xanto#egaming.ro>
- Modified to point to Valve's Radeon ACO compiler patches from https://github.com/daniel-schuermann/mesa.
* Mon Oct 10 2016 Rudolf Kastl <rudolf#redhat.com>
- Synced with Leighs spec.
And, here is the tmp file - https://pastebin.com/PGa9hMXD (word limit here).
Can anybody tell me where the trouble is?

Related

How to make rootless containers with Podman efficient

I launched web applications in containers with the help of podman and there was a performance problem if I run container as rootless user. I have to wait a few seconds for the page to load.
The application uses the postgres database.
When I run the containers as root, the application runs much faster.
There is some way to improve the performance of the rootless containers?
podman info:
host:
arch: amd64
buildahVersion: 1.21.3
cgroupControllers: []
cgroupManager: cgroupfs
cgroupVersion: v1
conmon:
package: conmon-2.0.29-1.module_el8.4.0+886+c9a8d9ad.x86_64
path: /usr/bin/conmon
version: 'conmon version 2.0.29, commit: 97bba1e91aaab5be2e93bacd34ec4e66655a02ae'
cpus: 4
distribution:
distribution: '"centos"'
version: "8"
eventLogger: file
hostname: localhost
idMappings:
gidmap:
- container_id: 0
host_id: 5002
size: 1
- container_id: 1
host_id: 100000
size: 65536
uidmap:
- container_id: 0
host_id: 5002
size: 1
- container_id: 1
host_id: 100000
size: 65536
kernel: 4.18.0-305.12.1.el8_4.x86_64
linkmode: dynamic
memFree: 134930432
memTotal: 8145588224
ociRuntime:
name: runc
package: runc-1.0.0-74.rc95.module_el8.4.0+886+c9a8d9ad.x86_64
path: /usr/bin/runc
version: |-
runc version spec: 1.0.2-dev
go: go1.15.14
libseccomp: 2.5.1
os: linux
remoteSocket:
path: /run/user/5002/podman/podman.sock
security:
apparmorEnabled: false
capabilities: CAP_NET_RAW,CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
rootless: true
seccompEnabled: true
seccompProfilePath: /usr/share/containers/seccomp.json
selinuxEnabled: true
serviceIsRemote: false
slirp4netns:
executable: /usr/bin/slirp4netns
package: slirp4netns-1.1.8-1.module_el8.4.0+641+6116a774.x86_64
version: |-
slirp4netns version 1.1.8
commit: d361001f495417b880f20329121e3aa431a8f90f
libslirp: 4.3.1
SLIRP_CONFIG_VERSION_MAX: 3
libseccomp: 2.5.1
swapFree: 2139840512
swapTotal: 2147479552
uptime: 2h 58m 15.4s (Approximately 0.08 days)
registries:
search:
- registry.access.redhat.com
- registry.redhat.io
- docker.io
store:
configFile: /home/user/.config/containers/storage.conf
containerStore:
number: 0
paused: 0
running: 0
stopped: 0
graphDriverName: overlay
graphOptions:
overlay.mount_program:
Executable: /usr/bin/fuse-overlayfs
Package: fuse-overlayfs-1.6-1.module_el8.4.0+886+c9a8d9ad.x86_64
Version: |-
fusermount3 version: 3.2.1
fuse-overlayfs: version 1.6
FUSE library version 3.2.1
using FUSE kernel interface version 7.26
graphRoot: /home/admin/.local/share/containers/storage
graphStatus:
Backing Filesystem: xfs
Native Overlay Diff: "false"
Supports d_type: "true"
Using metacopy: "false"
imageStore:
number: 0
runRoot: /run/user/5002/containers
volumePath: /home/user/.local/share/containers/storage/volumes
version:
APIVersion: 3.2.3
Built: 1632432139
BuiltTime: Thu Sep 23 23:22:19 2021
GitCommit: ""
GoVersion: go1.15.14
OsArch: linux/amd64
Version: 3.2.3

How do I change the cgroup version for podman

I am trying to run podman with cgroups v2 enabled. I found a couple of blogposts explaining how to change the runtime to crun and the cgroup_manager to cgroupfs. But I don't know how to actually set the cgroup version to v2.
I am running podman on Manjaro Linx Kernerl 5.4, so, if i am correct, cgroups v2 should be supported.
here it the output of podman info:
host:
BuildahVersion: 1.14.3
CgroupVersion: v1
Conmon:
package: Unknown
path: /usr/bin/conmon
version: 'conmon version 2.0.15, commit: 1bddbf7051a973f4a4fecf06faa0c48e82f1e9e1'
Distribution:
distribution: manjaro
version: unknown
IDMappings:
gidmap:
- container_id: 0
host_id: 1000
size: 1
- container_id: 1
host_id: 65536
size: 66536
uidmap:
- container_id: 0
host_id: 1000
size: 1
- container_id: 1
host_id: 65536
size: 66536
MemFree: 9938743296
MemTotal: 16709140480
OCIRuntime:
name: crun
package: Unknown
path: /usr/bin/crun
version: |-
crun version 0.13
commit: e79e4de4ac16da0ce48777afb72c6241de870525
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
SwapFree: 18296258560
SwapTotal: 18296258560
arch: amd64
cpus: 6
eventlogger: journald
hostname: josef-pc
kernel: 5.4.30-1-MANJARO
os: linux
rootless: true
slirp4netns:
Executable: /usr/bin/slirp4netns
Package: Unknown
Version: |-
slirp4netns version 1.0.0
commit: a3be729152a33e692cd28b52f664defbf2e7810a
libslirp: 4.1.0
uptime: 18m 20.54s
registries:
search:
- docker.io
- registry.fedoraproject.org
- quay.io
- registry.access.redhat.com
- registry.centos.org
store:
ConfigFile: /home/josmos/.config/containers/storage.conf
ContainerStore:
number: 0
GraphDriverName: overlay
GraphOptions:
overlay.mount_program:
Executable: /usr/bin/fuse-overlayfs
Package: Unknown
Version: |-
fusermount3 version: 3.9.1
fuse-overlayfs: version 0.7.8
FUSE library version 3.9.1
using FUSE kernel interface version 7.31
GraphRoot: /home/josmos/.local/share/containers/storage
GraphStatus:
Backing Filesystem: extfs
Native Overlay Diff: "false"
Supports d_type: "true"
Using metacopy: "false"
ImageStore:
number: 9
RunRoot: /run/user/1000/containers
VolumePath: /home/josmos/.local/share/containers/storage/volumes
are you using OpenRC? From what I see, you need to set rc_cgroup_mode="unified" in the rc.conf file.
If you were using systemd instead, you'd need to run # grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=1".

Trouble installing DBD::mysql under macOS Catalina 10.15.1

Can't install DBD::mysql under macOS Catalina 10.15.1. Mysql 8.0.18 and openssl 1.0.2t are installed through brew.
Here is the module installation log:
cpan[1]> install DBD::mysql
..........
I will use the following settings for compiling and testing:
cflags (mysql_config) = -I/usr/local/Cellar/mysql/8.0.18_1/include/mysql
embedded (guessed ) =
ldflags (guessed ) =
libs (mysql_config) = -L/usr/local/Cellar/mysql/8.0.18_1/lib -L/usr/local/opt/openssl/lib -lmysqlclient -lssl -lcrypto
mysql_config (guessed ) = mysql_config
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
nossl (default ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (default ) =
testport (default ) =
testsocket (default ) =
testuser (guessed ) = dmitry
To change these settings, see 'perl Makefile.PL --help' and
'perldoc DBD::mysql::INSTALL'.
Checking if libs are available for compiling...
Looks good.
Checking if your kit is complete...
Looks good
Using DBI 1.631 (for perl 5.018004 on darwin-thread-multi-2level) installed in /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/auto/DBI/
Writing Makefile for DBD::mysql
Wide character in print at /System/Library/Perl/5.18/ExtUtils/MakeMaker.pm line 1034.
Wide character in print at /System/Library/Perl/5.18/ExtUtils/MakeMaker.pm line 1034.
Writing MYMETA.yml and MYMETA.json
cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
cc -c -I/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/auto/DBI -I/usr/local/Cellar/mysql/8.0.18_1/include/mysql -DDBD_MYSQL_WITH_SSL -g -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -Os -DVERSION=\"4.050\" -DXS_VERSION=\"4.050\" -iwithsysroot "/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE" dbdimp.c
In file included from dbdimp.c:15:
./dbdimp.h:20:10: fatal error: 'DBIXS.h' file not found
#include <DBIXS.h> /* installed by the DBI module */
^~~~~~~~~
1 error generated.
make: *** [dbdimp.o] Error 1
DVEEDEN/DBD-mysql-4.050.tar.gz
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Failed during this command:
DVEEDEN/DBD-mysql-4.050.tar.gz : make NO
cpan[2]>
It seems the compiler could not find the DBIXS.h file. find found this file in the system:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/auto/DBI/DBIXS.h
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/auto/DBI/DBIXS.h
/System/Volumes/Data/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/auto/DBI/DBIXS.h
/System/Volumes/Data/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/auto/DBI/DBIXS.h
/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/auto/DBI/DBIXS.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level/auto/DBI/DBIXS.h
How to include this header file during compilation?
UPDATE
My searches led me to build the package using the standard path where there are no header files
/System/Library/Perl/5.18/darwin-thread-multi-2level
And you must use the path
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level
But here's how to specify it? I encountered the same problem when installing Mac::SystemDirectory
/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE/EXTERN.h -
file not found
Perl information:
perl -V
Summary of my perl5 (revision 5 version 18 subversion 4) configuration:
Platform:
osname=darwin, osvers=19.0, archname=darwin-thread-multi-2level
uname='darwin osx391.sd.apple.com 19.0 darwin kernel version 18.0.0: tue jul 9 11:12:08 pdt 2019; root:xnu-4903.201.2.100.7~1release_x86_64 x86_64 '
config_args='-ds -e -Dprefix=/usr -Dccflags=-g -pipe -Dldflags= -Dman3ext=3pm -Duseithreads -Duseshrplib -Dinc_version_list=none -Dcc=cc'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags =' -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector',
optimize='-Os',
cppflags='-g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector'
ccversion='', gccversion='4.2.1 Compatible Apple LLVM 11.0.0 (clang-1100.0.32.4) (-macos10.15-objc-selector-opts)', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -fstack-protector'
libpth=/usr/lib /usr/local/lib
libs=
perllibs=
libc=, so=dylib, useshrplib=true, libperl=libperl.dylib
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -fstack-protector'
Characteristics of this binary (from libperl):
Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_64_BIT_ALL
USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
USE_REENTRANT_API
Locally applied patches:
/Library/Perl/Updates/<version> comes before system perl directories
installprivlib and installarchlib points to the Updates directory
Built under darwin
Compiled at Aug 23 2019 16:44:31
#INC:
/Library/Perl/5.18/darwin-thread-multi-2level
/Library/Perl/5.18
/Network/Library/Perl/5.18/darwin-thread-multi-2level
/Network/Library/Perl/5.18
/Library/Perl/Updates/5.18.4/darwin-thread-multi-2level
/Library/Perl/Updates/5.18.4
/System/Library/Perl/5.18/darwin-thread-multi-2level
/System/Library/Perl/5.18
/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level
/System/Library/Perl/Extras/5.18
.
The missing EXTERN.h file you find here:
$ find /Library/Developer/CommandLineTools -name EXTERN.h
A detailed instructions you find here:
DBD::mysql installation on Catalina/Big Sur fail with 'EXTERN.h' file not found?

How do I build 32-bit executables on x86_64 Fedora?

I am trying to run 32bit executables on 64bit Fedora 21.
#include <stdio.h>
int main(){
printf ("Hello C\n");
return 1;
}
cc -m32 hello.c -o helloi686
Executable returns bad system call, or not a dynamic executable.
Installed packages
glibc i686 2.20-8.fc21 #updates 15 M
glibc-devel i686 2.20-8.fc21 #updates 1.0 M
libX11 i686 1.6.2-2.fc21 #fedora 1.3 M
libXau i686 1.0.8-4.fc21 #fedora 49 k
libXext i686 1.3.3-2.fc21 #fedora 87 k
libXrandr i686 1.4.2-2.fc21 #fedora 46 k
libXrender i686 0.9.8-4.fc21 #fedora 45 k
libgcc i686 4.9.2-6.fc21 #updates 202 k
libstdc++ i686 4.9.2-6.fc21 #updates 1.0 M
libxcb i686 1.11-3.fc21 #updates 875 k
ncurses-libs i686 5.9-16.20140323.fc21 #fedora 932 k
nss-softokn-freebl i686 3.18.0-1.fc21 #updates 432 k
zlib i686 1.2.8-7.fc21 #fedora 187 k
In command line:
[root#machine platform-tools]# ldconfig -v | grep ld-linux
ld-linux.so.2 -> ld-2.20.so
ld-linux-x86-64.so.2 -> ld-2.20.so
[root#machine platform-tools]# ls -l /lib/ld-2.20.so
-rwxr-xr-x 1 root root 159020 feb 27 13:02 /lib/ld-2.20.so
What packages should solve this problem?
Could be systemd config file system.conf has enabled SystemCallArchitectures with other arch.
Adjust/remove it. dracut -f, and reboot.

Busybox rpm scriplets

I am packaging with rpm for embedded device with busybox instead normal GNU system.
When I install with busybox, it install module, but do not even try to run scriplets.
On regular system, It runs them and fails(ofc, another version of kernel).
Question: Where am I wrong, and how to work around it?
Here is my spec-file:
# The kernel version you are building for
%define kernel 3.4.0-rc6-01292-g9b8149d
# The name of the module you are supplying
%define modname ktgrabber
# The path to the module, after it is installed
%define modpath /lib/modules/%{kernel}/kernel/net/ipv4
# Which revision are we on
%define pkgrelease 1.SL
# Is this a new module, or are we replacing an existing module
# 1 - new module
# 0 - replacing an existing module
%define newmodule 1
# Optional - what Architecture we are building for
#%define thisarch ia32e
Name: kernel-module-%{modname}-%{kernel}
Summary: Kernel Module %{modname} for the %{kernel} kernel
Version: 0.99
Release: 1
Epoch: 0
License: GPLv2+
Packager: Troy Dawson <dawson#fnal.gov>
Group: System Environment/Kernel
BuildRoot: %{_tmppath}/%{name}-%{version}-root
#Requires: /boot/vmlinux-%{kernel}, modutils
Provides: kernel-module-%{modname} = %{epoch}:%{version}
Source0: %{modname}.ko.%{kernel}
%description
This package provides a %{modname} kernel module for
kernel %{kernel}.
%install
mkdir -p $RPM_BUILD_ROOT/%{modpath}
%if %{newmodule}
install -m 644 %{SOURCE0} $RPM_BUILD_ROOT/%{modpath}/%{modname}.ko
%else
install -m 644 %{SOURCE0} $RPM_BUILD_ROOT/%{modpath}/%{modname}.%{version}.%{pkgrelease}.o
%endif
%pre
touch /root/bar
mkdir /alice
%post
touch /bar
/bin/echo %{modname} >> /etc/modules
depmod
mkdir /foo
depmod -ae %{kernel} >/dev/null 2>&1
modprobe %{modname}
%postun
sed -i 's/^%{modname}$//g' /etc/modules
%if %{newmodule}
depmod -ae %{kernel} >/dev/null 2>&1 || :
%else
if [ "" = "0" ] ; then
if ! [ -f %{modpath}/%{modname}.original.o ] ; then
mv %{modpath}/%{modname}.o %{modpath}/%{modname}.original.o
fi
cp -f %{modpath}/%{modname}.%{version}.%{pkgrelease}.o %{modpath}/%{modname}.o
depmod -ae %{kernel} >/dev/null 2>&1 || :
fi
%endif
%files
%if %{newmodule}
%{modpath}/%{modname}.ko
%else
%{modpath}/%{modname}.%{version}.%{pkgrelease}.ko
%endif
Check out this link : http://lists.busybox.net/pipermail/busybox/2006-November/059507.html scriptlets aren't run by busybox's rpm command.
Looking at the source at http://git.busybox.net/busybox/tree/archival/rpm.c#n149 that appears to be true.