On Mon, Jan 30, 2023 at 01:39:32PM +0100, j...@wxcvbn.org wrote:
> Bulk build on pbuild-amd64.wxcvbn.org
> 
> Started : Tue Jan 24 19:33:22 CET 2023
> Finished: Sat Jan 28 21:50:42 CET 2023
> Duration: 4 Days 2 hours 17 minutes
> 
> Built using OpenBSD 7.2-current (GENERIC.MP) #4: Sun Jan  8 23:17:54 CET 2023

[...]

> https://wxcvbn.org/~jca/build-failures/amd64-clang/2023-01-24/games/dxx-rebirth.txt

common/include/valptridx.h:210:2: error: call to unsigned int 
valptridx<dcx::player>::check_index_range<valptridx<dcx::player>::index_range_exception,
 std::__1::less>(char const*, unsigned int, unsigned int, 
valptridx<dcx::player>::array_managed_type 
const*)::DXX_ALWAYS_ERROR_FUNCTION::dxx_trap_handle_index_range_error() 
declared with 'error' attribute: invalid index used in array subscript
    DXX_VALPTRIDX_CHECK(Compare<std::size_t>()(ss, array_size), 
handle_index_range_error, "invalid index used in array subscript", a, ss);
    ^

Below a diff to update to a more recent checkout date 2022-09-29. I'm
not sure if this fixes the issue, but the convoluted C++ behind
DXX_VALPTRIDX_CHECK has changed so here is hoping this takes care of
it...

Runtime tested and works. Can you try it with a clang 15 build?

