Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Contributor
Posts: 2
Registered: ‎07-09-2012
My Device: PlayBook 2.0
My Carrier: Rogers

Google protocol buffers build error with "Can't specify -P, -C, -E, -c or -S with -o and have multiple files"

Hello,

I'm trying to build Google protocol buffers with native SDK, but run into a problem at linking stage.

 

My environment:

* bndk-2.1.0-beta1

* Mac OSX 10.6.8

* protobuf-2.4.1 (http://code.google.com/p/protobuf/)

 

Steps to reproduce:

1. Extract and cd into protobuf-2.4.1

2. source /Developer/SDKs/bbndk-2.1.0-beta1/bbndk-env.sh

3. 

    

export RANLIB="${QNX_HOST}/usr/bin/ntoarmv7-ranlib"
export CXX="${QNX_HOST}/usr/bin/qcc -V4.4.2,gcc_ntoarmv7le_cpp -E"
export CC="${QNX_HOST}/usr/bin/qcc -V4.4.2,gcc_ntoarmv7le_cpp"
export LD="${QNX_HOST}/usr/bin/ntoarmv7-ld"
export CXXFLAGS="-D__PLAYBOOK__ -D__QNXNTO__"
export CFLAGS=" -g "
export LDFLAGS="-L${QNX_TARGET}/armle-v7/lib -L${QNX_TARGET}/armle-v7/usr/lib"
export LD_RUN_PATH="${QNX_TARGET}/armle-v7/lib:${QNX_TARGET}/armle-v7/usr/lib"

 

4. ./configure --build=i386-apple-darwin10.8.0 --host=arm-unknown-nto-qnx6.5.0eabi --with-protoc=/usr/local/bin/protoc

 

Note that protoc builds ok when I use i386-apple-darwin10.8.0 in both --build and --host. It was installed into /usr/local/bin

 

5. make

 

make all-recursive
make[1]: Entering directory `/Users/sergey/Documents/Dev/tools/protobuf-2.4.1'
Making all in .
make[2]: Entering directory `/Users/sergey/Documents/Dev/tools/protobuf-2.4.1'
make[2]: Leaving directory `/Users/sergey/Documents/Dev/tools/protobuf-2.4.1'
Making all in src
make[2]: Entering directory `/Users/sergey/Documents/Dev/tools/protobuf-2.4.1/src'
make all-am
make[3]: Entering directory `/Users/sergey/Documents/Dev/tools/protobuf-2.4.1/src'
/bin/sh ../libtool --tag=CXX --mode=link /Developer/SDKs/bbndk-2.1.0-beta1/host/macosx/x86/usr/bin/qcc -V4.4.2,gcc_ntoarmv7le_cpp -E -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -D__PLAYBOOK__ -D__QNXNTO__ -L/Developer/SDKs/bbndk-2.1.0-beta1/target/qnx6/armle-v7/lib -L/Developer/SDKs/bbndk-2.1.0-beta1/target/qnx6/armle-v7/usr/lib -o protoc main.o libprotobuf.la libprotoc.la
libtool: link: LD_RUN_PATH="/usr/local/lib:/Developer/SDKs/bbndk-2.1.0-beta1/target/qnx6/armle-v7/lib:/Developer/SDKs/bbndk-2.1.0-beta1/target/qnx6/armle-v7/usr/lib" /Developer/SDKs/bbndk-2.1.0-beta1/host/macosx/x86/usr/bin/qcc -V4.4.2,gcc_ntoarmv7le_cpp -E -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -D__PLAYBOOK__ -D__QNXNTO__ -o .libs/protoc main.o -L/Developer/SDKs/bbndk-2.1.0-beta1/target/qnx6/armle-v7/lib -L/Developer/SDKs/bbndk-2.1.0-beta1/target/qnx6/armle-v7/usr/lib ./.libs/libprotobuf.so ./.libs/libprotoc.so /Users/skapustin/Documents/Dev/tools/protobuf-2.4.1/src/.libs/libprotobuf.so
cc: Can't specify -P, -C, -E, -c or -S with -o and have multiple files
make[3]: *** [protoc] Error 1
make[3]: Leaving directory `/Users/sergey/Documents/Dev/tools/protobuf-2.4.1/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/Users/sergey/Documents/Dev/tools/protobuf-2.4.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/Users/sergey/Documents/Dev/tools/protobuf-2.4.1'
make: *** [all] Error 2

 

Any idea what may be the problem?

 

Highlighted
New Contributor
Posts: 2
Registered: ‎07-09-2012
My Device: PlayBook 2.0
My Carrier: Rogers

Re: Google protocol buffers build error with "Can't specify -P, -C, -E, -c or -S with -o and have multiple files"

To follow up.

 

Since I couldn't make the build with autotools to work, I created a project in Momentics for protobuf-lite static library from scratch. After a bit of fiddling, PB can now send protobuf-encoded messages.

 

Had to make some changes in config to use boost unorderd_set/map instead of tr1.