“跳过不兼容”在蓝色基因机器上
我正在尝试在 Blue Gene 超级计算机上构建 Google Protocolbuffers 和京都柜,这是一台基于 PowerPC64 的机器,运行 Suse Linux、gcc 4.1.2。
当我编译代码时,Google Protocolbuffers 和京都柜都给出了“跳过不兼容”错误。 编译命令行:
g++ -g -Xlinker -zmuldefs -I/some_path/include $sourceFile -o $fileName -L/some_path/lib -lkyotocabinet -lz -lstdc++ -lrt -lpthread -lm -lc -lprotobuf -lprotoc meta.pb.cc
然后我使用 ./configure 更改了它们的安装--host=powerpc-bgp-linux
,Google Protocolbuffers 这次可以工作,但京都内阁仍然给出如下错误:
/usr/bin/ld: 跳过不兼容的 /some_path/lib/libkyotocabinet.so 当搜索-kyotocabinet
/usr/bin/ld:搜索 -lkyotocabinet 时跳过不兼容的 /some_path/lib/libkyotocabinet.a
/usr/bin/ld: 找不到 -lkyotocabinet
collect2:ld返回1退出状态
我检查了其中的config.status
,Google Protocolbuffers有类似这样的东西
sys_lib_search_path_spec='/usr/lib/gcc/powerpc64-suse- linux/4.1.2 /usr/powerpc64-suse-linux/lib /usr/lib /lib'
显然它知道如何找到合适的东西来使用。但是Kyotocabinet在config.status中没有这种设置。希望这个技巧能有所帮助。
有什么解决方案可以让我在 BlueGene 上使用京都柜吗?或者我可以添加一些像上面提到的那样的行来告诉京都内阁在哪里可以找到正确的库?或者你能推荐一些快速的键值存储吗?
I'm trying to build Google Protocolbuffers and Kyotocabinet on a Blue Gene supercomputer, which is a PowerPC64 based machine, running Suse Linux, gcc 4.1.2.
When I compile my code, both Google Protocolbuffers and Kyotocabinet gave "skipping incompatible" error.
Compile command line:
g++ -g -Xlinker -zmuldefs -I/some_path/include $sourceFile -o $fileName -L/some_path/lib -lkyotocabinet -lz -lstdc++ -lrt -lpthread -lm -lc -lprotobuf -lprotoc meta.pb.cc
Then I changed installation of them, by using ./configure --host=powerpc-bgp-linux
, Google Protocolbuffers works this time, but Kyotocabinet still give that error as below:
/usr/bin/ld: skipping incompatible /some_path/lib/libkyotocabinet.so when searching for -lkyotocabinet
/usr/bin/ld: skipping incompatible /some_path/lib/libkyotocabinet.a when searching for -lkyotocabinet
/usr/bin/ld: cannot find -lkyotocabinet
collect2: ld returned 1 exit status
I checked config.status
of them, Google Protocolbuffers has some thing like this
sys_lib_search_path_spec='/usr/lib/gcc/powerpc64-suse-linux/4.1.2 /usr/powerpc64-suse-linux/lib /usr/lib /lib'
Apparently it know how to find proper stuff to use. But Kyotocabinet doesn't have this kind of settings in config.status. Hope this tip will help.
Is there any solution so I can use Kyotocabinet on BlueGene? Or can I add some lines like mentioned above to tell Kyotocabinet where to find correct lib? Or could you recommend some fast key-value stores?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你的问题不在于找到京都内阁。您的问题是您指向的库:
/some_path/lib/libkyotocabinet.so
是为不兼容的体系结构构建的(最链接的是ppc32
)。执行
file -L /some_path/lib/libkyotocabinet.so
并查看其内容。您必须将其重建为与gcc
默认生成的架构相同的架构。更新:
文件
说ELF 64位MSB共享对象,64位PowerPC
。但这与您的g++
默认输出相符吗?输出是什么:我打赌上面会打印
32-bit PowerPC
,在这种情况下,您需要将-m64
添加到命令行。更新2:
你不应该这么无助。您知道问题是库不匹配,所以去修复它。
Your problem is not in finding Kyotocabinet. Your problem is that the library you are pointing at:
/some_path/lib/libkyotocabinet.so
is built for incompatible architecture (most linkelyppc32
).Do
file -L /some_path/lib/libkyotocabinet.so
and see what it says. You must rebuilt it for the same architecture as whatgcc
produces by default.Update:
file
saysELF 64-bit MSB shared object, 64-bit PowerPC
. But does that match what yourg++
outputs by default? What is the output from:I bet above will print
32-bit PowerPC
, in which case you need to add-m64
to your command line.Update 2:
You should not be so helpless. You understand that the problem is mis-matched libraries, so go and fix it.