Problems building protoc-c on windows/cygwin

588 views
Skip to first unread message

mag...@goteb.org

unread,
Feb 4, 2009, 5:17:03 AM2/4/09
to Protocol Buffers
Hi, I am trying to build the C version of the protocol buffer tools on
windows/cygwin but get problems in the make phase.

To begin with I have built the normal c++ protobuf tools (2.0.3 rc2)
with
./configure --prefix=/usr
make
make check
make install

no problems there

Then I do the same for protobuf-c-0.8
./configure --prefix=/usr
make
here I run inte the problem, it seems like files are missing?

Thanks for any help!
/Magnus


-- 8< --- A clip of the output follows ---
/.../
/bin/sh ../libtool --tag=CXX --mode=link g++ -g -O2 -o protoc-
c.exe c_service.o c_helpers.o c_enum.o c_enum_field.o
c_string_field.o c_primitive_f
ield.o c_extension.o c_file.o c_field.o c_message.o c_generator.o
c_message_field.o main.o c_bytes_field.o -lprotoc
g++ -g -O2 -o protoc-c.exe c_service.o c_helpers.o c_enum.o
c_enum_field.o c_string_field.o c_primitive_field.o c_extension.o
c_file.o c_field.o c_mes
sage.o c_generator.o c_message_field.o main.o c_bytes_field.o /usr/
lib/libprotoc.a /usr/lib/libprotobuf.a
make[2]: Leaving directory `/cygdrive/c/work/Winston/protobuf/protobuf-
c-0.8/src'
Making all in test
make[2]: Entering directory `/cygdrive/c/work/Winston/protobuf/
protobuf-c-0.8/src/test'
mkdir -p generated-code
../protoc-c -I. --c_out=generated-code ./test.proto
mkdir -p generated-code
../protoc-c -I. --c_out=generated-code ./test-full.proto
mkdir -p generated-code
/usr/bin/protoc -I. --cpp_out=generated-code ./test-full.proto
g++ -g -O2 cxx-generate-packed-data.cc -o cxx-generate-packed-
data
/cygdrive/c/DOCUME~1/AAMAIV~1.ASS/LOKALA~1/Temp/ccKzWY8q.o: In
function
`_ZN6google8protobuf16RepeatedPtrFieldIN3foo7SubMessEE5ClearEv':
/usr/include/google/protobuf/repeated_field.h:548: undefined reference
to `google::protobuf::Message::SerializeToString
(std::basic_string<char, std::c
har_traits<char>, std::allocator<char> >*) const'
/cygdrive/c/DOCUME~1/AAMAIV~1.ASS/LOKALA~1/Temp/ccKzWY8q.o: In
function `_Z24dump_test_required_int64v':
/cygdrive/c/work/Winston/protobuf/protobuf-c-0.8/src/test/cxx-generate-
packed-data.cc:143: undefined reference to
`foo::TestMessRequiredInt64::TestMes
sRequiredInt64()'
/cygdrive/c/work/Winston/protobuf/protobuf-c-0.8/src/test/cxx-generate-
packed-data.cc:153: undefined reference to
`foo::TestMessRequiredInt64::~TestMe
ssRequiredInt64()'
/cygdrive/c/work/Winston/protobuf/protobuf-c-0.8/src/test/cxx-generate-
packed-data.cc:153: undefined reference to
`foo::TestMessRequiredInt64::~TestMe
ssRequiredInt64()'
/cygdrive/c/DOCUME~1/AAMAIV~1.ASS/LOKALA~1/Temp/ccKzWY8q.o: In
function `_Z25dump_test_required_sint64v':
/cygdrive/c/work/Winston/protobuf/protobuf-c-0.8/src/test/cxx-generate-
packed-data.cc:158: undefined reference to
`foo::TestMessRequiredSInt64::TestMe
ssRequiredSInt64()'
/cygdrive/c/work/Winston/protobuf/protobuf-c-0.8/src/test/cxx-generate-
packed-data.cc:168: undefined reference to
`foo::TestMessRequiredSInt64::~TestM
essRequiredSInt64()'
/cygdrive/c/work/Winston/protobuf/protobuf-c-0.8/src/test/cxx-generate-
packed-data.cc:168: undefined reference to
`foo::TestMessRequiredSInt64::~TestM
essRequiredSInt64()'
/cygdrive/c/DOCUME~1/AAMAIV~1.ASS/LOKALA~1/Temp/ccKzWY8q.o: In
function `_Z27dump_test_required_sfixed64v':
/cygdrive/c/work/Winston/protobuf/protobuf-c-0.8/src/test/cxx-generate-
packed-data.cc:173: undefined reference to
`foo::TestMessRequiredSFixed64::Test
MessRequiredSFixed64()'
/cygdrive/c/work/Winston/protobuf/protobuf-c-0.8/src/test/cxx-generate-
packed-data.cc:183: undefined reference to
`foo::TestMessRequiredSFixed64::~Tes
tMessRequiredSFixed64()'
/cygdrive/c/work/Winston/protobuf/protobuf-c-0.8/src/test/cxx-generate-
packed-data.cc:183: undefined reference to
`foo::TestMessRequiredSFixed64::~Tes
tMessRequiredSFixed64()'
/cygdrive/c/DOCUME~1/AAMAIV~1.ASS/LOKALA~1/Temp/ccKzWY8q.o: In
function `_Z25dump_test_required_uint64v':
/cygdrive/c/work/Winston/protobuf/protobuf-c-0.8/src/test/cxx-generate-
packed-data.cc:188: undefined reference to
`foo::TestMessRequiredUInt64::TestMe
ssRequiredUInt64()'
/cygdrive/c/work/Winston/protobuf/protobuf-c-0.8/src/test/cxx-generate-
packed-data.cc:204: undefined reference to
`foo::TestMessRequiredUInt64::~TestM
essRequiredUInt64()'
/cygdrive/c/work/Winston/protobuf/protobuf-c-0.8/src/test/cxx-generate-
packed-data.cc:204: undefined reference to
`foo::TestMessRequiredUInt64::~TestM
essRequiredUInt64()'
/cygdrive/c/DOCUME~1/AAMAIV~1.ASS/LOKALA~1/Temp/ccKzWY8q.o: In
function `_Z26dump_test_required_fixed64v':
/cygdrive/c/work/Winston/protobuf/protobuf-c-0.8/src/test/cxx-generate-
packed-data.cc:209: undefined reference to
`foo::TestMessRequiredFixed64::TestM
essRequiredFixed64()'
/../


