how to reproduce: USE="-* bzip2" emerge -pv dpkg result: Making all in lib make[2]: Entering directory `/var/tmp/portage/dpkg-1.13.11/work/dpkg-1.13.11/lib' if i686-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I. -I.. -DLOCALEDIR=\"/usr/share/locale\" -I../intl -DCONFIGDIR=\"/etc/dpkg\" -DCOPYINGFILE=\"/usr/share/common-licenses/GPL-2\" -O2 -march=pentium3 -fomit-frame-pointer -MT compat.o -MD -MP -MF ".deps/compat.Tpo" -c -o compat.o compat.c; \ then mv -f ".deps/compat.Tpo" ".deps/compat.Po"; else rm -f ".deps/compat.Tpo"; exit 1; fi if i686-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I. -I.. -DLOCALEDIR=\"/usr/share/locale\" -I../intl -DCONFIGDIR=\"/etc/dpkg\" -DCOPYINGFILE=\"/usr/share/common-licenses/GPL-2\" -O2 -march=pentium3 -fomit-frame-pointer -MT compression.o -MD -MP -MF ".deps/compression.Tpo" -c -o compression.o compression.c; \ then mv -f ".deps/compression.Tpo" ".deps/compression.Po"; else rm -f ".deps/compression.Tpo"; exit 1; fi compression.c: In function 'decompress_cat': compression.c:72: error: 'Z_ERRNO' undeclared (first use in this function) compression.c:72: error: (Each undeclared identifier is reported only once compression.c:72: error: for each function it appears in.) make[2]: *** [compression.o] Error 1 make[2]: Leaving directory `/var/tmp/portage/dpkg-1.13.11/work/dpkg-1.13.11/lib' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/dpkg-1.13.11/work/dpkg-1.13.11' make: *** [all] Error 2 emerge info: Portage 2.1.1-r2 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.5-r0, 2.6.18-gentoo-r6 i686) ================================================================= System uname: 2.6.18-gentoo-r6 i686 AMD Athlon(tm) Gentoo Base System version 1.12.6 Last Sync: Unknown app-admin/eselect-compiler: [Not Present] dev-java/java-config: 1.3.7, 2.0.31 dev-lang/python: 2.4.3-r4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.14 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.17-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium3 -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/X11/xkb /usr/share/config /var/qmail/alias /var/qmail/control" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-O2 -march=pentium3 -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig cvs distlocks metadata-transfer sandbox sfperms strict userfetch userpriv usersandbox" GENTOO_MIRRORS="http://mirror.uni-c.dk/pub/gentoo/ " LINGUAS="de da en_GB" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/home/bangert/gentoo/gentoo-x86" PORTDIR_OVERLAY="/usr/local/portage" SYNC="cvs://bangert@cvs.gentoo.org:/var/cvsroot" USE="x86 X a52 aac acl acpi aim alsa alsa_cards_ali5451 alsa_cards_als4000 alsa_cards_atiixp alsa_cards_atiixp-modem alsa_cards_bt87x alsa_cards_ca0106 alsa_cards_cmipci alsa_cards_emu10k1 alsa_cards_emu10k1x alsa_cards_ens1370 alsa_cards_ens1371 alsa_cards_es1938 alsa_cards_es1968 alsa_cards_fm801 alsa_cards_hda-intel alsa_cards_intel8x0 alsa_cards_intel8x0m alsa_cards_maestro3 alsa_cards_trident alsa_cards_usb-audio alsa_cards_via82xx alsa_cards_via82xx-modem alsa_cards_ymfpci alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol audiofile bash-completion berkdb bitmap-fonts browserplugin bzip2 bzlib cairo cdparanoia cdr cli cracklib crypt cups dbus divx4linux dlloader dri dvd dvdr dvdread eds elibc_glibc emboss encode exif expat fam ffmpeg firefox flac font-server gdbm gif gpgme gpm gstreamer gtalk gtk hal iconv icq idn imap input_devices_keyboard input_devices_mouse isdnlog jabber javascript jpeg jpeg2k kde kernel_linux lcd_devices_bayrad lcd_devices_cfontz lcd_devices_cfontz633 lcd_devices_glk lcd_devices_hd44780 lcd_devices_lb216 lcd_devices_lcdm001 lcd_devices_mtxorb lcd_devices_ncurses lcd_devices_text lcms ldap libcaca libg++ linguas_da linguas_de linguas_en_GB mad maildir memlimit mhash midi mime mmx mng mozilla mp3 mpeg mpeg4 mplayer msn ncurses nls nodrm nptl nptlonly ogg opengl oscar pam pcmcia pcre perl pic png ppds pppd python qt3 qt4 quicktime rdesktop readline reflection ruby scanner sdl session slp sndfile speex spell spl sse ssl startup-notification subversion svg tga theora threads tiff truetype truetype-fonts type1-fonts udev unicode usb userland_GNU v4l v4l2 vhosts video_cards_fbdev video_cards_radeon video_cards_vesa vnc vorbis wifi win32codecs wmf xface xml xorg xosd xpm xprint xrandr xv xvid zeroconf zlib" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS
filed with upstream dpkg maintainers; their bzip2 incorrectly utilizes zlib defines in error checking when it should be using bzip2 defines ...
just for easier reference: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=410605
the URL field of the bug report is already set ...
apparently upstream fixed this in dpkg-1.14.0
1.14.12 now in the tree