tomassedovic / tcod-rs

Rust bindings for libtcod 1.6.3 (the Doryen library/roguelike toolkit)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tcod-rs not building on Mac OS 10.12.6

protoCall7 opened this issue · comments

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.

println!("cargo:rustc-link-lib=framework=OpenGL");

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

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

build_libtcod_objects(config, libtcod_sources);

This may be a misconfiguration of my build system :(

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