Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 337821 - x11-libs/cairo-1.10.0-r3 fails to compile with openvg use flag
Summary: x11-libs/cairo-1.10.0-r3 fails to compile with openvg use flag
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-18 06:56 UTC by vp
Modified: 2011-03-08 12:03 UTC (History)
6 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 vp 2010-09-18 06:56:10 UTC
x11-libs/cairo-1.10.0-r3 fails to compile with openvg use flag

Reproducible: Always

Steps to Reproduce:
1. USE="openvg" emerge cairo
2.
3.

Actual Results:  
/bin/sh ../libtool --silent --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -I. -D_REENTRANT   -I/usr/include/pixman-1        -I/usr/include/freetype2    -I/usr/include/libdrm    -I/usr/include/libdrm   -I/usr/include/libpng14             -Wall -Wextra -Wold-style-definition -Wdeclaration-after-statement -Wmissing-declarations -Werror-implicit-function-declaration -Wnested-externs -Wpointer-arith -Wwrite-strings -Wsign-compare -Wstrict-prototypes -Wmissing-prototypes -Wpacked -Wswitch-enum -Wmissing-format-attribute -Wbad-function-cast -Wvolatile-register-var -Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations -Wno-missing-field-initializers -Wno-unused-parameter -Wno-attributes -Wno-long-long -Winline -Wlogical-op -fno-strict-aliasing -fno-common -flto -Wp,-D_FORTIFY_SOURCE=2 -DXCB_GENERIC_ERROR_HAS_MAJOR_MINOR_CODES -I../src/glew                          -O2 -march=x86-64 -pipe -fgcse-after-reload  -finline-limit=1200 -c -o cairo-vg-surface.lo cairo-vg-surface.c
cairo-vg-surface.c: In function ‘_vg_format_to_pixman’:
cairo-vg-surface.c:261:10: error: ‘VG_A_1’ undeclared (first use in this function)
cairo-vg-surface.c:261:10: note: each undeclared identifier is reported only once for each function it appears in
cairo-vg-surface.c:262:10: error: ‘VG_A_4’ undeclared (first use in this function)
cairo-vg-surface.c:246:5: warning: enumeration value ‘VG_IMAGE_FORMAT_FORCE_SIZE’ not handled in switch
cairo-vg-surface.c: In function ‘_vg_format_to_content’:
cairo-vg-surface.c:316:10: error: ‘VG_A_4’ undeclared (first use in this function)
cairo-vg-surface.c:317:10: error: ‘VG_A_1’ undeclared (first use in this function)
cairo-vg-surface.c:302:5: warning: enumeration value ‘VG_IMAGE_FORMAT_FORCE_SIZE’ not handled in switch
cairo-vg-surface.c: At top level:
cairo-vg-surface.c:1577:5: warning: initialization from incompatible pointer type
make[3]: *** [cairo-vg-surface.lo] Error 1
make[3]: Leaving directory `/var/tmp/portage/x11-libs/cairo-1.10.0-r3/work/cairo-1.10.0/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/x11-libs/cairo-1.10.0-r3/work/cairo-1.10.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/x11-libs/cairo-1.10.0-r3/work/cairo-1.10.0'
make: *** [all] Error 2
emake failed



emerge --info
Portage 2.2_rc83-r1 (default/linux/amd64/10.0/desktop, gcc-4.5.1, glibc-2.12.1-r1, 2.6.35-zen1+ x86_64)
=================================================================
System uname: Linux-2.6.35-zen1+-x86_64-Intel-R-_Core-TM-2_Duo_CPU_U9400_@_1.40GHz-with-gentoo-2.0.1
Timestamp of tree: Sat, 18 Sep 2010 05:15:01 +0000
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11
dev-lang/python:     2.5.4-r4, 2.6.5-r3, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.3::sabayon
sys-apps/sandbox:    2.3-r1
sys-devel/autoconf:  2.13, 2.67
sys-devel/automake:  1.7.9-r2, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.5.1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.35 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=x86-64 -pipe -fgcse-after-reload"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /usr/share/config/kdm /var/bind /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/portage /etc/revdep-rebuild /etc/sandbox.d /etc/skel /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -march=x86-64 -pipe -fgcse-after-reload"
DISTDIR="/var/portage/distfiles"
FEATURES="assume-digests collision-protect distlocks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://212.219.56.139/sites/www.ibiblio.org/gentoo/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1,--as-needed"
LINGUAS="en"
MAKEOPTS="-j3"
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="/var/portage/portage"
PORTDIR_OVERLAY="/var/portage/layman/zugaina /var/portage/layman/bazaar /var/portage/layman/bazaar /var/portage/layman/emacs /var/portage/layman/emacs /var/portage/layman/x11 /var/portage/layman/x11 /var/portage/layman/gamerlay /var/portage/layman/gamerlay /var/portage/layman/gamerlay /var/portage/layman/kde /var/portage/layman/multilib /var/portage/layman/sabayon /var/portage/layman/sunrise /var/portage/layman/sunrise /var/portage/layman/matsuu /var/portage/layman/matsuu /var/portage/layman/matsuu /var/portage/local"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac aalib accessibility acl acpi aim aio alltargets alsa amd64 applet async audiofile bazaar berkdb bidi branding bzip2 cairo caps ccache cdda cddb cdr chm cjk cleartype cli common-lisp compiz consolekit cracklib crypt css cups curl custom-cpuopts cxx dbus devhelp dhcpcd dri dts dv dvb dvd dvdr dvi eds elisp emacs emboss emerald encode esd evo exchange exif faac faad fam fame fat fbcon fbcondecor fbsplash festival ffmpeg fftw firefox flac flash fontconfig fuse gallium gconf gd gdbm gdu gif gimp git glade glitz gmail gmenu gmp gnome gnome-keyring gnuplot gnutls google-gadgets graphite graphviz grub gs gsf gsm gstreamer gtk gtkhtml guile hal hddtemp hfs hpcups hpijs hunspell iconv icq icu idn imap ipv6 irc irda jabber java java6 javascript jfs jingle jpeg jpeg2k kde kernel-patch kipi kvm lame laptop lcd lcms libcaca libkms libnotify lj llvm lm_sensors logrotate lto lzo mad mail matroska mbrola mikmod mmx mng modules mono motif mozdevelop mp3 mp3rtp mp4 mpeg msn mudflap multilib multilib_abi_amd64 multitarget musepack musicbrainz mysql nautilus ncurses network network-monitor networking networkmanager new-login nfs nls nptl nptlonly nsplugin ntfs ntp ofx ogg openal openexr opengl openmp optimization pam pango parted pcmcia pcre pda pdf perl php phyp pidgin png policykit portage ppds pppd pth python qemu qt3support qt4 quicktime quotas rar rdesktop readline reflection resolvconf rss samba sasl scanner schroedinger sdl secure-delete session slp sms speex spell sse sse2 ssl startup-notification stream subversion svg sysfs syslog taglib tcpd theora tiff truetype udev uml unicode upnp usb v4l v4l2 valgrind virtualbox visibility voice vorbis wifi wmf x264 xcb xcomposite xfs xinerama xml xorg xpm xrandr xulrunner xv xvid xvmc yahoo youtube zeroconf zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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 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" APACHE2_MPMS="prefork" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse void" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" LIRC_DEVICES="audio audio_alsa serial" MULTILIB_ABIS="amd64 x86" QEMU_SOFTMMU_TARGETS="i386 arm m68k x86_64" QEMU_USER_TARGETS="i386 arm m68k x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev vesa intel radeon r700 r600 i915" 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, FFLAGS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 jujubickoille 2010-09-18 07:27:04 UTC
I got same :

checking for cairo's OpenVG surface backend feature... 
checking VG/openvg.h usability... no
checking VG/openvg.h presence... no
checking for VG/openvg.h... no
checking whether cairo's OpenVG surface backend feature could be enabled... no (OpenVG headers not found)
configure: error:  OpenVG surface backend feature could not be enabled

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/x11-libs/cairo-1.10.0-r3/work/cairo-1.10.0/config.log
 * ERROR: x11-libs/cairo-1.10.0-r3 failed:
 *   econf failed
 * 
 * Call stack:
 *     ebuild.sh, line   56:  Called src_configure
 *   environment, line 3223:  Called econf '--disable-dependency-tracking' '--with-x' '--enable-xlib' '--enable-xlib-xrender' '--disable-quartz' '--disable-quartz-image' '--disable-test-surfaces' '--disable-directfb' '--disable-gtk-doc' '--enable-vg' '--enable-gl' '--disable-qt' '--disable-static' '--enable-svg' '--enable-xcb' '--enable-xcb-shm' '--enable-ft' '--enable-pdf' '--enable-png' '--enable-ps' '--disable-xlib-xcb' '--disable-drm' '--disable-gallium' '--disable-xcb-drm'
 *     ebuild.sh, line  558:  Called die
 * The specific snippet of code:
 *                      die "econf failed"
 * 
 * If you need support, post the output of 'emerge --info =x11-libs/cairo-1.10.0-r3',
 * the complete build log and the output of 'emerge -pqv =x11-libs/cairo-1.10.0-r3'.



There is no package *openVG* in portage, maybe it will come soon ?
Comment 2 Sergey Kondakov 2010-09-24 10:46:08 UTC
from what i know - libOpenVG.so and its headers are parts of gallium (state tracker, to be exact) and gallium is the part of mesa.
portage ebuild for mesa lacks openvg support. next mesa release (7.9) maybe will also contain support for gles, llvm and "egl-platform" support for drm/kms, x11, fbdev, gdi.

so, my point is that mesa ebuilds need and will need some love for i while.
Comment 3 Martin Rapavý 2010-09-26 14:09:58 UTC
Oh, I hope I am not coming late to the party...
Sorry if this is unreadable, but both lynx and elinks are still a pain in the ass...
It seems that "vp" had gotten OpenVG from somewhere, whereas "jujubickoille" did not even have it.

Well, I got mine from ShivaVG (media-libs/shivavg-0.2.1), which is blocked, reportedly because it conflicts with Mesa git, but it does not matter, as both reportedly use the same specification version.

But it you really want to get it working, no matter how, try this:

1. create a symbolic link from vg to VG inside the /usr/include directory (cd /usr/include ; ln -s vg VG) if it does not exist yet (mine did not, I had gotten it from ShivaVG, so it may already exist in your case);

2. add the missing constants to /usr/include/VG/openvg.h according to the OpenVG 1.1 specification, you can get them from the reference header file published by Khronos (http://www.khronos.org/registry/vg/api/1.1/openvg.h) or from the published specification (http://www.khronos.org/registry/vg/specs/openvg-1.1.pdf [PDF, 1.7 MiB]), add VG_A_1=13, VG_A_4=14 to the VGImageFormat enum (and I also added VG_COLOR_TRANSFORM=0x1170, VG_COLOR_TRANSFORM_VALUES=0x1171 to the VGParamType enum, just to be safe in case it had been necessary, to save myself from more frustration from possible compilation errors), just like this:

diff --recursive --show-c-function '--unified=3' old/openvg.h new/openvg.h
--- old/openvg.h	2009-03-20 04:27:52.000000000 +0100
+++ new/openvg.h	2009-03-20 04:27:52.000000000 +0100
@@ -75,6 +75,10 @@ typedef enum {
   /* Scissoring rectangles */
   VG_SCISSOR_RECTS                            = 0x1106,
 
+  /* Color Transformation */
+  VG_COLOR_TRANSFORM                          = 0x1170,
+  VG_COLOR_TRANSFORM_VALUES                   = 0x1171,
+
   /* Stroke parameters */
   VG_STROKE_LINE_WIDTH                        = 0x1110,
   VG_STROKE_CAP_STYLE                         = 0x1111,
@@ -310,6 +314,8 @@ typedef enum {
   VG_lL_8                                     = 10,
   VG_A_8                                      = 11,
   VG_BW_1                                     = 12,
+  VG_A_1                                      = 13,
+  VG_A_4                                      = 14,
 
   /* {A,X}RGB channel ordering */
   VG_sXRGB_8888                               =  0 | (1 << 6),



3. Add the dependency on libGLU.so to the libtool file, /usr/lib/libOpenVG.la , like this:

diff --recursive '--unified=1' old/libOpenVG.la new/libOpenVG.la
--- old/libOpenVG.la	2010-09-18 07:00:00.000000000 +0200
+++ new/libOpenVG.la	2010-09-18 08:00:00.000000000 +0200
@@ -19,3 +19,3 @@
 # Libraries that this one depends upon.
-dependency_libs=' -L/usr/lib64 -lglut -lXxf86vm -lXi -lm -lGL -lXext -lX11 -lxcb -lXau -lXdmcp -ldl'
+dependency_libs=' -L/usr/lib64 -lGLU -lglut -lXxf86vm -lXi -lm -lGL -lXext -lX11 -lxcb -lXau -lXdmcp -ldl'


That should work around the compilation and linking errors, but you may still experience problems during program execution if you decide to carry out the above-mentioned steps, as cairo apparently relies on OpenVG version 1.1 library being present (it does not check the OpenVG version in its configure script), whereas the provided one is only of version 1.0.1, the same version that is reportedly in Mesa git as well...

So it seems that OpenVG is rather unusable in cairo at the moment. We either ought to implement it first, or at least we must remove the corresponding USE flag and disable the respective configuration option, so that it does not result in a compilation error, according to Gentoo policy.

Plese excuse any wrongdoing on my part, I am still rather new to Gentoo Bugzilla -- this is my 1st post, actually...
Comment 4 Tomáš Chvátal (RETIRED) gentoo-dev 2011-03-08 12:03:53 UTC
openvg useflag is respectively masked until upstream make it work fine and we have some vg implems around.

For time being this bug is cantfix.