-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mavericks (OSX 10.9) build fixes #54
Comments
Thanks for update, I'm still on 10.8.6 here. I'll add this (or if you have changes already you can just send pull request). I don't use Xcode at all. I use only gmake on OSX/iOS/Android/etc. Did you try to build thru command line?
Anyhow bgfx project files are there just as an example, I assume if anyone is using bgfx that they will just switch to their build system anyway. For example, building it with CMake: At some point I'll probably provide compiled libs for all targets, but currently I don't have automated way to do it. |
I saw you pushed the latest from Kronos - I stashed my changes and tried again. glext.h is good now :) Gor bx, I had to delete unordered_map entirely to get it out of the search path, as well as removing the include of malloc.h. I've shifted to a command line build strategy as you suggest, with the bx mods, the library builds fine. Trying to get the samples building now, for some reason it's hung up on not finding the SDL2 headers (which I've currently got in /Library/Frameworks.) I'm sure it'll be easy enough to resolve at my end. Maybe the premake script could generate the unordered_map header on pre 10.9 installations? |
Solved SDL2 with I think maybe you were assuming that SDL2 would be installed by people into /usr/local instead of as a framework? A few notes in the readme might be helpful. After a command line build, the examples are working (i.e., they run properly) up to the stencil shadow sample, which doesn't build because for an obvious reason - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cmath:1242:46: fatal error: declaration conflicts Getting close! |
Yeah I was wondering about that. Since it would include itself. Btw, can you try deleting whole bx/include/compat/osx. Based on your changes it might work that way, and then I'll figure out how to remove include path from 10.9 in Premake script instead. |
I've been wanting to disable SDL2 build for OSX anyway. Someone requested SDL2 integration and I left it enabled mostly for testing reasons. Setting ENTRY_CONFIG_USE_SDL to 0 build with native entry path. |
What's using cmath? |
Btw, SDL2 path is just what SDL2 uses when building from source. I just did make && make install. How did you obtain SDL2? Is it part of Xcode/SDK now? |
Fixed this fmin/fmax name collision (a4df646). It seems defined everywhere except MSVC. Not sure why this never caused any issues?! |
All of the demos I tried look good, except the SDF font demo is quite glitched around the edges of some letters. |
Probably would be the best to create screenshot and open new issue specifically for it. |
Ok, I don't have solution yet how to make it work with 10.8.4 and 10.9 but good to know. |
LOL, okay, I'll learn how to add screenshots to issue reports. |
Here are a couple of patches to get past initial Mavericks compatibility problems. This allows the build to get to the end of the initial make steps. There's still a bunch of compile time issues after that.
Unfortunately premake4.4b4 doesn't generate clean Xcode projects (it generates 32 bit targets when 64 is specified, and the include paths are not set up correctly). AFAIK those problems need to be resolved within premake itself. Given the current state of premake development, I wonder if it is worth simply creating some clean Xcode projects manually and storing them in the bgfx repo? (That's what I ended up doing with my own projects which were initially premake based).
Here's a correction for glext.h
ifndef GL_ARB_shader_objects
/* GL types for program/shader text and shader object handles */
typedef char GLcharARB;
if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1090)
typedef void* GLhandleARB;
else
typedef unsigned int GLhandleARB;
endif
endif
A fix to bx's unordered_map shim.
if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1090)
include <unordered_map>
else
include <tr1/unordered_map>
endif
bx's allocator.h
if BX_CONFIG_ALLOCATOR_CRT
if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1090)
else
include <malloc.h>
endif
The text was updated successfully, but these errors were encountered: