I get the following build error for Simutrans 124.3.1, building from the source zip for the OpenSuse repos at https://build.opensuse.org/package/show/home:m_vanderwulp:branches:games/simutrans:
[ 51s] ===> HOSTCXX src/simutrans/tool/simtool.cc
[ 51s] g++ -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -DMULTI_THREAD -O3 -g -DDEBUG -DMSG_LEVEL=3 -I/usr/include/freetype2 -DUSE_ZSTD -DUSE_FLUIDSYNTH_MIDI -Wall -Wextra -Wcast-qual -Wpointer-arith -Wcast-align -DREVISION="11671" -I/usr/include/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT -DCOLOUR_DEPTH=16 -c -MMD -o build/default/src/simutrans/tool/simtool.o src/simutrans/tool/simtool.cc
[ 51s] src/simutrans/tool/simtool.cc: In member function 'virtual const char* tool_build_bridge_t::do_work(player_t*, const koord3d&, const koord3d&)':
[ 51s] src/simutrans/tool/simtool.cc:2956:1: error: control reaches end of non-void function [-Werror=return-type]
[ 51s] 2956 | }
[ 51s] | ^
[ 51s] src/simutrans/tool/simtool.cc: In member function 'virtual bool tool_recolour_t::init(player_t*)':
[ 51s] src/simutrans/tool/simtool.cc:8516:17: warning: this statement may fall through [-Wimplicit-fallthrough=]
[ 51s] 8516 | }
[ 51s] | ^
[ 51s] src/simutrans/tool/simtool.cc:8518:17: note: here
[ 51s] 8518 | default:
[ 51s] | ^~~~~~~
[ 51s] cc1plus: some warnings being treated as errors
[ 51s] make: *** [common.mk:50: build/default/src/simutrans/tool/simtool.o] Error 1
[ 51s] make: *** Waiting for unfinished jobs....
Since this ony happens for Tumbleweed, and not for Leap, I presume that this is due to a change in the compiler?
How can I prevent this?
Thanks,
Michiel
I added a patch to the spec file to make building possible.
See the attached "returnNull.patch".
I think it should return "" for silent fail.
OK, thanks. I saw your commit.
So, I can remove the patch again after the next release.
:)
Maybe I can make use of the opportunity to mention my blog about building simutrans for openSUSE: see https://michiel.vanderwulp.be/post-obs-build-locally.html (https://michiel.vanderwulp.be/post-obs-build-locally.html)