The official "ZDoom on Mac OS X" thread.

Discuss anything ZDoom-related that doesn't fall into one of the other categories.

Re: The unofficial "ZDoom on Mac OS X" thread.

Postby Rachael » Tue Jun 09, 2009 2:45 pm

Ok, I am sorry to bump such an old thread, but I am hoping someone can help me with this.

When compiling r1661, I am bumping into this error:
Code: Select allExpand view
[ 44%] Building CXX object src/CMakeFiles/zdoom.dir/m_alloc.o
/Users/xero5/zdoom/trunk/src/m_alloc.cpp:39:20: error: malloc.h: No such file or directory
/Users/xero5/zdoom/trunk/src/m_alloc.cpp: In function ‘void* M_Malloc(size_t)’:
/Users/xero5/zdoom/trunk/src/m_alloc.cpp:61: error: ‘malloc_usable_size’ was not declared in this scope
/Users/xero5/zdoom/trunk/src/m_alloc.cpp: In function ‘void* M_Realloc(void*, size_t)’:
/Users/xero5/zdoom/trunk/src/m_alloc.cpp:69: error: ‘malloc_usable_size’ was not declared in this scope
/Users/xero5/zdoom/trunk/src/m_alloc.cpp:76: error: ‘malloc_usable_size’ was not declared in this scope
/Users/xero5/zdoom/trunk/src/m_alloc.cpp: In function ‘void M_Free(void*)’:
/Users/xero5/zdoom/trunk/src/m_alloc.cpp:115: error: ‘malloc_usable_size’ was not declared in this scope
make[2]: *** [src/CMakeFiles/zdoom.dir/m_alloc.o] Error 1
make[1]: *** [src/CMakeFiles/zdoom.dir/all] Error 2
make: *** [all] Error 2
xero5s-macbook:release xero5$


I've tried some of the more intuitive fixes, even switching it to the FreeBSD #ifdef, but to no success.

I am trying to create a patch to make ZDoom cross-platform friendly to not just Macs, but all platforms, "out-of-the-box."
User avatar
Rachael
^ walking stack of unfinished projects ^
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: The unofficial "ZDoom on Mac OS X" thread.

Postby lamacq » Thu Jun 11, 2009 8:06 am

Thanks so much for this ZDoom Mac port, guys -- It works great, I just have one problem though. I have never used the standard WASD control setup; instead I have always used mouse2 for forward and left-alt for back. So my left thumb is "back". I think this works for me because it's kind of like driving a car, where your right foot is the accelerator and left foot is the brake.

Anyway, I can't do this on the Mac it seems because what was left-alt on a PC is the left command key, and ZDoom doesn't seem to recognize when just the left command key is pressed (this may be an OS-level thing, where the keypress isn't sent to the application until the entire command key chord is pressed, I don't know). Unfortunately I think my control setup is just far too hardwired into my brain to be able to switch to WASD at this point. Does anybody have an idea how I can get ZDoom on Mac to recognize the left command key? Interestingly, it does actually recognize the right command key as "alt", it just doesn't work for the left command key.
lamacq
 

Re: The unofficial "ZDoom on Mac OS X" thread.

Postby randi » Thu Jun 11, 2009 10:27 am

I have an idea: Use the toolkits Mac OS X provides for getting input instead of SDL. There's a reason I don't use SDL on Windows, and I think it's probably just as valid on the Mac.
User avatar
randi
Site Admin
 
Joined: 09 Jul 2003

Re: The unofficial "ZDoom on Mac OS X" thread.

Postby Rachael » Fri Jun 12, 2009 6:16 am

I'm still kinda a newbie at programming so I would need help in figuring that out, randee. :(
User avatar
Rachael
^ walking stack of unfinished projects ^
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: The unofficial "ZDoom on Mac OS X" thread.

Postby Gez » Fri Jun 12, 2009 6:34 am

SoulPriestess wrote:Ok, I am sorry to bump such an old thread, but I am hoping someone can help me with this.

When compiling r1661, I am bumping into this error:
Code: Select allExpand view
[ 44%] Building CXX object src/CMakeFiles/zdoom.dir/m_alloc.o
/Users/xero5/zdoom/trunk/src/m_alloc.cpp:39:20: error: malloc.h: No such file or directory

