Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Macos Mac OS X上的LLV8调用-第二次尝试_Macos - Fatal编程技术网

Macos Mac OS X上的LLV8调用-第二次尝试

Macos Mac OS X上的LLV8调用-第二次尝试,macos,Macos,我在最后一个问题中没有给出很多信息 我已经从v0.4构建了LLV8调用。我已经安装了已知的依赖项,即libxml-2.0和libreadline。我的开发系统是MacOSX10.5。llv8call是使用SCON构建的 当我试图通过./llv8call运行llv8call时,我得到以下错误: library loading error: org.coderepos.env is not found in : (loadBinary) 我不确定如何排除此错误。作者还没有回复我。我需要一些关于如何

我在最后一个问题中没有给出很多信息

我已经从v0.4构建了LLV8调用。我已经安装了已知的依赖项,即libxml-2.0和libreadline。我的开发系统是MacOSX10.5。llv8call是使用SCON构建的

当我试图通过./llv8call运行llv8call时,我得到以下错误:

library loading error: org.coderepos.env is not found in : (loadBinary)
我不确定如何排除此错误。作者还没有回复我。我需要一些关于如何解决这个问题的技巧,而不仅仅是一个明确的答案,尽管如果有人有这样的答案,这是非常受欢迎的


这些文件安装到/usr/local/llv8call。llv8call/lib/llv8call/org/coderepos下有一个目录结构,但不包含“env”目录。我的第一个猜测是,它在org.coderepos.env上寻找的任何库都应该在这条路径上,但“env”并不存在。如果这听起来合理,那可能是我应该开始寻找的地方,但我需要确认。

你的直觉似乎是正确的。做grep:

grep -r "org.coderepos" *|less
我看到它检查org.coderepos下的许多“库”。此外,在preload_builtin_classes函数的src/main.cc中,我们可以看到:

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);
}
句柄参数[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);
如果(请尝试\u catch.hascapt()){
字符串::Utf8Value错误(try_catch.Exception());
fprintf(stderr,“库加载错误:%s\n”,*错误);
出口(2);
}

我的朋友,那是你的确凿证据。

它正在/org/coderepos目录中寻找一个名为env(即libenv.so)的库


制作/org/coderepos并将库复制到其中,或者让您的动态链接器在其他地方查找/org/coderepos内容。

我通过在我的llv8call源目录的顶级目录中执行以下操作修复了此问题(在运行SCON构建所有内容之后):


“dtruss-f test.sh”有助于找到v8在哪里查找LIB。

请下次编辑原始问题
mkdir -p out/lib/llv8call/org/coderepos
find ext -name \*.dylib -exec cp {} out/lib/llv8call/org/coderepos \;