Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
#109942 - 06/20/17 07:22 AM sdlmame build fail on mac g5 ppc  
Joined: Jun 2017
Posts: 9
dan81 Offline
Member
dan81  Offline
Member

Joined: Jun 2017
Posts: 9
hi!
i'd like to compile sdlmame for my old g5 ( osx 10.5 ) but make fails frown

pre required problem :
- i use last sdl2 for ppc : https://www.libsdl.org/release/SDL2-2.0.2.dmg

- i' have problem to obtane libcxx dependence from mac prot

- and the last glan for ppc il glang3.4 ( glang3.7 is required frown http://docs.mamedev.org/initialsetup/compilingmame.html )

i use this command line:

make TARGETOS=macosx BIGENDIAN=1 OVERRIDE_CC=/opt/local/bin/clang-mp-3.4 OVERRIDE_CXX=/opt/local/bin/clang++-mp-3.4 PYTHON_EXECUTABLE=/opt/local/bin/python2.7 ARCHOPTS=-stdlib=libc++

but i have this error:
Converting src/mame/drivers/ymmu100.ppm...
cc1plus: error: unrecognized command line option "-std=c++11"
make[1]: *** [m68kmake.o] Error 1
make: *** [src/devices/cpu/m68000/m68kops.cpp] Error 2

probably clang3.4 is not c++11 compliant?

i have try to compile clang3.7 but i obtain this error:
Specify --help for usage, or press the help button on the CMake GUI.
g5:build daniele$ cmake -G "Unix Makefiles" ../llvm
-- No build type selected, default to Debug
CMake Error at cmake/modules/CheckAtomic.cmake:36 (message):
Host compiler appears to require libatomic, but cannot find it.
Call Stack (most recent call first):
cmake/config-ix.cmake:291 (include)
CMakeLists.txt:360 (include)

but i have installed libatomic_ops @7.4.4 (devel) from port but cmake glang fails frown

who can help me to compile mame on my g5?
there is any command line option for ppc architteture?

thanks
Daniele



Last edited by dan81; 06/20/17 08:16 AM. Reason: link sdl2
#109945 - 06/20/17 08:04 AM Re: sdlmame build fail on mac g5 ppc [Re: dan81]  
Joined: Feb 2004
Posts: 1,873
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,873
Sydney, Australia
You probably can't compile it on your G5 if you can't get sufficiently recent clang working.

#109946 - 06/20/17 09:19 AM Re: sdlmame build fail on mac g5 ppc [Re: dan81]  
Joined: Jun 2017
Posts: 9
dan81 Offline
Member
dan81  Offline
Member

Joined: Jun 2017
Posts: 9
probably could be better complete last sdlmame compatible with ppc architecture ... for the moment.
someone know the last sdlmame build compatible with ppc?

#109947 - 06/20/17 10:55 AM Re: sdlmame build fail on mac g5 ppc [Re: dan81]  
Joined: Apr 2006
Posts: 685
Tafoid Offline
Senior Member
Tafoid  Offline
Senior Member

Joined: Apr 2006
Posts: 685
USA
As linked from MAMEDEV.ORG this seems to be the latest available binaries for PPC Mac:OSX: https://www.mediafire.com/folder/07r0cvcq1i39g/OSX_PPC_10.5_%28SDL2%29




#109948 - 06/20/17 12:09 PM Re: sdlmame build fail on mac g5 ppc [Re: Tafoid]  
Joined: Jun 2017
Posts: 9
dan81 Offline
Member
dan81  Offline
Member

Joined: Jun 2017
Posts: 9
i have tested all sdl2 build and last sdl1build , but , on my g5 they don't work frown
rom scan fail or/and frontend/gui doesn't work frown
so i have decide to compile it from source !
on mac intel compile work like a charm !!! you need to write only make , but on g5 it seems impossible

#109957 - 06/21/17 07:26 AM Re: sdlmame build fail on mac g5 ppc [Re: Tafoid]  
Joined: Jun 2017
Posts: 9
dan81 Offline
Member
dan81  Offline
Member

Joined: Jun 2017
Posts: 9
Originally Posted by Tafoid
As linked from MAMEDEV.ORG this seems to be the latest available binaries for PPC Mac:OSX: https://www.mediafire.com/folder/07r0cvcq1i39g/OSX_PPC_10.5_%28SDL2%29


this mame build works!!
i had configured wrong qmc2 ! mame 168 with qmc2 54 works!

probably i can compile only mame 0157 or before frown with the command : make TARGETOS=macosx BIGENDIAN=1

" http://sdlmame.lngn.net/ " how had you compiled your pcc mame? thanks for your work!

#110079 - 06/30/17 08:19 PM Re: sdlmame build fail on mac g5 ppc [Re: dan81]  
Joined: Jan 2007
Posts: 174
MacBox360 Offline
Senior Member
MacBox360  Offline
Senior Member

Joined: Jan 2007
Posts: 174
You can try with GCC 6.3 instead, the build process goes a bit further but again it stops when c++ libraries are invoked. Also an SDL2 library for OSX PPC never officially existed, the best you can have is to build a universal binary (PPC/x86) of 2.0.1 and then using it in your projects. The link you posted above point to a intel-only SDL2 library, useless with PowerMacs. If you search a bit in the place where you have found the 0.168 PPC binary you should found also a working PPC SDL2 library to use in your projects.

Good luck and if you succeed in building a working OSX PPC binary of SDLmame please share it with us :-)