When typing "malloc.h" in google, its AJAX autocompletion feature brings "malloc.h mac os x" and "malloc.h no such file or directory" as the top two searches. Got any luck with them?

One of the results said to use this:
Code: Select allExpand view
#ifdef MACOSX
#include "sys/malloc.h" // mac os x
#else
#include "malloc.h" // linux, windows
#endif

Is that what you tried?
Gez
 
 
 
Joined: 06 Jul 2007

Re: The unofficial "ZDoom on Mac OS X" thread.

Postby Rachael » Fri Jun 12, 2009 8:34 pm

Haven't tried that, yet. Will try it now.


EDIT:
#ifdef __APPLE__ worked.

However, it still does not recognize malloc_usable_size(), and that is causing issues. I'm trying some hacky workarounds but haven't found one that works yet.

It would appear that the function is missing entirely from the Mac API - and possibly with a bit of reason. But I don't know of any good substitute without it - otherwise I'd just write the function in.
User avatar
Rachael
^ walking stack of unfinished projects ^
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: The unofficial "ZDoom on Mac OS X" thread.

Postby skadoomer » Thu Jun 25, 2009 6:20 am

Bump

Hows this coming along?
skadoomer
 
Joined: 05 Sep 2003

Re: The unofficial "ZDoom on Mac OS X" thread.

Postby Rachael » Fri Jun 26, 2009 2:28 pm

Not coming along at all. I have little or no help from anyone knowledgable with Unix and how to make things compile, so really, this project is almost moot. Google isn't being real helpful, either.
User avatar
Rachael
^ walking stack of unfinished projects ^
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: The unofficial "ZDoom on Mac OS X" thread.

Postby Ardekantur » Wed Jul 29, 2009 8:22 am

Hello all -

My name is Ardekantur and I just spend the better part of an evening trying to get ZDoom working on my Intel Mac, using Leopard and gcc 4.2 (I've upgraded to 4.4 using Macports in an attempt to fix an error, but 4.2 is the minimum, I think, to get this working at all). I wasn't successful, but I did make a little progress.

I should warn that I am not an expert in anything I was doing and was more often than not choosing the quickest solution to make things work. None of this should be submitted as patches until someone more competent than I look over these things. Additionally, this was all done against r1739.

The build error I received with regards to crashcatcher.c:387 was fixed by using Darwin's conventions for certain flags. To wit:

Code: Select allExpand view
...
#elif defined(__APPLE__)
   sa.sa_flags = SA_RESETHAND | SA_NODEFER | SA_SIGINFO;
...


The build error I received with regards to files.h:262 (error: ‘CLzmaDec’ does not name a type) was fixed by altering the include declaration for LzmaDec.h. Specifically, pointing it explicitly to "../lzma/C/LzmaDec.h" allowed the error to go away.

Code: Select allExpand view
 #include "../lzma/C/LzmaDec.h"


The error in i_system.cpp (src/sdl/i_system.cpp:537: error: invalid conversion from ‘int (*)(const dirent*)’ to ‘int (*)(dirent*)’) was mentioned elsewhere on the boards, I think in a bug report.

Finally, the error you guys have been getting with regards to malloc_usable_size() is due to the fact that Unix doesn't use the de facto Linux standard malloc library, written by Doug Lea.

I revised the relevant preprocessor directives in m_alloc.cpp to look like the following:

Code: Select allExpand view
 #ifdef __FreeBSD__
 #include <stdlib.h>
 #include <malloc_np.h>
 #elif __APPLE__
 #include <stdlib.h>
 #include "dlmalloc.h"
 #else
 #include <malloc.h>
 #endif
 #include "i_system.h"
 #include "dobject.h"


And included "dlmalloc.h", which is the file "dlmalloc.c" renamed, in the /src directory. "dlmalloc.c" can be found by googling, and will have the MD5 sum 39ba26754209092e0d45172ef918f4e1.

After that, I commented out the majority of the code used to determine CPUID, since I don't trust myself to alter assembly.

From there I was able to compile successfully until the a_armor.o target, when the compiler/linker totally borked and gave me the following error.

Code: Select allExpand view
[ 40%] Building CXX object src/CMakeFiles/zdoom.dir/g_shared/a_armor.o
/var/folders/jz/jzdbZxG4E-yVWBJvuS8CYE+++TI/-Tmp-//ccSreTER.s:507:non-relocatable subtraction expression, "LC6" minus "L00000000008$pb"
/var/folders/jz/jzdbZxG4E-yVWBJvuS8CYE+++TI/-Tmp-//ccSreTER.s:507:symbol: "L00000000008$pb" can't be undefined in a subtraction expression
/var/folders/jz/jzdbZxG4E-yVWBJvuS8CYE+++TI/-Tmp-//ccSreTER.s:unknown:Undefined local symbol L00000000008$pb
make[2]: *** [src/CMakeFiles/zdoom.dir/g_shared/a_armor.o] Error 1
make[1]: *** [src/CMakeFiles/zdoom.dir/all] Error 2


I hope this was useful, and I hope this allows the community to make a little more progress :-)
User avatar
Ardekantur
 
