"Skipping incompatibles" on a Blue Gene machine

I am trying to create Google Protocolbuffers and Kyotocabinet on the Blue Gene supercomputer, which is a PowerPC64 based machine running Suse Linux, gcc 4.1.2.

When I compile my code, both the Google Protocolbuffers and Kyotocabinet gave a "skipping incompatible" error. Compile the 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 their installation using ./configure --host=powerpc-bgp-linux , the Google Protocolbuffers works this time, but Kyotocabinet still gives this error, as shown 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 have something 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, he knows how to find the right material to use. But Kyotocabinet does not have such settings in config.status. Hope this tip helps.

Is there any solution so I can use Kyotocabinet on BlueGene? Or can I add some lines as mentioned above to tell Kyotocabinet where to find the correct lib? Or could you recommend some quick keystores?

+4
source share
1 answer

Your problem is not finding Kyotocabinet. Your problem is that the library you are pointing to: /some_path/lib/libkyotocabinet.so is built for an incompatible architecture ( ppc32 most attached).

Make file -L /some_path/lib/libkyotocabinet.so and see what it says. You must rebuild it for the same architecture as gcc by default.

Update: file says ELF 64-bit MSB shared object, 64-bit PowerPC . But does this match your g++ by default? What is the result:

 echo "int foo() { return 0; }" | g++ -xc++ - -c -o foo.o && file foo.o 

I set above, I will print 32-bit PowerPC , in which case you need to add -m64 to your command line.

Update 2:

Any idea for this problem?

You should not be so helpless. You understand that the problem is with the wrong libraries, so go ahead and fix it.

  • Decide if you want the last binary to run in 32-bit or 64-bit mode.
  • Get or rebuild all the libraries you need in the desired bit.
  • Build the final binary
  • Profit!
+2
source

All Articles