mamedev / mame

MAME
https://www.mamedev.org/
Other
8.26k stars 2.02k forks source link

Build fail with recent boost and asio #5721

Closed tanertas closed 2 years ago

tanertas commented 5 years ago

I'm trying to compile mame-0.214 with this setup below but it fails.

Alpine Linux Edge musl-libc 1.1.23 gcc-9.2 boost-1.71 asio-1.14

TARGETOS=linux NOWERROR=1 DEBUG=0 USE_QTDEBUG=0 VERBOSE=1 REGENIE=1 OSD=sdl SYMBOLS=0 FORCE_DRC_C_BACKEND= PTR64=1 NOASM=0 TOOLS= SDL_INI_PATH=/etc/mame USE_SYSTEM_LIB_EXPAT=1 USE_SYSTEM_LIB_ZLIB=1 USE_SYSTEM_LIB_JPEG=1 USE_SYSTEM_LIB_FLAC=1 USE_SYSTEM_LIB_LUA=1 USE_SYSTEM_LIB_SQLITE3=1 USE_SYSTEM_LIB_PORTAUDIO=1 USE_SYSTEM_LIB_UV=1 USE_SYSTEM_LIB_GLM=1 USE_SYSTEM_LIB_RAPIDJSON=1 USE_SYSTEM_LIB_PORTMIDI=1 USE_SYSTEM_LIB_ASIO=1

Compiling src/mame/drivers/jpmsru.cpp...
g++ -I/usr/include/lua5.3 -DBX_CRT_MUSL -Wno-everything -I/usr/include/lua5.3 -DBX_CRT_MUSL -Wno-everything -Os -fomit-frame-pointer -MMD -MP -MP -DPTR64=1 -DNDEBUG -DCRLF=2 -DLSB_FIRST -DXMD_H -DFLAC__NO_DLL -DPUGIXML_HEADER_ONLY -DNATIVE_DRC=drcbe_x64 -DLUA_COMPAT_ALL -DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2 -I"../../../../../src/osd" -I"../../../../../src/emu" -I"../../../../../src/devices" -I"../../../../../src/mame" -I"../../../../../src/lib" -I"../../../../../src/lib/util" -I"../../../../../src/lib/netlist" -I"../../../../../3rdparty" -I"../../../../generated/mame/layout" -I"../../../../../scripts"   -m64 -pipe -O3 -fno-strict-aliasing -Wno-unknown-pragmas -Wall -Wcast-align -Wundef -Wformat-security -Wwrite-strings -Wno-sign-compare -Wno-conversion -Wno-error=deprecated-declarations -Wno-unused-result -Wno-array-bounds -Wno-format-overflow -Wno-stringop-truncation -Wno-stringop-overflow -m64 -x c++ -std=c++14 -Woverloaded-virtual -Wno-class-memaccess -Wsuggest-override  -include ../../../../linux_gcc/obj/x64/Release/emu.h -o "../../../../linux_gcc/obj/x64/Release/src/mame/drivers/jpmsru.o" -c "../../../../../src/mame/drivers/jpmsru.cpp"
In file included from ../../../../../src/emu/http.cpp:16:
../../../../../src/lib/util/server_ws_impl.hpp: In instantiation of 'webpp::SocketServerBase<socket_type>::Connection::Connection(socket_type*) [with socket_type = asio::basic_stream_socket<asio::ip::tcp>]':
../../../../../src/lib/util/server_ws_impl.hpp:695:77:   required from here
../../../../../src/lib/util/server_ws_impl.hpp:79:87: error: 'class asio::basic_stream_socket<asio::ip::tcp>' has no member named 'get_io_service'
   79 |    explicit Connection(socket_type *socket): super(0), socket(socket), strand(socket->get_io_service()), closed(false) { }
      |                                                                               ~~~~~~~~^~~~~~~~~~~~~~
