Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 465516 - games-fps/eduke32: doesn't build against libpng-1.6
Summary: games-fps/eduke32: doesn't build against libpng-1.6
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: libpng16
  Show dependency tree
 
Reported: 2013-04-11 12:30 UTC by Mike MacDonald
Modified: 2013-04-11 14:17 UTC (History)
0 users

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


Attachments
A patch to fix the build on libpng-1.6 (eduke32-20130317.3572-no-png_sizeof-in-libpng-1.6.patch,1023 bytes, patch)
2013-04-11 13:25 UTC, Mike MacDonald
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike MacDonald 2013-04-11 12:30:30 UTC
eduke32 doesn't build against >=dev-libs/libpng-1.6.0beta27, size a function it calls (png_sizeof) was renamed.

Reproducible: Always

Steps to Reproduce:
1. emerge -1 eduke32
Actual Results:  
emake failed.

Expected Results:  
eduke32 is installed.

Yes, I am using funtoo, but it does not effect any involved packages.

Portage 2.3.5-r7 (funtoo/1.0/linux-gnu/arch/x86-64bit, gcc-4.6.3, glibc-2.15-r3, 3.7.6-gentoo-mikemac1 x86_64)
=================================================================
System uname: Linux-3.7.6-gentoo-mikemac1-x86_64-AMD_Phenom-tm-_II_X6_1090T_Processor-with-gentoo-2.2.0
KiB Mem:    16409200 total,    554628 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Thu, 11 Apr 2013 05:45:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12-r1000
dev-lang/python:          2.7.4-r1000, 3.2.4-r1000
dev-util/cmake:           2.8.10.2-r1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2.0-r4
sys-apps/openrc:          0.10.2-r7
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.4_p6-r1, 1.9.6-r3, 1.10.3, 1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.5-r1
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo sunrise local
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/polkit-1/actions /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS=" --quiet-build=n --keep-going"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync mini-manifest news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"                                
FFLAGS=""                                                                                                                                               
GENTOO_MIRRORS="http://distfiles.gentoo.org"                                                                                                            
LANG="en_US.UTF-8"                                                                                                                                      
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"                                                                                                     
LINGUAS="en en_US fr fr_FR"                                                                                                                             
MAKEOPTS="-j6"                                                                                                                                          
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /usr/local/portage"
SYNC="git://github.com/funtoo/ports-2012.git"
SYNC_USER="root"
USE="10bit 3dnow 3dnowext 64bit X a52 aac aacs aalib acl acpi aften aim aio alisp alsa amd64 apng ass assistant audio audiofile autotrace avahi bash-completion berkdb bfq binfilter bluetooth bluray boost branding bzip2 cairo cdaudio cdda cddb cdinstall cdio cdr clucene colordiff consolekit corefonts cracklib crypt css ctype ctypes-python cups curl cxx dbus declarative device-mapper djvu dri drm dts dvd dvdnav dvdr dvdread egl emovix enca encode equalizer espeak exceptions exif expat expoblending extras faad fam festival ffmpeg fftw firefox flac fluidsynth font-styles fontconfig fontforge fonts fortune freetts frei0r ftp fuse g3dvl gallium gbm gd gdbm geoip gif gimp git glamor gles2 glib glut gmp gnutls gpm graphite grp grub gs gsm gstreamer gtk gudev gzip hddtemp hog holidays hpn hwdb iconv icu id3 id3tag ieee1394 imagemagick imlib inotify introspection ipc ipv6 ipython java java6 javascript jbig jit joystick jpeg jpeg2k kate kde kdecards kdenlive keymap kipi kvm kvm-trace ladspa lame lensfun libass libcaca libkms libmms libnotify libsamplerate libvisual llvm lm_sensors lzma lzo mac mad man mathml matplotlib matroska mbox melt mercurial metis midi mikmod minizip mjpeg mmap mms mmx mmxext mng mod modplug modules mono mozilla mp3 mp4 mpd mpeg mpg123 mpi-threads mplayer mudflap multilib multimedia musepack music mvl mysql ncurses network nls normalize notebook nptl nsplugin ntfs ntp objc objc++ objc-gc ocr offensive ogg ogg123 ogm okular openal openexr opengl openmp openssl opus oscar pam pango panorama pcre pdf pdfimport perl phonon plasma plugins png policykit postscript ppds pppd prison projectm ps pulseaudio pyglet pygobject python qemu qemu-ifup qt qt3support qt4 qtscript quad quicktime rar raw readline realtime redeyes regex regexp reiserfs replaygain resolvconf romio rpc rtc ruby samba sasl scanner schroedinger script sdl sdl-image secure-delete semantic-desktop sharedmem shm shorten smbclient smp sndfile sockets socks5 sound soundcloud sounds sox speech speex spell sql sqlite sqlite3 sse sse2 sse3 sse4a ssh ssl startup-notification subversion svg system-jpeg system-sqlite taglib tcpd textures theora threads tiff timidity tk toilet tools tordns transcode truetype udev udisks ukit umfpack unicode unlock-notify upnp urandom usb utils vaapi vcd vcdx vde vdpau videos virtuoso vlc vorbis vpx wad wav wavpack webkit webkit2 webm webp win32 win64 wininst wma wmf wxwidgets x264 xattr xcb xcomposite xine xinerama xml xorg xosd xpm xrandr xrender xscreensaver xulrunner xv xvid xvmc zip zlib" ABI_X86="64" ALSA_CARDS="hda-intel" 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 authn_core authz_core socache_shmcb unixd" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="canon 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 joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver presenter-console presenter-minimizer scripting-beanshell scripting-javascript wiki-publisher pdfimport" LINGUAS="en en_US fr fr_FR" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_ABIS="2.7 3.2 2.7-pypy-2.0" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby19" SANE_BACKENDS="brscan3" USERLAND="GNU" VIDEO_CARDS="radeon r600" 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, SYNC_UMASK
Comment 1 Julian Ospald 2013-04-11 12:46:38 UTC
funtoo does have it's own repository. Even if they mirror it from gentoo I have no idea what is happening there, what patches they apply and I don't even care what they do.

