couchbase / goforestdb

Go bindings for ForestDB
Apache License 2.0
37 stars 6 forks source link

Cannot build after OSX Yosemite upgrade #14

Open tleyden opened 9 years ago

tleyden commented 9 years ago

I just upgraded to OSX Yosemite (yeah I know, I was waiting for them to fix all the bugs), and now I'm having issues building goforestdb. In order to build, I had to do the following workarounds:

  1. In my .bash_profile, export C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/local/include/. It seems that by default /usr/local/include is no longer in the default header search path. (or is my system messed up somehow?)
  2. In all .go files that had an #cgo LDFLAGS directive, replace with: //#cgo LDFLAGS: -L/usr/local/lib -lforestdb to explicitly add /usr/local/lib into the library search path.

If someone else is able to build fine on OSX Yosemite, then just close this bug and I'll try to figure out how my system is messed up. Any pointers welcome.

Btw, forestdb itself still builds fine.

(I wonder if I just need to reinstall or rebuild go from source?)

mschoch commented 9 years ago

I'm on Yosemite, and it builds fine for me, but my development environment has been broken and manually fixed again to no longer be a good barometer of anything.

Out of curiosity I checked, and I have:

export C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/local/include

in my .bash_profile too. So I likely ran into the same thing. Though I I don't modify any .go files, instead I also have:

export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib

in my .bash_profile. Yay for hacks!

tleyden commented 9 years ago

export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib

OK that explains something, because I tried both LD_LIBRARY_PATH and DYLD_LIBRARY_PATH, and neither worked. I'll switch to using LIBRARY_PATH.

Can the README be updated via a PR, or is this under Gerrit's dark cloud of control?

tleyden commented 9 years ago

is this under Gerrit's dark cloud of control

Actually, nevermind, I just remembered it was under Gerrit. We should update the README with a "how to contribute" section.