Google Protocol Buffer Reference Collection

My problems with using the Google protocol buffers consist of two parts: one is about compiler options, the other is cross-compilation. Construction Machine Power6, 64bit; host machine - PowerPC450, 32 bit. Gcc 4.1.2.

The first issue concerns compiler options:

I am trying to install Google protocol buffers on a PowerPC machine that requires cross-compilation. Construction Machine Power6, 64bit; host machine - PowerPC450, 32 bit. Firstly, I tried installing directly on the collector, with options, to tell the compiler which would use:

./configure --prefix=/home/where_to_install --host=powerpc-bgp-linux

Then do it, do a check, do the installation, everything is fine. I think I indicated a host machine that should contain enough information that needs to be compiled. When I try to compile my code with

/bgsys/drivers/ppcfloor/gnu-linux/powerpc-bgp-linux/bin/g++ -g -zmuldefs -Xlinker -I/home/somewhere_installed/include $sourceFile -o $fileName -L/home/somewhere_installed/lib -lz -lstdc++ -lrt -lpthread -lm -lc -lprotobuf -lprotoc msg.pb.cc

I was given an error:

g++: unrecognized option '-zmuldefs'
In file included from zht_util.h:20,
                 from hash-phm.cpp:9:
meta.pb.h:9:42: error: google/protobuf/stubs/common.h: No such file or directory

and many errors about variables in common.h were not found.

I know this because the compiler does not recognize the -zmuldefs option, so it cannot find the common.h file that exists. I dealt with him and did not get a clear idea. How can I get the compiler to use this parameter or find a file? Or is this a problem in my compilation team?


-. readme Google , . , --with-protoc = protoc, configure, , , -.

./configure --prefix=/home/where_to_install/built --host=powerpc-bgp-linux

, .

, , -:

./configure --prefix=/home/tonglin/Installed/built_3 CC=/bgsys/drivers/ppcfloor/gnu-linux/bin/powerpc-bgp-linux-gcc CXX=/bgsys/drivers/ppcfloor/gnu-linux/bin/powerpc-bgp-linux-g++ --host=powerpc-bgp-linux --with-protoc=/home/where_already_Installed/built/bin/protoc

:

... blabla.....

collect2: ld returned 1 exit status
make[3]: *** [protoc] Error 1
make[3]: Leaving directory `/gpfs/home/somewere/src/protobuf-2.4.1/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/gpfs/home/somewere/src/protobuf-2.4.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/gpfs/home/tonglin/Installed/src/protobuf-2.4.1'
make: *** [all] Error 2

? ( ), , , . , , ? , Google? .

,

-Tony

+5
2

:

protobuf, -. :

./configure --prefix=/usr
make
make check
make install

.

make distclean

.

( ),

./configure --host=ppc CC=powerpc-none-linux-gnuspe-gcc CXX=powerpc-none-linux-gnuspe-g++ --with-protoc=protoc --prefix=/path/to/built/files

make, make check make install, , , /patch/to/built/files.

+5

protobuf

./configure --prefix=/your_dir
make
make check
make install

include- /your _dir/include make -I,

-I/your_dir/include

.

0

All Articles