Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 180039 - dev-python/pypcap tests fails with python-2.5
Summary: dev-python/pypcap tests fails with python-2.5
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Python Gentoo Team
URL: http://code.google.com/p/pypcap/
Whiteboard:
Keywords:
Depends on:
Blocks: python-2.5
  Show dependency tree
 
Reported: 2007-05-27 17:57 UTC by Santiago M. Mola (RETIRED)
Modified: 2007-06-22 15:33 UTC (History)
1 user (show)

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


Attachments
build.log (dev-python:pypcap-1.1:20070528-154132.log,3.41 KB, text/plain)
2007-05-28 15:45 UTC, Santiago M. Mola (RETIRED)
Details
pypcap-pyrex_0.9.5.1a.patch (pypcap-pyrex_0.9.5.1a.patch,21.33 KB, patch)
2007-05-28 18:34 UTC, Ali Polatel (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Santiago M. Mola (RETIRED) gentoo-dev 2007-05-27 17:57:17 UTC
pypcap-1.1 doesn't support dev-python/pyrex-0.9.5.1a.
Support for it have been added in svn trunk, commit 81.

Reproducible: Always

Steps to Reproduce:
1.- Install latest pyrex.
2.- Try to install pypcap-1.1.
3.- See how it fails miserably at test phase.
Comment 1 Thomas Anderson (tanderson) (RETIRED) gentoo-dev 2007-05-28 15:23:57 UTC
Please attach the output of "emerge --info".

My tests work fine on amd64.
Comment 2 Santiago M. Mola (RETIRED) gentoo-dev 2007-05-28 15:45:36 UTC
Created attachment 120526 [details]
build.log

So maybe it's about Python 2.5, and not pyrex...

Here's my build.log, and emerge --info

[ $ ~  ] emerge --info
Portage 2.1.2.7 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.5-r2, 2.6.20-gentoo-r6 i686)
=================================================================
System uname: 2.6.20-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Sun, 27 May 2007 18:30:09 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.32
dev-lang/python:     2.4.4-r4, 2.5-r2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
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.3.16
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /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"
CXXFLAGS="-march=pentium4 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms splitdebug strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LC_ALL="es_ES.UTF-8"
LDFLAGS="-Wl,--as-needed"
LINGUAS="es es_ES en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
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="/var/paludis/repositories/gentoo"
PORTDIR_OVERLAY="/usr/local/portage /var/paludis/repositories/musicbrainz /var/paludis/repositories/sunrise /var/paludis/repositories/cowerlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="7zip X a52 aac aalib ace acl acpi aiglx aim allegro alsa amr ao apache2 asf asm audiofile avahi bash-completion berkdb bitmap-fonts bittorrent bluetooth bonjour bzip2 cairo ccache cdda cddb cdio cdparanoia cdr cli cracklib crypt cscope css ctype cups curl d daap dba dbus dga dhcp divx dmx dri dssi dts dv dvd dvdr dvdread dvi ecc emboss encode evo exif expat fam fastbuild fastcgi fat festival ffmpeg fftw firefox flac fluidsynth fmod fortran freetype ftp gcj gd gdbm geoip gif gimp glade glitz glsa glut glx gmedia gmp gnutls gpm gstreamer gtk gtk2 guile gvim hal howl icecast iconv icq idn imagemagick ipod irc irda irssi isdnlog jabber jack javascript jpeg jpeg2k kde kerberos kqemu ladspa lame lcms ldap libcaca libg++ libnotify libofa lua mad matroska mbrola memlimit midi mikmod ming mjpeg mmx mng modplug mono mozilla mp3 mpeg mplayer msn mudflap musepack musicbrainz mysql ncurses nfs nis nls nptl nptlonly ntfs ocaml ode ofa offensive ogg openal openexr opengl openmp pam pango pcmcia pcre pda pdf perl php png portaudio posix pppd psyco python qt3 qt3support qt4 quicktime rar readline reflection reiserfs rss ruby samba samplerate sdl session sid simplexml slang smp sndfile soap sockets softmmu speex spell spl sqlite sse sse2 ssl startup-notification subtitles subversion svg tcpd tga theora threads tidy tiff timidity tokenizer transcode trayicon truetype truetype-fonts type1-fonts unicode usb v4l v4l2 vcd vfat vidix vim visualization vnc vorbis win32codecs wma wmf wmp x264 x86 xanim xcb xcomposite xft xine xml xml2 xorg xosd xpm xrandr xscreensaver xsl xv xvid xvmc yahoo zeroconf zip zlib" ALSA_CARDS="ati" 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="es es_ES en" USERLAND="GNU" VIDEO_CARDS="radeon vesa v4l"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Santiago M. Mola (RETIRED) gentoo-dev 2007-05-28 16:00:48 UTC
Yep, it's about Python 2.5.

