On Sun, Oct 08, 2023 at 10:02:34PM +0200, Santiago Vila wrote: >... > For example, configure.ac unconditionally adds -O3 to CXXFLAGS. > This is already a bug, because packages should honor whatever comes > from dpkg-buildflags (usually -O2). >...
For the record, this is not considered to be be a bug - using non-standard flags is fine as long as they aren't violating the architecture baseline. -O3 is regarded as best choice for some applications, there is nothing wrong with that. On Mon, Oct 14, 2024 at 01:36:20AM +0200, Santiago Vila wrote: >... > A) The simple and effective way: Disable parallel building, > i.e. add --no-parallel to dh call. The package would still > build the same, and it would not sacrifice things like -O3, > which would be preserved. >... This would simply be horrible. The successful build of the previous version took a week on the riscv64 buildd. If the build would still succeed, your change would have caused a build time of 3 weeks or a month on a release architecture. This is a HUGE problem. The packages requiring lots of RAM during the build are usually also the ones with the largest build times, you cannot disable parallel building on these (as your 10 GB change also effectively did). On Sun, Dec 15, 2024 at 12:40:46PM +0100, Santiago Vila wrote: >... > I've used 10000 MB / CPU as a threshold, based on my own measurements, > but of course we could lower that later if it proves not to be enough. >... What exactly have you measured? Looking at the riscv64 FTBFS your change caused, I am puzzled how you ended up with such an insanely high number. Please fix this regression you introduced. Based on build times on other architectures, with 8 GB RAM and 2 CPUs on s390x the build of graph-tool is much faster when using both CPUs, which indicates that the limit must be below 4 GB for this package. On Wed, Oct 16, 2024 at 04:47:47PM +0200, Santiago Vila wrote: >... > +MEM_PER_CPU = 10000 > +NCPUS := $(or $(subst parallel=,,$(filter > parallel=%,$(DEB_BUILD_OPTIONS))),$(shell nproc)) > +NJOBS := $(shell awk -vn=$(NCPUS) -vm=$(MEM_PER_CPU) '/^MemAvailable:/ { mt > = $$2 } \ > + END { n2 = int(mt/1024/m); print (n==1 || n2<=1) ? 1 : (n2<=n ? n2 : n) }' > /proc/meminfo) >... > +override_dh_auto_build: > + dh_auto_build -- -j $(NJOBS) >... --max-parallel would be a simpler approach. cu Adrian