Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
Compilation of MAME 0.208 fails on macOS #114938 03/27/19 01:01 PM
Joined: May 1999
Posts: 558
Carbon Offline OP
Senior Member
OP Offline
Senior Member
Joined: May 1999
Posts: 558
Compilation fails on macOS 10.14.4 and latest Xcode 10.2 with a string_view error.

Code
Compiling src/mame/drivers/interpro.cpp...
In file included from ../../../../../src/emu/http.cpp:12:
In file included from ../../../../../src/lib/util/server_ws_impl.hpp:8:
In file included from ../../../../../src/osd/asio.h:34:
In file included from ../../../../../3rdparty/asio/include/asio.hpp:21:
In file included from ../../../../../3rdparty/asio/include/asio/basic_datagram_socket.hpp:20:
In file included from ../../../../../3rdparty/asio/include/asio/basic_socket.hpp:40:
In file included from ../../../../../3rdparty/asio/include/asio/detail/reactive_socket_service.hpp:22:
In file included from ../../../../../3rdparty/asio/include/asio/buffer.hpp:27:
In file included from ../../../../../3rdparty/asio/include/asio/detail/string_view.hpp:23:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/experimental/string_view:11:2: error: 
      "<experimental/string_view> has been removed. Use <string_view> instead."
#error "<experimental/string_view> has been removed. Use <string_view> instead."
 ^
In file included from ../../../../../src/emu/http.cpp:12:
In file included from ../../../../../src/lib/util/server_ws_impl.hpp:8:
In file included from ../../../../../src/osd/asio.h:34:
In file included from ../../../../../3rdparty/asio/include/asio.hpp:21:
In file included from ../../../../../3rdparty/asio/include/asio/basic_datagram_socket.hpp:20:
In file included from ../../../../../3rdparty/asio/include/asio/basic_socket.hpp:40:
In file included from ../../../../../3rdparty/asio/include/asio/detail/reactive_socket_service.hpp:22:
In file included from ../../../../../3rdparty/asio/include/asio/buffer.hpp:27:
../../../../../3rdparty/asio/include/asio/detail/string_view.hpp:31:12: error: 
      no member named 'experimental' in namespace 'std'
using std::experimental::basic_string_view;
      ~~~~~^
../../../../../3rdparty/asio/include/asio/detail/string_view.hpp:32:12: error: 
      no member named 'experimental' in namespace 'std'
using std::experimental::string_view;
      ~~~~~^


... multiple errors of the same kind here .....

                                   ^
In file included from ../../../../../src/emu/http.cpp:12:
In file included from ../../../../../src/lib/util/server_ws_impl.hpp:8:
In file included from ../../../../../src/osd/asio.h:34:
In file included from ../../../../../3rdparty/asio/include/asio.hpp:78:
In file included from ../../../../../3rdparty/asio/include/asio/ip/basic_resolver.hpp:27:
In file included from ../../../../../3rdparty/asio/include/asio/ip/basic_resolver_iterator.hpp:27:
../../../../../3rdparty/asio/include/asio/ip/basic_resolver_entry.hpp:53:36: error: 
      no type named 'string_view' in namespace 'asio'; did you mean
      'std::string_view'?
      ASIO_STRING_VIEW_PARAM host, ASIO_STRING_VIEW_PARAM service)
                                   ^~~~~~~~~~~~~~~~~~~~~~
                                   std::string_view
In file included from ../../../../../src/emu/http.cpp:12:
In file included from ../../../../../src/lib/util/server_ws_impl.hpp:8:
In file included from ../../../../../src/osd/asio.h:34:
In file included from ../../../../../3rdparty/asio/include/asio.hpp:21:
In file included from ../../../../../3rdparty/asio/include/asio/basic_datagram_socket.hpp:20:
In file included from ../../../../../3rdparty/asio/include/asio/basic_socket.hpp:40:
In file included from ../../../../../3rdparty/asio/include/asio/detail/reactive_socket_service.hpp:22:
In file included from ../../../../../3rdparty/asio/include/asio/buffer.hpp:27:
../../../../../3rdparty/asio/include/asio/detail/string_view.hpp:40:33: note: 
      expanded from macro 'ASIO_STRING_VIEW_PARAM'
# define ASIO_STRING_VIEW_PARAM asio::string_view
                                ^~~~~~
In file included from ../../../../../src/emu/http.cpp:1:
In file included from ../../../../../src/emu/emu.h:29:
In file included from /Users/charel/Desktop/mame/build/projects/sdl/mame/gmake-osx-clang/../../../../../src/emu/emucore.h:37:
In file included from /Users/charel/Desktop/mame/build/projects/sdl/mame/gmake-osx-clang/../../../../../src/emu/emualloc.h:16:
In file included from /Users/charel/Desktop/mame/build/projects/sdl/mame/gmake-osx-clang/../../../../../src/osd/osdcore.h:28:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string:500:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string_view:770:37: note: 
      'std::string_view' declared here