[ $ ~/dev/pypcap-1.1  ] python2.4 ./setup.py build
running build
running build_ext
[ $ ~/dev/pypcap-1.1  ] python2.4 ./test.py
./test.py:5: RuntimeWarning: Python C API version mismatch for module pcap: This Python has API version 1012, module pcap has version 1013.
  import pcap
.....
----------------------------------------------------------------------
Ran 5 tests in 0.001s

OK
[ $ ~/dev/pypcap-1.1  ]

--------------------------------

The same with python2.5 fails with the same errors I reported (see build.log).
Comment 4 Thomas Anderson (tanderson) (RETIRED) gentoo-dev 2007-05-28 17:31:55 UTC
Ah, ok. Well, then that explains why mine didn't fail. I still run 2.4.

I can't really make a patch though, because I don't have, nor want to mess with, 2.5. :-(
Comment 5 Ali Polatel (RETIRED) gentoo-dev 2007-05-28 18:34:25 UTC
Created attachment 120537 [details, diff]
pypcap-pyrex_0.9.5.1a.patch

(In reply to comment #2)
> So maybe it's about Python 2.5, and not pyrex...
> 
 It's about both actually. pcap.c has been generated using pyrex-0.9.3 which is too old for python-2.5. I've regenerated it using pyrex-0.9.5.1a and it passes tests with python-2.5.1-r2,python-2.4.4-r4 and python-2.3.6-r2. testsniff.py seems to work with all the mentioned versions as well.
 The only problem is the patch is bigger than 20kbytes. We can also add dev-python/pyrex to DEPEND and do pyrexc pcap.pyx before distutils_src_compile.
Comment 6 Santiago M. Mola (RETIRED) gentoo-dev 2007-05-28 19:11:58 UTC
(In reply to comment #5)
> We can also add
> dev-python/pyrex to DEPEND and do pyrexc pcap.pyx before distutils_src_compile.

This looks like a reliable solution to me.
Comment 7 Thomas Anderson (tanderson) (RETIRED) gentoo-dev 2007-05-28 22:03:34 UTC
It actually isn't as good as providing a proper patch. Here's why:

The reason CVS builds aren't allowed often is because QA is reduced to nothing. Noone has any idea what caused a problem because things break. Reproduction of the bug is entirely different.

The same is true when you use a program to modify the source. No one knows what will happen when you bump pyrex to 0.9.5.2. 

That said, it is still possible to get your patch into the tree. While it can't be put onto the rsync tree(see devmanual.gentoo.org), it can be put on the distfile mirrors.
Comment 8 Ali Polatel (RETIRED) gentoo-dev 2007-05-28 22:28:24 UTC
(In reply to comment #7)
> It actually isn't as good as providing a proper patch. Here's why:
 well it is actually a proper patch considering we don't use the actual source file ( pcap.pyx ) in the ebuild.

> The same is true when you use a program to modify the source. No one knows
> what will happen when you bump pyrex to 0.9.5.2. 

 This might only be a problem only if we use pyrex in the ebuild to produce pcap.c . Using this patch is just a workaround until upstream releases a new version.

> That said, it is still possible to get your patch into the tree. While it  
> can't
> be put onto the rsync tree(see devmanual.gentoo.org), it can be put on the
> distfile mirrors.
> 

 I've already mentioned that...
Comment 9 Albert Hopkins (RETIRED) gentoo-dev 2007-06-11 15:05:20 UTC
There appears to be a bug report wrt this issue upstream.
Can we please consider having pypcap block python 2.5 or vice versa?  I feel this is a relatively minor module that is preventing a relatively major piece of software from being released.
Comment 10 Ali Polatel (RETIRED) gentoo-dev 2007-06-22 15:33:43 UTC
  I just commited an ebuild to CVS which uses >=pyrex-0.9.5.1a to regenerate pcap.pyx which fixes this. Thanks!