[Debian-astro-maintainers] Bug#983953: scamp: ftbfs with -march=x86-64-v3

Matthias Klose doko at debian.org
Wed Mar 3 15:39:21 GMT 2021


Package: src:scamp
Version: 2.10.0-2
Severity: minor
User: debian-gcc at lists.debian.org
Usertags: ftbfs-x86-64-v3

Starting with LLVM 12 and GCC 11 (and backported to gcc-10 for Debian), 
GCC introduces optimizations for new micro-architecture levels from
the x86-64 psABI.  Filing these bug reports for packages building with
the current level (x86-64), but not with x86-64-v3.

To reproduce these issues, append -march=x86-64-v3 to the compiler
flags (CFLAGS, CXXFLAGS, ...).  You also need hardware supporting these.
The easiest way is to call the dynamic linker in glibc 2.33 like
  /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 --help
Otherwise look at the flags in /proc/cpuinfo and compare these with
those from table 3.1 in the System V Application Binary Interface doc:
https://gitlab.com/x86-psABIs/x86-64-ABI/-/wikis/x86-64-psABI

Please don't upload a package setting these flags by default.  The
x86-64 baseline is still unchanged.

The full build log can be found at:
http://people.debian.org/~doko/logs/20210228/filtered/gcc10-v3/scamp_2.10.0-2_unstable_gcc10-v3.log
The last lines of the build log are at the end of this report.

[...]
                 from makeit.c:37:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 11 and 36 bytes into a destination of size 12
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
makeit.c:116:39: warning: ‘%02d’ directive writing between 2 and 11 bytes into a region of size between 0 and 7 [-Wformat-overflow=]
  116 |         sprintf(prefs.sdate_end,"%04d-%02d-%02d",
      |                                       ^~~~
makeit.c:116:33: note: directive argument in the range [-2147483647, 2147483647]
  116 |         sprintf(prefs.sdate_end,"%04d-%02d-%02d",
      |                                 ^~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from makeit.c:37:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 11 and 36 bytes into a destination of size 12
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/plplot -Wdate-time -D_FORTIFY_SOURCE=2 -D_REENTRANT -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fcommon -c -o merge.o merge.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/plplot -Wdate-time -D_FORTIFY_SOURCE=2 -D_REENTRANT -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fcommon -c -o misc.o misc.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/plplot -Wdate-time -D_FORTIFY_SOURCE=2 -D_REENTRANT -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fcommon -c -o mosaic.o mosaic.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/plplot -Wdate-time -D_FORTIFY_SOURCE=2 -D_REENTRANT -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fcommon -c -o photsolve.o photsolve.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/plplot -Wdate-time -D_FORTIFY_SOURCE=2 -D_REENTRANT -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fcommon -c -o pqueue.o pqueue.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/plplot -Wdate-time -D_FORTIFY_SOURCE=2 -D_REENTRANT -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fcommon -c -o prefs.o prefs.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/plplot -Wdate-time -D_FORTIFY_SOURCE=2 -D_REENTRANT -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fcommon -c -o proper.o proper.c
prefs.c: In function ‘useprefs’:
prefs.c:694:7: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  694 |       fgets(teststr, 80, testfile);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/plplot -Wdate-time -D_FORTIFY_SOURCE=2 -D_REENTRANT -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fcommon -c -o quadtree.o quadtree.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/plplot -Wdate-time -D_FORTIFY_SOURCE=2 -D_REENTRANT -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fcommon -c -o samples.o samples.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/plplot -Wdate-time -D_FORTIFY_SOURCE=2 -D_REENTRANT -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fcommon -c -o threads.o threads.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/plplot -Wdate-time -D_FORTIFY_SOURCE=2 -D_REENTRANT -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fcommon -c -o url.o url.c
gcc -DHAVE_CONFIG_H -I. -I..  -I/usr/include/plplot -Wdate-time -D_FORTIFY_SOURCE=2 -D_REENTRANT -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fcommon -c -o xml.o xml.c
xml.c: In function ‘write_xml_meta’:
xml.c:214:35: warning: ‘%02d’ directive writing between 2 and 11 bytes into a region of size between 0 and 7 [-Wformat-overflow=]
  214 |     sprintf(prefs.sdate_end,"%04d-%02d-%02d",
      |                                   ^~~~
xml.c:214:29: note: directive argument in the range [-2147483647, 2147483647]
  214 |     sprintf(prefs.sdate_end,"%04d-%02d-%02d",
      |                             ^~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from xml.c:34:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 11 and 36 bytes into a destination of size 12
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/bin/bash ../libtool  --tag=CC   --mode=link gcc -D_REENTRANT -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fcommon  -Wl,-z,relro -o scamp astrefcat.o astrsolve.o astrstats.o catout.o chealpix.o chealpixstore.o check.o colour.o astrcplot.o cplot.o photcplot.o crossid.o dgeomap.o fft.o fgroup.o field.o fitswcs.o header.o main.o makeit.o match.o merge.o misc.o mosaic.o photsolve.o pqueue.o prefs.o proper.o quadtree.o samples.o threads.o url.o xml.o ../src/fits/libfits.a ../src/wcs/libwcs_c.a -lcurl  -llapack_atlas -lfftw3f_threads -lfftw3f -lm  -lpthread -lplplot
libtool: link: gcc -D_REENTRANT -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fcommon -Wl,-z -Wl,relro -o scamp astrefcat.o astrsolve.o astrstats.o catout.o chealpix.o chealpixstore.o check.o colour.o astrcplot.o cplot.o photcplot.o crossid.o dgeomap.o fft.o fgroup.o field.o fitswcs.o header.o main.o makeit.o match.o merge.o misc.o mosaic.o photsolve.o pqueue.o prefs.o proper.o quadtree.o samples.o threads.o url.o xml.o  ../src/fits/libfits.a ../src/wcs/libwcs_c.a -lcurl -llapack_atlas -lfftw3f_threads -lfftw3f -lm -lpthread -lplplot
/usr/bin/ld: chealpix.o: in function `neighbours_nest64':
./src/chealpix.c:933: undefined reference to `spread_bits64'
/usr/bin/ld: ./src/chealpix.c:934: undefined reference to `spread_bits64'
/usr/bin/ld: ./src/chealpix.c:935: undefined reference to `spread_bits64'
/usr/bin/ld: ./src/chealpix.c:936: undefined reference to `spread_bits64'
/usr/bin/ld: ./src/chealpix.c:937: undefined reference to `spread_bits64'
/usr/bin/ld: chealpix.o:./src/chealpix.c:938: more undefined references to `spread_bits64' follow
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:547: scamp] Error 1
make[4]: Leaving directory '/<<PKGBUILDDIR>>/src'
make[3]: *** [Makefile:629: all-recursive] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/src'
make[2]: *** [Makefile:537: all-recursive] Error 1
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[1]: *** [Makefile:444: all] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: error: make -j4 returned exit code 2
make: *** [debian/rules:7: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2



More information about the Debian-astro-maintainers mailing list