Author Topic: Build on Mac OS X 10.7.4  (Read 9099 times)

Offline antigluten

  • Sergeant
  • **
  • Posts: 12
    • View Profile
Build on Mac OS X 10.7.4
« on: March 19, 2013, 02:45:05 am »
Full verbose log errors here: https://pastebin.com/7YDg6KpH

As discussed with a few IRCers, it seems like glext.h is not being referenced properly.

I have installed XCode 4.3.1 and installed its Command Line Tools, and installed 'yaml-cpp', 'sdl', 'sdl_gfx', and 'sdl_mixer' via Homebrew.

I've found glext.h in a few places on OS X...

/System/Library/Frameworks/OpenGL.framework/Headers/glext.h

as well as

/usr/X11/include/glext.h

I've tried referencing these locations explicitly in the makefile but have not had any success.

Thanks in advance for your guidance here - compiling is definitely not my strong suit

Offline antigluten

  • Sergeant
  • **
  • Posts: 12
    • View Profile
Re: Build on Mac OS X 10.7.4
« Reply #1 on: March 19, 2013, 05:48:00 am »
I'm wondering if using GLEW is gonna help me out here... gonna try updating this linking with GLEW libraries and see if this solves the issue....

Offline antigluten

  • Sergeant
  • **
  • Posts: 12
    • View Profile
Re: Build on Mac OS X 10.7.4
« Reply #2 on: March 19, 2013, 07:30:04 am »
apparently GLEW and SDL_OpenGL.h don't mix well. Just fyi

Offline hmaon

  • Sergeant
  • **
  • Posts: 40
  • C jockey
    • View Profile
Re: Build on Mac OS X 10.7.4
« Reply #3 on: March 19, 2013, 09:08:03 am »
apply this: https://bumba.net/~hmaon/oxc/OSX_kludge.patch
compile with make -f Makefile.gcc-pch -j 4 (or however many cores you have)

I'm having it include glext.h before SDL's headers. I don't like it. I'll try to find a better solution later.

Oh, I only tested on OS X 10.8.something so YMMV. Let me know how it goes.

Offline antigluten

  • Sergeant
  • **
  • Posts: 12
    • View Profile
Re: Build on Mac OS X 10.7.4
« Reply #4 on: March 19, 2013, 04:08:09 pm »
ah great - this definitely solves that problem: i was able to remove the #include "glext.h" by adding in #define NO_SDL_GLEXT instead. This also got rid of a warning where the glext version was being redefined.

Now I just need to drop my yaml version down to 0.3 (or less -thanks warboy ;)

Offline antigluten

  • Sergeant
  • **
  • Posts: 12
    • View Profile
Re: Build on Mac OS X 10.7.4
« Reply #5 on: March 19, 2013, 08:16:45 pm »
Alright! Now have successfully built on 10.7.4.

Issues were as follows:

yaml-cpp 0.3.0 (or less)

Used hmaon's patch to accommodate for OSX weirdness. I made a minor edit (as described in my previous post).

Built just fine after these corrections with a few warnings which havent caused any problems yet to the build.


Final methodology for successful compile:

Tada! Thanks to hmaon, warboy, and Grrussel. Hopefully we can exclude the patching in the near future..

Offline grrussel

  • Captain
  • ***
  • Posts: 72
    • View Profile
Re: Build on Mac OS X 10.7.4
« Reply #6 on: May 08, 2013, 10:09:28 pm »
My (slightly different patch) is linked to from https://github.com/SupSuper/OpenXcom/issues/465