typedef basic_string_view<char>     string_view;
                                    ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
Compiling src/mame/drivers/jackie.cpp...
2 warnings and 20 errors generated.
make[2]: *** [../../../../osx_clang/obj/x64/Release/src/emu/http.o] Error 1
make[1]: *** [emu] Error 2
make[1]: *** Waiting for unfinished jobs....
Compiling src/mame/drivers/intellec4.cpp...
Compiling src/mame/drivers/lordgun.cpp...
Compiling src/mame/drivers/ipc.cpp...
Compiling src/mame/machine/cammu.cpp...
Compiling src/mame/drivers/pgm.cpp...
Compiling src/mame/drivers/ipds.cpp...
Compiling src/mame/drivers/isbc.cpp...
Compiling src/mame/machine/interpro_arbga.cpp...
Compiling src/mame/drivers/pgm2.cpp...
Compiling src/mame/machine/interpro_ioga.cpp...
Compiling src/mame/drivers/isbc8010.cpp...
Compiling src/mame/machine/interpro_mcga.cpp...
Compiling src/mame/drivers/isbc8030.cpp...
Compiling src/mame/drivers/pgm3.cpp...
Compiling src/mame/machine/interpro_sga.cpp...
Compiling src/mame/drivers/spoker.cpp...
Compiling src/mame/drivers/rex6000.cpp...
Compiling src/mame/machine/igs022.cpp...
Archiving libinterpro.a...
Compiling src/mame/drivers/sdk51.cpp...
Compiling src/mame/drivers/sdk80.cpp...
Compiling src/mame/machine/igs025.cpp...
Compiling src/mame/machine/igs028.cpp...
Compiling src/mame/machine/igs036crypt.cpp...
Compiling src/mame/drivers/sdk85.cpp...
Compiling src/mame/drivers/sdk86.cpp...
Compiling src/mame/machine/imds2ioc.cpp...
Compiling src/mame/machine/pgm2_memcard.cpp...
Compiling src/mame/machine/pgmcrypt.cpp...
Compiling src/mame/machine/pgmprot_igs025_igs012.cpp...
Compiling src/mame/machine/pgmprot_igs025_igs022.cpp...
Compiling src/mame/machine/imm6_76.cpp...
Compiling src/mame/machine/pgmprot_igs025_igs028.cpp...
Compiling src/mame/machine/pgmprot_igs027a_type1.cpp...
Compiling src/mame/machine/pgmprot_igs027a_type2.cpp...
Compiling src/mame/machine/isbc_208.cpp...
Compiling src/mame/machine/isbc_215g.cpp...
Compiling src/mame/machine/pgmprot_igs027a_type3.cpp...
Compiling src/mame/machine/pgmprot_orlegend.cpp...
Archiving libintel.a...
Compiling src/mame/video/goldstar.cpp...
Compiling src/mame/video/igs017_igs031.cpp...
Compiling src/mame/video/iqblock.cpp...
Compiling src/mame/video/lordgun.cpp...
Compiling src/mame/video/pgm.cpp...
Compiling src/mame/video/pgm2.cpp...
Archiving libigs.a...
make: *** [macosx_x64_clang] Error 2

Last edited by Carbon; 03/27/19 01:02 PM.
Re: Compilation of MAME 0.208 fails on macOS [Re: Carbon] #114939 03/27/19 01:55 PM
Joined: Feb 2004
Posts: 2,067
Vas Crabb Offline
Very Senior Member
Offline
Very Senior Member
Joined: Feb 2004
Posts: 2,067
Um, are you compiling in C++17 mode? That shouldn't happen with C++14 mode selected which is what's supposed to happen. We haven't changed ASIO since the last release, so it must be a change to your tools or build environment. You may be able to install a compatible version of ASIO system-wide and set USE_SYSTEM_ASIO=1 and see what happens. (We haven't moved to C++17 yet because we don't have good support for it across platforms/toolchains yet.)

Re: Compilation of MAME 0.208 fails on macOS [Re: Carbon] #114941 03/27/19 02:13 PM
Joined: Mar 2001
Posts: 16,335
R
R. Belmont Offline
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,335
Is Xcode 10.2 released now? I thought it was still beta.

Re: Compilation of MAME 0.208 fails on macOS [Re: Carbon] #114943 03/27/19 03:16 PM
Joined: May 1999
Posts: 558
Carbon Offline OP
Senior Member
OP Offline
Senior Member
Joined: May 1999
Posts: 558
Released yesterday alongside 10.14.4.

It occurs on both my iMac and Macbook Pro and apart of updating macOS and Xcode I did not change anything since I compiled MAME successfully last month.

