#113 Sucessfully build clang12 compat RPM
Closed 2 years ago by tstellar. Opened 2 years ago by kkleine.
rpms/ kkleine/clang rawhide  into  rawhide

file modified
+11 -3
@@ -375,8 +375,14 @@ 

  

  # Move include files

  mkdir -p %{buildroot}%{pkg_includedir}

- mv  %{buildroot}/%{install_includedir}/clang %{buildroot}/%{pkg_includedir}/

- mv  %{buildroot}/%{install_includedir}/clang-c %{buildroot}/%{pkg_includedir}/

+ 

+ # Conditional move to prevent an error that's similar to this one:

+ # + mv /builddir/build/BUILDROOT/clang12-12.0.0-2.fc35.x86_64//usr/lib64/llvm12/include/clang /builddir/build/BUILDROOT/clang12-12.0.0-2.fc35.x86_64//usr/lib64/llvm12/include/

+ # mv: '/builddir/build/BUILDROOT/clang12-12.0.0-2.fc35.x86_64//usr/lib64/llvm12/include/clang' and '/builddir/build/BUILDROOT/clang12-12.0.0-2.fc35.x86_64//usr/lib64/llvm12/include/clang' are the same file

+ %if %{without compat_build}

+ mv %{buildroot}/%{install_includedir}/clang %{buildroot}/%{pkg_includedir}/

+ mv %{buildroot}/%{install_includedir}/clang-c %{buildroot}/%{pkg_includedir}/

+ %endif

  

  %else

  
@@ -437,7 +443,9 @@ 

  rm -Rvf %{buildroot}%{_includedir}/clang-tidy/

  

  # Add a symlink in /usr/bin to clang-format-diff

+ %if %{without compat_build}

  ln -s %{_datadir}/clang/clang-format-diff.py %{buildroot}%{_bindir}/clang-format-diff

+ %endif

  

  %check

  %if %{without compat_build}
@@ -489,9 +497,9 @@ 

  %files resource-filesystem

  %dir %{pkg_libdir}/clang/%{version}/

  %dir %{pkg_libdir}/clang/%{version}/include/

+ %if %{without compat_build}

  %dir %{pkg_libdir}/clang/%{version}/lib/

  %dir %{pkg_libdir}/clang/%{version}/share/

- %if %{without compat_build}

  %{pkg_libdir}/clang/%{maj_ver}

  %endif

  

This change includes all the changes I needed to make in order for the
compatibilty build of clang12 to succeed.

I took the code from https://src.fedoraproject.org/rpms/clang11/pull-request/3.patch and did more changes along the way as the build kept failing.

For example, the following error was fixed by putting a section into a
conditional build if-block.

   RPM build errors:
   error: Directory not found: /builddir/build/BUILDROOT/clang12-12.0.0-2.fc35.x86_64/usr/lib64/llvm12/lib/clang/12.0.0/lib
   error: Directory not found: /builddir/build/BUILDROOT/clang12-12.0.0-2.fc35.x86_64/usr/lib64/llvm12/lib/clang/12.0.0/share
       Directory not found: /builddir/build/BUILDROOT/clang12-12.0.0-2.fc35.x86_64/usr/lib64/llvm12/lib/clang/12.0.0/lib
       Directory not found: /builddir/build/BUILDROOT/clang12-12.0.0-2.fc35.x86_64/usr/lib64/llvm12/lib/clang/12.0.0/share
   Finish: rpmbuild clang12-12.0.0-2.fc35.src.rpm

1 new commit added

  • Fix missing directories
2 years ago

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

rebased onto 4191080f22b5999dd681b68978aed33a17191fc1

2 years ago

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

rebased onto 66ac485

2 years ago

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

Pull-Request has been closed by tstellar

2 years ago
Metadata