Bugzilla – Bug 1218701
llvm17 on i586: fails to build with RPM 4.19
Last modified: 2024-06-20 12:39:53 UTC
Created attachment 871750 [details] llvm17 on i586 with RPM 4.19 The remaining blocker for RPM 4.19 to go is llvm17 failing to build on i586, please see attached log.
In case it helps, from the bottom of the log: [12316s] ******************** [12346s] Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. [12346s] [12346s] 1 warning(s) in tests [12346s] ******************** [12346s] Failed Tests (2): [12346s] Clang Tools :: clang-tidy/checkers/abseil/duration-factory-scale.cpp [12346s] Clang Tools :: clang-tidy/checkers/altera/struct-pack-align.cpp [12346s] [12346s] [12346s] Testing Time: 31.18s [12346s] Unsupported : 1 [12346s] Passed : 797 [12346s] Expectedly Failed: 2 [12346s] Failed : 2 [12346s] error: Bad exit status from /var/tmp/rpm-tmp.HNfYRP (%check)
Looking at the build log, there is this diff: - -- LLVM host triple: i586-suse-linux - -- LLVM default target triple: i586-suse-linux + -- LLVM host triple: i686-suse-linux + -- LLVM default target triple: i686-suse-linux Which is coming from %_host_cpu: # Figure out the host triple. %ifarch armv6hl # See https://build.opensuse.org/request/show/968066. %define host_cpu armv6kz %else %define host_cpu %{_host_cpu} %endif The build happens on a recent x86_64 VM with an x86_64 kernel and 32bit x86 userspace, so technically i686 is actually more correct than i586 and IMO not an RPM regression. I guess the clang-tidy testsuite failure is because of https://github.com/llvm/llvm-project/issues/40805, which is related to floating point precision.
(In reply to Fabian Vogt from comment #2) > The build happens on a recent x86_64 VM with an x86_64 kernel and 32bit x86 > userspace, so technically i686 is actually more correct than i586 and IMO > not an RPM regression. FTR, the most likely cause upstream is https://github.com/rpm-software-management/rpm/commit/26d3802390602c6aadc523bfb84426914c8fa050
(In reply to Fabian Vogt from comment #2) > Looking at the build log, there is this diff: > > - -- LLVM host triple: i586-suse-linux > - -- LLVM default target triple: i586-suse-linux > + -- LLVM host triple: i686-suse-linux > + -- LLVM default target triple: i686-suse-linux > > Which is coming from %_host_cpu: > > # Figure out the host triple. > %ifarch armv6hl > # See https://build.opensuse.org/request/show/968066. > %define host_cpu armv6kz > %else > %define host_cpu %{_host_cpu} > %endif > > The build happens on a recent x86_64 VM with an x86_64 kernel and 32bit x86 > userspace, so technically i686 is actually more correct than i586 and IMO > not an RPM regression. The intent here is actually not to figure out the host, but the "default target": what the compiler will emit without explicit --target=<triple>. Presumably our default target is still i586 and not i686, so how do I get that? Maybe %{_target_cpu}? With the current RPM, that's just an alias on x86_64: /usr/lib/rpm/macros:%_build_cpu %{_host_cpu} /usr/lib/rpm/macros:%_host_cpu x86_64 /usr/lib/rpm/macros:%_target_cpu %{_host_cpu} Though maybe that's not actually where it comes from, since I can override the target when building the package. Conceptually, using the _target_* macros instead of _host_* macros seems definitely right, but I'm not sure if it would fix the issue. The clang-tidy tests are not a big issue, but I don't think we want i686 as default target.
(In reply to Aaron Puchert from comment #4) > Presumably our default target is still i586 and not i686, so how do I get > that? Maybe %{_target_cpu}? With the current RPM, that's just an alias on > x86_64: > > /usr/lib/rpm/macros:%_build_cpu %{_host_cpu} > /usr/lib/rpm/macros:%_host_cpu x86_64 > /usr/lib/rpm/macros:%_target_cpu %{_host_cpu} > > Though maybe that's not actually where it comes from, since I can override > the target when building the package. Correct. > Conceptually, using the _target_* macros instead of _host_* macros seems > definitely right, but I'm not sure if it would fix the issue. > > The clang-tidy tests are not a big issue, but I don't think we want i686 as > default target. So using %_target_cpu is necessary in any case and with some luck also addresses the build failure, worth a try.
(In reply to Fabian Vogt from comment #5) > So using %_target_cpu is necessary in any case and with some luck also > addresses > the build failure, worth a try. Works! https://build.opensuse.org/package/live_build_log/home:favogt:branches:devel:tools:compiler/llvm17/rpm/i586 https://build.opensuse.org/request/show/1138113
This is an autogenerated message for OBS integration: This bug (1218701) was mentioned in https://build.opensuse.org/request/show/1138185 Factory / llvm17
This is an autogenerated message for OBS integration: This bug (1218701) was mentioned in https://build.opensuse.org/request/show/1157115 Backports:SLE-15-SP5 / llvm17
This is fixed already.