Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 364747 - sys-fs/fuse-zip-0.2.13 with dev-libs/libzip-0.10 - bigBuffer.cpp:274: error: invalid conversion from `ssize_t (*)(void*, void*, size_t, zip_source_cmd)' to [...]
Summary: sys-fs/fuse-zip-0.2.13 with dev-libs/libzip-0.10 - bigBuffer.cpp:274: error: ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Markos Chandras (RETIRED)
URL: http://code.google.com/p/fuse-zip/iss...
Whiteboard:
Keywords: PATCH
: 362039 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-04-25 05:13 UTC by Forza
Modified: 2011-10-19 20:04 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
libzip-fix-0.10.patch (libzip-fix-0.10.patch,1.23 KB, patch)
2011-09-29 01:58 UTC, Billy Holmes
Details | Diff
fuse-zip-0.2.13-r1.ebuild (fuse-zip-0.2.13-r1.ebuild,1.11 KB, text/plain)
2011-09-29 02:00 UTC, Billy Holmes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Forza 2011-04-25 05:13:28 UTC
After updating to dev-libs/libzip-0.10 from libzip-0.9 it is no longer possible to compile sys-fs/fuse-zip-0.2.13.

Reproducible: Always

Steps to Reproduce:
1. Install libzip-0.10
2. emerge fuse-zip-0.2.13

Actual Results:  
^[[32;01m * ^[[39;49;00mPackage:    sys-fs/fuse-zip-0.2.13
^[[32;01m * ^[[39;49;00mRepository: gentoo
^[[32;01m * ^[[39;49;00mMaintainer: hwoarang@gentoo.org
^[[32;01m * ^[[39;49;00mUSE:        elibc_glibc kernel_linux userland_GNU x86
^[[32;01m * ^[[39;49;00mFEATURES:   sandbox
>>> Unpacking source...
>>> Unpacking fuse-zip-0.2.13.tar.gz to /var/tmp/portage/sys-fs/fuse-zip-0.2.13/work
>>> Source unpacked in /var/tmp/portage/sys-fs/fuse-zip-0.2.13/work
>>> Preparing source in /var/tmp/portage/sys-fs/fuse-zip-0.2.13/work/fuse-zip-0.2.13 ...
 ^[[32;01m*^[[0m Applying fuse-zip-0.2.13-as-needed.patch ...
^[[A^[[147C ^[[34;01m[ ^[[32;01mok^[[34;01m ]^[[0m
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-fs/fuse-zip-0.2.13/work/fuse-zip-0.2.13 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/sys-fs/fuse-zip-0.2.13/work/fuse-zip-0.2.13 ...
make -j2 CXX=i686-pc-linux-gnu-g++ 'CXXFLAGS=-O2 -march=athlon-xp -mtune=native -pipe -fomit-frame-pointer -Wl,--hash-style=gnu$
i686-pc-linux-gnu-g++ -c -O2 -march=athlon-xp -mtune=native -pipe -fomit-frame-pointer -Wl,--hash-style=gnu,-O1 -Wl,--as-needed$
            -Ilib \
            -o main.o
make -C lib
make[1]: Entering directory `/var/tmp/portage/sys-fs/fuse-zip-0.2.13/work/fuse-zip-0.2.13/lib'
i686-pc-linux-gnu-g++ -c -O2 -march=athlon-xp -mtune=native -pipe -fomit-frame-pointer -Wl,--hash-style=gnu,-O1 -Wl,--as-needed$
bigBuffer.cpp: In member function âint BigBuffer::saveToZip(time_t, zip*, const char*, bool, int)â:
bigBuffer.cpp:274: error: invalid conversion from âssize_t (*)(void*, void*, size_t, zip_source_cmd)â to âzip_int64_t (*)(void*, void*, zip_uint64_t, zip_$
bigBuffer.cpp:274: error:   initializing argument 2 of âzip_source* zip_source_function(zip*, zip_int64_t (*)(void*, void*, zip_uint64_t, zip_source_cmd),$
make[1]: *** [bigBuffer.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/sys-fs/fuse-zip-0.2.13/work/fuse-zip-0.2.13/lib'
make: *** [lib/libfusezip.a] Error 2
make: *** Waiting for unfinished jobs....
emake failed


Expected Results:  
Expected a clean compile.

Seems as the ouput in my  terminal got sligtly garbeled, but I do not beleive it is affecting the build. See the link to Google code: http://code.google.com/p/fuse-zip/issues/detail?id=31

I am using gcc version 4.4.5 (Gentoo 4.4.5 p1.2, pie-0.4.5) Target: i686-pc-linux-gnu
Comment 1 Markos Chandras (RETIRED) gentoo-dev 2011-04-29 20:50:21 UTC
*** Bug 362039 has been marked as a duplicate of this bug. ***
Comment 2 Markos Chandras (RETIRED) gentoo-dev 2011-04-29 20:54:14 UTC
I can't reproduce it using gcc-4.6
Comment 3 Forza 2011-09-11 10:59:42 UTC
(In reply to comment #2)
> I can't reproduce it using gcc-4.6

Does that mean it is not a bug, or that it is a bug in previous GCC? gcc-4.6 is still masked/unstable.
Comment 4 Markos Chandras (RETIRED) gentoo-dev 2011-09-11 11:01:55 UTC
(In reply to comment #3)
It means that I can't reproduce it in my current system. Please attach your emerge --info so I can understand how your system is configured and try a similar configuration if possible
Comment 5 Billy Holmes 2011-09-29 01:55:57 UTC
The issue here is that the code is relying on an automatic type conversion from ssize_t to an internal libzip (zip.h) type of zip_int64_t and zip_uint64_t.

I've created a patch that fixes the type in the prototype (.h) as well as the implementation (.cpp).
Comment 6 Billy Holmes 2011-09-29 01:58:56 UTC
Created attachment 288167 [details, diff]
libzip-fix-0.10.patch

This changes the signature of the zipUserFunctionCallback() to better match the zip_source_callback that is defined in libzip (/usr/include/zip.h).

This bypasses the flawed assumption that the compiler will magically perform the requested type conversion.

(This is probably why it compiles in newer versions of gcc)
Comment 7 Billy Holmes 2011-09-29 02:00:02 UTC
Created attachment 288169 [details]
fuse-zip-0.2.13-r1.ebuild

This is an ebuild which applies the libzip-fix patch.
Comment 8 Billy Holmes 2011-09-29 02:06:07 UTC
(In reply to comment #4)
> (In reply to comment #3)
> It means that I can't reproduce it in my current system. Please attach your
> emerge --info so I can understand how your system is configured and try a
> similar configuration if possible

I had a similar issue using gcc-4.4.5. I created a patch to solve the underlying issue.

Here is my emerge --info.

Portage 2.1.10.11 (default/linux/x86/10.0, gcc-4.4.5, glibc-2.12.2-r0, 2.6.39-gentoo-r3 i686)
=================================================================
System uname: Linux-2.6.39-gentoo-r3-i686-Intel-R-_Core-TM-2_CPU_T7200_@_2.00GHz-with-gentoo-2.0.2
Timestamp of tree: Thu, 29 Sep 2011 01:00:01 +0000
distcc 3.1 i686-pc-linux-gnu [disabled]
ccache version 2.4 [disabled]
app-shells/bash:          4.1_p9
dev-java/java-config:     1.3.7-r1, 2.1.11-r3
dev-lang/python:          2.4.6, 2.5.4-r3, 2.6.6-r1, 2.7.1-r1, 3.1.3-r1
dev-util/ccache:          2.4-r9
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.25-r2
sys-apps/baselayout:      2.0.2
sys-apps/openrc:          0.8.2-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.13::<unknown repository>, 2.65-r1
sys-devel/automake:       1.4_p6::<unknown repository>, 1.5::<unknown repository>, 1.6.3::<unknown repository>, 1.7.9-r1::<unknown repository>, 1.8.5-r3::<unknown repository>, 1.9.6-r3, 1.10.2, 1.11.1
sys-devel/binutils:       2.20.1-r1
sys-devel/gcc:            4.1.2::<unknown repository>, 4.3.4, 4.4.5
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.2.10
sys-devel/make:           3.82
sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=i686 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-Os -march=i686 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://www.gtlib.gatech.edu/pub/gentoo/ ftp://ftp.gtlib.gatech.edu/pub/gentoo/ http://gentoo.osuosl.org/"
LANG="en_US.88591"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US en"
MAKEOPTS="-j4"
PKGDIR="/tmp/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://gamedog/gentoo-portage"
USE="X aac acpi aim alsa amr avi berkdb bzip2 cdr cli cracklib crypt cups cxx dell dga dri dts dv dvb dvd encode flac foomaticdb fortran gdbm gimp gnutls gpm gstreamer icecast iconv ipv6 java jpeg kerberos laptop lcms live logrotate lzma lzo mad midi mmap mmx modules mozilla mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin ogg opengl openmp oss pam pcre perl pic png ppds pppd python qt qt3support quicktime readline samba session skey smp socks5 sse sse2 ssl static-libs svga sysfs syslog tcpd threads tiff tk truetype unicode usb vorbis wifi win32codecs winbind x86 xml xmms xorg yahoo zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" FOO2ZJS_DEVICES="hp1020" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="ati radeon fbdev vesa vga" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 9 Markos Chandras (RETIRED) gentoo-dev 2011-09-30 17:36:35 UTC
(In reply to comment #6)
> Created attachment 288167 [details, diff]
> libzip-fix-0.10.patch
> 
> This changes the signature of the zipUserFunctionCallback() to better match the
> zip_source_callback that is defined in libzip (/usr/include/zip.h).
> 
> This bypasses the flawed assumption that the compiler will magically perform
> the requested type conversion.
> 
> (This is probably why it compiles in newer versions of gcc)

Hi thanks for the patch. Did you contact upstream developers about this? If this package compiles with >4.5.X gcc then I don't applying this patch makes sense. 4.5.3 is already stabled.
Comment 10 Forza 2011-10-15 17:52:42 UTC
I could not compile fuse-zip with gcc-4.6.1-r1 without the patch. Thanks for the patch!
Comment 11 Markos Chandras (RETIRED) gentoo-dev 2011-10-19 20:04:25 UTC
OK I applied that patch even though I can't reproduce it. Thanks!