Bug#1041870: [3dprinter-general] Bug#1041870: slic3r-prusa FTBFS on i386

2023-07-25 Thread Chow Loong Jin
On Tue, Jul 25, 2023 at 12:09:51AM +0200, Christoph Berg wrote:
> Re: Adrian Bunk
> > 2. the following change:
> > 
> > --- debian/rules.old2023-07-24 15:36:20.941771419 +
> > +++ debian/rules2023-07-24 15:36:43.133759741 +
> > @@ -5,7 +5,7 @@
> >  # less debug info to avoid running out of address space
> >  ifneq (,$(filter $(DEB_HOST_ARCH), mips mipsel))
> > export DEB_CXXFLAGS_MAINT_APPEND += --param ggc-min-expand=5 -g0
> > -else ifneq (,$(filter $(DEB_HOST_ARCH), armhf))
> 
> The old command was wrong anyway, the pattern list comes first:
> 
> ifneq (,$(filter armhf, $(DEB_HOST_ARCH)))
> 
> Doesn't matter when it's a single item without % wildcards, but will
> explode when adding more architectures.
> 
> Christoph

Both versions work identically :)

To be perfectly honest though, I'd initially thought $(filter ...) only
took one pattern, but I see that your version works because it takes
multiple patterns in the first argument, whereas the old version would
have worked with a $(filter ...) function that takes only one pattern.

% cat test.mk
all:
ifneq (,$(filter $(DEB_HOST_ARCH), mips mipsel armhf))
@echo old=true
else
@echo old=false
endif

ifneq (,$(filter mips mipsel armhf, $(DEB_HOST_ARCH)))
@echo new=true
else
@echo new=false
endif

% for i in mips mipsel armhf amd64 i386; do echo "DEB_HOST_ARCH=$i"; make -f 
test.mk DEB_HOST_ARCH=$i; done;
DEB_HOST_ARCH=mips
old=true
new=true
DEB_HOST_ARCH=mipsel
old=true
new=true
DEB_HOST_ARCH=armhf
old=true
new=true
DEB_HOST_ARCH=amd64
old=false
new=false
DEB_HOST_ARCH=i386
old=false
new=false

-- 
Kind regards,
Loong Jin


signature.asc
Description: PGP signature


Bug#1041870: [3dprinter-general] Bug#1041870: slic3r-prusa FTBFS on i386

2023-07-24 Thread Christoph Berg
Re: Adrian Bunk
> 2. the following change:
> 
> --- debian/rules.old  2023-07-24 15:36:20.941771419 +
> +++ debian/rules  2023-07-24 15:36:43.133759741 +
> @@ -5,7 +5,7 @@
>  # less debug info to avoid running out of address space
>  ifneq (,$(filter $(DEB_HOST_ARCH), mips mipsel))
>   export DEB_CXXFLAGS_MAINT_APPEND += --param ggc-min-expand=5 -g0
> -else ifneq (,$(filter $(DEB_HOST_ARCH), armhf))

The old command was wrong anyway, the pattern list comes first:

ifneq (,$(filter armhf, $(DEB_HOST_ARCH)))

Doesn't matter when it's a single item without % wildcards, but will
explode when adding more architectures.

Christoph



Bug#1041870: slic3r-prusa FTBFS on i386

2023-07-24 Thread Adrian Bunk
Source: slic3r-prusa
Version: 2.6.0+dfsg-1
Severity: serious
Tags: ftbfs patch
Forwarded: https://github.com/prusa3d/PrusaSlicer/pull/11036

https://buildd.debian.org/status/fetch.php?pkg=slic3r-prusa=i386=2.6.0%2Bdfsg-1=1690032193=0

...
/<>/src/libslic3r/Format/AnycubicSLA.cpp:327:15: error: no 
matching function for call to ‘crop_value(float_t&, float, float)’
  327 | crop_value(h.delay_before_exposure_s, 0.0f, 1000.0f);
  | ~~^~
/<>/src/libslic3r/Format/AnycubicSLA.cpp:219:24: note: candidate: 
‘template void Slic3r::{anonymous}::crop_value(T&, T, T)’
...


Two fixes are required for fixing the build on i386
(and likely also some non-release 32bit architectures).

1. The patch from the pull request above, and

2. the following change:

--- debian/rules.old2023-07-24 15:36:20.941771419 +
+++ debian/rules2023-07-24 15:36:43.133759741 +
@@ -5,7 +5,7 @@
 # less debug info to avoid running out of address space
 ifneq (,$(filter $(DEB_HOST_ARCH), mips mipsel))
export DEB_CXXFLAGS_MAINT_APPEND += --param ggc-min-expand=5 -g0
-else ifneq (,$(filter $(DEB_HOST_ARCH), armhf))
+else ifeq ($(DEB_HOST_ARCH_BITS), 32)
export DEB_CXXFLAGS_MAINT_APPEND += -g1
 endif