kidok / protobuf

Automatically exported from code.google.com/p/protobuf
0 stars 0 forks source link

zip_output_unittest.sh inevitably fails when compiling with MinGW #662

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I've compiled zlib v1.2.8 with MinGW (which produced lib/libz.a, 
lib/libz.dll.a, bin/zlib1.dll and the headers in include) and I'm trying to 
build/test protobuf with --with-zlib option.

I'm building Protobuf 2.5.0 with patches to atomicops*.h (fix MemoryBarrier), 
configure.ac and gtest/configure.ac (add -no-undefined to LDFLAGS on WIndows) 
applied.

My flags/configure options look like this:

CFLAGS/CXXFLAGS/CPPFLAGS = -DNDEBUG -Wno-unused-local-typedefs -Izlib/include 
-m32
LDFLAGS = -static-libgcc -static-libstdc++ -Lzlib/lib -Lzlib/lib  # (I've also 
tried putting libz.a here or -Wl,-Bstatic -lz)

./configure --prefix=/some/folder --disable-services --with-zlib
make
make check

All tests pass (including IoTest.Gzip*, IoTest.Zlib* and IoTest.Compression*), 
however no matter what I do the very last test (that checks zcgzip/zcgunzip 
roundtrip) always fails:

+ TESTFILE=Makefile
+ ./zcgzip
+ gunzip
+ cmp - Makefile
- Makefile differ: char 1731, line52

gunzip: stdout: Broken pipe
FAIL: google/protobuf/io/gzip_stream/unittest.sh

I've tried explicitly linking in libz.a statically which doesn't seem to help.

Original issue reported on code.google.com by I.S.Smir...@gmail.com on 15 Aug 2014 at 1:52

GoogleCodeExporter commented 9 years ago
Just to add, I've tried running zcgzip -> zcgunzip on the Makefile and it ended 
up with a file that was 2741 bytes long instead of 312574 (those 2741 bytes 
match with the original though).

Original comment by I.S.Smir...@gmail.com on 15 Aug 2014 at 1:56