NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.48k stars 13.67k forks source link

cups-filters fail to build #70483

Closed marzipankaiser closed 4 years ago

marzipankaiser commented 4 years ago

Describe the bug cups-filters fails to build on current master

To Reproduce Steps to reproduce the behavior:

  1. Get a checkout of the current nixpkgs master
  2. nix-build ./default.nix -A cups-filters

Expected behavior Build succeeds

Screenshots

Not a screenshot, but build output

``` these derivations will be built: /nix/store/8xh6xsgmgic6fvdmkarcyba868xbq0hd-cups-filters-1.25.0.drv building '/nix/store/8xh6xsgmgic6fvdmkarcyba868xbq0hd-cups-filters-1.25.0.drv'... unpacking sources unpacking source archive /nix/store/k8x5lmb8h88j1fkdy96a8ydxzd7c08ms-cups-filters-1.25.0.tar.xz source root is cups-filters-1.25.0 setting SOURCE_DATE_EPOCH to timestamp 1559827043 of file cups-filters-1.25.0/test-driver patching sources configuring fixing libtool script ./ltmain.sh configure flags: --disable-static --disable-dependency-tracking --prefix=/nix/store/6j3w9qiaqf89n5rw6j939mx808m3ghvj-cups-filters-1.25.0 --with-pdftops=pdftops --with-pdftops-path=/nix/store/zsrhky4x49llpd7d63r692q50qbbiaws-poppler-utils-0.74.0/bin/pdftops --with-gs-path=/nix/store/fvhw1i95576nhzhs36p687nkzlvyjl7g-ghostscript-9.26/bin/gs --with-pdftocairo-path=/nix/store/zsrhky4x49llpd7d63r692q50qbbiaws-poppler-utils-0.74.0/bin/pdftocairo --with-ippfind-path=/nix/store/r4nksg5dz5h8afilkanj39wikhirmya0-cups-2.2.12/bin/ippfind --enable-imagefilters --with-rcdir=no --with-shell=/nix/store/l6h4ya0wzb4b8mr0y58k2gh2nhfql4sn-bash-4.4-p23/bin/bash --with-test-font-path=/path-does-not-exist checking for a BSD-compatible install... /nix/store/kx56d14p0qm2awn0qrqrv4rb8xdhvhpi-coreutils-8.31/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /nix/store/kx56d14p0qm2awn0qrqrv4rb8xdhvhpi-coreutils-8.31/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether make supports nested variables... (cached) yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking whether make supports the include directive... yes (GNU style) checking dependency style of gcc... none checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... none checking whether g++ supports C++11 features by default... yes checking how to run the C preprocessor... gcc -E checking whether ln -s works... yes checking whether make sets $(MAKE)... (cached) yes checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking how to print strings... printf checking for a sed that does not truncate output... /nix/store/5pwj1q9zbs89xv9wlmp554p4fixz9im4-gnused-4.7/bin/sed checking for grep that handles long lines and -e... /nix/store/6zcfsp4rkn7pyc04zy0jww3p5lfhvvh4-gnugrep-3.3/bin/grep checking for egrep... /nix/store/6zcfsp4rkn7pyc04zy0jww3p5lfhvvh4-gnugrep-3.3/bin/grep -E checking for fgrep... /nix/store/6zcfsp4rkn7pyc04zy0jww3p5lfhvvh4-gnugrep-3.3/bin/grep -F checking for ld used by gcc... ld checking if the linker (ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... nm checking the name lister (nm) interface... BSD nm checking the maximum length of command line arguments... 1572864 checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop checking for ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse nm output from gcc object... ok checking for sysroot... no checking for a working dd... /nix/store/kx56d14p0qm2awn0qrqrv4rb8xdhvhpi-coreutils-8.31/bin/dd checking how to truncate binary pipes... /nix/store/kx56d14p0qm2awn0qrqrv4rb8xdhvhpi-coreutils-8.31/bin/dd bs=4096 count=1 ./configure: line 8431: /usr/bin/file: No such file or directory checking for mt... no checking if : is a manifest tool... no checking for ANSI C header files... no checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... no checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking how to run the C++ preprocessor... g++ -E checking for ld used by g++... ld checking if the linker (ld) is GNU ld... yes checking whether the g++ linker (ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC -DPIC checking if g++ PIC flag -fPIC -DPIC works... yes checking if g++ static flag -static works... no checking if g++ supports -c -o file.o... yes checking if g++ supports -c -o file.o... (cached) yes checking whether the g++ linker (ld) supports shared libraries... yes checking dynamic linker characteristics... (cached) GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking for pkg-config... /nix/store/gyh4j0wwlry6wx4rkpb6bzyic2b1wjqx-pkg-config-0.29.2/bin/pkg-config checking pkg-config is at least version 0.20... yes checking for cups-config... /nix/store/1cnsy7rxbgp4r79mwwcixjspngp2p92p-cups-2.2.12-dev/bin/cups-config checking for library containing dlopen... -ldl checking for strlcat... no checking for strlcpy... no checking for sigaction... yes checking for waitpid... yes checking for wait3... yes checking for strtoll... yes checking for open_memstream... yes checking for getline... yes checking for strcasestr... yes checking for library containing pow... none required checking for stdlib.h... (cached) yes checking for sys/stat.h... (cached) yes checking for sys/types.h... (cached) yes checking for unistd.h... (cached) yes checking zlib.h usability... yes checking zlib.h presence... yes checking for zlib.h... yes checking endian.h usability... yes checking endian.h presence... yes checking for endian.h... yes checking dirent.h usability... yes checking dirent.h presence... yes checking for dirent.h... yes checking sys/ioctl.h usability... yes checking sys/ioctl.h presence... yes checking for sys/ioctl.h... yes checking jpeglib.h usability... yes checking jpeglib.h presence... yes checking for jpeglib.h... yes checking for library containing jpeg_destroy_decompress... -ljpeg checking for LIBPNG... yes checking tiff.h usability... yes checking tiff.h presence... yes checking for tiff.h... yes checking for library containing TIFFReadScanline... -ltiff checking for AVAHI... yes checking ldap.h usability... no checking ldap.h presence... no checking for ldap.h... no checking for GLIB... yes checking for AVAHI_GLIB... yes checking for GIO... yes checking for GIO_UNIX... yes checking for LCMS... yes checking for FREETYPE... yes checking for FONTCONFIG... yes checking for ZLIB... yes checking for LIBQPDF... yes checking for POPPLER... yes checking poppler/cpp/poppler-version.h usability... yes checking poppler/cpp/poppler-version.h presence... yes checking for poppler/cpp/poppler-version.h... yes checking for DBUS... yes checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... no checking for long long... yes checking whether gs supports the ps2write device... yes checking for mutool... mutool checking whether pdftops supports -origpagesizes... yes checking whether pdftops supports -r... yes checking for liblouis... no checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating libcupsfilters.pc config.status: creating libfontembed.pc config.status: creating Makefile config.status: creating utils/cups-browsed config.status: creating utils/cups-browsed.conf config.status: creating filter/foomatic-rip/foomatic-rip.1 config.status: creating filter/braille/drivers/index/indexv4.sh config.status: creating filter/braille/drivers/index/indexv3.sh config.status: creating filter/braille/drivers/index/index.sh config.status: creating filter/braille/drivers/index/textbrftoindexv3 config.status: creating filter/braille/drivers/index/imageubrltoindexv3 config.status: creating filter/braille/drivers/index/imageubrltoindexv4 config.status: creating filter/braille/drivers/generic/brftoembosser config.status: creating filter/braille/filters/cups-braille.sh config.status: creating filter/braille/filters/imagetobrf config.status: creating filter/braille/filters/texttobrf config.status: creating filter/braille/filters/brftopagedbrf config.status: creating filter/braille/filters/vectortopdf config.status: creating filter/braille/filters/vectortobrf config.status: creating filter/braille/filters/musicxmltobrf config.status: creating filter/braille/filters/liblouis1.defs.gen config.status: creating mime/cupsfilters.convs config.status: creating config.h config.status: executing depfiles commands config.status: executing libtool commands config.status: executing executable-scripts commands configure: ============================================================================== Environment settings: CFLAGS: -g -O2 -Wall -std=gnu11 -D_GNU_SOURCE CXXFLAGS: -g -O2 -Wall -D_GNU_SOURCE LDFLAGS: Build configuration: cups-config: system font directory: /nix/store/6j3w9qiaqf89n5rw6j939mx808m3ghvj-cups-filters-1.25.0/etc/fonts/conf.d foomatic: yes init directory: cups dom socket: /nix/store/6j3w9qiaqf89n5rw6j939mx808m3ghvj-cups-filters-1.25.0/var/run/cups/cups.sock poppler: yes ghostscript: yes gs-path: /nix/store/fvhw1i95576nhzhs36p687nkzlvyjl7g-ghostscript-9.26/bin/gs mutool: yes mutool-path: system ippfind-path: /nix/store/r4nksg5dz5h8afilkanj39wikhirmya0-cups-2.2.12/bin/ippfind imagefilters: yes jpeg: yes pdftocairo-path: /nix/store/zsrhky4x49llpd7d63r692q50qbbiaws-poppler-utils-0.74.0/bin/pdftocairo pdftops: pdftops pdftops-path: /nix/store/zsrhky4x49llpd7d63r692q50qbbiaws-poppler-utils-0.74.0/bin/pdftops png: yes php: no php-config: system shell: /nix/store/l6h4ya0wzb4b8mr0y58k2gh2nhfql4sn-bash-4.4-p23/bin/bash test-font: /path-does-not-exist tiff: yes avahi: yes dbus: yes browsing: dnssd cups werror: no braille: yes braille tables: /usr/share/liblouis/tables driverless: yes apple-raster: rastertopdf pclm: yes driverless auto-setup: no ============================================================================== substituteStream(): WARNING: pattern 'execve' doesn't match anything in file 'filter/gstoraster.c' patching script interpreter paths in filter filter/test.sh: interpreter directive changed from "/bin/sh" to "/nix/store/l6h4ya0wzb4b8mr0y58k2gh2nhfql4sn-bash-4.4-p23/bin/sh" filter/braille/filters/liblouis1.defs.gen: interpreter directive changed from "/bin/bash" to "/nix/store/l6h4ya0wzb4b8mr0y58k2gh2nhfql4sn-bash-4.4-p23/bin/bash" filter/braille/filters/imagetobrf.in: interpreter directive changed from "/bin/bash" to "/nix/store/l6h4ya0wzb4b8mr0y58k2gh2nhfql4sn-bash-4.4-p23/bin/bash" filter/braille/filters/texttobrf.in: interpreter directive changed from "/bin/bash" to "/nix/store/l6h4ya0wzb4b8mr0y58k2gh2nhfql4sn-bash-4.4-p23/bin/bash" filter/braille/filters/brftopagedbrf.in: interpreter directive changed from "/bin/bash" to "/nix/store/l6h4ya0wzb4b8mr0y58k2gh2nhfql4sn-bash-4.4-p23/bin/bash" filter/braille/drivers/index/imageubrltoindexv3.in: interpreter directive changed from "/bin/bash" to "/nix/store/l6h4ya0wzb4b8mr0y58k2gh2nhfql4sn-bash-4.4-p23/bin/bash" filter/braille/drivers/index/imageubrltoindexv4.in: interpreter directive changed from "/bin/bash" to "/nix/store/l6h4ya0wzb4b8mr0y58k2gh2nhfql4sn-bash-4.4-p23/bin/bash" filter/braille/drivers/index/textbrftoindexv3.in: interpreter directive changed from "/bin/bash" to "/nix/store/l6h4ya0wzb4b8mr0y58k2gh2nhfql4sn-bash-4.4-p23/bin/bash" filter/braille/drivers/generic/brftoembosser.in: interpreter directive changed from "/bin/bash" to "/nix/store/l6h4ya0wzb4b8mr0y58k2gh2nhfql4sn-bash-4.4-p23/bin/bash" building build flags: -j8 -l8 SHELL=/nix/store/l6h4ya0wzb4b8mr0y58k2gh2nhfql4sn-bash-4.4-p23/bin/bash CUPS_SERVERBIN=\$\(out\)/lib/cups CUPS_DATADIR=\$\(out\)/share/cups CUPS_SERVERROOT=\$\(out\)/etc/cups gdbus-codegen \ --interface-prefix org.cups.cupsd \ --c-namespace Cups \ --generate-c-code cups-notifier \ utils/org.cups.cupsd.Notifier.xml gdbus-codegen \ --interface-prefix org.cups.cupsd \ --c-namespace Cups \ --generate-c-code cups-notifier \ utils/org.cups.cupsd.Notifier.xml make all-am make[1]: Entering directory '/build/cups-filters-1.25.0' CC main.o CC aglfn13.lo CC dynstring.lo CC embed.lo CC embed_sfnt.lo CC embed_pdf.lo CC fontfile.lo CC frequent.lo CC sfnt.lo CC sfnt_subset.lo CC parallel-ieee1284.o CC parallel-parallel.o CC serial-serial.o CC beh-beh.o CC implicitclass-implicitclass.o CC libcupsfilters_la-attr.lo CC libcupsfilters_la-check.lo CC libcupsfilters_la-cmyk.lo CC libcupsfilters_la-colord.lo CC libcupsfilters_la-colormanager.lo CC libcupsfilters_la-dither.lo CC libcupsfilters_la-image.lo CC libcupsfilters_la-pdftoippprinter.lo CC libcupsfilters_la-image-bmp.lo CC libcupsfilters_la-image-colorspace.lo CC libcupsfilters_la-image-gif.lo CC libcupsfilters_la-image-jpeg.lo CC libcupsfilters_la-image-photocd.lo CC libcupsfilters_la-image-pix.lo CC libcupsfilters_la-image-png.lo CC libcupsfilters_la-image-pnm.lo CC libcupsfilters_la-image-sgi.lo CC libcupsfilters_la-image-sgilib.lo CC libcupsfilters_la-image-sun.lo CC libcupsfilters_la-image-tiff.lo CC libcupsfilters_la-image-zoom.lo CC libcupsfilters_la-lut.lo CC libcupsfilters_la-pack.lo CC libcupsfilters_la-ppdgenerator.lo CC libcupsfilters_la-raster.lo CC libcupsfilters_la-rgb.lo CC libcupsfilters_la-srgb.lo CC cups-brf.o CXX pdftopdf-pdftopdf.o CXX pdftopdf-pdftopdf_jcl.o CXX pdftopdf-pdftopdf_processor.o CXX pdftopdf-qpdf_pdftopdf_processor.o CXX pdftopdf-pptypes.o CXX pdftopdf-nup.o CXX pdftopdf-intervalset.o CXX pdftopdf-qpdf_tools.o CXX pdftopdf-qpdf_xobject.o CXX pdftopdf-qpdf_pdftopdf.o CXX pdftopdf-qpdf_cm.o CC commandtoescpx-commandtoescpx.o CC commandtopclx-commandtopclx.o CC sys5ippprinter-common.o CC sys5ippprinter-sys5ippprinter.o CC texttotext-texttotext.o CC pdftops-common.o CC pdftops-pdftops.o CC rastertoescpx-rastertoescpx.o CC rastertopclx-pcl-common.o CC rastertopclx-rastertopclx.o CC texttopdf-common.o CC texttopdf-pdfutils.o CC texttopdf-textcommon.o CC texttopdf-texttopdf.o CXX rastertopdf-rastertopdf.o CC bannertopdf-banner.o CC bannertopdf-bannertopdf.o CXX bannertopdf-pdf.o CC rastertops-rastertops.o CXX pdftoraster-pdftoraster.o CC gstoraster-gstoraster.o CC mupdftoraster-mupdftoraster.o CC foomatic_rip-foomaticrip.o CC foomatic_rip-options.o CC foomatic_rip-pdf.o CC foomatic_rip-postscript.o CC foomatic_rip-process.o filter/pdf.cxx: In function 'void pdf_prepend_stream(pdf_t*, unsigned int, const char*, size_t)': filter/pdf.cxx:118:3: error: 'memcpy' was not declared in this scope memcpy(stream_data->getBuffer(), buf, len); ^~~~~~ filter/pdf.cxx:118:3: note: 'memcpy' is defined in header ''; did you forget to '#include '? filter/pdf.cxx:28:1: +#include filter/pdf.cxx:118:3: memcpy(stream_data->getBuffer(), buf, len); ^~~~~~ filter/pdf.cxx: In function 'std::__cxx11::string lookup_opt(opt_t*, const string&)': filter/pdf.cxx:336:18: error: 'strcmp' was not declared in this scope if ( strcmp(opt->key, key.c_str()) == 0 ) { ^~~~~~ filter/pdf.cxx:336:18: note: 'strcmp' is defined in header ''; did you forget to '#include '? CC foomatic_rip-renderer.o make[1]: *** [Makefile:3921: bannertopdf-pdf.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory '/build/cups-filters-1.25.0' make: *** [Makefile:1964: all] Error 2 builder for '/nix/store/8xh6xsgmgic6fvdmkarcyba868xbq0hd-cups-filters-1.25.0.drv' failed with exit code 2 error: build of '/nix/store/8xh6xsgmgic6fvdmkarcyba868xbq0hd-cups-filters-1.25.0.drv' failed ```

Additional context The kind of error (not including a needed header) seems to be an upstream bug for me.

Metadata Please run nix run nixpkgs.nix-info -c nix-info -m and paste the result.

 - system: `"x86_64-linux"`
 - host os: `Linux 5.3.2, NixOS, 20.03.git.de171ba (Markhor)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3`
 - channels(gaisseml): `""`
 - nixpkgs: `/nix/store/d20micxzvfg2gc9mb7lij9y0b3i516dg-src/nixpkgs`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
  - cups-filters
# a list of nixos modules affected by the problem
module:
marzipankaiser commented 4 years ago

Fixed by upstream in https://github.com/OpenPrinting/cups-filters/commit/1878ecd2ef533c3dbe6e6bc29018ce4bf8246e83. See my PR