X-Debbugs-Cc: libnetpbm10-...@packages.debian.org On 2021-11-04 Lucas Nussbaum <lu...@debian.org> wrote: > Source: pfstools > Version: 2.2.0-1 > Severity: serious > Justification: FTBFS > Tags: bookworm sid ftbfs > User: lu...@debian.org > Usertags: ftbfs-20211104 ftbfs-bookworm
> Hi, > During a rebuild of all packages in sid, your package failed to build > on amd64. > Relevant part (hopefully): > > cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/src/fileformat && /usr/bin/c++ > > -D_CRT_SECURE_NO_WARNINGS -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu > > -I/<<PKGBUILDDIR>>/src/pfs -I/usr/include/OpenEXR > > -I/usr/include/ImageMagick-6 -I/usr/include/x86_64-linux-gnu/ImageMagick-6 > > -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong > > -Wformat -Werror=format-security -Wall -Wdate-time -D_FORTIFY_SOURCE=2 -MD > > -MT src/fileformat/CMakeFiles/pfsinppm.dir/ppmio.cpp.o -MF > > CMakeFiles/pfsinppm.dir/ppmio.cpp.o.d -o > > CMakeFiles/pfsinppm.dir/ppmio.cpp.o -c > > /<<PKGBUILDDIR>>/src/fileformat/ppmio.cpp > > In file included from /usr/include/c++/11/bits/specfun.h:45, > > from /usr/include/c++/11/cmath:1935, > > from /usr/include/c++/11/math.h:36, > > from /<<PKGBUILDDIR>>/src/fileformat/ppmio.cpp:34: > > /usr/include/c++/11/bits/stl_algobase.h:278:56: error: macro "min" passed 3 > > arguments, but takes just 2 > > 278 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) > > | ^ > > In file included from /usr/include/pbm.h:7, > > from /usr/include/pgm.h:7, > > from /usr/include/ppm.h:7, > > from /<<PKGBUILDDIR>>/src/fileformat/ppmio.cpp:31: > > /usr/include/pm.h:51: note: macro "min" defined here > > 51 | #define min(a,b) ((a) < (b) ? (a) : (b)) [...] Hello, This looks like a problem with libnetpbm10-dev, it should not #define generic max/min macros in a public header. The same error is generated with: (sid)ametzler@argenau:/tmp/PFSTOOLS$ cat fail-with-pm.cpp #include <ppm.h> #include <math.h> int main () { return 0; } (sid)ametzler@argenau:/tmp/PFSTOOLS$ g++ -o fail-with-pm fail-with-pm.cpp Deleting the #defines from /usr/include/pm.h lets pfstools build successfully. Which seems to have been fixed in netpbm upstream somewhere in 10.35 (anno 2009), sourceforge has a tarball for 10.35.68 without max/min. (They switched to upper case MAX MIN from 10.11 up to 10.26). cu Andreas > > | -- `What a good friend you are to him, Dr. Maturin. His other friends are so grateful to you.' `I sew his ears on from time to time, sure'