Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 380127 - media-tv/xbmc fails to build with libpng-1.5
Summary: media-tv/xbmc fails to build with libpng-1.5
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Xbox project
URL:
Whiteboard:
Keywords:
: 388683 (view as bug list)
Depends on:
Blocks: libpng-1.5
  Show dependency tree
 
Reported: 2011-08-21 18:40 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2011-10-27 21:09 UTC (History)
4 users (show)

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


Attachments
Build log (compressed) (xbmc-10.1:20110821-104459.log.xz,75.25 KB, application/x-xz)
2011-08-21 18:43 UTC, Diego Elio Pettenò (RETIRED)
Details
Untested patch (due to also failing with glibc-2.14) (xbmc-10.1-libpng15.patch,606 bytes, patch)
2011-09-15 11:48 UTC, Samuli Suominen (RETIRED)
Details | Diff
modifies the bundled cximage-6.0 lib for libpng-1.5 support (xbmc-png.patch,19.35 KB, patch)
2011-09-16 21:51 UTC, Ian Stakenvicius (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2011-08-21 18:40:54 UTC
Portage 2.1.10.10 (default/linux/x86/10.0, gcc-4.6.0-asneeded, glibc-2.14-r0, 3.0.0 i686)
=================================================================
System uname: Linux-3.0.0-i686-Quad-Core_AMD_Opteron-tm-_Processor_2350-with-gentoo-2.0.3
Timestamp of tree: Fri, 12 Aug 2011 12:30:01 +0000
distcc[953] (dcc_get_top_dir) Warning: HOME is not set; can't find distcc directory [disabled]
ccache version 3.1.5 [disabled]
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r2, 3.2-r2
dev-util/ccache:          3.1.5
dev-util/cmake:           2.8.5-r2
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.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
sys-devel/gcc:            4.6.0
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.38 (virtual/os-headers)
sys-libs/glibc:           2.14
Repositories: gentoo
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/entropy /usr/share/bufrtables /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf /usr/share/openvpn/easy-rsa /usr/share/qpsmtpd/plugins /usr/share/themes/oxygen-gtk/gtk-2.0 /var/bind /var/lib/hsqldb /var/phxd /var/vpopmail/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/games/angband/edit/ /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.5/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 -pipe"
DISTDIR="/var/cache/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms split-log strict test test-fail-continue unknown-features-warn unmerge-orphans userfetch userpriv usersandbox"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.wheel.sk/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
MAKEOPTS="-j14"
PKGDIR="/var/spool/portage/packages"
PORTAGE_COMPRESS=""
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=ChangeLog"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/cache/portage/tree"
PORTDIR_OVERLAY=""
SYNC="rsync://yamato.home.flameeyes.eu/gentoo-portage"
USE="acl berkdb bzip2 cli cracklib crypt cups cxx dri fortran gdbm gpm iconv ipv6 java5 java6 modules mudflap mysql ncurses nls nostatic nptl nptlonly openmp pam pcre pcsc-lite perl png postgres pppd python qt3support readline semantic-desktop session ssl sysfs tcpd unicode vhosts x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 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 auth_digest cgi" CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words" 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18 jruby ruby19 ree18" USERLAND="GNU" VIDEO_CARDS="intel radeon nouveau vmware" 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, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-08-21 18:43:34 UTC
Created attachment 284139 [details]
Build log (compressed)
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2011-09-15 11:42:15 UTC
> ximapng.h:72:25: error: invalid use of incomplete type ‘png_struct’
> ximapng.h:73:18: error: invalid use of incomplete type ‘png_struct’

These appear to be the problem, but the package fails to compile also with glibc-2.14 per the attached build.log:

/var/tmp/portage/media-tv/xbmc-10.1/work/xbmc-10.1/xbmc/lib/libPython/Python/Modules/nismodule.c:17:21: fatal error: rpc/rpc.h: No such file or directory

so I'm not sure if I can test it, even if I wrote patch for it...
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2011-09-15 11:48:17 UTC
Created attachment 286541 [details, diff]
Untested patch (due to also failing with glibc-2.14)

Please test and commit
Comment 4 Ian Stakenvicius (RETIRED) gentoo-dev 2011-09-16 21:51:17 UTC
Created attachment 286713 [details, diff]
modifies the bundled cximage-6.0 lib for libpng-1.5 support

This patch works; tested it against xbmc-10.1 on a "x86" system with libpng-1.5 manually qmerged and sdl-image re-emerged (so that it too was built against libpng-1.5).

I had very little to actually test xbmc against at runtime, but the skin i was using contains all PNG graphics so I believe the patch is successful and safe.

This patch also does the fixes in a backwards-compatible way, such as would be appropriate for upstream to apply.  All changes only take effect against libpng-1.4 and above.  I'm going to post it in the cximage forum, but this should be submitted to xbmc upstream.
Comment 5 Ian Stakenvicius (RETIRED) gentoo-dev 2011-09-17 02:12:47 UTC
As for the glibc-2.14 bug, xbmc bundles python-2.4 so if a patch can be made for that then it can be applied to xbmc as well..
Comment 6 Ian Stakenvicius (RETIRED) gentoo-dev 2011-09-17 02:41:42 UTC
my patch also works on xbmc-9999 btw, except that upstream changed the source files from DOS format to unix format (so the patch file itself needs to be converted first)
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2011-09-17 19:13:13 UTC
(In reply to comment #6)
> my patch also works on xbmc-9999 btw, except that upstream changed the source
> files from DOS format to unix format (so the patch file itself needs to be
> converted first)

your patch is a bit weird for not fixing the errors in the .h file, like the previous patch did

anyway, netbsd has a patch for net-im/amsn, also in portage now, it fixes the same bundled cximage 

perhaps it's worth to reuse the amsn patch for xbmc
Comment 8 SpanKY gentoo-dev 2011-09-18 00:42:27 UTC
update your tree and re-emerge glibc-2.14.  rpc support was restored.
Comment 9 SpanKY gentoo-dev 2011-09-18 01:36:15 UTC
(In reply to comment #3)

this patch is incomplete.  i have a half written one locally, but got bored with fixing cximage.

(In reply to comment #7)

his patch does fix the header like yours does
Comment 11 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-09-19 23:51:04 UTC
*** Bug 383731 has been marked as a duplicate of this bug. ***
Comment 12 Tomasz Golinski 2011-09-21 15:51:19 UTC
It seems it is only partially fixed, since xbmc-9999 is still affected. I confirm that patch in the tree works with 9999 after converting dos to unix. It would be nice if it would be also in tree.
Comment 13 SpanKY gentoo-dev 2011-09-21 16:06:14 UTC
i dont patch live sources.  you want that fixed, then hassle upstream.
Comment 14 Craig Andrews gentoo-dev 2011-09-26 01:52:43 UTC
FYI - this appears to be the relevant upstream bug:
http://trac.xbmc.org/ticket/11977
Comment 15 Ian Stakenvicius (RETIRED) gentoo-dev 2011-09-26 16:06:48 UTC
That upstream bug states that they should start using the embedded libpng-1.4 instead of fixing...  

Thanks very much for posting the patch there; would it be possible for you to add a comment stating that this patch migrates cximage-6.0 to libpng-1.5?
Comment 16 Craig Andrews gentoo-dev 2011-09-26 16:21:37 UTC
(In reply to comment #15)
> That upstream bug states that they should start using the embedded libpng-1.4
> instead of fixing...  
> 
> Thanks very much for posting the patch there; would it be possible for you to
> add a comment stating that this patch migrates cximage-6.0 to libpng-1.5?

Comment added. And I realized that since we're making a very different request than the original ticket (which simply wants to stop using external libpng completely), I created a new ticket: http://trac.xbmc.org/ticket/12001
Comment 17 Samuli Suominen (RETIRED) gentoo-dev 2011-10-27 21:09:50 UTC
*** Bug 388683 has been marked as a duplicate of this bug. ***