Joined: 29 Jul 2009

Re: The unofficial "ZDoom on Mac OS X" thread.

Postby jonw1987 » Tue Aug 04, 2009 1:52 am

I'm having trouble running ZDoom OS X. When I run it it gives me the following message:

"ZDoom OS X could not find any IWADs (doom.wad, doom2.wad, etc.). Make sure you have them in this folder before trying to launch ZDoom:
[Home Folder]/Library/Application Support/zdoom"

The problem with that is when I installed the application on my Mac, it didn't create that folder in Application Support. So I created a folder with that title. Still the same message pops up, and the folder is full of IWADs, including DOOM2.WAD. What's going on?
jonw1987
 

Re: The unofficial "ZDoom on Mac OS X" thread.

Postby Gez » Tue Sep 01, 2009 2:43 am

Gez
 
 
 
Joined: 06 Jul 2007

Re: The unofficial "ZDoom on Mac OS X" thread.

Postby macman134 » Tue Sep 01, 2009 3:47 pm

i am obviously a mac lover (you can tell by my username) and would love to test this. i havean old g4 ppc with 2 gigs of ram running 10.5.7, it's pretty old, but it still kicks but. and prboom sucks bigtime on controls/environment/bugs.
User avatar
macman134
 
Joined: 01 Sep 2009

Re: The unofficial "ZDoom on Mac OS X" thread.

Postby wildweasel » Tue Sep 01, 2009 5:07 pm

macman134 wrote:i am obviously a mac lover (you can tell by my username) and would love to test this. i havean old g4 ppc with 2 gigs of ram running 10.5.7, it's pretty old, but it still kicks but. and prboom sucks bigtime on controls/environment/bugs.

Unfortunately, you may be out of luck; as far as I've seen, ZDoom for OS X is Intel-only.
User avatar
wildweasel
from a different perspective.
Moderator Team Lead
 
Joined: 15 Jul 2003

Re: The unofficial "ZDoom on Mac OS X" thread.

Postby Blzut3 » Tue Sep 01, 2009 5:12 pm

I have to wonder what all of this stuff is about then:
Code: Select allExpand view
if( CMAKE_SYSTEM_PROCESSOR MATCHES powerpc )
    if( NOT NO_ASM )
        message( STATUS "Disabling assembly code for PowerPC." )
        set( NO_ASM ON )
    endif( NOT NO_ASM )
endif( CMAKE_SYSTEM_PROCESSOR MATCHES powerpc )

and
http://zdoom.org/svndiff/1780/zdoom/tru ... m_swap.h#0

Not sure if fmodex is powerpc compatible, but I'm not sure why it wouldn't be.
Blzut3
Pronounced: B-l-zut
 
 
 
Joined: 24 Nov 2004
Github ID: Blzut3
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit
Graphics Processor: ATI/AMD with Vulkan Support

Re: The unofficial "ZDoom on Mac OS X" thread.

Postby randi » Tue Sep 01, 2009 6:49 pm

I'm disappointed in CMake. It can make Xcode projects, but they don't work out of the box (for ZDoom). At least the Unix makefiles still work fine.
User avatar
randi
Site Admin
 
Joined: 09 Jul 2003

PreviousNext

Return to General

Who is online

Users browsing this forum: No registered users and 2 guests