dev-db/virtuoso-server 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 dev-db/virtuoso-server Actual Results: In file included from ../../libsrc/zlib/contrib/minizip/unzip.h:57:0, from bif_file.c:6143: ../../libsrc/zlib/contrib/minizip/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 dev-db/virtuoso-server These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] dev-db/virtuoso-server-6.1.3-r1 USE="readline -kerberos -ldap" 0 kB Total: 1 package (1 reinstall), Size of downloads: 0 kB
Created attachment 286773 [details] build.log
The macro OF changed name to _Z_OF (see /usr/include/zconf.h): #ifndef OF /* function prototypes */ # ifdef STDC # define OF(args) args [...] #ifndef _Z_OF /* function prototypes */ # ifdef STDC # define _Z_OF(args) args [...] Another problem is the mixed use of the embedded copy of zlib.h and the system header. The attached patches force the use of the system zlib.h and update the macro OF to the new name. These are the results of make test run with binaries compiled from the patched sources on a ~x86 system with gcc-4.6.1-r1: ===================================================================== = Checking log file tlubm.output for statistics: = = Total number of tests PASSED : 102 = Total number of tests FAILED : 0 = Total number of tests ABORTED : 0 ===================================================================== ===================================================================== = COMPLETED LUBM tests = Sun Sep 18 22:13:48 CEST 2011 ===================================================================== PASS: test_server.sh ============= 1 test passed ============= Use flags and version of the test build: [ebuild R ] dev-db/virtuoso-server-6.1.3-r1 USE="ldap readline -kerberos" 0 kB [1]
Created attachment 286921 [details, diff] Force system provided zlib.h in libsrc/Wi
Created attachment 286923 [details, diff] Update OF to _Z_OF and force system zlib.h in libsrc/zlib
Comment on attachment 286923 [details, diff] Update OF to _Z_OF and force system zlib.h in libsrc/zlib 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 independently, it looks like virtuoso-server is wrongly bundling the zlib code locally instead of using the system one ...
At first I thought to redefine OF or to drop it, but the files where it is used belong to an embedded copy of Minizip (http://www.winimage.com/zLibDll/minizip.html) and this library(?) is strictly tied to zlib, so I decided to keep it in sync with zlib code. Is Minizip installed by some ebuild? Anyway, checking the latest version available, it doesen't seem to have been still updated. After a fast grep of the code it seems that minizip is included only in libsrc/Wi/bif_file.c, close to the end of the file (row 6143/6660), with these three peculiar includes: #include "zlib/contrib/minizip/unzip.h" #include "zlib/contrib/minizip/ioapi.c" #include "zlib/contrib/minizip/unzip.c" I suppose that Minizip could be not really necessary... ./configure is correctly run with the recognized option --without-internal-zlib and I don't find traces of zlib compilation into the build log, so I assume that it actually links with the system zlib but includes the local header in various files.
Like it was suggested in #383179, I was able to temporarily "fix" virtuoso-server with CPPFLAGS hack. Hope this gets fixed soon.
I'm uncertain what to do with this. I think for now I'll apply a block. @Mike What do you think of making sys-lib/zlib (maybe optionally) provide minizip, so that hardcoded minizip implementations can be unbundled as well?
there is some discussion on bug #383349 and sys-libs/zlib-1.2.5.1-r2 is in tree, please block as =sys-libs/zlib-1.2.5.1-r1 if -r2 is suitable
Users will have to deal with sys-lib/zlib[minizip] USE dep on virtuoso-server-6.1.3-r1 stabilization...