Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
Joined: May 1999
Posts: 576
Carbon Offline OP
Senior Member
OP Offline
Senior Member
Joined: May 1999
Posts: 576
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.
Joined: Feb 2004
Posts: 2,242
Likes: 6
Very Senior Member
Offline
Very Senior Member
Joined: Feb 2004
Posts: 2,242
Likes: 6
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.)

Joined: Mar 2001
Posts: 16,739
Likes: 26
R
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,739
Likes: 26
Is Xcode 10.2 released now? I thought it was still beta.

Joined: May 1999
Posts: 576
Carbon Offline OP
Senior Member
OP Offline
Senior Member
Joined: May 1999
Posts: 576
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.
Joined: Jul 2007
Posts: 225
Senior Member
Offline
Senior Member
Joined: Jul 2007
Posts: 225
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.

Joined: Sep 2000
Posts: 463
Likes: 1
M
Senior Member
Offline
Senior Member
M
Joined: Sep 2000
Posts: 463
Likes: 1
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.
Joined: Mar 2001
Posts: 16,739
Likes: 26
R
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,739
Likes: 26
Ok, I'll get the update tonight and figure out what's going on.

Joined: Mar 2001
Posts: 16,739
Likes: 26
R
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,739
Likes: 26
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.

Joined: May 1999
Posts: 576
Carbon Offline OP
Senior Member
OP Offline
Senior Member
Joined: May 1999
Posts: 576
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:

Joined: Jul 2007
Posts: 225
Senior Member
Offline
Senior Member
Joined: Jul 2007
Posts: 225
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 

Link Copied to Clipboard
Who's Online Now
0 members (), 26 guests, and 3 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,933
Posts117,399
Members4,991
Most Online890
Jan 17th, 2020
Forum Host
These forums are hosted by www.retrogamesformac.com
Forum hosted by www.retrogamesformac.com