sylpheed-mail / sylpheed

Sylpheed Email client
https://sylpheed.sraoss.jp/
Other
140 stars 15 forks source link

Fails to build with GCC 14 #41

Open mones opened 3 months ago

mones commented 3 months ago

This has been reported as Debian bug https://bugs.debian.org/1075546. The attached patch should fix it. Thanks in advance! 0013-fix-FTBFS-GCC-14.patch.txt

barracuda156 commented 2 months ago

On macOS it fails already at configure:

--->  Configuring sylpheed
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_mail_sylpheed/sylpheed/work/sylpheed-3.7.0" && ./configure --prefix=/opt/local --disable-compface --disable-gpgme --disable-jpilot --disable-ssl --disable-gtkspell --enable-ipv6 
checking build system type... powerpc-apple-darwin10.0.0d2
checking host system type... powerpc-apple-darwin10.0.0d2
checking target system type... powerpc-apple-darwin10.0.0d2
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /opt/local/bin/gmkdir -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 whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... ccache /opt/local/bin/gcc-mp-14
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 ccache /opt/local/bin/gcc-mp-14 accepts -g... yes
checking for ccache /opt/local/bin/gcc-mp-14 option to accept ISO C89... none needed
checking whether ccache /opt/local/bin/gcc-mp-14 understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of ccache /opt/local/bin/gcc-mp-14... gcc3
checking for library containing strerror... none required
checking for gcc... (cached) ccache /opt/local/bin/gcc-mp-14
checking whether we are using the GNU C compiler... (cached) yes
checking whether ccache /opt/local/bin/gcc-mp-14 accepts -g... (cached) yes
checking for ccache /opt/local/bin/gcc-mp-14 option to accept ISO C89... (cached) none needed
checking whether ccache /opt/local/bin/gcc-mp-14 understands -c and -o together... (cached) yes
checking dependency style of ccache /opt/local/bin/gcc-mp-14... (cached) gcc3
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking how to run the C preprocessor... ccache /opt/local/bin/gcc-mp-14 -E
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
checking for bison... bison -y
checking how to print strings... printf
checking for a sed that does not truncate output... /opt/local/bin/gsed
checking for grep that handles long lines and -e... /opt/local/bin/ggrep
checking for egrep... /opt/local/bin/ggrep -E
checking for fgrep... /opt/local/bin/ggrep -F
checking for ld used by ccache /opt/local/bin/gcc-mp-14... /opt/local/bin/ld
checking if the linker (/opt/local/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /opt/local/bin/nm -B
checking the name lister (/opt/local/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert powerpc-apple-darwin10.0.0d2 file names to powerpc-apple-darwin10.0.0d2 format... func_convert_file_noop
checking how to convert powerpc-apple-darwin10.0.0d2 file names to toolchain format... func_convert_file_noop
checking for /opt/local/bin/ld option to reload object files... -r
checking for objdump... no
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 ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /opt/local/bin/nm -B output from ccache /opt/local/bin/gcc-mp-14 object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking for ANSI C header files... yes
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 ccache /opt/local/bin/gcc-mp-14 supports -fno-rtti -fno-exceptions... no
checking for ccache /opt/local/bin/gcc-mp-14 option to produce PIC... -fno-common -DPIC
checking if ccache /opt/local/bin/gcc-mp-14 PIC flag -fno-common -DPIC works... yes
checking if ccache /opt/local/bin/gcc-mp-14 static flag -static works... no
checking if ccache /opt/local/bin/gcc-mp-14 supports -c -o file.o... yes
checking if ccache /opt/local/bin/gcc-mp-14 supports -c -o file.o... (cached) yes
checking whether the ccache /opt/local/bin/gcc-mp-14 linker (/opt/local/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin10.0.0d2 dyld
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 for pkg-config... /opt/local/bin/pkg-config
checking pkg-config is at least version 0.16... yes
checking for GLIB - version >= 2.8.0... no
*** Could not run GLIB test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GLIB is incorrectly installed.
configure: error: Test for GLib failed. See the 'INSTALL' for help.
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_mail_sylpheed/sylpheed/work/sylpheed-3.7.0" && ./configure --prefix=/opt/local --disable-compface --disable-gpgme --disable-jpilot --disable-ssl --disable-gtkspell --enable-ipv6 
Exit code: 1

Which happens because -no-cpp-precomp is not accepted by any recent versions of gcc:

configure:13359: ccache /opt/local/bin/gcc-mp-14 -o conftest -pipe -Os -arch ppc -no-cpp-precomp -fno-common -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc conftest.c  -L/opt/local/lib -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl >&5
gcc-mp-14: error: unrecognized command-line option '-no-cpp-precomp'

-no-cpp-precomp works with gcc-4.2, but should not be used with modern ones.