Last edited by Carbon; 03/27/19 03:18 PM.
Re: Compilation of MAME 0.208 fails on macOS [Re: Carbon] #114945 03/27/19 04:22 PM
Joined: Jul 2007
Posts: 220
M
Monotremata Offline
Senior Member
Offline
Senior Member
M
Joined: Jul 2007
Posts: 220
Yep same issue here. Just updated to 10.14.4 and Xcode yesterday and haven't changed anything else. Since moving to Mojave I don't even have a dev environment setup other than the stuff needed for MAME heh.

Re: Compilation of MAME 0.208 fails on macOS [Re: Carbon] #114946 03/27/19 05:15 PM
Joined: Sep 2000
Posts: 446
M
MAMEBase Offline
Senior Member
Offline
Senior Member
M
Joined: Sep 2000
Posts: 446
Same issue here, although I'm still on 10.14.3, Xcode updated to 10.2 a couple of days prior via the App Store (10.14.4 is sitting in the software update cue...)

Last edited by MAMEBase; 03/27/19 09:26 PM.

The following statement is true...
The preceding statement is false.
Re: Compilation of MAME 0.208 fails on macOS [Re: Carbon] #114947 03/27/19 07:06 PM
Joined: Mar 2001
Posts: 16,335
R
R. Belmont Offline
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,335
Ok, I'll get the update tonight and figure out what's going on.

Re: Compilation of MAME 0.208 fails on macOS [Re: Carbon] #114950 03/28/19 12:41 AM
Joined: Mar 2001
Posts: 16,335
R
R. Belmont Offline
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,335
There is a permanent fix in Github now; if you can pull from there and build it'll work with Xcode 10.2 (and should continue to work with older Xcode).

If you'd rather not do that, open 3rdparty/asio/include/asio/detail/string_view.hpp in your favorite editor.

On line 19, immediately after "#if defined(ASIO_HAS_STD_STRING_VIEW)" add this new line:

#undef ASIO_HAS_EXPERIMENTAL_STRING_VIEW

Save the file and things should build fine.

Re: Compilation of MAME 0.208 fails on macOS [Re: Carbon] #114952 03/28/19 05:54 AM
Joined: May 1999
Posts: 558
Carbon Offline OP
Senior Member
OP Offline
Senior Member
Joined: May 1999
Posts: 558
Getting a different error now:

Code
In file included from ../../../../../3rdparty/asio/include/asio/basic_socket.hpp:40:
In file included from ../../../../../3rdparty/asio/include/asio/detail/reactive_socket_service.hpp:22:
In file included from ../../../../../3rdparty/asio/include/asio/buffer.hpp:27:
In file included from ../../../../../3rdparty/asio/include/asio/detail/string_view.hpp:24:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/experimental/string_view:11:2: error: 
      "<experimental/string_view> has been removed. Use <string_view> instead."
#error "<experimental/string_view> has been removed. Use <string_view> instead."
 ^
In file included from ../../../../../src/emu/http.cpp:12:
In file included from ../../../../../src/lib/util/server_ws_impl.hpp:8:
In file included from ../../../../../src/osd/asio.h:34:
In file included from ../../../../../3rdparty/asio/include/asio.hpp:21:
In file included from ../../../../../3rdparty/asio/include/asio/basic_datagram_socket.hpp:20:
In file included from ../../../../../3rdparty/asio/include/asio/basic_socket.hpp:40:
In file included from ../../../../../3rdparty/asio/include/asio/detail/reactive_socket_service.hpp:22:
In file included from ../../../../../3rdparty/asio/include/asio/buffer.hpp:27:
../../../../../3rdparty/asio/include/asio/detail/string_view.hpp:32:12: error: no member named
      'experimental' in namespace 'std'
using std::experimental::basic_string_view;
      ~~~~~^
../../../../../3rdparty/asio/include/asio/detail/string_view.hpp:33:12: error: no member named
      'experimental' in namespace 'std'
using std::experimental::string_view;
      ~~~~~^
In file included from ../../../../../src/emu/http.cpp:12:
In file included from ../../../../../src/lib/util/server_ws_impl.hpp:8:
In file included from ../../../../../src/osd/asio.h:34:
In file included from ../../../../../3rdparty/asio/include/asio.hpp:21:

Re: Compilation of MAME 0.208 fails on macOS [Re: Carbon] #114954 03/28/19 07:32 AM
Joined: Jul 2007
Posts: 220
M
Monotremata Offline
Senior Member
Offline
Senior Member
M
Joined: Jul 2007
Posts: 220
Grabbed the latest off GitHub earlier and it worked for me. I tried adding the line to the string_view file and pick up where my other compile left off but it failed with the same error Carbon got above. The brand new source from GitHub (in a separate directory and everything) worked great though.

Page 1 of 2 1 2

Moderated by  R. Belmont 

Who's Online Now
1 registered members (Pernod), 401 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,692
Posts114,252
Members4,865
Most Online510
Aug 26th, 2019
Powered by UBB.threads™ PHP Forum Software 7.7.3