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?
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.