mk wrote: > Hi > > Could someone please help me to install protobuf-2.2.0a on Sun Soalris > machine. I tried even to install it to /usr, but I am still getting > these same errors: > > ld: fatal: file .libs/common.o: wrong ELF class: ELFCLASS64 > ld: fatal: File processing errors. No output written to .libs/ > libprotobuf.so.5.0.0 > collect2: ld returned 1 exit status
This looks like a configure-script bug I hit earlier that results in trying to mix 32- and 64-bit objects when linking. To avoid this, you need to explicitly pass -m32 or -m64 in *both* CFLAGS and CXXFLAGS. I configure my solaris builds like this: 32-bit: ./configure --prefix=/usr/local/protobuf/2.2.0 \ --without-zlib \ --disable-64bit-solaris \ CXXFLAGS="-m32 -g -DNDEBUG -fno-exceptions" \ PROTOBUF_OPT_FLAG=-O2 \ CFLAGS=-m32 64-bit: ./configure --prefix=/usr/local/protobuf/2.2.0 \ --without-zlib \ CXXFLAGS="-m64 -g -DNDEBUG -fno-exceptions" \ PROTOBUF_OPT_FLAG=-O2 \ CFLAGS=-m64 -O -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
