views:

42

answers:

0

I am trying to compile protobuf-2.3.0.tar.gz & protobuf-c-0.13.tar.gz on the latest CYGWIN platform in windows.

While compiling protobuf-c-0.13.tar.gz i am ending up with the following error: Is there any flag to update LD_FLAGS?? (even though i am able to compile 2.3.0 without setting any flags and my understanding was there is no need to set any flags and i am through with this apporach in linux with out any problems).

Any help is really appreciated..

checking for alloca.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking winsock.h usability... no
checking winsock.h presence... yes
configure: WARNING: winsock.h: present but cannot be compiled
configure: WARNING: winsock.h:     check for missing prerequisite headers?
configure: WARNING: winsock.h: see the Autoconf documentation
configure: WARNING: winsock.h:     section "Present But Cannot Be Compiled"
configure: WARNING: winsock.h: proceeding with the preprocessor's result
configure: WARNING: winsock.h: in the future, the compiler will take precedence
checking for winsock.h... yes
checking google/protobuf/stubs/common.h usability... yes
checking google/protobuf/stubs/common.h presence... yes
checking for google/protobuf/stubs/common.h... yes
configure: error:
  ERROR:
  protobuf test program failed to link:
  perhaps you need to add -Llibdir to your LDFLAGS.

I am able to compile protobuf-2.3.0.tar.gz with out setting any environment variables with the following warnings on "make"

/bin/sh ../libtool --tag=CXX   --mode=link g++  -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -O2 -g -DNDEBUG -version-info 6:0:0 -export-dynamic -no-undefined  -o libprotoc.la -rpath /usr/local/lib code_generator.lo command_line_interface.lo plugin.lo plugin.pb.lo subprocess.lo zip_writer.lo cpp_enum.lo cpp_enum_field.lo cpp_extension.lo cpp_field.lo cpp_file.lo cpp_generator.lo cpp_helpers.lo cpp_message.lo cpp_message_field.lo cpp_primitive_field.lo cpp_service.lo cpp_string_field.lo java_enum.lo java_enum_field.lo java_extension.lo java_field.lo java_file.lo java_generator.lo java_helpers.lo java_message.lo java_message_field.lo java_primitive_field.lo java_service.lo python_generator.lo  libprotobuf.la -lz 

*** Warning: This system can not link to static lib archive libprotobuf.la.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have.

*** Warning: linker path does not have real file for library -lz.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libz and none of the candidates passed a file format test
*** using a file magic. Last file checked: /lib/libz.dll.a
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.

*** Since this library must not contain undefined symbols,
*** because either the platform does not support them or
*** it was explicitly requested with -no-undefined,
*** libtool will only create a static version of it.

libtool: link: ( cd ".libs" && rm -f "libprotoc.la" && ln -s "../libprotoc.la" "libprotoc.la" )
/bin/sh ../libtool --tag=CXX   --mode=link g++  -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -O2 -g -DNDEBUG   -o protoc.exe main.o  libprotobuf.la libprotoc.la -lz 
libtool: link: g++ -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -O2 -g -DNDEBUG -o .libs/protoc.exe main.o  ./.libs/libprotobuf.a ./.libs/libprotoc.a /DevTools/protobuf-2.3.0/src/.libs/libprotobuf.a /usr/lib/gcc/i686-pc-cygwin/4.3.4/libstdc++.dll.a -lz -L/usr/lib/gcc/i686-pc-cygwin/4.3.4
oldpwd=`pwd` && ( cd . && $oldpwd/protoc.exe -I. --cpp_out=$oldpwd google/protobuf/unittest.proto google/protobuf/unittest_empty.proto google/protobuf/unittest_import.proto google/protobuf/unittest_mset.proto google/protobuf/unittest_optimize_for.proto google/protobuf/unittest_embed_optimize_for.proto google/protobuf/unittest_custom_options.proto google/protobuf/unittest_lite.proto google/protobuf/unittest_import_lite.proto google/protobuf/unittest_lite_imports_nonlite.proto google/protobuf/unittest_no_generic_services.proto google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto )
touch unittest_proto_middleman
make  all-am
make[3]: Entering directory `/DevTools/protobuf-2.3.0/src'
/bin/sh ../libtool --tag=CXX   --mode=link g++  -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -O2 -g -DNDEBUG -version-info 6:0:0 -export-dynamic -no-undefined  -o libprotobuf-lite.la -rpath /usr/local/lib common.lo once.lo hash.lo extension_set.lo generated_message_util.lo message_lite.lo repeated_field.lo wire_format_lite.lo coded_stream.lo zero_copy_stream.lo zero_copy_stream_impl_lite.lo  -lz 

*** Warning: linker path does not have real file for library -lz.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libz and none of the candidates passed a file format test
*** using a file magic. Last file checked: /lib/libz.dll.a
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.

*** Since this library must not contain undefined symbols,
*** because either the platform does not support them or
*** it was explicitly requested with -no-undefined,
*** libtool will only create a static version of it.
libtool: link: ar cru .libs/libprotobuf-lite.a  common.o once.o hash.o extension_set.o generated_message_util.o message_lite.o repeated_field.o wire_format_lite.o coded_stream.o zero_copy_stream.o zero_copy_stream_impl_lite.o
libtool: link: ranlib .libs/libprotobuf-lite.a
libtool: link: ( cd ".libs" && rm -f "libprotobuf-lite.la" && ln -s "../libprotobuf-lite.la" "libprotobuf-lite.la" )
make[3]: Leaving directory `/DevTools/protobuf-2.3.0/src'
make[2]: Leaving directory `//DevTools/protobuf-2.3.0/src'
make[1]: Leaving directory `/DevTools/protobuf-2.3.0'

related questions