Closed GoogleCodeExporter closed 8 years ago
I confirm we have the same problem in Debian Sid.
Original comment by ajq...@gmail.com
on 7 Jul 2012 at 10:46
Subject: Fixed compilation with zlib 1.2.6
--- a/src/libcommon.h
+++ b/src/libcommon.h
@@ -191,7 +191,7 @@
}
namespace zip {
-typedef ResourceWrapper<void, void*, int, gzclose> gzFile;
+ typedef ResourceWrapper<struct gzFile_s, struct gzFile_s *, int, gzclose>
gzFileWrapper;
}
--- a/src/libcommon.cpp
+++ b/src/libcommon.cpp
@@ -190,7 +190,7 @@
int unpack_zlib(const char* arch_file_name, const char* out_file_name, print_info_t print_info)
{
- zip::gzFile in(gzopen(arch_file_name, "rb"));
+ zip::gzFileWrapper in(gzopen(arch_file_name, "rb"));
if(!in) {
print_info("Unable to open archive file %s\n", arch_file_name);
return EXIT_FAILURE;
Original comment by zhouwei...@gmail.com
on 20 Jul 2012 at 9:15
Attachments:
I downloaded the current version of StarDict in Mercurial and am still seeing
this compilation problem in Debian 64bit Testing. Are the changes by zhouwei to
libcommon.cpp and libcommon.h included in Mercurial?
Here is what I see:
root@debamos:~/stardict-3# make
Making all in lib
make[1]: Entering directory `/root/stardict-3/lib'
make all-recursive
make[2]: Entering directory `/root/stardict-3/lib'
Making all in src
make[3]: Entering directory `/root/stardict-3/lib/src'
/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I..
-Wall -pthread -I/usr/include/gtk-2.0
-I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0
-I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1
-I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/cairo
-I/usr/include/libxml2 -I.. -I.. -g -O2 -MT libcommon.lo -MD -MP -MF
.deps/libcommon.Tpo -c -o libcommon.lo libcommon.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -Wall -pthread
-I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include
-I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0
-I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1
-I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/cairo
-I/usr/include/libxml2 -I.. -I.. -g -O2 -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*)'
libcommon.h:191:58: error: invalid type in declaration before ';' token
libcommon.cpp: In function 'int unpack_zlib(const char*, const char*)':
libcommon.cpp:602:45: error: invalid conversion from 'gzFile' to 'zip::gzFile
{aka int}' [-fpermissive]
libcommon.cpp:617:27: error: 'get_impl' was not declared in this scope
libcommon.cpp:617:27: note: suggested alternative:
libcommon.h:148:19: note: 'get_impl'
make[3]: *** [libcommon.lo] Error 1
make[3]: Leaving directory `/root/stardict-3/lib/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/stardict-3/lib'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/stardict-3/lib'
make: *** [all-recursive] Error 1
Original comment by amosba...@gmail.com
on 6 Nov 2012 at 4:54
Try use `abs` instead, I've submitted the patches to the Arch repository for a
while
Original comment by the.warl...@gmail.com
on 6 Nov 2012 at 11:46
Fixed. Patch merged!
Original comment by huzheng...@gmail.com
on 17 Apr 2013 at 3:13
Original issue reported on code.google.com by
the.warl...@gmail.com
on 10 Jun 2012 at 2:24