Tuesday, February 05, 2019

Re: emulators/mame, fix with new libc++ (asio, similar to boost)

On 2019/02/05 15:45, Stuart Henderson wrote:
> It hasn't finished a full build yet (still running), but at least has
> got past the previous breakage point.
>
> ok if it finishes?
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/emulators/mame/Makefile,v
> retrieving revision 1.20
> diff -u -p -r1.20 Makefile
> --- Makefile 4 Feb 2019 10:12:52 -0000 1.20
> +++ Makefile 5 Feb 2019 15:25:19 -0000
> @@ -82,6 +82,7 @@ post-extract:
> xargs sed -i 's|"png.h"|"localpng.h"|'
> @perl -pi -e 's/\r//g' ${WRKSRC}/makefile ${WRKSRC}/scripts/genie.lua \
> ${WRKSRC}/3rdparty/genie/build/gmake.bsd/genie.make \
> + ${WRKSRC}/3rdparty/asio/include/asio/detail/config.hpp \
> ${WRKSRC}/docs/man/* ${WRKSRC}/keymaps/*
>
> do-install:
> Index: patches/patch-3rdparty_asio_include_asio_detail_config_hpp
> ===================================================================
> RCS file: patches/patch-3rdparty_asio_include_asio_detail_config_hpp
> diff -N patches/patch-3rdparty_asio_include_asio_detail_config_hpp
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-3rdparty_asio_include_asio_detail_config_hpp 5 Feb 2019 15:25:19 -0000
> @@ -0,0 +1,18 @@
> +$OpenBSD$
> +
> +libc++ 7.x moved string_view out of experimental
> +
> +Index: 3rdparty/asio/include/asio/detail/config.hpp
> +--- 3rdparty/asio/include/asio/detail/config.hpp.orig
> ++++ 3rdparty/asio/include/asio/detail/config.hpp
> +@@ -708,9 +708,8 @@
> + # if !defined(ASIO_DISABLE_STD_STRING_VIEW)
> + # if defined(__clang__)
> + # if (__cplusplus >= 201103)
> +-# if __has_include(<experimental/string_view>)
> ++# if __has_include(<string_view>)
> + # define ASIO_HAS_STD_STRING_VIEW 1
> +-# define ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1
> + # endif // __has_include(<experimental/string_view>)
> + # endif // (__cplusplus >= 201103)
> + # endif // defined(__clang__)
>

....so it eventually failed on i386, but that looks like a bug introduced with
the mame update, rather than libc++ related.


Compiling src/frontend/mame/ui/videoopt.cpp...
c++ -O2 -pipe -I/usr/local/include -I/usr/X11R6/include -I/usr/local/include/lua-5.3/ -Wno-ignored-qualifiers -fno-ret-protector -MMD -MP -MP -DNDEBUG -DCRLF=2 -DLSB_FIRST -DXMD_H -DFLAC__NO_DLL -DPUGIXML_HEADER_ONLY -DNATIVE_DRC=drcbe_x86 -DLUA_COMPAT_ALL -DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2 -DUI_SDL -I"../../../../../src/osd" -I"../../../../../src/emu" -I"../../../../../src/frontend/mame" -I"../../../../../src/devices" -I"../../../../../src/lib" -I"../../../../../src/lib/util" -I"../../../../../3rdparty" -I"../../../../generated/emu" -I"../../../../generated/emu/layout" -I"../../../../../3rdparty/asio/include" -I"../../../../../scripts/src/mame" -I"../../../../../3rdparty/rapidjson/include" -m32
-pipe -O2 -pipe -Wno-unknown-pragmas -Wall -Wcast-align -Wundef -Wformat-security -Wwrite-strings -Wno-sign-compare
-Wno-conversion -Wno-error=deprecated-declarations -m32 -x c++ -std=c++14 -Woverloaded-virtual -include ../../../../openbsd/obj/x32/Release/emu.h -o "../../../../openbsd/obj/x32/Release/src/frontend/mame/ui/videoopt.o" -c "../../../../../src/frontend/mame/ui/videoopt.cpp"
../../../../../src/frontend/mame/ui/videoopt.cpp:81:9: error: case value evaluates to 2147483648, which cannot be narrowed to type 'intptr_t' (aka 'long') [-Wc++11-narrowing]
case VIDEO_ITEM_ROTATE:
^
../../../../../src/frontend/mame/ui/videoopt.cpp:98:9: error: case value evaluates to 2147483649, which cannot be narrowed to type 'intptr_t' (aka 'long') [-Wc++11-narrowing]
case VIDEO_ITEM_BACKDROPS:
^
../../../../../src/frontend/mame/ui/videoopt.cpp:106:9: error: case value evaluates to 2147483650, which cannot be narrowed to type 'intptr_t' (aka 'long') [-Wc++11-narrowing]
case VIDEO_ITEM_OVERLAYS:
^
../../../../../src/frontend/mame/ui/videoopt.cpp:114:9: error: case value evaluates to 2147483651, which cannot be narrowed to type 'intptr_t' (aka 'long') [-Wc++11-narrowing]
case VIDEO_ITEM_BEZELS:
^
../../../../../src/frontend/mame/ui/videoopt.cpp:122:9: error: case value evaluates to 2147483652, which cannot be narrowed to type 'intptr_t' (aka 'long') [-Wc++11-narrowing]
case VIDEO_ITEM_CPANELS:
^
../../../../../src/frontend/mame/ui/videoopt.cpp:130:9: error: case value evaluates to 2147483653, which cannot be narrowed to type 'intptr_t' (aka 'long') [-Wc++11-narrowing]
case VIDEO_ITEM_MARQUEES:
^
../../../../../src/frontend/mame/ui/videoopt.cpp:138:9: error: case value evaluates to 2147483654, which cannot be narrowed to type 'intptr_t' (aka 'long') [-Wc++11-narrowing]
case VIDEO_ITEM_ZOOM:
^
7 errors generated.

1 comment:

  1. Maybe changing intptr_t with uintptr_t in videoopt.h let you compile?
    switch ((uintptr_t)menu_event->itemref)

    ReplyDelete