#110108 - 07/03/17 06:59 AM Re: sdlmame build fail on mac g5 ppc [Re: MacBox360]  
Joined: Jun 2017
Posts: 9
dan81 Offline
Member
dan81  Offline
Member

Joined: Jun 2017
Posts: 9
Originally Posted by MacBox360
You can try with GCC 6.3 instead, the build process goes a bit further but again it stops when c++ libraries are invoked. Also an SDL2 library for OSX PPC never officially existed, the best you can have is to build a universal binary (PPC/x86) of 2.0.1 and then using it in your projects. The link you posted above point to a intel-only SDL2 library, useless with PowerMacs. If you search a bit in the place where you have found the 0.168 PPC binary you should found also a working PPC SDL2 library to use in your projects.

Good luck and if you succeed in building a working OSX PPC binary of SDLmame please share it with us :-)


hi here sdl2 for ppc https://www.mediafire.com/?z271aj8pts8wr#07r0cvcq1i39g ( by http://sdlmame.lngn.net/ ) i'll try with gcc 6.3 but i remeber that macport doesn't have ggc 6.3 for ppc . i'll check it asap!

#110200 - 07/06/17 09:49 PM Re: sdlmame build fail on mac g5 ppc [Re: dan81]  
Joined: Jan 2007
Posts: 174
MacBox360 Offline
Senior Member
MacBox360  Offline
Senior Member

Joined: Jan 2007
Posts: 174
If someone is motivated enough to go ahead with OSX PPC port of SDLmame I have found this article in MacPorts that could be useful:

Progress about CXX 11 compatible Clang compiler on 10.5 PPC

The tricky part seem to be the build of universal (x86/ppc32) libcxx libraries that still require an intel Mac but once trasferred they should work fine on PPC machines. I have not tried myself but it seems possible.

#110204 - 07/07/17 09:18 AM Re: sdlmame build fail on mac g5 ppc [Re: MacBox360]  
Joined: Jun 2017
Posts: 9
dan81 Offline
Member
dan81  Offline
Member

Joined: Jun 2017
Posts: 9
Originally Posted by MacBox360
If someone is motivated enough to go ahead with OSX PPC port of SDLmame I have found this article in MacPorts that could be useful:

Progress about CXX 11 compatible Clang compiler on 10.5 PPC

The tricky part seem to be the build of universal (x86/ppc32) libcxx libraries that still require an intel Mac but once trasferred they should work fine on PPC machines. I have not tried myself but it seems possible.


thanks for your link , Hope to try soon on my g5

#110261 - 07/12/17 10:26 AM Re: sdlmame build fail on mac g5 ppc [Re: dan81]  
Joined: Jun 2017
Posts: 9
dan81 Offline
Member
dan81  Offline
Member

Joined: Jun 2017
Posts: 9
i can't find 10.5 Intel system files listed in https://trac.macports.org/ticket/53184

So i have tried to virtualize on virtualbox (intel pc w10 ) leopard. i'd like to build universal (x86/ppc32) app ; but virtual machine doesn't start frown
i have tried to follow this guide http://www.sysprobs.com/install-mac-os-1055-leopard-virtualbox-314-installation-dvd , but i have use the last vbox frown
any idea?

#110825 - 09/23/17 03:23 PM Re: sdlmame build fail on mac g5 ppc [Re: dan81]  
Joined: Jan 2007
Posts: 174
MacBox360 Offline
Senior Member
MacBox360  Offline
Senior Member