Compiling src/mame/drivers/airbustr.cpp...
g++ -I/usr/include/lua5.3 -DBX_CRT_MUSL -Wno-everything -I/usr/include/lua5.3 -DBX_CRT_MUSL -Wno-everything -Os -fomit-frame-pointer -MMD -MP -MP -DPTR64=1 -DNDEBUG -DCRLF=2 -DLSB_FIRST -DXMD_H -DFLAC__NO_DLL -DPUGIXML_HEADER_ONLY -DNATIVE_DRC=drcbe_x64 -DLUA_COMPAT_ALL -DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2 -I"../../../../../src/osd" -I"../../../../../src/emu" -I"../../../../../src/devices" -I"../../../../../src/mame" -I"../../../../../src/lib" -I"../../../../../src/lib/util" -I"../../../../../src/lib/netlist" -I"../../../../../3rdparty" -I"../../../../generated/mame/layout" -I"../../../../../scripts"   -m64 -pipe -O3 -fno-strict-aliasing -Wno-unknown-pragmas -Wall -Wcast-align -Wundef -Wformat-security -Wwrite-strings -Wno-sign-compare -Wno-conversion -Wno-error=deprecated-declarations -Wno-unused-result -Wno-array-bounds -Wno-format-overflow -Wno-stringop-truncation -Wno-stringop-overflow -m64 -x c++ -std=c++14 -Woverloaded-virtual -Wno-class-memaccess -Wsuggest-override  -include ../../../../linux_gcc/obj/x64/Release/emu.h -o "../../../../linux_gcc/obj/x64/Release/src/mame/drivers/airbustr.o" -c "../../../../../src/mame/drivers/airbustr.cpp"
../../../../../src/lib/util/server_ws_impl.hpp: In instantiation of 'std::shared_ptr<asio::basic_waitable_timer<std::chrono::_V2::system_clock> > webpp::SocketServerBase<socket_type>::get_timeout_timer(const std::shared_ptr<webpp::SocketServerBase<socket_type>::Connection>&, size_t) [with socket_type = asio::basic_stream_socket<asio::ip::tcp>; size_t = long unsigned int]':
../../../../../src/lib/util/server_ws_impl.hpp:382:17:   required from 'void webpp::SocketServerBase<socket_type>::read_handshake(const std::shared_ptr<webpp::SocketServerBase<socket_type>::Connection>&) [with socket_type = asio::basic_stream_socket<asio::ip::tcp>]'
../../../../../src/lib/util/server_ws_impl.hpp:706:31:   required from here
../../../../../src/lib/util/server_ws_impl.hpp:363:74: error: 'using element_type = class asio::basic_stream_socket<asio::ip::tcp>' {aka 'class asio::basic_stream_socket<asio::ip::tcp>'} has no member named 'get_io_service'
  363 |    auto timer = std::make_shared<asio::system_timer>(connection->socket->get_io_service());
      |                                                      ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
Compiling src/mame/drivers/djboy.cpp...
g++ -I/usr/include/lua5.3 -DBX_CRT_MUSL -Wno-everything -I/usr/include/lua5.3 -DBX_CRT_MUSL -Wno-everything -Os -fomit-frame-pointer -MMD -MP -MP -DPTR64=1 -DNDEBUG -DCRLF=2 -DLSB_FIRST -DXMD_H -DFLAC__NO_DLL -DPUGIXML_HEADER_ONLY -DNATIVE_DRC=drcbe_x64 -DLUA_COMPAT_ALL -DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2 -I"../../../../../src/osd" -I"../../../../../src/emu" -I"../../../../../src/devices" -I"../../../../../src/mame" -I"../../../../../src/lib" -I"../../../../../src/lib/util" -I"../../../../../src/lib/netlist" -I"../../../../../3rdparty" -I"../../../../generated/mame/layout" -I"../../../../../scripts"   -m64 -pipe -O3 -fno-strict-aliasing -Wno-unknown-pragmas -Wall -Wcast-align -Wundef -Wformat-security -Wwrite-strings -Wno-sign-compare -Wno-conversion -Wno-error=deprecated-declarations -Wno-unused-result -Wno-array-bounds -Wno-format-overflow -Wno-stringop-truncation -Wno-stringop-overflow -m64 -x c++ -std=c++14 -Woverloaded-virtual -Wno-class-memaccess -Wsuggest-override  -include ../../../../linux_gcc/obj/x64/Release/emu.h -o "../../../../linux_gcc/obj/x64/Release/src/mame/drivers/djboy.o" -c "../../../../../src/mame/drivers/djboy.cpp"
../../../../../src/lib/util/server_ws_impl.hpp: In instantiation of 'void webpp::SocketServerBase<socket_type>::timer_idle_init(const std::shared_ptr<webpp::SocketServerBase<socket_type>::Connection>&) [with socket_type = asio::basic_stream_socket<asio::ip::tcp>]':
../../../../../src/lib/util/server_ws_impl.hpp:615:4:   required from 'void webpp::SocketServerBase<socket_type>::connection_open(const std::shared_ptr<webpp::SocketServerBase<socket_type>::Connection>&, webpp::SocketServerBase<socket_type>::Endpoint&) [with socket_type = asio::basic_stream_socket<asio::ip::tcp>]'
../../../../../src/lib/util/server_ws_impl.hpp:447:9:   required from 'void webpp::SocketServerBase<socket_type>::write_handshake(const std::shared_ptr<webpp::SocketServerBase<socket_type>::Connection>&, const std::shared_ptr<asio::basic_streambuf<> >&) [with socket_type = asio::basic_stream_socket<asio::ip::tcp>]'
../../../../../src/lib/util/server_ws_impl.hpp:395:6:   required from 'void webpp::SocketServerBase<socket_type>::read_handshake(const std::shared_ptr<webpp::SocketServerBase<socket_type>::Connection>&) [with socket_type = asio::basic_stream_socket<asio::ip::tcp>]'
../../../../../src/lib/util/server_ws_impl.hpp:706:31:   required from here
../../../../../src/lib/util/server_ws_impl.hpp:654:86: error: 'using element_type = class asio::basic_stream_socket<asio::ip::tcp>' {aka 'class asio::basic_stream_socket<asio::ip::tcp>'} has no member named 'get_io_service'
  654 |     connection->timer_idle= std::make_unique<asio::system_timer>(connection->socket->get_io_service());
      |                                                                  ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
