kripken / BananaBread

BananaBread is a C++ 3D game engine that runs on the web using JavaScript+WebGL+HTML
1.38k stars 346 forks source link

OSX build fails on zlib.h being missing. #52

Open juj opened 10 years ago

juj commented 10 years ago

Tried to build on OSX with latest emscripten, but the build aborts on a missing include zlib.h:

http://pastebin.com/GhNBsetv

Did OSX builds work at some point - is this a regression? Or I wonder if OSX hasn't been used before to build?

juj commented 10 years ago

Oh, I see we had this change: https://github.com/kripken/emscripten/commit/409051caded1916098fd6411fbfcb7918f9fd2a0 which breaks it.

kripken commented 10 years ago

What are you building there?

If that is a project that uses zlib, it should include the zlib headers. We had them by mistake in our system headers, but we don't have the code there, so we removed the header.

juj commented 10 years ago

I was building BananaBread for Emscripten using these instructions: https://github.com/kripken/BananaBread

kripken commented 10 years ago

Ok, i guess that project needs to import zlib headers then.

nickdesaulniers commented 10 years ago

Was this fixed in https://github.com/kripken/BananaBread/commit/0b96d97de78bdecc15d1c61fad92b8d7b4cc9534 ?

kripken commented 10 years ago

Seems so, at least in that branch.

On Wed, Sep 3, 2014 at 2:11 PM, Nick Desaulniers notifications@github.com wrote:

Was this fixed in 0b96d97 https://github.com/kripken/BananaBread/commit/0b96d97de78bdecc15d1c61fad92b8d7b4cc9534 ?

— Reply to this email directly or view it on GitHub https://github.com/kripken/BananaBread/issues/52#issuecomment-54368048.

nickdesaulniers commented 10 years ago

I've checked out the worker branch, but when I run emmake make, I still get 'zlib.h' file not found. Do I need to add an addition -I flag?

kripken commented 10 years ago

No, we just need to copy zlib.h into here somewhere, I guess. I thought I already had into at least one branch, but maybe no.

nickdesaulniers commented 10 years ago

If I add -I. (from @juj ), compilation fails because zlib.hL34 tries to include zconf.h.

nickdesaulniers commented 10 years ago

If I simply curl zconf.h into the dir, building proceeds. PR inbound.

nickdesaulniers commented 10 years ago

Unfortunately, looks like we can't use crunch on OSX. @juj seems to already have run into this one...

juj commented 10 years ago

You can install crunch via Emscripten SDK on OSX (type ./emsdk install crunch-1.04). I hacked together a build from the patches that were provided in that issue, and packaged the resulting build up to emsdk.

nickdesaulniers commented 10 years ago

@juj , can I install crunch given emscripten's source, instead of having to install the sdk?