Kenton Varda

unread,
Feb 4, 2009, 1:35:00 PM2/4/09
to mag...@goteb.org, Protocol Buffers
On Wed, Feb 4, 2009 at 2:17 AM, <mag...@goteb.org> wrote:
To begin with I have built the normal c++ protobuf tools (2.0.3 rc2)

Why rc2?  That's a release candidate build (like a beta).  You should use the official 2.0.3 release.
 
Then I do the same for protobuf-c-0.8
./configure --prefix=/usr
make
here I run inte the problem, it seems like files are missing?

From the errors it looks like protobuf-c may already be implementing packed repeated fields, which were not in protobuf 2.0.3 but will be in 2.0.4.  You may have to use an older version of protobuf-c.  That's just my guess, though; you should probably contact the author of protobuf-c directly.

Ivarsson, Magnus

unread,
Feb 5, 2009, 4:07:12 AM2/5/09
to Kenton Varda, mag...@goteb.org, Protocol Buffers

Hi, is there a specific forum for protobuf-c? I did not find it so how do I contact the author directly? I have added a comment on the wiki page but it does not feel like the correct forum.

 

Anyway, I forgot to mention that I can build it allright on a Linux platform so I guess the problem is cygwin related.

And this morning I also tried the protobuf-2.0.3 release, protobuf-c-0.8 and the protobuf-c-0.7 release, all with the same errors as before.

 

Any more ideas?

 

/Magnus

 


Kenton Varda

unread,
Feb 5, 2009, 3:57:21 PM2/5/09
to Ivarsson, Magnus, mag...@goteb.org, Protocol Buffers
The author of protobuf-c is lahi...@gmail.com -- just e-mail him.

lahi...@gmail.com

unread,
Feb 8, 2009, 10:21:41 PM2/8/09
to Protocol Buffers
I think this is a fairly classic cygwin bug: not using enough $
(EXEEXT)'s in your Makefile(.am)s. The needed patch is likely:

-generated-code/test-full-cxx-output.inc: cxx-generate-packed-data
+generated-code/test-full-cxx-output.inc: cxx-generate-packed-data$
(EXEEXT)

(and one similar change)
(i will release a new protobuf-c w the fix once tested)

- dave
Reply all
Reply to author
Forward
0 new messages