Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 368601 - dev-python/pycairo-1.10.0-r1 SVG support isn't installed despite USE-flag set
Summary: dev-python/pycairo-1.10.0-r1 SVG support isn't installed despite USE-flag set
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard: python-overlay
Keywords: InOverlay, InVCS
Depends on:
Blocks:
 
Reported: 2011-05-24 15:17 UTC by Henry Gebhardt
Modified: 2011-07-06 20:00 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,12.78 KB, text/plain)
2011-06-17 16:44 UTC, Alec Meyers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Henry Gebhardt 2011-05-24 15:17:50 UTC
The SVG support is not installed, although the svg USE-flag is set.

Reproducible: Always

Steps to Reproduce:
1. USE="svg examples" emerge -av pycairo
2. python2 /usr/share/doc/pycairo-1.10.0-r1/examples/cairo_snippets/snippets_svg.py

Actual Results:  
"cairo was not compiled with SVG support"

Expected Results:  
Install SVGSurface binding.

# USE="examples svg" emerge --info pycairo
Portage 2.1.9.49 (default/linux/amd64/10.0/desktop/gnome, gcc-4.5.2, glibc-2.13-r2, 2.6.39 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.39-x86_64-Intel-R-_Core-TM-2_Duo_CPU_L7500_@_1.60GHz-with-gentoo-2.0.2
Timestamp of tree: Sat, 21 May 2011 21:30:01 +0000
ccache version 3.1.4 [enabled]
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.6.6-r2::sage-on-gentoo, 2.7.1-r1::sage-on-gentoo, 3.1.3-r1, 3.2
dev-util/ccache:          3.1.4
dev-util/cmake:           2.8.4-r1
sys-apps/baselayout:      2.0.2
sys-apps/openrc:          0.8.2-r1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.8.5-r4, 1.10.3, 1.11.1-r1
sys-devel/binutils:       2.21
sys-devel/gcc:            4.5.2
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82
sys-kernel/linux-headers: 2.6.38 (virtual/os-headers)
sys-libs/glibc:           2.13-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="assume-digests binpkg-logs ccache distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://ftp.twaren.net/Linux/Gentoo/ ftp://gentoo.imj.fr/pub/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US de"
MAKEOPTS="-j2"
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/science /var/lib/layman/lxde /var/lib/layman/sage-on-gentoo /var/lib/layman/mgorny /usr/local/portage/barbieri-playground /usr/local/portage/systemd /usr/local/portage/kork"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acct acpi alsa amd64 apng archive aspell autoipd avahi bash-completion berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib cscope cups cxx data dbus dns dri dts dvd dvdr dvi emboss encode evo examples exif faac faad fam fat fbcon ffmpeg firefox flac fontconfig fortran fortune gcj gdbm gdm gdu gif git gmp gnome gnome-keyring gpm graphics gsm gstreamer gtk h323 hdaps hddtemp humanities iconv imap inotify iplayer ipv6 ipython irc ithreads jabber jingle jpeg kpathsea laptop latex lcms libnotify lm_sensors mad mdnsresponder-compat mikmod mmx mmxext mng modules mp3 mp4 mpeg mpi mudflap multilib nautilus ncurses networkmanager nls nntp normalize nptl nptlonly nsplugin ogg opengl openmp optimization pam pango pari24 pcre pdf perl pipechan png policykit portaudio ppds pppd pstricks python qt3support readline replaygain sage science sdl session sip smp spell sse sse2 ssl ssse3 startup-notification subversion svg sysfs systemd tcpd theora thinkpad threads tiff tk truetype udev unicode usb v4l2 vim-pager vim-syntax vim-with-x vorbis wav webkit wicd wifi wimax x264 xcb xcomposite xetex xinerama xml xorg xpm xrandr xulrunner xv xvid xvmc zlib" 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" CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="plymouth" 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 en_US de" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel fbdev vesa" 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

=================================================================
                        Package Settings
=================================================================

dev-python/pycairo-1.10.0-r1 was built with the following:
USE="examples (multilib) svg -doc -test"

Some preliminary investigation showed, that the patch files/py2cairo-1.10.0-svg_check.patch doesn't work as expected.
Comment 1 Rafał Mużyło 2011-05-24 17:17:28 UTC
The relevant build log wouldn't be out of place here...

But anyway, it's not quite the patch, that causes the problem, it's actually a quirk triggered by the build system/packaging.

In src/ (only in py2 tarball, py3 is waf only), there's config.h.in and the generated by autotools config.h. Unfortunately, that means that during waf build there are two config.h and compiler picks one in src/ - without PYCAIRO_ENABLE_SVG definition.

Trivial fix - 'rm "${WORKDIR}/${P}-${PYTHON_ABI}"/src/config.h' after copying py2 sources.

Upstream may want to know.
Comment 2 Henry Gebhardt 2011-05-24 20:54:34 UTC
(In reply to comment #1)
> The relevant build log wouldn't be out of place here...

Yeah, should have done that, sorry. I guess it isn't needed anymore?

> ...
> Trivial fix - 'rm "${WORKDIR}/${P}-${PYTHON_ABI}"/src/config.h' after copying
> py2 sources.

Yes, I can confirm that putting that line like this solves the problem:

--- pycairo-1.10.0-r1.ebuild	2011-05-24 22:45:22.852530742 +0200
+++ pycairo-1.10.0-r2.ebuild	2011-05-24 22:45:12.062666390 +0200
@@ -37,6 +37,7 @@
 	popd > /dev/null
 
 	pushd "${WORKDIR}/py2cairo-${PYCAIRO_PYTHON2_VERSION}" > /dev/null
+	rm src/config.h || die
 	epatch "${FILESDIR}/py2cairo-1.10.0-svg_check.patch"
 	popd > /dev/null
Comment 3 Alec Meyers 2011-06-17 16:43:22 UTC
I can confirm that Henry's fix works.
Comment 4 Alec Meyers 2011-06-17 16:44:00 UTC
Created attachment 277391 [details]
build.log

Here's a build.log
Comment 5 Alessandro Guido 2011-07-05 12:58:04 UTC
Had the same problem and the suggested fix worked for me too.
Comment 6 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-07-05 23:23:45 UTC
Fixed in python overlay.
Comment 7 Dirkjan Ochtman (RETIRED) gentoo-dev 2011-07-06 19:52:39 UTC
I've committed this fix to the portage tree (I've made a similar fix to the Python 3 version of the code, I hope that works the same way).

I don't think reporting to upstream makes sense here, since the way we do the svg use flag selection seems kind of gentoo-specific.
Comment 8 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-07-06 20:00:06 UTC
(In reply to comment #7)
> (I've made a similar fix to the Python 3 version of the code, I hope
> that works the same way).

There is no src/config.h in tarball for Python 3 version of pycairo.