View Ticket
Not logged in
Ticket Hash: 28501e61bb37438e19184f98e8f6a4e15aec7b89
Title: Fails to build with GCC 7
Status: Closed Type: Build_Problem
Severity: Important Priority: Immediate
Subsystem: Resolution: Fixed
Last Modified: 2017-08-05 21:14:18
Version Found In: 2.0.0-devel
User Comments:
anonymous added on 2017-01-31 17:59:53:
As reported by Matthias Klose in Debian Bug #853667 (https://bugs.debian.org/853667):

> The package fails to build in a test rebuild on at least amd64 with
> gcc-7/g++-7, but succeeds to build with gcc-6/g++-6. The
> severity of this report may be raised before the buster release.
> There is no need to fix this issue in time for the stretch release.
>
> The full build log can be found at:
> http://people.debian.org/~doko/logs/gcc7-20170126/spatialite-gui_2.0.0~devel2-4_unstable_gcc7.log
> The last lines of the build log are at the end of this report.
>
> To build with GCC 7, either set CC=gcc-7 CXX=g++-7 explicitly,
> or install the gcc, g++, gfortran, ... packages from experimental.
>
>   apt-get -t=experimental install g++
>
> Common build failures are new warnings resulting in build failures with
> -Werror turned on, or new/dropped symbols in Debian symbols files.
> For other C/C++ related build failures see the porting guide at
> http://gcc.gnu.org/gcc-7/porting_to.html
>
> [...]
> make[3]: Entering directory '/<<PKGBUILDDIR>>/win_resource'
> make[3]: Nothing to be done for 'all'.
> make[3]: Leaving directory '/<<PKGBUILDDIR>>/win_resource'
> Making all in mac_resource
> make[3]: Entering directory '/<<PKGBUILDDIR>>/mac_resource'
> make[3]: Nothing to be done for 'all'.
> make[3]: Leaving directory '/<<PKGBUILDDIR>>/mac_resource'
> Making all in gnome_resource
> make[3]: Entering directory '/<<PKGBUILDDIR>>/gnome_resource'
> make[3]: Nothing to be done for 'all'.
> make[3]: Leaving directory '/<<PKGBUILDDIR>>/gnome_resource'
> make[3]: Entering directory '/<<PKGBUILDDIR>>'
> g++ -DHAVE_CONFIG_H -I.  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I. -Wdate-time -D_FORTIFY_SOURCE=2  -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -c -o BlobExplorer.o BlobExplorer.cpp
> g++ -DHAVE_CONFIG_H -I.  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I. -Wdate-time -D_FORTIFY_SOURCE=2  -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -c -o Dialogs.o Dialogs.cpp
> g++ -DHAVE_CONFIG_H -I.  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I. -Wdate-time -D_FORTIFY_SOURCE=2  -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -c -o DialogsGraph.o DialogsGraph.cpp
> g++ -DHAVE_CONFIG_H -I.  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I. -Wdate-time -D_FORTIFY_SOURCE=2  -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -c -o Exif.o Exif.cpp
> g++ -DHAVE_CONFIG_H -I.  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I. -Wdate-time -D_FORTIFY_SOURCE=2  -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -c -o Main.o Main.cpp
> g++ -DHAVE_CONFIG_H -I.  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I. -Wdate-time -D_FORTIFY_SOURCE=2  -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -c -o MalformedGeoms.o MalformedGeoms.cpp
> g++ -DHAVE_CONFIG_H -I.  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I. -Wdate-time -D_FORTIFY_SOURCE=2  -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -c -o Network.o Network.cpp
> g++ -DHAVE_CONFIG_H -I.  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I. -Wdate-time -D_FORTIFY_SOURCE=2  -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -c -o Objects.o Objects.cpp
> g++ -DHAVE_CONFIG_H -I.  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I. -Wdate-time -D_FORTIFY_SOURCE=2  -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -c -o QueryView.o QueryView.cpp
> g++ -DHAVE_CONFIG_H -I.  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I. -Wdate-time -D_FORTIFY_SOURCE=2  -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -c -o QueryViewComposer.o QueryViewComposer.cpp
> g++ -DHAVE_CONFIG_H -I.  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I. -Wdate-time -D_FORTIFY_SOURCE=2  -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -c -o ResultSetView.o ResultSetView.cpp
> g++ -DHAVE_CONFIG_H -I.  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I. -Wdate-time -D_FORTIFY_SOURCE=2  -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -c -o Shapefiles.o Shapefiles.cpp
> g++ -DHAVE_CONFIG_H -I.  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I. -Wdate-time -D_FORTIFY_SOURCE=2  -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -c -o TableTree.o TableTree.cpp
> g++ -DHAVE_CONFIG_H -I.  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I. -Wdate-time -D_FORTIFY_SOURCE=2  -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -c -o TextCsv.o TextCsv.cpp
> g++ -DHAVE_CONFIG_H -I.  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I. -Wdate-time -D_FORTIFY_SOURCE=2  -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -c -o Wfs.o Wfs.cpp
> g++ -DHAVE_CONFIG_H -I.  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I. -Wdate-time -D_FORTIFY_SOURCE=2  -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -c -o Raster.o Raster.cpp
> g++ -DHAVE_CONFIG_H -I.  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I. -Wdate-time -D_FORTIFY_SOURCE=2  -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -c -o Styles.o Styles.cpp
> g++ -DHAVE_CONFIG_H -I.  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I. -Wdate-time -D_FORTIFY_SOURCE=2  -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -c -o RasterSymbolizers.o RasterSymbolizers.cpp
> g++ -DHAVE_CONFIG_H -I.  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I. -Wdate-time -D_FORTIFY_SOURCE=2  -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -c -o VectorSymbolizers1.o VectorSymbolizers1.cpp
> g++ -DHAVE_CONFIG_H -I.  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -I. -Wdate-time -D_FORTIFY_SOURCE=2  -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -c -o VectorSymbolizers2.o VectorSymbolizers2.cpp
> ResultSetView.cpp: In member function 'const char* MyResultSetView::CleanSqlTail(const char*)':
> ResultSetView.cpp:497:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
>    while (p != '\0')
>                ^~~~
> Makefile:571: recipe for target 'ResultSetView.o' failed
> make[3]: *** [ResultSetView.o] Error 1
> make[3]: *** Waiting for unfinished jobs....
> make[3]: Leaving directory '/<<PKGBUILDDIR>>'
> Makefile:603: recipe for target 'all-recursive' failed
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory '/<<PKGBUILDDIR>>'
> Makefile:433: recipe for target 'all' failed
> make[1]: *** [all] Error 2
> make[1]: Leaving directory '/<<PKGBUILDDIR>>'
> dh_auto_build: make -j64 returned exit code 2
> debian/rules:11: recipe for target 'build' failed
> make: *** [build] Error 2
> dpkg-buildpackage: error: debian/rules build gave error exit status 2

sandro added on 2017-02-05 22:58:37:
expected to be fixed by commit b3b307832b

anonymous added on 2017-08-05 00:08:03:
GCC 7 is now the default compiler in Debian causing the issue to become Release Critical which will trigger to automatic removal of the package from Debian testing (and by extension from the next stable release) when the issue remains unfixed.

Can the fix be cherry-picked?

sandro added on 2017-08-05 21:14:18:
this ticket is closed because the problem has been already fixed.
the current development sources nicely built on GCC 7.1.1 (tested on Fedora 26).

note: the development cycle of spatialite_gui 2.0.0-devel has been aborted because it was a dead-end (a "stable" 2.0.0 version will never been released).
the current development version is 2.1.0-devel, and it's immediately available from the Fossil repository.
a first Release Candidate will be probably released during this month.