I will test this and try to confirm/fix/report to upstream, but that still makes this report invalid.
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2013-04-11 13:01:09 UTC
(In reply to comment #1)
> I will test this and try to confirm/fix/report to upstream, but that still
> makes this report invalid.

how is that? libpng 1.6 is in gentoo-x86 ~arch and the package fails with or without funtoo. I can confirm this on Gentoo.

1. The build uses -Werror-implicit-function-declaration that causes "cc1: some warnings being treated as errors"

2. The build fails with:

src/engine.c: In function ‘screencapture_png’:
src/engine.c:16115:9: error: implicit declaration of function ‘png_sizeof’ [-Werror=implicit-function-declaration]
         palette = (png_colorp)png_malloc(png_ptr, 256*png_sizeof(png_color));
         ^
src/engine.c:16115:66: error: expected expression before ‘png_color’
         palette = (png_colorp)png_malloc(png_ptr, 256*png_sizeof(png_color));
                                                                  ^
src/engine.c:16132:56: error: expected expression before ‘png_text’
     text = (png_textp)png_malloc(png_ptr, 2*png_sizeof(png_text));

So these should be done:

1. png_sizeof() should be replaced by #include <string.h> and sizeof()
2. -Werror-implicit-function-declaration patched out from the build system
Comment 3 Julian Ospald 2013-04-11 13:05:41 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > I will test this and try to confirm/fix/report to upstream, but that still
> > makes this report invalid.
> 
> how is that? libpng 1.6 is in gentoo-x86 ~arch and the package fails with or
> without funtoo. I can confirm this on Gentoo.

Yes, and until someone confirms the bug on gentoo all funtoo bugs are invalid.
Comment 4 Mike MacDonald 2013-04-11 13:25:46 UTC
Created attachment 345220 [details, diff]
A patch to fix the build on libpng-1.6

Since sizeof works like png_sizeof from libpng-1.4 on, and the oldest libpng in slot 0 (the DEPENDed on one) is >=1.4, there does not need to be any conditional logic in applying this patch.

Editing the existing build system patch to strip out -Werror seems a larger task than I have time for at the moment, and the attached patch is sufficient to fix the build.
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2013-04-11 13:44:14 UTC
(In reply to comment #4)
> Created attachment 345220 [details, diff] [details, diff]
> A patch to fix the build on libpng-1.6
> 
> Since sizeof works like png_sizeof from libpng-1.4 on, and the oldest libpng
> in slot 0 (the DEPENDed on one) is >=1.4, there does not need to be any
> conditional logic in applying this patch.

nod, looks good

the ebuild should have EAPI="5" and >=media-libs/libpng-1.5:0= as a dependency, 1.5 to force recent enough version, :0 to get headers and such, and = to get automatic rebuilds

> Editing the existing build system patch to strip out -Werror seems a larger
> task than I have time for at the moment, and the attached patch is
> sufficient to fix the build.

It would be enough to add `append-cflags -Wno-error` to counter-effect the build systems -Werror* flags
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2013-04-11 13:46:40 UTC
(In reply to comment #5)
> > Editing the existing build system patch to strip out -Werror seems a larger
> > task than I have time for at the moment, and the attached patch is
> > sufficient to fix the build.
> It would be enough to add `append-cflags -Wno-error` to counter-effect the
> build systems -Werror* flags

Sorry, I was wrong about this. The build system adds it's flags later, so it won't help to set -Wno-error like that.
Comment 7 Julian Ospald 2013-04-11 14:17:42 UTC
it's not desired to strip _specific_ Werror flags unless they break shit (at least QA says so)

also: when writing a patch like this we can't assume gentoo packages when we want it to be included upstream, so a conditional logic is cleaner imo


+  11 Apr 2013; Julian Ospald <hasufell@gentoo.org>
+  eduke32-20130317.3572-r1.ebuild,
+  +files/eduke32-20130317.3572-libpng-1.6.patch:
+  fix build with libpng-1.6