Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

libcouchbase + NodeJS buildpack - libcouchbase/couchbase.h: No such file or directory

63 views
Skip to first unread message

Ali Hamidi

unread,
May 21, 2013, 11:05:15 AM5/21/13
to buildpack-...@googlegroups.com

Hi guys,

I'm trying to put together a custom buildpack with NodeJS and the CouchBase module/libraries

I've gotten as far as using Vulcan to build libcouchbase and libvbucket and getting the buildpack to retrieve and unpack the tgz files for both.

Everything looks ok there, but I receive errors when npm tries to install the couchbase module:

I get a bunch of errors, but the line:
"../src/couchbase_impl.h:52:36: warning: libcouchbase/couchbase.h: No such file or directory" 

leads me to think that it can't find the libcouchbase libraries (which is possible since they aren't in the usual place).

I've tried to add the correct path using CPPFLAGS="-I/app/vendor/couchbase/include/libcouchbase" in both the Config Vars and just exporting that as part of the compile face, but still no luck.

Here is the gist with the Heroku deploy output and the compile/release buildpack files:
https://gist.github.com/ahamidi/5620503

Any help would be greatly appreciated.

Thanks,

Ali

Ali Hamidi

unread,
May 22, 2013, 8:42:09 AM5/22/13
to buildpack-...@googlegroups.com
Hi,

I resolved my issue.


In order to get the couchbase npm module to install I had to tell it where to find the libcouchbase libraries (in compile file):

export EXTRA_CPPFLAGS="-I$BUILD_DIR/vendor/couchbase/include" 
export EXTRA_LDFLAGS="-L$BUILD_DIR/vendor/couchbase/lib -Wl,-rpath,$BUILD_DIR/vendor/couchbase/lib" 


Then in order to require couchbase in my app I had to set the following Env Variable:

LD_LIBRARY_PATH="/app/vendor/couchbase/lib:$LD_LIBRARY_PATH"

With the command:

heroku config:add LD_LIBRARY_PATH="/app/vendor/couchbase/lib:$LD_LIBRARY_PATH"
 

Ali

Reply all
Reply to author
Forward
0 new messages