Mednafen Members Members   Search Search   Help Help   Register Register   Login Login   Home Home
Home » Mednafen » Development » Compiling Mednafen 0.9.22-WIP fails with PSX enabled on Intel Mac OS X 10.5.8 [SOLVED]
Show: Today's Messages  :: Show Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Compiling Mednafen 0.9.22-WIP fails with PSX enabled on Intel Mac OS X 10.5.8 [SOLVED] [message #2535] Sun, 27 May 2012 21:43 Go to next message
idyll  [PM]
I hope this is the right section of the forum to post this. I don't know if this is a bug or just user error. Smile

Like the topic title says, I'm trying to compile Mednafen 0.9.22-WIP with all emulation cores enabled (including PSX) but I keep getting the same error during "make." My system is an Intel Mac Mini with a Core 2 Duo processor and Mac OS X 10.5.8. I've got Xcode and all needed libraries installed except for jack. I'm quite sure that something in the PSX core is halting the compile because the make log says so. Also, when I use "--disable-psx" with configure, mednafen compiles without error and runs fine afterwards.

The following are the two commands I run:

Quote:

./configure --enable-static --disable-shared --disable-jack


Quote:

make


Configure completes without errors, but make errors out with the following:

Quote:

Making all in psx
depbase=`echo psx.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -ffast-math -mmmx -msse -msse2 -funroll-loops -I../../include -I../../intl -I../.. -I/usr/local/include -I/usr/local/include -fsigned-char -Wall -Winline -Wshadow -g -O2 -fomit-frame-pointer -finline-limit=6000 --param large-function-growth=800 --param inline-unit-growth=175 --param max-inline-insns-single=10000 -fwrapv -MT psx.o -MD -MP -MF $depbase.Tpo -c -o psx.o psx.cpp &&\
mv -f $depbase.Tpo $depbase.Po
../PSFLoader.h:31: warning: ‘class PSFLoader’ has virtual functions but non-virtual destructor
../../mednafen/masmem.h: In instantiation of ‘MultiAccessSizeMem<2097152u, uint32, false, 0u, 0u>’:
psx.cpp:78: instantiated from here
../../mednafen/masmem.h:108: error: creating array with size zero (‘0u’)
../../mednafen/masmem.h: In instantiation of ‘MultiAccessSizeMem<2097152u, uint32, false, 0u, 0u>’:
psx.cpp:78: instantiated from here
../../mednafen/masmem.h:117: error: creating array with size zero (‘0u’)
../../mednafen/masmem.h: In instantiation of ‘MultiAccessSizeMem<1024u, uint32, false, 0u, 0u>’:
psx.cpp:83: instantiated from here
../../mednafen/masmem.h:108: error: creating array with size zero (‘0u’)
../../mednafen/masmem.h: In instantiation of ‘MultiAccessSizeMem<1024u, uint32, false, 0u, 0u>’:
psx.cpp:83: instantiated from here
../../mednafen/masmem.h:117: error: creating array with size zero (‘0u’)
../../mednafen/masmem.h: In instantiation of ‘MultiAccessSizeMem<524288u, uint32, false, 0u, 0u>’:
psx.cpp:303: instantiated from here
../../mednafen/masmem.h:108: error: creating array with size zero (‘0u’)
../../mednafen/masmem.h: In instantiation of ‘MultiAccessSizeMem<524288u, uint32, false, 0u, 0u>’:
psx.cpp:303: instantiated from here
../../mednafen/masmem.h:117: error: creating array with size zero (‘0u’)
../../mednafen/masmem.h: In instantiation of ‘MultiAccessSizeMem<65536u, uint32, false, 0u, 0u>’:
psx.cpp:479: instantiated from here
../../mednafen/masmem.h:108: error: creating array with size zero (‘0u’)
../../mednafen/masmem.h: In instantiation of ‘MultiAccessSizeMem<65536u, uint32, false, 0u, 0u>’:
psx.cpp:479: instantiated from here
../../mednafen/masmem.h:117: error: creating array with size zero (‘0u’)
make[2]: *** [psx.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1



I'm hoping the problem is something simple, like I need to add a switch to configure or change an environment variable. Below are the logs for configure and make. Thank you for any help you can provide.

EDIT: Changed the title to add "[SOLVED]"

[Updated on: Wed, 30 May 2012 18:54]

Re: Compiling Mednafen 0.9.22-WIP fails with PSX enabled on Intel Mac OS X 10.5.8 [message #2536 is a reply to message #2535 ] Mon, 28 May 2012 07:04 Go to previous messageGo to next message
Administrator  [PM]
The version of gcc you seem to be using(4.0.1) is realllly old.

You can try replacing masmem.h with the attached file.

  • Attachment: masmem.h
    (Size: 4.18KB, Downloaded 281 time(s))

Re: Compiling Mednafen 0.9.22-WIP fails with PSX enabled on Intel Mac OS X 10.5.8 [message #2542 is a reply to message #2535 ] Tue, 29 May 2012 13:24 Go to previous messageGo to next message
idyll  [PM]
That worked great! It compiles just fine now. Thank you. For anyone that's curious the modified "masmem.h" file from above changes line 108 from:

Quote:

max_unit_type pre_padding[pre_padding_count];


to:

Quote:

max_unit_type pre_padding[pre_padding_count ? pre_padding_count : 1];


and line 117 from:

Quote:

max_unit_type post_padding[post_padding_count];


to:

Quote:

max_unit_type post_padding[post_padding_count ? post_padding_count : 1];


Unfortunately for people stuck with Mac OS X 10.5.8, gcc 4.0.1 is the last version of the compiler provided by Xcode. This modification should help others trying to build this excellent emulator on their outdated Macs. Thanks for offering a fix when the problem was on my end.

On a side note, it's great to see PSX emulation working so well on my Mac. If this really is the alpha stage of PSX emulation for Mednafen, then I can't wait to see the final version. Smile
Re: Compiling Mednafen 0.9.22-WIP fails with PSX enabled on Intel Mac OS X 10.5.8 [SOLVED] [message #4282 is a reply to message #2535 ] Sun, 03 January 2016 20:20 Go to previous message
Mdfen  [PM]
posted in the wrong section... Sad

[Updated on: Sun, 03 January 2016 20:37]

  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic:Audio crackle, WASAPI
Next Topic:SDL2
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ ]

Current Time: Sat May 18 10:21:07 CDT 2024
.:: Contact :: Home ::.

Powered by FUDforum.
Copyright © FUDforum Bulletin Board Software