Hi everyone,

I got version protobuf-cpp-3.10.0.tar.gz 
and protoc-3.10.0-linux-aarch_64.zip from 
https://github.com/protocolbuffers/protobuf/releases

I tried to cross-compile  protobuf-cpp-3.10.0 on Linux  SMP Debian 
4.9.144-3.1 (2019-02-19) x86_64 GNU/Linux 
The steps I did are

$ ./configure --host=x86-linux --target=aarch64-linux-gnu  
CXX=arm-linux-gnueabihf-g++ --with-protoc=../protoc-3.10.0/bin/protoc
$ make
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
$ sudo ldconfig

It did build the libprotobuf.so.21.0.0 shared lib under  ../ 
protobuf-3.10.0/src/.libs   and installed under /usr/local/lib
It also create protoc under  ../ protobuf-3.10.0/src/.libs


$ file libprotobuf.so.21.0.0
libprotobuf.so.21.0.0: ELF 32-bit LSB shared object, ARM, EABI5 version 1 
(GNU/Linux), dynamically linked,

$ file protoc
protoc: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically 
linked
 
When I tried to use protoc to compile proto file I got the following ERROR

$ protoc BIT.proto
protoc: error while loading shared libraries: libprotobuf.so.21: wrong ELF 
class: ELFCLASS32

I can't use the protoc from protoc-3.10.0-linux-aarch_64.zip as it is ELF 
64bits

What do I missed here? What wrong with ELFCLASS32.  My libprotobuf.so and 
protoc are both ELF 32 bits

Any help are very appreciated.   

Is there any protobuf compiler for ARM 32 bits?  I found only 
protoc-3.10.0-linux-aarch_64.zip

Thanks

-Tom
 
 



-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/aef6e207-0856-473a-b531-3b7a6fe73af3%40googlegroups.com.

Reply via email to