waf 找不到现有库
我正在尝试为 node.js 编写 C++ 模块。 Node 使用 waf 作为构建器。
我想检查配置,如果库“sigar”存在。 我正在尝试这样做:
def configure(conf):
conf.check_cxx(lib='sigar')
当我运行“node-waf configure”时,我收到以下消息:
Checking for library sigar : not found
但是 libsigar.so 存在:
# whereis libsigar
libsigar: /lib64/libsigar.so
安装“libsigar”库后我还运行了 ldconfig。 节点模块编译、链接和工作没有错误。 其他库如 libm、libboost_system 等可以在configure 中找到。
有人可以告诉我我做错了什么吗? 除了将 *.so 复制到库路径并运行 ldconfig 之外,安装库还有什么特别要做的吗?
感谢您的任何帮助。
I'm trying to program a C++ module for node.js.
Node is using waf as builder.
I want to check on configure, if the library "sigar" exists.
What I'm trying to do so:
def configure(conf):
conf.check_cxx(lib='sigar')
When I run "node-waf configure", I get the following message:
Checking for library sigar : not found
But libsigar.so exists:
# whereis libsigar
libsigar: /lib64/libsigar.so
I also ran ldconfig after installing the "libsigar" library.
The node module compiles, links and works without errors.
Other libraries like libm, libboost_system and so on can be found on configure.
Can someone tell me what I am doing wrong?
Is there anything special to do for installing a library than only copying a *.so to the library path and running ldconfig?
Thanks for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我自己解决了。
使用 -vvv 选项运行配置非常有帮助,可以获得非常详细的输出。
当我尝试重新编译程序时,出现了一个链接器错误,这确实有帮助:
在检查 libsigar 之前添加链接器标志解决了问题:
Solved it on my own.
Its pretty helpful to run configure with the -vvv option, for very verbose output.
When I tried to recompile the programm, I got a linker error which really helped:
Adding a linker flag before checking for libsigar solved the problem: