On Sat, Dec 28, 2019 at 01:17:33AM +1100, Jonathan Gray wrote: > On Tue, Dec 24, 2019 at 08:16:22PM +1100, Jonathan Gray wrote: > > On Tue, Dec 24, 2019 at 09:22:27AM +0100, Solene Rapenne wrote: > > > Le Tue, 24 Dec 2019 10:46:41 +1100, > > > Jonathan Gray <j...@jsg.id.au> a écrit : > > > > > > > On Mon, Dec 23, 2019 at 07:41:32PM +0100, Solene Rapenne wrote: > > > > > This patch updates eduke32 to last version and enable playing Ion > > > > > Fury > > > > > > > > > > most of the diff comes from the following thread > > > > > https://marc.info/?l=openbsd-misc&m=156907261602397&w=2 > > > > > > > > > > tested Ion Fury, works fine on an old T400 (smooth if > > > > > I disabled sound...) but smooth on a T480, it's really CPU intensive > > > > > > > > > > duke32 shareware data still works fine out of the box > > > > > > > > This looks mostly fine but why have you dropped base-clang from > > > > COMPILER? > > > > > > > > > > I forgot to explain why I dropped base-clang, this is because eduke32 > > > fails with this error: > > > > > > ===> Building for eduke32-2.0.0.8494 > > > mkdir -p obj/duke3d > > > c++ -std=gnu++11 -fno-exceptions -fno-rtti -fomit-frame-pointer > > > -fno-strict-aliasing -fno-threadsafe-statics -fjump-tables > > > -fno-stack-protector -O2 -pipe -W -Wall -Wextra -Wpointer-arith > > > -Wno-char-subscripts -Wno-missing-braces -Wwrite-strings -Wuninitialized > > > -Wno-attributes -Wno-strict-overflow -Isource/build/include > > > -Isource/mact/include -Isource/audiolib/include -Isource/glad/include > > > -Isource/voidwrap/include -MP -MMD -funsigned-char -U_FORTIFY_SOURCE > > > -D_FORTIFY_SOURCE=0 -DNDEBUG -DNOASM -DRENDERTYPESDL=1 -DSTARTUP_WINDOW > > > -DUSE_OPENGL -DPOLYMER -I/usr/local/include -DUSE_LIBVPX -DHAVE_VORBIS > > > -DHAVE_FLAC -DHAVE_XMP -DSDL_TARGET=2 -I/usr/local/include > > > -I/usr/local/include/SDL2 -I/usr/X11R6/include -D_REENTRANT > > > -I/usr/X11R6/include -DHAVE_GTK2 -I/usr/local/include/gtk-2.0 > > > -I/usr/local/lib/gtk-2.0/include -I/usr/local/include/pango-1.0 > > > -I/usr/local/include/gio-unix-2.0 -I/usr/X11R6/include > > > -I/usr/local/include/cairo -I/usr/local/include/atk-1.0 > > > -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include -pthread > > > -I/usr/local/include/fribidi -I/usr/X11R6/include/pixman-1 > > > -I/usr/local/include/libpng16 -I/usr/local/include/harfbuzz > > > -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include > > > -I/usr/X11R6/include/freetype2 -Isource/duke3d/src -c > > > source/duke3d/src/actors.cpp -o obj/duke3d/actors.o > > > In file included from source/duke3d/src/actors.cpp:25: > > > In file included from source/duke3d/src/duke3d.h:134: > > > In file included from source/duke3d/src/game.h:34: > > > source/duke3d/src/gamevars.h:254:85: error: fallthrough annotation does > > > not directly precede switch label > > > case GAMEVAR_PERPLAYER: iptr = &var.pValues[vm.playerNum & > > > (MAXPLAYERS-1)]; fallthrough__; > > > > > > ^ > > > source/build/include/compat.h:267:25: note: expanded from macro > > > 'fallthrough__' > > > # define fallthrough__ [[fallthrough]] > > > ^ > > > 1 error generated. > > > gmake: *** [GNUmakefile:1074: obj/duke3d/actors.o] Error 1 > > > *** Error 2 in . (/home/ports/infrastructure/mk/bsd.port.mk:2890 > > > '/home/ports/pobj/eduke32-2.0.0.8494/.build_done') > > > *** Error 1 in /usr/ports/games/eduke32 > > > (/home/ports/infrastructure/mk/bsd.port.mk:2556 'all') > > > > case GAMEVAR_PERACTOR: iptr = &var.pValues[vm.spriteNum & (MAXSPRITES-1)]; > > goto jmp; > > case GAMEVAR_PERPLAYER: iptr = &var.pValues[vm.playerNum & (MAXPLAYERS-1)]; > > fallthrough__; > > jmp: default: *iptr = libdivide_s32_do(*iptr, dptr); break; > > > > it should be enough to change this to > > > > default: jmp: ... > > eduke32 rev 8495 and later has this change. >
Thanks Jonathan, I built the port with that change cherry-picked, plus base-clang re-added to the COMPILERS line. I hit this error: c++ -std=gnu++11 -fno-exceptions -fno-rtti -fomit-frame-pointer -fno-strict-aliasing -fno-threadsafe-statics -fjump-tables -fno-stack-protector -O2 -pipe -W -Wall -Wextra -Wpointer-arith -Wno-char-subscripts -Wno-missing-braces -Wwrite-strings -Wuninitialized -Wno-attributes -Wno-strict-overflow -Isource/build/include -Isource/mact/include -Isource/audiolib/include -Isource/glad/include -Isource/voidwrap/include -MP -MMD -funsigned-char -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -DNDEBUG -DNOASM -DRENDERTYPESDL=1 -DSTARTUP_WINDOW -DUSE_OPENGL -DPOLYMER -I/usr/local/include -DUSE_LIBVPX -DHAVE_VORBIS -DHAVE_FLAC -DHAVE_XMP -DSDL_TARGET=2 -I/usr/local/include -I/usr/local/include/SDL2 -I/usr/X11R6/include -D_REENTRANT -I/usr/X11R6/include -DHAVE_GTK2 -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/usr/local/include/pango-1.0 -I/usr/local/include/gio-unix-2.0 -I/usr/X11R6/include -I/usr/local/include/cairo -I/usr/local/include/atk-1.0 -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include -pthread -I/usr/local/include/fribidi -I/usr/X11R6/include/pixman-1 -I/usr/local/include/libpng16 -I/usr/local/include/harfbuzz -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/X11R6/include/freetype2 -DHAVE_ROUND -DLIBXMP_CORE_PLAYER -DBUILDING_STATIC -Isource/libxmp-lite/include/libxmp-lite -Wno-unused-parameter -Wno-sign-compare -c source/libxmp-lite/src/common.c -o obj/libxmp-lite/common.o c++: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated] source/libxmp-lite/src/common.c:70:55: error: invalid application of 'sizeof' to an incomplete type 'struct xmp_subinstrument' mod->xxi[i].sub = (struct xmp_subinstrument *)calloc(sizeof (struct xmp_subinstrument), num); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ source/libxmp-lite/src/common.c:70:28: note: forward declaration of 'xmp_subinstrument' mod->xxi[i].sub = (struct xmp_subinstrument *)calloc(sizeof (struct xmp_subinstrument), num); ^ 1 error generated. gmake: *** [GNUmakefile:1074: obj/libxmp-lite/common.o] Error 1 *** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2890 '/usr/ports/pobj/eduke32-2.0.0.8494/.build_done') *** Error 1 in /usr/ports/games/eduke32 (/usr/ports/infrastructure/mk/bsd.port.mk:2556 'all') It seems this is due to me having libxmp installed. Removing it allows the build to complete. I spent hours trying to figure out a way to make libxmplite play nice when libxmp package is installed, but the Makefile for eduke32 sure doesn't make it easy. Most (all?) of the files get built with loops that share the same dependency arguments as everything else, so finding a way to remove '-I/usr/local/include' just ends up breaking other stuff. Trying to use HAVE_XMP=0 to disable it doesn't work either, as it seems it is now deep enough in audiolib there is no more off switch for that. As of now I am unsure of how to proceed, but I don't think this update can go in if it breaks dpb... -Ryan