我正在寻找每个实际需要运行lua脚本所需的库,该脚本需要火炬库。
test.lua
#!/usr/bin/env lua
print "Welcome to LUA"
print('_VERSION = ' .. _VERSION)
require("nn") -- this loads torch nn libraries to be further used in the code
print "Load pass"
输出
Welcome to LUA
_VERSION = Lua 5.1
Load pass
当我用
lld
我遇到了一个问题,一个程序突然不想启动了,没有错误,什么都没有。为了确保代码及其链接库的完整性,我想比较每个(动态)链接库的md5sum。从这个论坛的其他帖子中,我发现很容易列出所有的链接库,很好地展示它们:
ldd myProgram | grep so | sed -e '/^[^\t]/ d' \
| sed -e 's/\t//' | sed -e 's/.*=..//' \
| sed -e 's/ (0.*)//'
如何添加md5sum或sha1sum,使其在文件名旁边添加一个校验和列?简单地添加md5sum只会产生一
我正在试图找到导入外部符号的共享库。目前,我可以通过使用nm或许多替代方案(如使用radare2 )获得所有导入的符号。我还可以通过使用ldd获得二进制所依赖的库。但是,由于找不到有效的方法来获取二进制文件中的哪个外部符号依赖于哪个共享库,我就陷入了困境。因此,例如,如何找到一个共享库,它可以高效地导出名为foo或printf的函数或任何东西?我举一个例子:
Output of nm -D myfile
w __cxa_finalize
U foo
w __gmon_start__
我试图通过make menuconfig配置Linux发行版,但是我得到了这些错误。
make: Warning: File `/usr/src/linux-2.6.32.61/arch/arm/Makefile' has modification time 11511 s in the future
make[1]: Warning: File `scripts/Makefile.host' has modification time 11393 s in the future
HOSTCC scripts/basic/fixdep
/usr/lib/gcc/arm-a
我试图链接到一个swiftkey库,得到了这个错误:
g++ test.cpp -I include/swiftkeysdk/ -L lib/x86/ -lswiftkeysdk-cpp
/usr/bin/ld: warning: libm.so.2, needed by lib/x86//libswiftkeysdk-cpp.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libcpp.so.4, needed by lib/x86//libswiftkeysdk-cpp.so, not found