Previous Thread
Next Thread
Print Thread
Page 2 of 2 1 2
Re: MAME 0.169 released! [Re: Vas Crabb] #103458 01/03/16 09:32 AM
Joined: Jul 2007
Posts: 220
M
Monotremata Offline
Senior Member
Offline
Senior Member
M
Joined: Jul 2007
Posts: 220
Originally Posted By Vas Crabb
OVERRIDE_CC=/path/to/clang-binary
OVERRIDE_CXX=/path/to/clang++-binary


Gotcha! I thought that might be it but figured I would wait before messing with stuff even more. wink As it turns out, my LLVM install never finished. Homebrew errors out during compiling parts of the Clang stuff so Im trying to nail that one before I continue with MAME..

Re: MAME 0.169 released! [Re: Stiletto] #103542 01/07/16 05:38 AM
Joined: Jul 2007
Posts: 220
M
Monotremata Offline
Senior Member
Offline
Senior Member
M
Joined: Jul 2007
Posts: 220
Well so far Mac OS 10.7 is down and out.. Got Clang 3.7.1 installed from scratch in /usr/local so it wont mess with Apple's older Clang.. GCC 5.3 is also installed in /usr/local via Homebrew.. My paths are set so that if you type either clang -v or gcc -v at the command line, they both show the proper updated versions.. MAME detects and starts to build with GCC 5.3 just fine until I hit the errors I listed previously.. If I it to Clang, it detects Clang, starts converting the first bunch of files, and then immediately stops and tells me it needs GCC 4.9 or above. No clue where to go from here, Clang was built specifically with GCC 5.3 so it should know where it is, it just wont go past that (it doesnt even get the MAME makefiles made before it stops)..

Now the weird part, if I use 'make -j5 OVERRIDE_CC=/path/to/clang OVERRIDE_CXX=/path/to/clang++ TOOLS=1 REGENIE=1' leaving out the 'macosx_x64' at the end it starts to build, but then runs into a bunch of errors with missing files. But if I tack on the architecture type like I normally do, I dont even get to the point where it builds the makefiles, it just stops and tells me Clang needs GCC 4.9.

Re: MAME 0.169 released! [Re: Monotremata] #103554 01/07/16 04:12 PM
Joined: Jan 2016
Posts: 1
h0tw1r3 Offline
Member
Offline
Member
Joined: Jan 2016
Posts: 1
Originally Posted By Monotremata
Well so far Mac OS 10.7 is down and out.. Got Clang 3.7.1 installed from scratch in /usr/local so it wont mess with Apple's older Clang.. GCC 5.3 is also installed in /usr/local via Homebrew.. My paths are set so that if you type either clang -v or gcc -v at the command line, they both show the proper updated versions.. MAME detects and starts to build with GCC 5.3 just fine until I hit the errors I listed previously.. If I it to Clang, it detects Clang, starts converting the first bunch of files, and then immediately stops and tells me it needs GCC 4.9 or above. No clue where to go from here, Clang was built specifically with GCC 5.3 so it should know where it is, it just wont go past that (it doesnt even get the MAME makefiles made before it stops)..

Now the weird part, if I use 'make -j5 OVERRIDE_CC=/path/to/clang OVERRIDE_CXX=/path/to/clang++ TOOLS=1 REGENIE=1' leaving out the 'macosx_x64' at the end it starts to build, but then runs into a bunch of errors with missing files. But if I tack on the architecture type like I normally do, I dont even get to the point where it builds the makefiles, it just stops and tells me Clang needs GCC 4.9.


I cross-compile my OS X builds on Linux using the 10.7 SDK and clang 3.5.0, but it's difficult without some genie and makefile patching. Prior to the C++14 change, I was able to compile with the 10.6 SDK, but now it requires 10.7 SDK and an additional patch to support 'std::make_unique' (missing on OS X 10.7, and probably 10.8 SDK).

Builds / Source: https://build.zaplabs.com/project/sdlmame/
Patches: https://github.com/Zap-Labs/buildsupport/tree/sdlmame/patches

With these patches (all cross-compile/toolchain related, but not necessarily OS X) I use:

Code:
make TARGETOS=macosx TOOLCHAIN=x86_64-apple-darwin11- TARGET=mame TOOLS=1 SEPARATE_BIN=1 PTR64=1 \
     OPTIMIZE=2 REGENIE=1 USE_SYSTEM_LIB_EXPAT=1 USE_SYSTEM_LIB_ZLIB=1 SDL_LIBVER=sdl2 USE_LIBSDL=1 \
     USE_QTDEBUG=0 CLANG_VERSION=3.5.0 ARCHOPTS="-stdlib=libc++ -std=c++1y"


Native OS X (with my patches) try just setting the ARCHOPTS and CLANG_VERSION with your standard make options. That fixed 99% of the problems I was having.

