Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 198875 - dev-python/pygobject-2.14.0 automagic dependency on libffi
Summary: dev-python/pygobject-2.14.0 automagic dependency on libffi
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: http://bugzilla.gnome.org/show_bug.cg...
Whiteboard:
Keywords:
Depends on: 199850
Blocks: 194632
  Show dependency tree
 
Reported: 2007-11-12 00:08 UTC by Ed Catmur
Modified: 2008-05-25 21:23 UTC (History)
4 users (show)

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


Attachments
libffi.patch (libffi.patch,1.02 KB, patch)
2007-11-12 01:06 UTC, Ed Catmur
Details | Diff
libffi.patch (libffi.patch,984 bytes, patch)
2007-11-12 07:20 UTC, Ed Catmur
Details | Diff
libffi.patch (libffi.patch,1.01 KB, patch)
2007-11-12 07:24 UTC, Ed Catmur
Details | Diff
pygobject-2.14.0.ebuild (pygobject-2.14.0.ebuild,2.43 KB, text/plain)
2007-11-12 07:26 UTC, Ed Catmur
Details
pygobject-2.14.0.ebuild (pygobject-2.14.0.ebuild,2.46 KB, text/plain)
2007-12-27 04:13 UTC, Ed Catmur
Details
libffi.patch (libffi.patch,1.20 KB, patch)
2007-12-27 11:02 UTC, Ed Catmur
Details | Diff
pygobject-2.14.0.ebuild (pygobject-2.14.0.ebuild,2.45 KB, text/plain)
2007-12-27 11:02 UTC, Ed Catmur
Details
libffi.patch (libffi.patch,1.39 KB, patch)
2007-12-27 11:17 UTC, Ed Catmur
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Catmur 2007-11-12 00:08:59 UTC
...
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.
Comment 1 Ed Catmur 2007-11-12 00:22:28 UTC
Upstreamed: http://bugs.gentoo.org/show_bug.cgi?id=198870
Comment 2 Ed Catmur 2007-11-12 01:06:33 UTC
Created attachment 135783 [details, diff]
libffi.patch

patch to configure.ac
Comment 3 Ed Catmur 2007-11-12 07:20:52 UTC
Created attachment 135798 [details, diff]
libffi.patch

oops
Comment 4 Ed Catmur 2007-11-12 07:24:14 UTC
Created attachment 135800 [details, diff]
libffi.patch

improve
Comment 5 Ed Catmur 2007-11-12 07:26:19 UTC
Created attachment 135801 [details]
pygobject-2.14.0.ebuild

ebuild applying patch - pygobject sucks autotools-wise
Comment 6 Hans Kwint 2007-11-27 00:44:47 UTC
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.
Comment 7 Ed Catmur 2007-11-27 01:43:04 UTC
Sorry, upstream URL should be: http://bugzilla.gnome.org/show_bug.cgi?id=496006
Comment 8 Gilles Dartiguelongue (RETIRED) gentoo-dev 2007-12-03 22:05:19 UTC
just one question wrt to the choice of the use flag. What is the use of libffi here ?
Comment 9 Ed Catmur 2007-12-03 22:58:12 UTC
(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 .
Comment 10 Ed Catmur 2007-12-04 01:35:20 UTC
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.
Comment 11 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-12-19 01:49:17 UTC
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
Comment 12 Ed Catmur 2007-12-27 04:13:45 UTC
Created attachment 139380 [details]
pygobject-2.14.0.ebuild

pass -L/usr/lib/libffi for libffi support
Comment 13 Ed Catmur 2007-12-27 04:20:12 UTC
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.
Comment 14 Gilles Dartiguelongue (RETIRED) gentoo-dev 2007-12-27 09:53:24 UTC
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 ?
Comment 15 Ed Catmur 2007-12-27 11:02:07 UTC
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.
Comment 16 Ed Catmur 2007-12-27 11:02:35 UTC
Created attachment 139389 [details]
pygobject-2.14.0.ebuild

for the above
Comment 17 Ed Catmur 2007-12-27 11:17:41 UTC
Created attachment 139390 [details, diff]
libffi.patch

should be more upstream-friendly
Comment 18 Jakub Moc (RETIRED) gentoo-dev 2007-12-27 11:30:32 UTC
(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.
Comment 19 Gilles Dartiguelongue (RETIRED) gentoo-dev 2007-12-27 11:48:56 UTC
I think until bug #199850 is resolved, it's better to desactivate this feature.
Comment 20 Gilles Dartiguelongue (RETIRED) gentoo-dev 2007-12-27 14:55:29 UTC
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.
Comment 21 Gilles Dartiguelongue (RETIRED) gentoo-dev 2007-12-27 18:15:47 UTC
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.
Comment 22 Marijn Schouten (RETIRED) gentoo-dev 2007-12-27 18:53:38 UTC
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.
Comment 23 Jakub Moc (RETIRED) gentoo-dev 2007-12-28 09:14:58 UTC
(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.
Comment 24 Jakub Moc (RETIRED) gentoo-dev 2008-02-28 10:25:40 UTC
If you really want support for this, gcc w/ USE=libffi provides it now.
Comment 25 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-05-25 21:23:29 UTC
this is now in 2.14.2.