And yes I do believe mesos is dependent on a locally installed java.
On Sun, Oct 13, 2013 at 8:42 PM, Ray Rodriguez <rayrod2...@gmail.com> wrote: > libjvm.so is not in the mesos binary but it is located in java installs. > On our slaves it's located > at /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/libjvm.so > > Perhaps you need to install a full jdk on your dev machine? > > Ray > > > On Sun, Oct 13, 2013 at 8:26 PM, Harry Wilkinson <hwilkin...@mdsol.com>wrote: > >> Hi, >> >> I'm toying with Ruby bindings for the C++ interface to Mesos. After much >> fiddling with Ruby's makefile-generating code I've made some progress, but >> I'm seeing this error in the logs when trying to check that I can actually >> link to something in libmesos.so: >> >> "g++ -o conftest >> -I/home/vagrant/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/x86_64-linux >> -I/home/vagrant/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1/ruby/backward >> -I/home/vagrant/.rvm/rubies/ruby-1.9.3-p448/include/ruby-1.9.1 -I. >> -I/usr/local/include/mesos -I/usr/local/include/mesos/include >> -I/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/rice-1.5.2/ruby/lib/include >> -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses >> -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith >> -Wwrite-strings -Wdeclaration-after-statement >> -Wimplicit-function-declaration conftest.c -L. >> -L/home/vagrant/.rvm/rubies/ruby-1.9.3-p448/lib >> -Wl,-R/home/vagrant/.rvm/rubies/ruby-1.9.3-p448/lib >> -L/usr/local/include/mesos/lib -Wl,-R/usr/local/include/mesos/lib -L. >> -rdynamic -Wl,-export-dynamic >> -L/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/rice-1.5.2/ruby/lib/lib >> -lrice '-Wl,-rpath,/../lib' -Wl,-R >> -Wl,/home/vagrant/.rvm/rubies/ruby-1.9.3-p448/lib >> -L/home/vagrant/.rvm/rubies/ruby-1.9.3-p448/lib -lruby -lmesos -lpthread >> -lrt -ldl -lcrypt -lm -lc" >> cc1plus: warning: command line option '-Wdeclaration-after-statement' is >> valid for C/ObjC but not for C++ [enabled by default] >> cc1plus: warning: command line option '-Wimplicit-function-declaration' >> is valid for C/ObjC but not for C++ [enabled by default] >> conftest.c: In function 'int t()': >> conftest.c:6:28: warning: variable 'p' set but not used >> [-Wunused-but-set-variable] >> /usr/bin/ld: warning: libjvm.so, needed by /usr/local/lib/libmesos.so, >> not found (try using -rpath or -rpath-link) >> /usr/local/lib/libmesos.so: undefined reference to >> `JNI_CreateJavaVM@SUNWprivate_1.1' >> collect2: ld returned 1 exit status >> checked program was: >> /* begin */ >> 1: #include "ruby.h" >> 2: >> 3: #include <mesos.hpp> >> 4: >> 5: /*top*/ >> 6: int t() { void ((*volatile p)()); p = (void >> ((*)()))mesos::FrameworkID::default_instance; return 0; } >> 7: int main(int argc, char **argv) >> 8: { >> 9: if (argc > 1000000) { >> 10: printf("%p", &t); >> 11: } >> 12: >> 13: return 0; >> 14: } >> /* end */ >> >> >> These look like the key lines describing the problem: >> >> /usr/bin/ld: warning: libjvm.so, needed by /usr/local/lib/libmesos.so, >> not found (try using -rpath or -rpath-link) >> /usr/local/lib/libmesos.so: undefined reference to >> `JNI_CreateJavaVM@SUNWprivate_1.1' >> >> Does this mean that the Java bindings create a dependency on the JVM libs >> at compile time? If so, presumably this could be refactored so the Java >> bindings depend on core Mesos but not vice-versa... right? Or am I missing >> something here? >> >> Thanks. >> >> Harry >> >> >