media-video/vlc builds fine with zlib-1.2.5.1, it fails with sys-libs/zlib-1.2.5.1-r1. This is probably related to bug #383179. Reproducible: Always Steps to Reproduce: 1.emerge -av1 media-video/vlc Actual Results: In file included from unzip.h:57:0, from unzip.c:39: ioapi.h:38:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF' # emerge --info Portage 2.2.0_alpha58 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.3, glibc-2.13-r4, 3.0.3-gentoo x86_64) ================================================================= System uname: Linux-3.0.3-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T9550_@_2.66GHz-with-gentoo-2.0.3 Timestamp of tree: Sat, 17 Sep 2011 12:15:01 +0000 app-shells/bash: 4.2_p10 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.4.6, 2.5.4-r4, 2.6.7-r2, 2.7.2-r3, 3.2.2 dev-util/cmake: 2.8.5-r2 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.0.3 sys-apps/openrc: 0.9.3-r1 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.1-r1 sys-devel/binutils: 2.21.1-r1 sys-devel/gcc: 4.5.3-r1 sys-devel/gcc-config: 1.4.1-r1 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r1 sys-kernel/linux-headers: 2.6.39 (virtual/os-headers) sys-libs/glibc: 2.13-r4 Repositories: gentoo sunrise voip java-overlay isaco Installed sets: @system ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1 googleearth AdobeFlash-10.1 AdobeFlash-10 Oracle-BCLA-JavaSE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf /usr/share/openvpn/easy-rsa" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/" LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j3" PKGDIR="/usr/portage/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="/var/lib/layman/sunrise /var/lib/layman/voip /var/lib/layman/java-overlay /usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X a52 aac abyss acl acpi aim alsa amd64 apng bash-completion bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative dri dts dvd dvdr emboss enca encode exif expat firefox flac fontconfig foomaticdb fortran gcrypt gdbm gdu gif git glib gnutls gpm gstreamer gtk iconv icq imap imlib ipv6 java java6 jpeg jpeg2k kde kipi kpathsea lcms mad matroska mime mmx mng modules mp2 mp3 mp4 mpeg mudflap multilib musepack musicbrainz mysql ncurses nptl nptlonly ogg opengl openmp pam pango pcre pdf perl phonon plasma png policykit ppds pppd python qt3support qt4 quicktime readline sdl semantic-desktop session soap spell sse sse2 sse3 ssl startup-notification svg sysfs tcpd theora tiff truetype udev unicode usb vcd vorbis webkit wma wmf x264 xcb xcomposite xine xinerama xml xorg xscreensaver xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" 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="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" 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, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS # emerge -pv media-video/vlc These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] media-video/vlc-1.1.11 USE="X a52 aac alsa cdda dbus dts dvd ffmpeg flac fontconfig gcrypt gnutls httpd kde matroska mmx mp3 mpeg musepack ncurses ogg opengl png qt4 sdl sse stream svg theora truetype udev vorbis x264 xcb xml xv -aalib (-altivec) -atmo -avahi -bidi -cddb -dc1394 -debug -dirac -directfb -dvb -fbcon -fluidsynth -ggi -gme -gnome -id3tag -ieee1394 -jack -kate -libass -libcaca -libnotify -libproxy -libtiger -libv4l -libv4l2 -lirc -live -lua -modplug -mtp -nsplugin -optimisememory -oss -projectm -pulseaudio -pvr -remoteosd -rtsp -run-as-root -samba -schroedinger -sdl-image -shine -shout -skins -speex -sqlite (-svga) -taglib -twolame -upnp -v4l -v4l2 -vaapi -vcdx -vlm (-win32codecs) -wma-fixed -xosd -zvbi" 0 kB Total: 1 package (1 reinstall), Size of downloads: 0 kB
Created attachment 286775 [details] build.log
Created attachment 286833 [details, diff] patch to fix compilation with zlib-1.2.5.1-r1 same here. Attached patch fixed it for me.
I can confirm the regression with zlib-1.2.5.1-r1. R and vlc both fail to compile with it installed. However, downgrading to zlib-1.2.5.1 works fine on my ~amd64 laptop. Which is what I did to rebuild them when libpng was upgraded today and I had to recompile everything built against the old version.
confirmed again, same trouble with chromium and sys-libs/zlib-1.2.5.1-r1
Also affects dev-lang/erlang-14.2.3. Fixable in the same way.
Just to make it clear, zlib new version is incompatible with software that used the old version? Is that it? API changed between revisions? I mean, I've used this same patch to fix dev-lang/R in my local overlay, but should we expect a zlib version bump to fix this, or all packages that depend on zlib will need to be updated?
Comment on attachment 286833 [details, diff] patch to fix compilation with zlib-1.2.5.1-r1 this misses the entire point. you aren't supposed to be using OF or _Z_OF or whatever else zlib happens to call it. either drop the OF() usage completely in the code, or add the one liner to the local code: #define OF(x) x
dev-lang/R, media-video/ogmrip and media-libs/opencv have the same issue.
(In reply to comment #8) > dev-lang/R, media-video/ogmrip and media-libs/opencv have the same issue. dev-lang/R: see bug #383431 media-video/ogmrip-0.13.6 and media-libs/opencv-2.3.0: could not reproduce. Please file separate bugs with your use flag combination and the build.log. This bug here is about vlc.
(In reply to comment #7) > Comment on attachment 286833 [details, diff] > patch to fix compilation with zlib-1.2.5.1-r1 > > this misses the entire point. you aren't supposed to be using OF or _Z_OF or > whatever else zlib happens to call it. > > either drop the OF() usage completely in the code, or add the one liner to the > local code: > #define OF(x) x Packages need to work with vanilla zlib. It's not your call whether vlc should use OF() or not. Being a Gentoo dev means you're packaging zlib and vlc, you're not developing them. zlib-1.2.5.1-r1 needs to be removed from portage and the problem fixed in whatever way upstream thinks it's best. We cannot fork a Gentoo-version of zlib; that just isn't going to work out very well. Also, zlib 1.2.5.1 is a beta version. Just that one means it could be hardmasked until a decision is made by upstream on how to deal with this.
*** Bug 383921 has been marked as a duplicate of this bug. ***
Well, the whole story here seem to come from various packages taking those unzip files straight from zlib tarball. As long as they were inside the tarball, there was no problem with them using internal zlib macros, but nobody seemed to bother to clean them after taking.
Anyone tried to report problem upstream?
This is just a build-time issue. 1st. emerge =sys-libs/zlib-1.2.5.1 # get the older version which works good 2nd. emerge vlc # compile vlc with the old zlib 3rd. emerge zlib # safe to upgrade zlib now
Assuming a recent version of portage, here's a simple fix, requiring no patching the ebuild or anything. Create the file: /etc/portage/env/media-video/vlc-1.1.11 (You may if you wish leave off the version number, simply naming it vlc, but the fix will likely be applied with the next bump, and including the version number means less chance of trouble with newer versions.) In this file, put the following three lines: post_src_prepare () { sed -i '1i#define OF(x) x' libs/unzip/ioapi.h } That should fix it! =:^) Duncan
(In reply to comment #2) > Created attachment 286833 [details, diff] > patch to fix compilation with zlib-1.2.5.1-r1 > > same here. > Attached patch fixed it for me. Work's for as well on an x86 Geoff
fixing the vlc code in question will work with any zlib version. there is nothing in there that requires a matching change in the upstream zlib. either drop the legacy ansi cruft (since i doubt the rest of vlc uses it), or add a local OF() define to the minizip code that vlc imported.
(In reply to comment #17) > fixing the vlc code in question will work with any zlib version. there is > nothing in there that requires a matching change in the upstream zlib. either > drop the legacy ansi cruft (since i doubt the rest of vlc uses it), or add a > local OF() define to the minizip code that vlc imported. true but I doubt vlc's dev will accept anything differing from upstream as that'll make future merges harder if I had a libminizip.{so,pc}, like there seems to be in fedora, vlc could use it instead of its own local copy
(In reply to comment #13) > Anyone tried to report problem upstream? vapier (Mike Frysinger) started a thread on the zlib-devel list: http://mail.madler.net/pipermail/zlib-devel_madler.net/2011-September/002621.html
same problem with media-video/smplayer
(In reply to comment #18) if you actually look at their code you'd see they're already maintaining small changes with the code base, and you don't even need to modify the code to make it sane. single line in unzip/Makefile.am: AM_CPPFLAGS = -D'OF(x)=x' i had looked around previously for minizip, but all the users seemed to customize the code heavily so it wouldn't help. should be easy to add a USE=minizip flag to zlib so that at least a few projects can avoid copying & pasting.
zlib-1.2.5.1-r2 is now in the tree with USE=minizip support so you can replace the broken '<' dep
(In reply to comment #22) > zlib-1.2.5.1-r2 is now in the tree with USE=minizip support so you can replace > the broken '<' dep thanks! though, minizip needs the same fix, because I get the following error: /usr/include/minizip/ioapi.h:128:51: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF'
(In reply to comment #23) yeah, someone pointed that on irc. should be fixed in cvs now.
'emerge -uvDN world' fails now for me with: root@orca:/root(42)# emerge -uvDN world These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild UD ] sys-libs/zlib-1.2.5.1 [1.2.5.1-r1] 0 kB [ebuild U ] sys-fs/reiserfsprogs-3.6.21-r1 [3.6.21] 0 kB [ebuild U ] sys-libs/zlib-1.2.5.1-r2 [1.2.5.1-r1] USE="minizip%* -static-libs%" 0 kB [ebuild U ] dev-java/rxtx-2.2_pre2 [2.1.7.2-r3] USE="doc -lfd -source" 1,457 kB [ebuild U ] app-office/texmacs-1.0.7.13 [1.0.7.12] USE="jpeg netpbm qt4 spell svg -imlib" 14,635 kB [ebuild U ] media-libs/libvpx-0.9.7-r1 [0.9.7] USE="doc mmx sse sse2 ssse3 threads (-altivec) -debug -postproc -sse3 -static-libs%" 0 kB Total: 6 packages (5 upgrades, 1 downgrade), Size of downloads: 16,091 kB !!! Multiple package instances within a single package slot have been pulled !!! into the dependency graph, resulting in a slot conflict: sys-libs/zlib:0 (sys-libs/zlib-1.2.5.1::gentoo, ebuild scheduled for merge) pulled in by <sys-libs/zlib-1.2.5.1-r1 required by (media-video/vlc-1.1.11::gentoo, installed) (sys-libs/zlib-1.2.5.1-r2::gentoo, ebuild scheduled for merge) pulled in by >=sys-libs/zlib-1.2.5.1-r2:0[minizip] required by (dev-db/virtuoso-server-6.1.3-r1::gentoo, installed) ...
Created attachment 287415 [details, diff] vlc-1.1.11.ebuild diff Allows for either <zlib-1.2.5.1-r1 or >=zlib-1.2.5.1-r2 with the minizip USE flag set. I think rev 1.2 of zlib-1.2.5.1-r2 may be necessary.
Even if I set the minizip USE flag for sys-libs/zlib 'emerge -vuDN world' hangs: root@moose:/root(58)# emerge -vuDN world These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild UD ] sys-libs/zlib-1.2.5.1 [1.2.5.1-r1] 0 kB [ebuild U ] sys-fs/reiserfsprogs-3.6.21-r1 [3.6.21] 0 kB [ebuild U ] sys-libs/zlib-1.2.5.1-r2 [1.2.5.1-r1] USE="minizip%* -static-libs%" 0 kB [ebuild U ] net-misc/ndisc6-1.0.2 [0.9.9-r2] 234 kB [ebuild U ] app-cdr/dvdisaster-0.72.2 [0.72.1] USE="sse2 -debug" LINGUAS="de -cs -it -ru" 0 kB [ebuild U ] app-office/texmacs-1.0.7.13 [1.0.7.12] USE="jpeg netpbm qt4 spell svg -imlib" 14,635 kB [ebuild U ] media-libs/libvpx-0.9.7-r1 [0.9.7] USE="doc mmx sse sse2 ssse3 threads (-altivec) -debug -postproc -sse3 -static-libs%" 0 kB Total: 7 packages (6 upgrades, 1 downgrade), Size of downloads: 14,869 kB !!! Multiple package instances within a single package slot have been pulled !!! into the dependency graph, resulting in a slot conflict: sys-libs/zlib:0 (sys-libs/zlib-1.2.5.1::gentoo, ebuild scheduled for merge) pulled in by <sys-libs/zlib-1.2.5.1-r1 required by (media-video/vlc-1.1.11::gentoo, installed) (sys-libs/zlib-1.2.5.1-r2::gentoo, ebuild scheduled for merge) pulled in by >=sys-libs/zlib-1.2.5.1-r2:0[minizip] required by (dev-db/virtuoso-server-6.1.3-r1::gentoo, installed)
I forgot to add: root@moose:/root(59)# grep minizip /etc/portage/package.use >=sys-libs/zlib-1.2.5.1-r2 minizip
I suppose the problem is that vlc-1.1.11 depends on <sys-libs/zlib-1.2.5.1-r1 root@moose:/root(63)# grep -C2 zlib- /usr/portage/media-video/vlc/vlc-1.1.11.ebuild RDEPEND=" <sys-libs/zlib-1.2.5.1-r1 >=media-libs/libdvbpsi-0.1.6 a52? ( >=media-libs/a52dec-0.7.4-r3 ) while virtuoso-server-6.1.3-r1 depends on >=sys-libs/zlib-1.2.5.1-r2 root@moose:/root(66)# grep -C2 zlib /usr/portage/dev-db/virtuoso-server/virtuoso-server-6.1.3-r1.ebuild dev-libs/libxml2:2 >=dev-libs/openssl-0.9.7i:0 >=sys-libs/zlib-1.2.5.1-r2:0[minizip] kerberos? ( app-crypt/mit-krb5 ) ldap? ( net-nds/openldap )
(In reply to comment #29) > I suppose the problem is that vlc-1.1.11 depends on <sys-libs/zlib-1.2.5.1-r1 The purpose of the attached ebuild diff is to fix this.
Yeah! media-video/vlc-1.1.11 compiles fine with sys-libs/zlib-1.2.5.1-r2 :)
should be fixed now
(In reply to comment #32) > should be fixed now Good to go. It pulls zlib-1.2.5.1, unless USE="minizip" for zlib, in which case it pulls zlib-1.2.5.1-r2. Thank you.
Hi, I tried to follow this thread and am still having problems compiling R for what appears to be the same reasons. The version of zlib installed on my machine is 1.2.5.1-r2. In /etc/portage/package.keywords I have: =sys-libs/zlib-1.2.5.1-r2 ~x86 In /etc/portage/package.use I have: >=sys-libs/zlib-1.2.5.1-r2 minizip So, this suggests to me that everything should be in order. Unfortunately, it's not. What am I doing wrong and how can I get things back on track? Sorry, I realize this is likely simple stuff, but I am just missing something. Best, Alex
(In reply to comment #34) > > The version of zlib installed on my machine is 1.2.5.1-r2. You need at least rev 1.2 of zlib-1.2.5.1-r2, if you installed zlib-1.2.5.1-r2 before it reached rev 1.2 do a resync, then remerge it.
Please forgive updating a closed bug, but I'm working on a similar problem for a different ebuild and I'm not quite sure what the proper solution is supposed to be. It looks like this is how the vlc ebuild was fixed: RDEPEND=" || ( >=sys-libs/zlib-1.2.5.1-r2[minizip] <sys-libs/zlib-1.2.5.1-r1 ) <SNIP> So, if stable zlib is installed (1.2.5), everything will work like normal, but if unstable zlib is installed, then the minizip USE flag must be set on zlib in order for VLC to run properly. Is that correct? Should that be the best approach to take with all other packages having this problem? Thanks.