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

OS X Building Error #232

Closed jmc-figueira closed 7 years ago

jmc-figueira commented 7 years ago

I followed the building instructions, and after obtaining an SDL include error, I followed the instructions from Issue #203 to fix it. But now, another error has popped up, and I am not sure what is causing it:

--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "Failed to run `\"pkg-config\" \"--libs\" \"--cflags\" \"sdl\"`: No such file or directory (os error 2)"', ../src/libcore/result.rs:837
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Do you have any idea what might be causing this issue?

tomassedovic commented 7 years ago

Looks like you might not have pkg-config installed.

Try running pkg-config on its own in your terminal. If it isn't there, you should be able to install it with Homebrew:

brew install pkg-config

After that (or if you already have it) try to run this directly:

pkg-config --libs --cflags sdl

It should succeed and print out something like this:

-D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -lSDL -lpthread

(I'm on Linux now so your output will not be exactly the same)

If that fails, can you make sure you have SDL installed?

brew install sdl
jmc-figueira commented 7 years ago

Thank you for the assistance, it was pkg-config that was missing.

tomassedovic commented 7 years ago

Sorry for the complication. I don't own a Mac so I hadn't realised pkg-config isn't installed by default until you hit it. I've created a pull request that adds it to the readme.