From 993e8358ae5908e235c63af782b6284ddffa24eb Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Dec 14 2021 18:10:54 +0000 Subject: [PATCH 1/3] compat_build: remove pyc BuildRequires This error is seen on the compat_build find: '.../rpmbuild/BUILDROOT/clang13-13.0.0-5.fc36.x86_64/ usr/lib/python3.10/site-packages': No such file or directory python3-clang is not part of the compat_build so ifdef out the problem area. Signed-off-by: Tom Rix --- diff --git a/clang.spec b/clang.spec index 016f7e3..7805446 100644 --- a/clang.spec +++ b/clang.spec @@ -128,10 +128,12 @@ BuildRequires: libatomic # We need python3-devel for %%py3_shebang_fix BuildRequires: python3-devel +%if %{without compat_build} # For reproducible pyc file generation # See https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_Appendix/#_byte_compilation_reproducibility BuildRequires: /usr/bin/marshalparser %global py_reproducible_pyc_path %{buildroot}%{python3_sitelib} +%endif # Needed for %%multilib_fix_c_header BuildRequires: multilib-rpm-config From 715c4e65eed5159e4fb4486afce9b959b030067d Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Dec 15 2021 13:38:00 +0000 Subject: [PATCH 2/3] compat_build: use llvm-config from the llvm compat build The regular llvm build installs llvm-config-N to _bindir The compat_build llvm build install llvm-config-N to pkg_bindir Use the pkg_bindir one. Fixes a build error error: File not found: .../rpmbuild/BUILDROOT/ clang13-13.0.0-5.fc36.x86_64/usr/lib64/llvm13/lib/*.so.* Signed-off-by: Tom Rix --- diff --git a/clang.spec b/clang.spec index 7805446..aa1fe9c 100644 --- a/clang.spec +++ b/clang.spec @@ -334,7 +334,7 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py %endif %if %{with compat_build} -DCLANG_BUILD_TOOLS:BOOL=OFF \ - -DLLVM_CONFIG:FILEPATH=%{_bindir}/llvm-config-%{maj_ver} \ + -DLLVM_CONFIG:FILEPATH=%{pkg_bindir}/llvm-config-%{maj_ver}-%{__isa_bits} \ -DCMAKE_INSTALL_PREFIX=%{install_prefix} \ -DCLANG_INCLUDE_TESTS:BOOL=OFF \ %else From 9625344c394f4d424906876da2118aa855c3606e Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Dec 15 2021 19:47:08 +0000 Subject: [PATCH 3/3] compat_build: remove scanview helpers from buildroot scanview and other tools are not built so these libraries are not needed, so remove them. Resolves a build but not packaged error. Signed-off-by: Tom Rix --- diff --git a/clang.spec b/clang.spec index aa1fe9c..518410b 100644 --- a/clang.spec +++ b/clang.spec @@ -388,6 +388,8 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py rm -Rf %{buildroot}%{install_bindir} rm -Rf %{buildroot}%{install_prefix}/share rm -Rf %{buildroot}%{install_prefix}/libexec +# Remove scanview-py helper libs +rm -Rf %{buildroot}%{install_prefix}/lib/{libear,libscanbuild} %else