tomassedovic / tcod-rs

Rust bindings for libtcod 1.6.3 (the Doryen library/roguelike toolkit)
Do What The F*ck You Want To Public License
229 stars 45 forks source link

tcod-rs not building on Mac OS 10.12.6 #248

Closed protoCall7 closed 7 years ago

protoCall7 commented 7 years ago

Attempting to build tcod-rs on Mac OS 10.12.6 fails, as SDL can't be found. I never see the output from line 184 of build.rs, so I'm not sure that the code is properly falling into the darwin branch for configuration.

https://github.com/tomassedovic/tcod-rs/blob/39b5631d2986d4a64186b9dd5d5f52a3fb758e78/tcod_sys/build.rs#L184

pkg-config is installed and detects SDL as expected: $ pkg-config --cflags --libs sdl -D_GNU_SOURCE=1 -D_THREAD_SAFE -I/usr/local/include/SDL -L/usr/local/lib -lSDLmain -lSDL -Wl,-framework,Cocoa

But the build falls apart after zlib is compiled:

https://gist.github.com/protoCall7/d70c9d423b0eb44476d7c0330a2eb439#file-tcod-sys-out-L357-L366

protoCall7 commented 7 years ago

Upon farther inspection, the build actually seems to likely be dying here:

https://github.com/tomassedovic/tcod-rs/blob/39b5631d2986d4a64186b9dd5d5f52a3fb758e78/tcod_sys/build.rs#L157

This may be a misconfiguration of my build system :(

protoCall7 commented 7 years ago

Fixed it by setting CFLAGS="-I/usr/local/include -L/usr/local/lib"