Index: Makefile
===================================================================
RCS file: /cvs/ports/games/dxx-rebirth/Makefile,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile
--- Makefile    11 Mar 2022 19:04:17 -0000      1.10
+++ Makefile    31 Jan 2023 02:30:26 -0000
@@ -1,8 +1,7 @@
-V =            0.60pl20190731
+V =            0.60pl20220929
 COMMENT =      source port of Descent, a 6-degrees-of-freedom shooter
 DISTNAME =     dxx-rebirth_${V:S/0.60pl//g}-src
 PKGNAME =      dxx-rebirth-${V}
-REVISION =     0
 CATEGORIES =   games x11
 
 HOMEPAGE =     https://www.dxx-rebirth.com/
@@ -11,7 +10,7 @@ MAINTAINER =  Thomas Frohwein <thfr@openb
 # GPLv3 with special exception for Parallax license
 PERMIT_PACKAGE =       Yes
 
-WANTLIB += ${COMPILER_LIBCXX} GL GLU SDL SDL_mixer c m physfs png z
+WANTLIB += ${COMPILER_LIBCXX} GL GLU SDL SDL_image SDL_mixer c m physfs png z
 
 MASTER_SITES = https://www.dxx-rebirth.com/download/dxx/rebirth/
 EXTRACT_SUFX = .tar.xz
@@ -20,15 +19,15 @@ EXTRACT_SUFX =      .tar.xz
 COMPILER =     base-clang ports-gcc
 
 MODULES =      devel/scons
-MODSCONS_ENV = CPPFLAGS="-I${LOCALBASE}/include" \
+MODSCONS_ENV = CPPFLAGS="-I${LOCALBASE}/include -I${LOCALBASE}/include/SDL 
-I${X11BASE}/include" \
                CXXFLAGS="${CXXFLAGS}" \
-               LINKFLAGS="-L${LOCALBASE}/lib"
+               LINKFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib"
 MODSCONS_FLAGS =       ignore_unknown_variables=1 verbosebuild=1 \
                        show_tool_version=false
 
 BUILD_DEPENDS =        devel/boost,-main
 LIB_DEPENDS =  devel/physfs \
-               devel/sdl \
+               devel/sdl-image \
                devel/sdl-mixer \
                graphics/png
 
Index: distinfo
===================================================================
RCS file: /cvs/ports/games/dxx-rebirth/distinfo,v
retrieving revision 1.2
diff -u -p -r1.2 distinfo
--- distinfo    16 Aug 2019 15:21:38 -0000      1.2
+++ distinfo    31 Jan 2023 02:30:26 -0000
@@ -1,2 +1,2 @@
-SHA256 (dxx-rebirth_20190731-src.tar.xz) = 
JTHtnDShvz+5miqHXa2lGG1/xfsQ/4NK6IPrIdPhAb8=
-SIZE (dxx-rebirth_20190731-src.tar.xz) = 1308972
+SHA256 (dxx-rebirth_20220929-src.tar.xz) = 
pRDaXbJBsFbjXVa5Rox8+eVA5mEM1TtM0k06FsYMlQA=
+SIZE (dxx-rebirth_20220929-src.tar.xz) = 1416232
Index: patches/patch-SConstruct
===================================================================
RCS file: /cvs/ports/games/dxx-rebirth/patches/patch-SConstruct,v
retrieving revision 1.6
diff -u -p -r1.6 patch-SConstruct
--- patches/patch-SConstruct    11 Mar 2022 19:04:17 -0000      1.6
+++ patches/patch-SConstruct    31 Jan 2023 02:30:26 -0000
@@ -3,16 +3,7 @@ Remove all the -Werror= flags.
 Index: SConstruct
 --- SConstruct.orig
 +++ SConstruct
-@@ -1948,7 +1948,7 @@ help:assume compiler supports __attribute__((unused))
-               
self._check_macro(context,macro_name=macro_name,macro_value=macro_value,test="""
- __attribute_unused
- static void a(){}
--""", msg='for function __attribute__((unused))', successflags={'CXXFLAGS' : 
[get_Werror_string(context.env['CXXFLAGS']) + 'unused']})
-+""", msg='for function __attribute__((unused))', successflags={'CXXFLAGS' : 
''})
-       @_custom_test
-       def check_attribute_warn_unused_result(self,context):
-               """
-@@ -2453,7 +2453,7 @@ $ x86_64-pc-linux-gnu-g++-5.4.0 -x c++ -S -Wformat -o 
+@@ -2451,7 +2451,7 @@ $ x86_64-pc-linux-gnu-g++-5.4.0 -x c++ -S -Wformat -o 
        @_custom_test
        def check_compiler_useless_cast(self,context):
                Compile = self.Compile
@@ -21,7 +12,7 @@ Index: SConstruct
                if Compile(context, text='''
  /*
   * SDL on Raspbian provokes a warning from -Wuseless-cast
-@@ -4234,17 +4234,6 @@ class DXXCommon(LazyObjectConstructor):
+@@ -4451,16 +4451,6 @@ class DXXCommon(LazyObjectConstructor):
                env.Prepend(CXXFLAGS = [
                        '-ftabstop=4',
                        '-Wall',
@@ -34,7 +25,6 @@ Index: SConstruct
 -                      Werror + 'pointer-arith',
 -                      Werror + 'cast-qual',
 -                      Werror + 'missing-declarations',
--                      Werror + 'redundant-decls',
 -                      Werror + 'vla',
                ])
                env.Append(
Index: patches/patch-similar_2d_font_cpp
===================================================================
RCS file: patches/patch-similar_2d_font_cpp
diff -N patches/patch-similar_2d_font_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-similar_2d_font_cpp   31 Jan 2023 02:30:26 -0000
@@ -0,0 +1,14 @@
+fix function signature mismatch
+
+Index: similar/2d/font.cpp
+--- similar/2d/font.cpp.orig
++++ similar/2d/font.cpp
+@@ -1024,7 +1024,7 @@ static std::unique_ptr<grs_font> gr_internal_init_font
+ 
+               colormap[TRANSPARENCY_COLOR] = TRANSPARENCY_COLOR;              
// changed from colormap[255] = 255 to this for macintosh
+ 
+-              decode_data(std::span{ft_data, ptr}, colormap, freq);
++              decode_data(std::span{ft_data, *ptr}, colormap, freq);
+       }
+       fontfile.reset();
+       //set curcanv vars
Index: patches/patch-similar_main_mglobal_cpp
===================================================================
RCS file: /cvs/ports/games/dxx-rebirth/patches/patch-similar_main_mglobal_cpp,v
retrieving revision 1.3
diff -u -p -r1.3 patch-similar_main_mglobal_cpp
--- patches/patch-similar_main_mglobal_cpp      11 Mar 2022 19:04:17 -0000      
1.3
+++ patches/patch-similar_main_mglobal_cpp      31 Jan 2023 02:30:26 -0000
@@ -3,7 +3,7 @@ Always enable full template instantiatio
 Index: similar/main/mglobal.cpp
 --- similar/main/mglobal.cpp.orig
 +++ similar/main/mglobal.cpp
-@@ -160,7 +160,7 @@ void reset_globals_for_new_game()
+@@ -179,7 +179,7 @@ void reset_globals_for_new_game()
  #if (defined(__NO_INLINE__) && __NO_INLINE__ > 0) || 
defined(__SANITIZE_ADDRESS__)
  #define DXX_VALPTRIDX_ENABLE_FULL_TEMPLATE_INSTANTIATION      1
  #else

Reply via email to