[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1015703: webdruid: ftbfs with LTO (link time optimization) enabled



Package: src:webdruid
Version: 0.5.4-16
Severity: minor
Tags: sid bookworm
User: debian-gcc@lists.debian.org
Usertags: ftbfs-lto

This package currently fails to build (at least on the amd64
architecture) with link time optimizations enabled.  For a background
for LTO please see

https://wiki.debian.org/ToolChain/LTO

The goal is to enable this optimization by default in an upcoming
Debian release in dpkg-buildflags for 64bit architectures.  The goal
is to get this package to build with link time optimizations, or to
explicitly disable link time optimizations for this package build.

To reproduce the build failure, enable the lto optimization in
testing/unstable by adding "optimize=+lto" to DEB_BUILD_MAINT_OPTIONS
in the debian/rules file, or if this macro is unset, just set it:

export DEB_BUILD_MAINT_OPTIONS = optimize=+lto

Please try to fix the build with lto enabled, fixing the packaging or
forwarding the issue upstream. If the issue cannot be fixed,
explicitly disallow building the package with lto by adding to your
rules file:

export DEB_BUILD_MAINT_OPTIONS = optimize=-lto

or adding that string to your existing setting of DEB_BUILD_MAINT_OPTIONS.

The full build log can be found at:
http://qa-logs.debian.net/2022/06/09/dpkglto/webdruid_0.5.4-16_unstable_dpkglto.log
The last lines of the build log are at the end of this report.

[...]
logs_mgmt.c:437:38: warning: passing argument 1 of ‘gzread’ from incompatible pointer type [-Wincompatible-pointer-types]
  437 |          plog->gz_f_end = gzread(plog->gz_file, plog->gz_f_buf, GZ_BUFSIZE);
      |                                  ~~~~^~~~~~~~~
      |                                      |
      |                                      struct gzFile_s **
In file included from /usr/include/zlib.h:34,
                 from logs_mgmt.c:28:
/usr/include/zlib.h:1390:28: note: expected ‘gzFile’ {aka ‘struct gzFile_s *’} but argument is of type ‘struct gzFile_s **’
 1390 | ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
      |                            ^~
logs_mgmt.c: In function ‘free_log_struct’:
logs_mgmt.c:566:19: warning: passing argument 1 of ‘gzclose’ from incompatible pointer type [-Wincompatible-pointer-types]
  566 |       gzclose(plog->gz_file);
      |               ~~~~^~~~~~~~~
      |                   |
      |                   struct gzFile_s **
In file included from /usr/include/zlib.h:34,
                 from logs_mgmt.c:28:
/usr/include/zlib.h:1630:32: note: expected ‘gzFile’ {aka ‘struct gzFile_s *’} but argument is of type ‘struct gzFile_s **’
 1630 | ZEXTERN int ZEXPORT    gzclose OF((gzFile file));
      |                                ^~
msgfmt po/ca.po -o po/ca.mo
msgfmt po/cs.po -o po/cs.mo
msgfmt po/da.po -o po/da.mo
msgfmt po/de.po -o po/de.mo
msgfmt po/el.po -o po/el.mo
msgfmt po/es.po -o po/es.mo
msgfmt po/et.po -o po/et.mo
msgfmt po/fi.po -o po/fi.mo
msgfmt po/fr.po -o po/fr.mo
msgfmt po/gl.po -o po/gl.mo
msgfmt po/hr.po -o po/hr.mo
msgfmt po/hu.po -o po/hu.mo
msgfmt po/id.po -o po/id.mo
msgfmt po/is.po -o po/is.mo
msgfmt po/it.po -o po/it.mo
msgfmt po/ja.po -o po/ja.mo
msgfmt po/ko.po -o po/ko.mo
msgfmt po/lv.po -o po/lv.mo
msgfmt po/ml.po -o po/ml.mo
msgfmt po/nl.po -o po/nl.mo
msgfmt po/no.po -o po/no.mo
msgfmt po/pl.po -o po/pl.mo
msgfmt po/pt.po -o po/pt.mo
msgfmt po/ro.po -o po/ro.mo
msgfmt po/ru.po -o po/ru.mo
msgfmt po/sl.po -o po/sl.mo
msgfmt po/sr.po -o po/sr.mo
msgfmt po/sv.po -o po/sv.mo
msgfmt po/tr.po -o po/tr.mo
msgfmt po/uk.po -o po/uk.mo
msgfmt po/zh.po -o po/zh.mo
gcc -flto=auto -ffat-lto-objects -Wl,-z,relro -o webdruid webdruid.o hashtab.o linklist.o preserve.o parser.o output.o xml_output.o dot_output.o utils.o dns_resolv.o graphs.o sengine.o logs_mgmt.o -lgd -lfreetype -lpng -lpthread -lz -lm 
In function ‘resolve_dns’,
    inlined from ‘main’ at webdruid.c:1107:16:
dns_resolv.c:171:36: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
  171 |          log_rec->hostname[MAXHOST]=0;
      |                                    ^
webdruid.c: In function ‘main’:
webdruid.h:204:31: note: at offset 128 into destination object ‘hostname’ of size 128
  204 | struct  log_struct  {  char   hostname[MAXHOST];   /* hostname             */
      |                               ^
/usr/bin/ld: /tmp/ccbHhwhB.ltrans0.ltrans.o: in function `main':
/<<PKGBUILDDIR>>/dns_resolv.c:230: undefined reference to `__db185_open'
/usr/bin/ld: /<<PKGBUILDDIR>>/dns_resolv.c:866: undefined reference to `__db185_open'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:56: webdruid] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [/usr/share/cdbs/1/class/makefile.mk:77: debian/stamp-makefile-build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2


Reply to: