Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 383371 - www-client/chromium fails to compile with sys-libs/zlib-1.2.5.1-r1
Summary: www-client/chromium fails to compile with sys-libs/zlib-1.2.5.1-r1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Chromium Project
URL:
Whiteboard:
Keywords:
: 383347 383535 (view as bug list)
Depends on: 383179
Blocks:
  Show dependency tree
 
Reported: 2011-09-17 16:25 UTC by Chris Smith
Modified: 2011-09-18 19:33 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Smith 2011-09-17 16:25:38 UTC
www-client/chromium-15.0.874.15 fails to compile

Reproducible: Always

Actual Results:  
In file included from ./third_party/zlib/contrib/minizip/unzip.h:59:0,
                 from chrome/common/zip.cc:15:
./third_party/zlib/contrib/minizip/ioapi.h:38:44: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/ioapi.h:39:44: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/ioapi.h:40:45: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/ioapi.h:41:44: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/ioapi.h:42:44: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/ioapi.h:43:45: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/ioapi.h:44:49: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/ioapi.h:48:5: error: ‘open_file_func’ does not name a type
./third_party/zlib/contrib/minizip/ioapi.h:49:5: error: ‘read_file_func’ does not name a type
./third_party/zlib/contrib/minizip/ioapi.h:50:5: error: ‘write_file_func’ does not name a type
./third_party/zlib/contrib/minizip/ioapi.h:51:5: error: ‘tell_file_func’ does not name a type
./third_party/zlib/contrib/minizip/ioapi.h:52:5: error: ‘seek_file_func’ does not name a type
./third_party/zlib/contrib/minizip/ioapi.h:53:5: error: ‘close_file_func’ does not name a type
./third_party/zlib/contrib/minizip/ioapi.h:54:5: error: ‘testerror_file_func’ does not name a type
./third_party/zlib/contrib/minizip/ioapi.h:60:26: error: expected initializer before ‘OF’
In file included from chrome/common/zip.cc:15:0:
./third_party/zlib/contrib/minizip/unzip.h:124:45: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/unzip.h:137:32: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/unzip.h:148:33: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/unzip.h:155:29: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/unzip.h:162:37: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/unzip.h:170:40: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/unzip.h:183:37: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/unzip.h:189:36: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/unzip.h:196:34: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/unzip.h:228:42: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/unzip.h:254:39: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/unzip.h:260:47: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/unzip.h:268:40: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/unzip.h:281:40: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/unzip.h:296:40: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/unzip.h:302:39: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/unzip.h:316:32: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/unzip.h:321:27: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/unzip.h:326:42: error: expected initializer before ‘OF’
In file included from chrome/common/zip.cc:16:0:
./third_party/zlib/contrib/minizip/zip.h:116:32: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/zip.h:136:33: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/zip.h:141:40: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/zip.h:165:41: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/zip.h:181:41: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/zip.h:206:40: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/zip.h:213:38: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/zip.h:218:41: error: expected initializer before ‘OF’
./third_party/zlib/contrib/minizip/zip.h:227:29: error: expected initializer before ‘OF’
chrome/common/zip.cc: In function ‘bool ExtractCurrentFile(unzFile, const FilePath&)’:
chrome/common/zip.cc:31:79: error: ‘unzGetCurrentFileInfo’ was not declared in this scope
chrome/common/zip.cc:37:36: error: ‘unzOpenCurrentFile’ was not declared in this scope
chrome/common/zip.cc:83:62: error: ‘unzReadCurrentFile’ was not declared in this scope
chrome/common/zip.cc:101:39: error: ‘unzCloseCurrentFile’ was not declared in this scope
chrome/common/zip.cc:103:33: error: ‘unzCloseCurrentFile’ was not declared in this scope
chrome/common/zip.cc: In function ‘bool Unzip(const FilePath&, const FilePath&)’:
chrome/common/zip.cc:170:50: error: ‘unzOpen’ was not declared in this scope
chrome/common/zip.cc:181:45: error: ‘unzGetGlobalInfo’ was not declared in this scope
chrome/common/zip.cc:194:37: error: ‘unzGoToNextFile’ was not declared in this scope
chrome/common/zip.cc:202:20: error: ‘unzClose’ was not declared in this scope
chrome/common/zip.cc: In function ‘bool AddFileToZip(zipFile, const FilePath&)’:
chrome/common/zip.cc:220:65: error: ‘zipWriteInFileInZip’ was not declared in this scope
chrome/common/zip.cc: In function ‘bool AddEntryToZip(zipFile, const FilePath&, const FilePath&)’:
chrome/common/zip.cc:249:40: error: ‘zipOpenNewFileInZip’ was not declared in this scope
chrome/common/zip.cc:259:43: error: ‘zipCloseFileInZip’ was not declared in this scope
chrome/common/zip.cc: In function ‘bool Zip(const FilePath&, const FilePath&, const base::Callback<bool(const FilePath&)>&)’:
chrome/common/zip.cc:280:73: error: ‘zipOpen’ was not declared in this scope
chrome/common/zip.cc:311:40: error: ‘zipClose’ was not declared in this scope
make: *** [out/Release/obj.target/common/chrome/common/zip.o] Error 1



emerge --info
Portage 2.2.0_alpha58 (default/linux/amd64/10.0, gcc-4.6.1, glibc-2.14-r0, 3.0.4-gentoo x86_64)
=================================================================
System uname: Linux-3.0.4-gentoo-x86_64-Intel-R-_Core-TM-_i7-2600K_CPU_@_3.40GHz-with-gentoo-2.0.3
Timestamp of tree: Sat, 17 Sep 2011 13:45:01 +0000
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          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.53.0.2
sys-devel/gcc:            4.6.1-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.14
Repositories: gentoo tcg
Installed sets: 
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -fomit-frame-pointer -pipe -floop-interchange -floop-strip-mine -floop-block"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /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="-O2 -march=native -fomit-frame-pointer -pipe -floop-interchange -floop-strip-mine -floop-block"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
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://mirror.netcologne.de/gentoo/ http://chi-10g-1-mirror.fastsoft.net/pub/linux/gentoo/gentoo-distfiles/ ftp://chi-10g-1-mirror.fastsoft.net/pub/linux/gentoo/gentoo-distfiles/ ftp://mirrors.rit.edu/gentoo/ ftp://gentoo.cites.uiuc.edu/pub/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US en"
MAKEOPTS="-j9"
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="/usr/local/portage"
SYNC="rsync://rsync21.us.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi addressbook alsa amd64 amr apache2 audiofile avahi avi bash-completion berkdb bzip2 cairo caps cdaudio cddb cdparanoia cdr cdrdao chm cli consolekit cracklib crypt cups curl cxx dbus designer-plugin devicekit djvu dri dts dv dvb dvd dvdr dvdread ebook encode exif fam ffmpeg flac fortran gdbm gif glitz gmp gnome gphoto2 gpm gps graphite gstreamer gtk gtk2 htmlhandbook iconv icu ieee1394 imagemagick imap imlib ipv6 jack java jpeg jpeg2k kpathsea lame lcd lcms ldap libffi libnotify mad marble midi mmap mmx modules mozcalendar mozilla mp3 mudflap multilib musicbrainz ncurses nepomuk nls nodrm nptl nptlonly nsplugin nvidia ofx ogg oggvorbis opencore-amr openexr opengl openmp pam pcre pdf perl png policykit pppd pulseaudio python quicktime readline samba sasl scanner sdl semantic-desktop session slp smp sndfile spell sse sse2 ssl subversion svg sysfs tcltk theora threads tiff tk transparency truetype udev unicode usb utf8 vcd vim-syntax vorbis wav wavpack wmf x264 xattr xcomposite xine xml xorg xscreensaver xv xvid xvmc zlib" ALSA_CARDS="hda-intel hdsp" 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="*" 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="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" QEMU_SOFTMMU_TARGETS="i386 x86 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Mike Gilbert gentoo-dev 2011-09-17 16:49:45 UTC
Seems like a problem with headers, or a compiler quirk.

What version of sys-libs/zlib do you have?
Can you try building with gcc-4.4 or gcc-4.5?
Comment 2 Mike Gilbert gentoo-dev 2011-09-17 16:57:24 UTC
Bug 383347 and the following change seem to point to a headers problem.

*zlib-1.2.5.1-r1 (16 Sep 2011)

  16 Sep 2011; Mike Frysinger <vapier@gentoo.org> +zlib-1.2.5.1-r1.ebuild:
  Rename OF/ON defines in exported header to avoid collisions with other
  packages #383179 by Ben Longbons.
Comment 3 Mike Gilbert gentoo-dev 2011-09-17 16:58:09 UTC
*** Bug 383347 has been marked as a duplicate of this bug. ***
Comment 4 Mike Gilbert gentoo-dev 2011-09-17 17:06:13 UTC
Base system:

We build chromium against system zlib headers. We also build a bundled copy of "minizip" (from zlib/contrib), for which there is no package in portage. minizip uses the OF macro.

Is this change to zlib permanent, or something that may soon be reverted? Suggestions for fixing this?
Comment 5 SpanKY gentoo-dev 2011-09-17 20:49:34 UTC
i wonder if we can add a USE flag to zlib to build minizip so chromium can depend on that ...

in the mean time, it's easy to do:
    append-cppflags -D'OF(x)=x'
Comment 6 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2011-09-17 21:38:27 UTC
(In reply to comment #5)
> i wonder if we can add a USE flag to zlib to build minizip so chromium can
> depend on that ...

That would be pretty cool. +1
Comment 7 Mike Gilbert gentoo-dev 2011-09-17 21:39:46 UTC
(In reply to comment #5)
> i wonder if we can add a USE flag to zlib to build minizip so chromium can
> depend on that ...
> 

I like that idea, but I'm not sure how to make it work.

It looks like chromium doesn't actually use the minizip binary, but rather directly uses some minizip functions that are defined in these files:

'contrib/minizip/ioapi.c',
'contrib/minizip/ioapi.h',
'contrib/minizip/unzip.c',
'contrib/minizip/unzip.h',
'contrib/minizip/zip.c',
'contrib/minizip/zip.h',

For reference:

http://src.chromium.org/viewvc/chrome/trunk/src/third_party/zlib/zlib.gyp
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/zip.cc?view=markup
Comment 8 SpanKY gentoo-dev 2011-09-17 23:02:05 UTC
yeah, that won't work then.  i don't want to distribute minizip as a static lib for people to link in since it isn't designed for that.

this one liner in chromium should fix the build and work with any zlib version:
  sed -i '1i#define OF(x) x' third_party/zlib/contrib/minizip/*.c || die
Comment 9 Mike Gilbert gentoo-dev 2011-09-18 03:11:17 UTC
I have added a variation of that to chromium 14, 15, and 9999. Thanks Mike.

I don't think there is a cleaner way to fix this, until/unless that zlib change gets accepted upstream.
Comment 10 Chris Smith 2011-09-18 18:49:53 UTC
(In reply to comment #8)
> this one liner in chromium should fix the build and work with any zlib version:
>   sed -i '1i#define OF(x) x' third_party/zlib/contrib/minizip/*.c || die

sys-libs/zlib-1.2.5.1-r1 also prevents vlc from building, reverting to sys-libs/zlib-1.2.5.1 allows it to build again
Comment 11 SpanKY gentoo-dev 2011-09-18 19:09:20 UTC
(In reply to comment #10)

this bug is only about chromium.  if you have a diff pkg, then file a diff bug.
Comment 12 Chris Smith 2011-09-18 19:14:58 UTC
(In reply to comment #11)
> (In reply to comment #10)
> 
> this bug is only about chromium.  if you have a diff pkg, then file a diff bug.

Besides this bug, bugs 383349, 383351, 383309 have all been filed regarding zlib-1.2.5.1-r1. Just providing a heads up that maybe this isn't a chromium bug as much as it's a zlib bug.
Comment 13 SpanKY gentoo-dev 2011-09-18 19:33:29 UTC
(In reply to comment #12)

once again, this is Bug 383371 -- for chromium.  *any* other package is off topic, so please desist.
Comment 14 Nicolas Schlumberger 2011-09-18 19:33:58 UTC
*** Bug 383535 has been marked as a duplicate of this bug. ***