Joined: Jan 2007
Posts: 174
With the release of GCC 7.2 for OSX PPC things are going a bit better than before, using this Makefile configuration:
Code
NOWERROR = 1
OVERRIDE_CC = /opt/local/bin/gcc-mp-7
OVERRIDE_CXX = /opt/local/bin/g++-mp-7
PYTHON_EXECUTABLE = python2


The compile of MAME version 0.189 goes to a very good point but stucks on the following three parts:
Code
Compiling 3rdparty/bx/src/crtnone.cpp...
../../../../../3rdparty/bx/src/crtnone.cpp: In function 'void* strcpy(char*, const char*)':
../../../../../3rdparty/bx/src/crtnone.cpp:50:18: warning: declaration of 'void* strcpy(char*, const char*)' conflicts with built-in declaration 'char* strcpy(char*, const char*)' [-Wbuiltin-declaration-mismatch]
 extern "C" void* strcpy(char* _dst, const char* _src)
                  ^~~~~~
../../../../../3rdparty/bx/src/crtnone.cpp: In function 'void* strncpy(char*, const char*, size_t)':
../../../../../3rdparty/bx/src/crtnone.cpp:56:18: warning: declaration of 'void* strncpy(char*, const char*, size_t)' conflicts with built-in declaration 'char* strncpy(char*, const char*, long unsigned int)' [-Wbuiltin-declaration-mismatch]
 extern "C" void* strncpy(char* _dst, const char* _src, size_t _num)
                  ^~~~~~~
../../../../../3rdparty/bx/src/crtnone.cpp: In function 'const char* strchr(const char*, int)':
../../../../../3rdparty/bx/src/crtnone.cpp:68:24: warning: declaration of 'const char* strchr(const char*, int)' conflicts with built-in declaration 'char* strchr(const char*, int)' [-Wbuiltin-declaration-mismatch]
 extern "C" const char* strchr(const char* _str, int _ch)
                        ^~~~~~
../../../../../3rdparty/bx/src/crtnone.cpp: In function 'const char* strstr(const char*, const char*)':
../../../../../3rdparty/bx/src/crtnone.cpp:83:24: warning: declaration of 'const char* strstr(const char*, const char*)' conflicts with built-in declaration 'char* strstr(const char*, const char*)' [-Wbuiltin-declaration-mismatch]
 extern "C" const char* strstr(const char* _str, const char* _find)
                        ^~~~~~
../../../../../3rdparty/bx/src/crtnone.cpp: In function 'int isprint(int)':
../../../../../3rdparty/bx/src/crtnone.cpp:94:16: error: redefinition of 'int isprint(int)'
 extern "C" int isprint(int _ch)
                ^~~~~~~
In file included from /usr/include/_wctype.h:63:0,
                 from /usr/include/wchar.h:114,
                 from ../../../../../3rdparty/bx/include/bx/string.h:11,
                 from ../../../../../3rdparty/bx/include/bx/error.h:9,
                 from ../../../../../3rdparty/bx/include/bx/readerwriter.h:10,
                 from ../../../../../3rdparty/bx/src/crtnone.cpp:8:
/usr/include/ctype.h:272:1: note: 'int isprint(int)' previously defined here
 isprint(int _c)
 ^~~~~~~
../../../../../3rdparty/bx/src/crtnone.cpp: In function 'int toupper(int)':
../../../../../3rdparty/bx/src/crtnone.cpp:99:16: error: redefinition of 'int toupper(int)'
 extern "C" int toupper (int _ch)
                ^~~~~~~
In file included from /usr/include/_wctype.h:63:0,
                 from /usr/include/wchar.h:114,
                 from ../../../../../3rdparty/bx/include/bx/string.h:11,
                 from ../../../../../3rdparty/bx/include/bx/error.h:9,
                 from ../../../../../3rdparty/bx/include/bx/readerwriter.h:10,
                 from ../../../../../3rdparty/bx/src/crtnone.cpp:8:
/usr/include/ctype.h:315:1: note: 'int toupper(int)' previously defined here
 toupper(int _c)
 ^~~~~~~
../../../../../3rdparty/bx/src/crtnone.cpp: In function 'float powf(float)':
../../../../../3rdparty/bx/src/crtnone.cpp:161:18: warning: declaration of 'float powf(float)' conflicts with built-in declaration 'float powf(float, float)' [-Wbuiltin-declaration-mismatch]
 extern "C" float powf(float _x)
                  ^~~~
../../../../../3rdparty/bx/src/crtnone.cpp:167:19: warning: declaration of 'double pow(double)' conflicts with built-in declaration 'double pow(double, double)' [-Wbuiltin-declaration-mismatch]
 extern "C" double pow(double _x)
                   ^~~
