tags:

views:

87

answers:

4

I didn't give a lot of info in my last question.

I've built llv8call from http://code.google.com/p/llv8call/, v0.4. I've gotten the known dependencies installed, being libxml-2.0 and libreadline. My dev system is Mac OS X 10.5. llv8call is built with Scons.

When I attempt to run llv8call via ./llv8call, I get this error:

library loading error: org.coderepos.env is not found in : (loadBinary)

I am not sure how to troubleshoot this error. The author hasn't responded to me yet. I need some tips on how to troubleshoot this more than an explicit answer, though if someone has one it's very welcome.

The files are installed to /usr/local/llv8call. There is a directory structure under llv8call/lib/llv8call/org/coderepos but it doesn't contain an "env" directory. My first guess is that whatever library its looking for at org.coderepos.env is supposed to be in this path, but "env" doesn't exist. If this sounds reasonable, it might be a place that I should start looking at but I need confirmation.

+1  A: 

Your intuition seems right. Doing a grep:

grep -r "org.coderepos" *|less

I see it checks for many "libraries" under org.coderepos. Furthermore, in src/main.cc in the preload_builtin_classes function, we see:

Handle<Value> args[1];
args[0] = String::New("org.coderepos.fs");
loadBinary->Call(v8ext, 1, args);
args[0] = String::New("org.coderepos.env");
loadBinary->Call(v8ext, 1, args);

if (try_catch.HasCaught()) {
    String::Utf8Value error(try_catch.Exception());
    fprintf(stderr, "library loading error: %s\n", *error);
    exit(2);
}

That, my friend, is your smoking gun.

Paul
A: 

I would also be interested in solving this problem. I haven't had any luck yet :-\

tlrobinson
A: 

It is looking for a library called env (i.e., libenv.so) in the directory /org/coderepos.

Either make /org/coderepos and copy the libraries into it, or ask your dynamic linker to look for /org/coderepos content elsewhere.

A: 

I fixed this by doing the following from the top-level directory of my llv8call source directory (after running scons to build everything):

mkdir -p out/lib/llv8call/org/coderepos
find ext -name \*.dylib -exec cp {} out/lib/llv8call/org/coderepos \;

"dtruss -f test.sh" was helpful in finding where v8 was looking for the libs.

Ireneo Funes