Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 39324 - building pypgsql failed after updating python from 2.2 to 2.3
Summary: building pypgsql failed after updating python from 2.2 to 2.3
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:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-25 02:35 UTC by Martin Lesser
Modified: 2004-01-25 06:58 UTC (History)
0 users

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 Martin Lesser 2004-01-25 02:35:32 UTC
python-updater worked fine except for pypgsql, a manual emerge pypgsql failed too.

libpqmodule.c: In function `libPQint2_FromObject':
libpqmodule.c:808: `LONG_LONG' undeclared (first use in this function)


Reproducible: Always
Steps to Reproduce:




Expected Results:  
IIRC LONG_LONG has changed to PY_LONG_LONG in python2.3 so an additional

#define LONG_LONG PY_LONG_LONG

in libpqmodule.h solved the problem at least for me:

--- pypgsql-2.3.ebuild  2004-01-25 11:31:45.000000000 +0100
+++ pypgsql-2.3-r1.ebuild       2004-01-25 11:08:10.000000000 +0100
@@ -14,6 +14,7 @@

 src_compile() {
        cd ${S}
+       epatch ${FILESDIR}/long_long.patch || die "long_long patch failed"
        python setup.py build || die
 }

--- ../../../pypgsql-2.3-r1/work/pypgsql/libpqmodule.h  2002-10-07
08:03:46.000000000 +0200
+++ libpqmodule.h       2004-01-25 11:03:04.000000000 +0100
@@ -91,6 +91,8 @@
 #   define Pg_END_ALLOW_THREADS(cnx)
 #endif

+#define LONG_LONG PY_LONG_LONG
+
 /***************************************\
 | Exception Objects for this module.   |
 \***************************************/


Portage 2.0.49-r21 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r9, 2.4.23)
=================================================================
System uname: 2.4.23 i686 AMD Athlon(tm) XP 2200+
Gentoo Base System version 1.4.3.10p1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=athlon-xp -O3 -pipe"
DISTDIR="/mnt/gentoo/distfiles"
FEATURES="autoaddcvs buildpkg ccache fixpackages sandbox"
GENTOO_MIRRORS="ftp://gentoo.inode.at/source/
ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo
http://ftp.snt.utwente.nl/pub/os/linux/gentoo"
MAKEOPTS="-j2"
PKGDIR="/mnt/gentoo/athlon-xp"
PORTAGE_TMPDIR="/mnt/gentoo/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="aalib acl acpi berkdb crypt cups curl doc emacs encode flash foomaticdb gd
gdbm gif gnome gtk2 guile imap imlib innodb java jpeg kerberos krb4 ldap libg++
libwww mad maildir mcal memlimit mikmod motif mpeg mysql ncurses nls odbc pam
pdflib perl png postgres python qt readline samba slang spell ssl tcpd tetex
tiff truetype wmf x86 xml xml2 zlib"
Comment 1 Alastair Tse (RETIRED) gentoo-dev 2004-01-25 06:58:43 UTC
i've gone for the easier solution of making pypgsql-2.4 stable. this version is compatible with python-2.3.

thank you for your report.