Re: [hatari-devel] Build errors on Mac

[ Thread Index | Date Index | More Archives ]


Are you trying to compile Hatari with only the SDL interface? If so, I think I also had a linker error when trying to use any of the cmake flags besides -G Xcode. 

I was trying to compile an SDL-only version when a change caused the OS X interface to stop compiling. I never got an SDL-only version to compile. 

Bob C

On Friday, January 31, 2014, Troed Sångberg <troed@xxxxxxxxxxx> wrote:
Many thanks for the mail Bob, I might need to contact you to verify installation paths if I'm unable to solve it. What has me confused is how cmake is able to find the SDL installation (and everything compiles) but ld is unable to link with it - I'm quite out of ideas at the moment.

(You're correct in what I meant was that last time I compiled Hatari it was without the native OSX interface - but since then I've upgraded to Mavericks among other things and there's surely room for other things to have been broken)

I'll keep working on this and if there's anything to be learned that's not unique to my system I'll communicate what.



On Fri, Jan 31, 2014 at 5:07 AM, Bob Carpenter <bcripon89@xxxxxxxxx> wrote:

I do compile Hatari under OS X. Jerome will be the best person to answer this though. I just downloaded the latest Mercurial version this evening and I only had to add an include path for /usr/local/include to include the IPF header files since I compile Hatari with IPF support. As far as I know, it is not possible to compile Hatari without SDL support even if you use the native OS X interface, SDL is still needed as far as I know. I did not have to do anything to utils.h or utils.c. The cmake build handled almost everything for me. I am running CMake 2.8-8.

I do not compile the PNG library separately. I use the PNG library that is included in XQuartz (community-supported version of X11 when Apple dropped X11 support).

I have only been able to compile an OS X bundle. If I attempt to compile an SDL-only build, it does not work. However, I think that is a problem with my setup.

I did have problems compiling Hatari when I first installed Xcode 5. As usual, Apple changed the rules and I did not have any header files in /usr/include. I had to run a Terminal command of "xcode-select --install" in order to get the header files back where they belonged.

I do not know if this helps you or not. However, since I do compile under OS X, I did want to respond to your question.

Bob C

On Wed, Jan 29, 2014 at 4:44 PM, Troed Sångberg <troed@xxxxxxxxxxx> wrote:
Hi Nicolas,

Right you are :) Interesting cause, took me a while to figure out since Gui-Sdl builds just fine.. It seems another utils.h is picked up during compilation of utils.c instead - renaming the one in src/includes and changing the corresponding include in utils.c works fine - it's what then includes SDL_types.h -> SDL_stdinc.h.

Unfortunately I've then spent hours trying to understand why CMake find_package, or find_library for that matter, has no problem detecting my SDL install yet ld refuses to link it - complaining the framework cannot be found. Any resident Mac compiler feel free to chime in - I believe last time I compiled Hatari it was without SDL support although I'm not sure. I've tried forcing directories to no avail.


On Wed, Jan 29, 2014 at 8:50 PM, Nicolas Pomarède <npomarede@xxxxxxxxxxxx> wrote:
Le 29/01/2014 20:34, Troed Sångberg a écrit :

Hi all,

Just tried updating to the latest Hatari from Mercurial - and ran into
the following:

1 (minor): Even after cmake (or configure) I had to manually add
-I/opt/local/include to CFLAGS for it to find png.h

2 (major): If my memory serves me right (some of) these are
Microsoft-specific types:


maybe these types (Uint32, Uint16, ...) exist under Windows, but in our case they come from SDL, so they should workd under mac too.

See /usr/include/SDL/SDL_stdinc.h for example


Mail converted by MHonArc 2.6.19+