Last edited by h0tw1r3; 01/07/16 04:14 PM.
Re: MAME 0.169 released! [Re: Stiletto] #103566 01/08/16 05:02 AM
Joined: Jul 2007
Posts: 220
M
Monotremata Offline
Senior Member
Offline
Senior Member
M
Joined: Jul 2007
Posts: 220
What Im running into now is more of an issue with my system/build environment than a MAME issue and probably best taken elsewhere..

I can specify Clang all day long, but Clang itself stops compiling almost immediately and cant find GCC, which it still uses libs from. When you type 'clang -v' it should show you its specified GCC install it uses (along with any others found on the system) and mine doesnt even do this. As it is, somehow I managed to get Clang 3.7.1 to compile perfectly fine yesterday, but trying to do it again isnt happening, even with the same source that worked fine the day before. In order to build the initial one, I had to remove both the compiler-rt and libcxx projects from it, but even thats not working now. Same thing happened with MAME 0.168.. Built it once, for whatever reason I tried to do it again, and it errors out not having changed anything from one build to the next.

Last edited by Monotremata; 01/08/16 05:03 AM.
Re: MAME 0.169 released! [Re: Stiletto] #103612 01/13/16 03:46 AM
Joined: Apr 2007
Posts: 58
K
KO Myung-Hun Offline
Member
Offline
Member
K
Joined: Apr 2007
Posts: 58
Hi/2.

Here is OS/2 patch.

Review, please...

Code:
diff -uNr  3rdparty/jsoncpp/src/lib_json/json_writer.cpp.org 3rdparty/jsoncpp/src/lib_json/json_writer.cpp
--- 3rdparty/jsoncpp/src/lib_json/json_writer.cpp.org	2015-12-30 11:29:52.000000000 +0900
+++ 3rdparty/jsoncpp/src/lib_json/json_writer.cpp	2016-01-11 23:24:34.000000000 +0900
@@ -29,13 +29,13 @@
 
 #if defined(_MSC_VER) && _MSC_VER < 1500 // VC++ 8.0 and below
 #define snprintf _snprintf
-#elif defined(__ANDROID__)
+#elif defined(__ANDROID__) || defined(__OS2__)
 #define snprintf snprintf
 #elif __cplusplus >= 201103L
 #define snprintf std::snprintf
 #endif
 
-#if defined(__BORLANDC__)  
+#if defined(__BORLANDC__)
 #include <float.h>
 #define isfinite _finite
 #define snprintf _snprintf
diff -uNr  scripts/genie.lua.org scripts/genie.lua
--- scripts/genie.lua.org	2015-12-30 11:30:02.000000000 +0900
+++ scripts/genie.lua	2016-01-12 17:58:12.000000000 +0900
@@ -731,10 +731,17 @@
 		"-std=c++1y",
 	}
 else
-	buildoptions_cpp {
-		"-x c++",
-		"-std=c++14",
-	}
+	if _OPTIONS["targetos"]=="os2" then
+		buildoptions_cpp {
+			"-x c++",
+			"-std=gnu++14",
+		}
+	else
+		buildoptions_cpp {
+			"-x c++",
+			"-std=c++14",
+		}
+	end
 
 	buildoptions_objc {
 		"-x objective-c++",

Re: MAME 0.169 released! [Re: h0tw1r3] #103666 01/15/16 07:45 PM
Joined: Jul 2007
Posts: 220
M
Monotremata Offline
Senior Member
Offline
Senior Member
M
Joined: Jul 2007
Posts: 220
Originally Posted By h0tw1r3

Native OS X (with my patches) try just setting the ARCHOPTS and CLANG_VERSION with your standard make options. That fixed 99% of the problems I was having.



Interestingly... If I use CLANG_VERSION instead of OVERRIDE_CC/OVERRIDE_CXX to specify Clang, it looks like Clang finally 'found' GCC 5.3 and starts building, however ultimately I run back into the same error's I mentioned on the first page of this thread, which was apparently a GCC issue with the syntax so Im stuck at the same place I was earlier. When I tried to use ARCHOPTS, it told me it didnt recognize the options you listed. I still havent tried any of your patches yet because Im not too familiar with Github and wasnt sure how to actually use them. Do I just copy/paste the text from each one and make a .diff file and apply it like I would to any other source code?

On a good note, I grabbed your build of it in the meantime and its working just fine. Maybe I shouldve left Ubuntu installed on here and at least I could probably cross compile it on there.

Page 2 of 2 1 2

Moderated by  R. Belmont 

Who's Online Now
3 registered members (R. Belmont, Dorando, 1 invisible), 151 guests, and 3 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,684
Posts114,031
Members4,863
Most Online510
Aug 26th, 2019
Powered by UBB.threads™ PHP Forum Software 7.7.3