In file included from ../../../../../src/emu/http.cpp:16:
../../../../../src/lib/util/server_ws_impl.hpp: In instantiation of 'webpp::SocketServerBase<socket_type>::Connection::Connection(const std::shared_ptr<_Tp>&) [with socket_type = asio::basic_stream_socket<asio::ip::tcp>]':
/usr/include/c++/9.2.0/ext/new_allocator.h:147:4:   required from 'void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = webpp::SocketServerBase<asio::basic_stream_socket<asio::ip::tcp> >::Connection; _Args = {std::shared_ptr<asio::basic_stream_socket<asio::ip::tcp, asio::executor> >&}; _Tp = webpp::SocketServerBase<asio::basic_stream_socket<asio::ip::tcp> >::Connection]'
/usr/include/c++/9.2.0/bits/alloc_traits.h:484:4:   required from 'static void std::allocator_traits<std::allocator<_Tp1> >::construct(std::allocator_traits<std::allocator<_Tp1> >::allocator_type&, _Up*, _Args&& ...) [with _Up = webpp::SocketServerBase<asio::basic_stream_socket<asio::ip::tcp> >::Connection; _Args = {std::shared_ptr<asio::basic_stream_socket<asio::ip::tcp, asio::executor> >&}; _Tp = webpp::SocketServerBase<asio::basic_stream_socket<asio::ip::tcp> >::Connection; std::allocator_traits<std::allocator<_Tp1> >::allocator_type = std::allocator<webpp::SocketServerBase<asio::basic_stream_socket<asio::ip::tcp> >::Connection>]'
/usr/include/c++/9.2.0/bits/shared_ptr_base.h:548:39:   required from 'std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = {std::shared_ptr<asio::basic_stream_socket<asio::ip::tcp, asio::executor> >&}; _Tp = webpp::SocketServerBase<asio::basic_stream_socket<asio::ip::tcp> >::Connection; _Alloc = std::allocator<webpp::SocketServerBase<asio::basic_stream_socket<asio::ip::tcp> >::Connection>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
/usr/include/c++/9.2.0/bits/shared_ptr_base.h:679:16:   required from 'std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = webpp::SocketServerBase<asio::basic_stream_socket<asio::ip::tcp> >::Connection; _Alloc = std::allocator<webpp::SocketServerBase<asio::basic_stream_socket<asio::ip::tcp> >::Connection>; _Args = {std::shared_ptr<asio::basic_stream_socket<asio::ip::tcp, asio::executor> >&}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
/usr/include/c++/9.2.0/bits/shared_ptr_base.h:1344:71:   required from 'std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<webpp::SocketServerBase<asio::basic_stream_socket<asio::ip::tcp> >::Connection>; _Args = {std::shared_ptr<asio::basic_stream_socket<asio::ip::tcp, asio::executor> >&}; _Tp = webpp::SocketServerBase<asio::basic_stream_socket<asio::ip::tcp> >::Connection; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
/usr/include/c++/9.2.0/bits/shared_ptr.h:359:59:   [ skipping 4 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/usr/include/c++/9.2.0/type_traits:2336:26:   required by substitution of 'template<class _Fn, class ... _Args> static std::__result_of_success<decltype (declval<_Fn>()((declval<_Args>)()...)), std::__invoke_other> std::__result_of_other_impl::_S_test(int) [with _Fn = http_manager::http_manager(bool, short int, const char*)::<lambda(auto:6, auto:7)>&; _Args = {std::shared_ptr<asio::basic_stream_socket<asio::ip::tcp, asio::executor> >, std::shared_ptr<webpp::ServerBase<asio::basic_stream_socket<asio::ip::tcp> >::Request>}]'
/usr/include/c++/9.2.0/type_traits:2347:55:   required from 'struct std::__result_of_impl<false, false, http_manager::http_manager(bool, short int, const char*)::<lambda(auto:6, auto:7)>&, std::shared_ptr<asio::basic_stream_socket<asio::ip::tcp, asio::executor> >, std::shared_ptr<webpp::ServerBase<asio::basic_stream_socket<asio::ip::tcp> >::Request> >'
/usr/include/c++/9.2.0/type_traits:2352:12:   required from 'struct std::__invoke_result<http_manager::http_manager(bool, short int, const char*)::<lambda(auto:6, auto:7)>&, std::shared_ptr<asio::basic_stream_socket<asio::ip::tcp, asio::executor> >, std::shared_ptr<webpp::ServerBase<asio::basic_stream_socket<asio::ip::tcp> >::Request> >'
/usr/include/c++/9.2.0/type_traits:2365:12:   required from 'class std::result_of<http_manager::http_manager(bool, short int, const char*)::<lambda(auto:6, auto:7)>&(std::shared_ptr<asio::basic_stream_socket<asio::ip::tcp> >, std::shared_ptr<webpp::ServerBase<asio::basic_stream_socket<asio::ip::tcp> >::Request>)>'
/usr/include/c++/9.2.0/bits/std_function.h:525:2:   required by substitution of 'template<class _Functor> std::function<void(std::shared_ptr<asio::basic_stream_socket<asio::ip::tcp> >, std::shared_ptr<webpp::ServerBase<asio::basic_stream_socket<asio::ip::tcp> >::Request>)>::_Requires<std::function<void(std::shared_ptr<asio::basic_stream_socket<asio::ip::tcp> >, std::shared_ptr<webpp::ServerBase<asio::basic_stream_socket<asio::ip::tcp> >::Request>)>::_Callable<typename std::decay<_Tp>::type, typename std::result_of<typename std::decay<_Tp>::type&(std::shared_ptr<asio::basic_stream_socket<asio::ip::tcp> >, std::shared_ptr<webpp::ServerBase<asio::basic_stream_socket<asio::ip::tcp> >::Request>)>::type>, std::function<void(std::shared_ptr<asio::basic_stream_socket<asio::ip::tcp> >, std::shared_ptr<webpp::ServerBase<asio::basic_stream_socket<asio::ip::tcp> >::Request>)>&> std::function<void(std::shared_ptr<asio::basic_stream_socket<asio::ip::tcp> >, std::shared_ptr<webpp::ServerBase<asio::basic_stream_socket<asio::ip::tcp> >::Request>)>::operator=<_Functor>(_Functor&&) [with _Functor = http_manager::http_manager(bool, short int, const char*)::<lambda(auto:6, auto:7)>]'
../../../../../src/emu/http.cpp:340:2:   required from here
../../../../../src/lib/util/server_ws_impl.hpp:76:111: error: 'using element_type = class asio::basic_stream_socket<asio::ip::tcp>' {aka 'class asio::basic_stream_socket<asio::ip::tcp>'} has no member named 'get_io_service'
   76 |    explicit Connection(const std::shared_ptr<socket_type> &socket) : super(0), socket(socket), strand(socket->get_io_service()), closed(false) { }
      |                                                                                                       ~~~~~~~~^~~~~~~~~~~~~~
Compiling src/mame/drivers/blueprnt.cpp...
couriersud commented 5 years ago

get_io_service seems to be deprecated. See here: https://github.com/chriskohlhoff/asio/search?q=get_io_service&unscoped_q=get_io_service Your system lib is 1.14 and has been compiled to not include deprecated elements. Thus for now you need to use USE_SYSTEM_LIB_ASIO=0 in your build.

Robbbert commented 4 years ago

Nothing further heard, closing.

tanertas commented 4 years ago

Nothing further heard, closing.

What does this mean? Does Mame get an update to support newer Asio? If so, shouldn't you reference the commit that fixes this issue?

Robbbert commented 4 years ago

It was a mistake. You can see it was reopened right after it was closed.

cuavas commented 2 years ago

Should be addressed by f570febfa15b63933f14d2bc6605338bccd14974.