... checking pkg-config is at least version 0.7... yes checking for GLIB - version >= 2.8.0... yes (version 2.14.3) checking for ffi.h... yes ... libffi support: yes This introduces a link dependency on -lffi, and can break the build (c.f. bug 194632). libffi dependency should be USE-controlled or, failing that, disabled.
Upstreamed: http://bugs.gentoo.org/show_bug.cgi?id=198870
Created attachment 135783 [details, diff] libffi.patch patch to configure.ac
Created attachment 135798 [details, diff] libffi.patch oops
Created attachment 135800 [details, diff] libffi.patch improve
Created attachment 135801 [details] pygobject-2.14.0.ebuild ebuild applying patch - pygobject sucks autotools-wise
After I suffered from this problem (compile died somewhere at something ffi), applied the two patches above, and I'm happy to report they worked for me.
Sorry, upstream URL should be: http://bugzilla.gnome.org/show_bug.cgi?id=496006
just one question wrt to the choice of the use flag. What is the use of libffi here ?
(In reply to comment #8) > just one question wrt to the choice of the use flag. What is the use of libffi > here ? It's to allow connecting to signals on native python objects from C by using libffi to provide C marshallers. See http://svn.gnome.org/viewvc/pygobject/trunk/configure.ac?view=log#rev651 and http://bugzilla.gnome.org/show_bug.cgi?id=353816 .
Uh, so if you define a signal on a gobject.GObject-derived Python class (using __gsignals__) and thn attach to the signal from C, you need ffi support or will get: GLib-GObject-CRITICAL **: g_closure_invoke: assertion `closure->marshal || closure->meta_marshal' failed aborting... I doubt anyone's using it yet, but it's possible packages will start to require it in future.
Also looks like the package is not looking in the right place always for libffi. /bin/sh ../libtool --mode=link i686-pc-linux-gnu-gcc -march=athlon-xp -mcpu=athlon-xp -O3 -pipe -Wall -fno-strict-aliasing -std=c9x -o _gobject.la -rpath /usr/lib/python2.4/site-packages/gtk-2.0/gobject -module -avoid-version -export-symbols-regex init_gobject _gobject_la-gobjectmodule.lo _gobject_la-pygboxed.lo _gobject_la-pygenum.lo _gobject_la-pygflags.lo _gobject_la-pygobject.lo _gobject_la-pygmaincontext.lo _gobject_la-pygmainloop.lo _gobject_la-pygparamspec.lo _gobject_la-pygpointer.lo _gobject_la-pygiochannel.lo _gobject_la-pygsource.lo _gobject_la-pygtype.lo _gobject_la-pygoptioncontext.lo _gobject_la-pygoptiongroup.lo _gobject_la-ffi-marshaller.lo -pthread -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lffi generating symbol list for `_gobject.la' /usr/bin/nm -B .libs/_gobject_la-gobjectmodule.o .libs/_gobject_la-pygboxed.o .libs/_gobject_la-pygenum.o .libs/_gobject_la-pygflags.o .libs/_gobject_la-pygobject.o .libs/_gobject_la-pygmaincontext.o .libs/_gobject_la-pygmainloop.o .libs/_gobject_la-pygparamspec.o .libs/_gobject_la-pygpointer.o .libs/_gobject_la-pygiochannel.o .libs/_gobject_la-pygsource.o .libs/_gobject_la-pygtype.o .libs/_gobject_la-pygoptioncontext.o .libs/_gobject_la-pygoptiongroup.o .libs/_gobject_la-ffi-marshaller.o | sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | /bin/sed 's/.* //' | sort | uniq > .libs/_gobject.exp /bin/grep -E -e "init_gobject" ".libs/_gobject.exp" > ".libs/_gobject.expT" mv -f ".libs/_gobject.expT" ".libs/_gobject.exp" echo "{ global:" > .libs/_gobject.ver cat .libs/_gobject.exp | sed -e "s/\(.*\)/\1;/" >> .libs/_gobject.ver echo "local: *; };" >> .libs/_gobject.ver i686-pc-linux-gnu-gcc -shared .libs/_gobject_la-gobjectmodule.o .libs/_gobject_la-pygboxed.o .libs/_gobject_la-pygenum.o .libs/_gobject_la-pygflags.o .libs/_gobject_la-pygobject.o .libs/_gobject_la-pygmaincontext.o .libs/_gobject_la-pygmainloop.o .libs/_gobject_la-pygparamspec.o .libs/_gobject_la-pygpointer.o .libs/_gobject_la-pygiochannel.o .libs/_gobject_la-pygsource.o .libs/_gobject_la-pygtype.o .libs/_gobject_la-pygoptioncontext.o .libs/_gobject_la-pygoptiongroup.o .libs/_gobject_la-ffi-marshaller.o /usr/lib/libgobject-2.0.so -L/usr/lib /usr/lib/libgthread-2.0.so -lrt /usr/lib/libglib-2.0.so -lffi -march=athlon-xp -mcpu=athlon-xp -pthread -Wl,-soname -Wl,_gobject.so -Wl,-version-script -Wl,.libs/_gobject.ver -o .libs/_gobject.so /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lffi collect2: ld returned 1 exit status make[2]: *** [_gobject.la] Error 1 make[2]: Leaving directory `/var/tmp/portage/dev-python/pygobject-2.14.0/work/pygobject-2.14.0/gobject' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/dev-python/pygobject-2.14.0/work/pygobject-2.14.0' make: *** [all] Error 2 * * ERROR: dev-python/pygobject-2.14.0 failed. I do have libffi installed: [ebuild R ] dev-libs/libffi-3.4.3 USE="nptl -nls (-uclibc)" 0 kB curie-int ~ # equery f libffi |grep libffi.so /usr/lib/libffi/libffi.so /usr/lib/libffi/libffi.so.3 /usr/lib/libffi/libffi.so.3.0.0 curie-int ~ # emerge --info Portage 2.1.4_rc10 (default-linux/x86/2006.1/desktop, gcc-3.4.6, glibc-2.7-r1, 2.6.18-rc3-git7 i686) ================================================================= System uname: 2.6.18-rc3-git7 i686 AMD Athlon(tm) XP 2500+ Timestamp of tree: Unknown distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.4 [enabled] app-shells/bash: 3.2_p17-r1 dev-java/java-config: 1.3.7, 2.1.2-r1 dev-lang/python: 2.4.4-r7 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 1.12.10-r5 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r1 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.17 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.23-r2 ACCEPT_KEYWORDS="x86 ~x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -mcpu=athlon-xp -O3 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /opt/glftpd/etc /opt/glftpd/ftp-data /opt/openjms/config /usr/share/config /var/bind /var/qmail/alias /var/qmail/control /var/vpopmail/domains /var/vpopmail/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-march=athlon-xp -mcpu=athlon-xp -O3 -pipe" DISTDIR="/home/gentoo/distfiles" FEATURES="autoaddcvs buildpkg ccache collision-protect cvs digest distlocks metadata-transfer sandbox sfperms sign unmerge-orphans userfetch userpriv" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" MAKEOPTS="-j4" PKGDIR="/home/gentoo/packages/curie-int/" 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 --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/gentoo-cvs/gentoo-x86" PORTDIR_OVERLAY="/usr/local/portage" SYNC="" USE="3dnow aalib acl acpi adns aio alsa amd apache2 apm avalon-framework avalon-logkit berkdb bitmap-fonts cairo cdr cgi clearpasswd cli cracklib crypt curl divx4linux dri dvd dvdr encode f77 fam fortran frxp gcj gd gdbm geoip gif gpgme hpn iconv idn imap innodb ipalias ipv6 isdnlog jai java javamail jikes jms jpeg junit libwww log4j logrotate mad maildir mcal md5sum midi mikmod mmx mp3 mpeg mpm-prefork mudflap multicall multitarget mysql ncurses nptl objc offensive ogg openmp pam pcap pcre pdflib perl pic plotutils png pnp ppds pppd python qmail readline reflection scanner session slp smime snmp socks5 spell spl sse ssl tetex tiff truetype truetype-fonts type1 type1-fonts udev ungif unicode usb userlocales v4l v4l2 vhosts vim-syntax vorbis x86 xml xml2 xorg xvid 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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 139380 [details] pygobject-2.14.0.ebuild pass -L/usr/lib/libffi for libffi support
Robin, please try the above. Explanation: dev-libs/g-wrap installs libffi to /usr/lib/libffi.so; dev-libs/libffi installs it to /usr/lib/libffi/libffi.so (see dev-libs/libffi-3.4.3.ebuild). Passing LDFLAGS=-L/usr/lib/libffi to configure should ensure it finds the libffi libffi.so first. The packages probably can't be installed together anyway; they probably still collide on /usr/include/libffi/ffi.h.
adding hkBst to get input on the libffi matter. My problem is that libffi is maintainer-needed and that g-wrap and libffi installs the same library but in different places. Is adding a blocker on each other a good idea ?
Created attachment 139388 [details, diff] libffi.patch Oops, the -lffi finds its way into gobject.pc, so it needs to have -L/usr/lib/libffi there as well. This should help.
Created attachment 139389 [details] pygobject-2.14.0.ebuild for the above
Created attachment 139390 [details, diff] libffi.patch should be more upstream-friendly
(In reply to comment #14) > adding hkBst to get input on the libffi matter. My problem is that libffi is > maintainer-needed and that g-wrap and libffi installs the same library but in > different places. Is adding a blocker on each other a good idea ? libffi ebuild plain needs to die. Until 199850 is fixed, I'd recommend hard-disabling this piece of junk, not adding any use flag.
I think until bug #199850 is resolved, it's better to desactivate this feature.
hum patch is inconsistent, it compares $with_ffi while the macro uses $with_libffi, so if you pass --without-libffi which is what the macro will match, it will give you [libffi requested, but ffi.h not found] because $with_ffi is not set with the proper value.
ok, I've commited a modified version of the patch to the tree. I think the latest if condition of the patch is wrong so I modified it. Currently it respects the "force off" behavior so it's fine, but please review to make sure it will behave correctly whenever libffi issue will be fixed.
I am not aware of package collisions for g-wrap but as a precaution it as been blocking non-existing libffi-4. Having g-wrap install libffi is a workaround against there not being any libffi-4.
(In reply to comment #22) > I am not aware of package collisions for g-wrap but as a precaution it as been > blocking non-existing libffi-4. Having g-wrap install libffi is a workaround > against there not being any libffi-4. It collides w/ gcc when compiled w/ USE=gcj (see Bug 200679). libffi should definitely vanish from g-wrap, doesn't belong there.
If you really want support for this, gcc w/ USE=libffi provides it now.
this is now in 2.14.2.