make[2]: *** [../../../../osx_clang/obj/x32/Release/3rdparty/bx/src/crtnone.o] Error 1
make[1]: *** [bx] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [macosx_x86] Error 2


Code
Compiling src/osd/modules/font/font_osx.cpp...
In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/DriverServices.h:32:0,
                 from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:125,
                 from /System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20,
                 from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21,
                 from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:20,
                 from ../../../../../src/osd/modules/font/font_osx.cpp:16:
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MachineExceptions.h:115:4: error: 'vector' does not name a type; did you mean '__vector'?
    vector unsigned int         v;
    ^~~~~~
    __vector
make[2]: *** [../../../../osx_clang/obj/x32/Release/osd_sdl/src/osd/modules/font/font_osx.o] Error 1
make[1]: *** [osd_sdl] Error 2
make: *** [macosx_x86] Error 2


Code
Compiling src/osd/modules/lib/osdlib_macosx.cpp...
In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/DriverServices.h:32:0,
                 from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:125,
                 from /System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20,
                 from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21,
                 from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:20,
                 from ../../../../../src/osd/modules/lib/osdlib_macosx.cpp:25:
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MachineExceptions.h:115:4: error: 'vector' does not name a type; did you mean '__vector'?
    vector unsigned int         v;
    ^~~~~~
    __vector
make[2]: *** [../../../../osx_clang/obj/x32/Release/ocore_sdl/src/osd/modules/lib/osdlib_macosx.o] Error 1
make[1]: *** [ocore_sdl] Error 2
make[1]: *** Waiting for unfinished jobs....



Do you have any suggestions on how to fix the errors above?

#111279 - 11/15/17 08:30 PM Re: sdlmame build fail on mac g5 ppc [Re: dan81]  
Joined: Jan 2007
Posts: 174
MacBox360 Offline
Senior Member
MacBox360  Offline
Senior Member

Joined: Jan 2007
Posts: 174
Well, thanks to the help of Mr. Karadzic the "crtnone.cpp" issue is solved" but the other compiler errors are still here (SDLmame version 0.191) so the build stucks on the following parts:

src/osd/modules/lib/osdlib_macosx.cpp
src/osd/modules/font/font_osx.cpp
src/osd/modules/sound/coreaudio_sound.cpp
src/osd/sdl/sdlmain.cpp

all of them exits with the same error list:
Code
In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/DriverServices.h:32:0,
                 from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:125,
                 from /System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20,
                 from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21,
                 from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:20,
[...]

/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MachineExceptions.h:115:4: error: 'vector' does not name a type; did you mean 'vec_or'?
    vector unsigned int         v;
    ^~~~~~
    vec_or



looks like a single fix can rule them all but I don't know how to: anyone can help here? I am using GCC 7.2 on OSX 10.5.8 and SDL 2.0.3
Thanks in advance...

#111520 - 12/06/17 09:23 PM Re: sdlmame build fail on mac g5 ppc [Re: dan81]  
Joined: Jan 2007
Posts: 174
MacBox360 Offline
Senior Member
MacBox360  Offline
Senior Member

Joined: Jan 2007
Posts: 174
Well, the errors above are still there in 0.192 release, the "crtnone" of bx package was simply corrected in the following way:

In the main mame source directory edit the file:

3rdparty/bx/include/bx/platform.h

and force the BX build to use the glib libraries declaring at line 33

#define BX_CRT_GLIBC 1

then edit the other file

3rdparty/bx/src/thread.cpp

and at line 204 replace the

pthread_setname_np(_name)

with

(void)_name

At this point i was stuck again with the error above until I discovered this post in MacPorts forum where an identical error was stopping a port to build on OSX 10.5 PPC:

MacPorts WxWidgets error

so it looks like it is simply a missing argument (-faltivec or -maltivec) to prevent SDLMAME to compile on my beloved PowerMac but where it should be placed? I have done some experiments with Genie but if set as defautl for ppc it breaks the whole compile (using GCC 7.2), I also tried to modify the generated .make files for the above parts only but with no luck, can someone point me in the right direction?

Page 1 of 2 1 2

Moderated by  R. Belmont 

Who's Online Now
0 registered members (), 14 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,453
Posts109,711
Members4,766
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.0
Page Time: 0.041s Queries: 14 (0.011s) Memory: 5.0634 MB (Peak: 5.3162 MB) Zlib enabled. Server Time: 2017-12-13 09:02:45 UTC