Bug #49556
Updated by Nathan Cutler about 3 years ago
43b441f9a3bc907c17d52385251001ffcd5d3ff9 removed a bunch of code that was protecting OBS builds from OOM by setting build parallelism on migrated the basis of available memory instead of spec file to the number of CPU threads the build hardware can sustain.
This commit also introduced the use of the %_smb_build_ncpus %_smp_build_ncpus RPM macro, which is not only available in any SUSE operating system except Tumbleweed (because only very recent newer versions of RPM.
openSUSE Leap 15.2 and SLE-15-SP2 have RPM 4.14.1 which does not define this macro). macro. As a result, on these platforms the RPM build fails:
Something will need <pre>
[ 82s] + cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib64 -DCMAKE_INSTALL_LIBEXECDIR:PATH=/usr/lib -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DCMAKE_INSTALL_MANDIR:PATH=/usr/share/man -DCMAKE_INSTALL_DOCDIR:PATH=/usr/share/doc/packages/ceph -DCMAKE_INSTALL_INCLUDEDIR:PATH=/usr/include -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR:PATH=/usr/lib/systemd/system -DWITH_MANPAGE:BOOL=ON -DWITH_PYTHON3:STRING=3.6 -DWITH_MGR_DASHBOARD_FRONTEND:BOOL=OFF -DWITH_TESTS:BOOL=OFF -DWITH_LTTNG:BOOL=ON -DWITH_BABELTRACE:BOOL=ON -DWITH_CEPHFS_SHELL:BOOL=ON -DWITH_LIBRADOSSTRIPER:BOOL=OFF -DWITH_RADOSGW_AMQP_ENDPOINT:BOOL=OFF -DWITH_RADOSGW_KAFKA_ENDPOINT:BOOL=OFF -DWITH_RBD_RWL:BOOL=ON -DWITH_RBD_SSD_CACHE:BOOL=ON -DWITH_SYSTEM_PMDK:BOOL=ON '-DBOOST_J:STRING=%{_smp_build_ncpus}' -DWITH_GRAFANA:BOOL=ON
</pre>
And as a result cmake is unable to be done set a reasonable value for "-j" (parallel build):
<pre>
[ 93s] + /usr/bin/make -O -j16
</pre>
(I guess cmake is falling back to restore a hard-coded default of 16 here because it doesn't understand <code>-DBOOST_J:STRING=%{_smp_build_ncpus}</code>)
A few seconds later, the "good build behavior" we had fails because there aren't enough CPU cores:
<pre>
[ 100s] Invalid value for the OBS before this regression. '-j' option.
</pre>
This commit also introduced the use of the %_smb_build_ncpus %_smp_build_ncpus RPM macro, which is not only available in any SUSE operating system except Tumbleweed (because only very recent newer versions of RPM.
openSUSE Leap 15.2 and SLE-15-SP2 have RPM 4.14.1 which does not define this macro). macro. As a result, on these platforms the RPM build fails:
Something will need <pre>
[ 82s] + cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib64 -DCMAKE_INSTALL_LIBEXECDIR:PATH=/usr/lib -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DCMAKE_INSTALL_MANDIR:PATH=/usr/share/man -DCMAKE_INSTALL_DOCDIR:PATH=/usr/share/doc/packages/ceph -DCMAKE_INSTALL_INCLUDEDIR:PATH=/usr/include -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR:PATH=/usr/lib/systemd/system -DWITH_MANPAGE:BOOL=ON -DWITH_PYTHON3:STRING=3.6 -DWITH_MGR_DASHBOARD_FRONTEND:BOOL=OFF -DWITH_TESTS:BOOL=OFF -DWITH_LTTNG:BOOL=ON -DWITH_BABELTRACE:BOOL=ON -DWITH_CEPHFS_SHELL:BOOL=ON -DWITH_LIBRADOSSTRIPER:BOOL=OFF -DWITH_RADOSGW_AMQP_ENDPOINT:BOOL=OFF -DWITH_RADOSGW_KAFKA_ENDPOINT:BOOL=OFF -DWITH_RBD_RWL:BOOL=ON -DWITH_RBD_SSD_CACHE:BOOL=ON -DWITH_SYSTEM_PMDK:BOOL=ON '-DBOOST_J:STRING=%{_smp_build_ncpus}' -DWITH_GRAFANA:BOOL=ON
</pre>
And as a result cmake is unable to be done set a reasonable value for "-j" (parallel build):
<pre>
[ 93s] + /usr/bin/make -O -j16
</pre>
(I guess cmake is falling back to restore a hard-coded default of 16 here because it doesn't understand <code>-DBOOST_J:STRING=%{_smp_build_ncpus}</code>)
A few seconds later, the "good build behavior" we had fails because there aren't enough CPU cores:
<pre>
[ 100s] Invalid value for the OBS before this regression. '-j' option.
</pre>