fancycheung / stardict-3

Automatically exported from code.google.com/p/stardict-3
GNU General Public License v3.0
0 stars 0 forks source link

[patch] stardict 3.x is not compatible with zlib 1.2.5.2 and/or higher #66

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Install zlib, 1.2.5.2 or higher, current is 1.2.8
2. Try to compile stardict 3.0.3 or 3.0.4

What is the expected output? What do you see instead?

ommon.lo libcommon.cpp
libtool: compile:  x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -Wall 
-pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include 
-I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo 
-I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 
-I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz 
-I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 
-I/usr/lib64/glib-2.0/include -I/usr/include/libxml2 -I.. -I.. -O2 -pipe 
-march=native -frecord-gcc-switches -MT libcommon.lo -MD -MP -MF 
.deps/libcommon.Tpo -c libcommon.cpp  -fPIC -DPIC -o .libs/libcommon.o
In file included from libcommon.cpp:30:0:
libcommon.h:191:50: error: could not convert template argument 'gzclose' to 
'int (*)(void*)'
 typedef ResourceWrapper<void, void*, int, gzclose> gzFile;
                                                  ^
libcommon.h:191:58: error: invalid type in declaration before ';' token
 typedef ResourceWrapper<void, void*, int, gzclose> gzFile;
                                                          ^
libcommon.cpp: In function 'int unpack_zlib(const char*, const char*)':
libcommon.cpp:602:44: error: invalid conversion from 'gzFile' to 'zip::gzFile 
{aka int}' [-fpermissive]
  zip::gzFile in(gzopen(arch_file_name, "rb"));
                                            ^
libcommon.cpp:617:27: error: 'get_impl' was not declared in this scope
   len = gzread(get_impl(in), buf, buffer_size);
                           ^
libcommon.cpp:617:27: note: suggested alternative:
In file included from libcommon.cpp:30:0:
libcommon.h:148:19: note:   'get_impl'
  friend inline T *get_impl(const ResourceWrapper& rw) {
                   ^
libcommon.cpp: In function 'std::string create_temp_file()':
libcommon.cpp:691:20: warning: ignoring return value of 'ssize_t write(int, 
const void*, size_t)', declared with attribute warn_unused_result 
[-Wunused-result]
   write(fd, " ", 1);
                    ^
Makefile:314: recipe for target 'libcommon.lo' failed
make[3]: *** [libcommon.lo] Error 1

What version of the product are you using? On what operating system?

Linux, but the issue is specific to zlib 1.2.5.2 and higher, however this patch 
should be compatible with older versions too

Please provide any additional information below.

We have been using this patch for stardict within Gentoo for 2 years about now, 
succesfully

Original issue reported on code.google.com by ssuomine...@gmail.com on 9 May 2014 at 2:10

Attachments:

GoogleCodeExporter commented 8 years ago
This bug is fixed in the newest code(3.0.5)!

Original comment by huzheng...@gmail.com on 15 May 2014 at 12:11