Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 503180 - =dev-lang/python-2.7.6[readline] with =sys-libs/readline-6.3 - .../work/Python-2.7.6/Modules/readline.c:914:24: error: 'Function' undeclared (first use in this function)
Summary: =dev-lang/python-2.7.6[readline] with =sys-libs/readline-6.3 - .../work/Pytho...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Python Gentoo Team
URL: http://bugs.python.org/issue20374
Whiteboard:
Keywords:
: 503734 503944 504224 (view as bug list)
Depends on:
Blocks: readline-6.3
  Show dependency tree
 
Reported: 2014-03-02 05:05 UTC by josef.95
Modified: 2014-03-16 18:36 UTC (History)
16 users (show)

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


Attachments
python-2.7.6_build.log.txt (python-2.7.6_build.log.txt,142.82 KB, text/plain)
2014-03-02 05:05 UTC, josef.95
Details
emerge --info python:2.7 readline (emerge-info.txt,5.62 KB, text/plain)
2014-03-02 05:06 UTC, josef.95
Details
python-3.2.5-r3 build.log (build.log,131.90 KB, text/plain)
2014-03-03 18:30 UTC, eroen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description josef.95 2014-03-02 05:05:05 UTC
Created attachment 371536 [details]
python-2.7.6_build.log.txt

Python build finished, but the necessary bits to build these modules were not found:
_tkinter           bsddb185           dl              
imageop            sunaudiodev                        
To find the necessary bits, look in setup.py in detect_modules() for the module's name.


Failed to build these modules:
readline                                              

running build_scripts
creating build/scripts-2.7
copying and adjusting /var/tmp/portage/dev-lang/python-2.7.6/work/Python-2.7.6/Tools/scripts/pydoc -> build/scripts-2.7
copying and adjusting /var/tmp/portage/dev-lang/python-2.7.6/work/Python-2.7.6/Tools/scripts/idle -> build/scripts-2.7
copying and adjusting /var/tmp/portage/dev-lang/python-2.7.6/work/Python-2.7.6/Tools/scripts/2to3 -> build/scripts-2.7
copying and adjusting /var/tmp/portage/dev-lang/python-2.7.6/work/Python-2.7.6/Lib/smtpd.py -> build/scripts-2.7
changing mode of build/scripts-2.7/pydoc from 644 to 755
changing mode of build/scripts-2.7/idle from 644 to 755
changing mode of build/scripts-2.7/2to3 from 644 to 755
changing mode of build/scripts-2.7/smtpd.py from 644 to 755
Makefile:475: recipe for target 'sharedmods' failed
make: *** [sharedmods] Error 1
 * ERROR: dev-lang/python-2.7.6::gentoo failed (compile phase):
 *   emake failed
Comment 1 josef.95 2014-03-02 05:06:14 UTC
Created attachment 371538 [details]
emerge --info python:2.7 readline
Comment 2 josef.95 2014-03-02 05:14:41 UTC
I think the error is here

building 'readline' extension
x86_64-pc-linux-gnu-gcc -pthread -fPIC -fno-strict-aliasing -march=native -O2 -pipe -ggdb -fwrapv -DNDEBUG -I. -I/var/tmp/portage/dev-lang/python-2.7.6/work/Python-2.7.6/Include -I/var/tmp/portage/dev-lang/python-2.7.6/work/x86_64-pc-linux-gnu -c /var/tmp/portage/dev-lang/python-2.7.6/work/Python-2.7.6/Modules/readline.c -o build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.6/work/Python-2.7.6/Modules/readline.o
/var/tmp/portage/dev-lang/python-2.7.6/work/Python-2.7.6/Modules/readline.c: In function 'setup_readline':
/var/tmp/portage/dev-lang/python-2.7.6/work/Python-2.7.6/Modules/readline.c:914:24: error: 'Function' undeclared (first use in this function)
     rl_startup_hook = (Function *)on_startup_hook;
                        ^
/var/tmp/portage/dev-lang/python-2.7.6/work/Python-2.7.6/Modules/readline.c:914:24: note: each undeclared identifier is reported only once for each function it appears in
/var/tmp/portage/dev-lang/python-2.7.6/work/Python-2.7.6/Modules/readline.c:914:34: error: expected expression before ')' token
     rl_startup_hook = (Function *)on_startup_hook;
                                  ^
/var/tmp/portage/dev-lang/python-2.7.6/work/Python-2.7.6/Modules/readline.c:916:36: error: expected expression before ')' token
     rl_pre_input_hook = (Function *)on_pre_input_hook;
                                    ^
/var/tmp/portage/dev-lang/python-2.7.6/work/Python-2.7.6/Modules/readline.c:919:41: error: 'CPPFunction' undeclared (first use in this function)
     rl_attempted_completion_function = (CPPFunction *)flex_complete;
                                         ^
/var/tmp/portage/dev-lang/python-2.7.6/work/Python-2.7.6/Modules/readline.c:919:54: error: expected expression before ')' token
     rl_attempted_completion_function = (CPPFunction *)flex_complete;
Comment 3 Hans de Graaff gentoo-dev Security 2014-03-02 06:45:55 UTC
https://bugs.gentoo.org/show_bug.cgi?id=503106 has the same report for Ruby and an upstream fix.
Comment 4 Silvio 2014-03-02 07:19:51 UTC
Same problem here. I add some lines where output says that cannot find some "bits": bsddb185, dl, imageop, sunaudiodev



 

6/Modules/_ctypes/stgdict.o build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.6/work/Python-2.7.6/Modules/_ctypes/cfield.o -L/usr/local/lib -L. -lffi -lpython2.7 -o build/lib.linux-x86_64-2.7/_ctypes.so

Python build finished, but the necessary bits to build these modules were not found:
bsddb185           dl                 imageop         
sunaudiodev                                           
To find the necessary bits, look in setup.py in detect_modules() for the module's name.


Failed to build these modules:
readline                                              

running build_scripts
creating build/scripts-2.7
copying and adjusting /var/tmp/portage/dev-lang/python-2.7.6/work/Python-2.7.6/Tools/scripts/pydoc -> build/scripts-2.7
copying and adjusting /var/tmp/portage/dev-lang/python-2.7.6/work/Python-2.7.6/Tools/scripts/idle -> build/scripts-2.7
copying and adjusting /var/tmp/portage/dev-lang/python-2.7.6/work/Python-2.7.6/Tools/scripts/2to3 -> build/scripts-2.7
copying and adjusting /var/tmp/portage/dev-lang/python-2.7.6/work/Python-2.7.6/Lib/smtpd.py -> build/scripts-2.7
changing mode of build/scripts-2.7/pydoc from 644 to 755
changing mode of build/scripts-2.7/idle from 644 to 755
changing mode of build/scripts-2.7/2to3 from 644 to 755
changing mode of build/scripts-2.7/smtpd.py from 644 to 755
Makefile:475: recipe for target 'sharedmods' failed
make: *** [sharedmods] Error 1
Comment 5 Silvio 2014-03-02 07:21:22 UTC
my emerge --info

emerge --info
Portage 2.2.8-r1 (default/linux/amd64/13.0/desktop/kde, gcc-4.8.2, glibc-2.18-r1, 3.12.12-gentoo x86_64)
=================================================================
System uname: Linux-3.12.12-gentoo-x86_64-Intel-R-_Core-TM-_i7-2630QM_CPU_@_2.00GHz-with-gentoo-2.2
KiB Mem:    16443372 total,   2007940 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Sat, 01 Mar 2014 22:45:01 +0000
ld ld di GNU (GNU Binutils) 2.24
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p45-r1
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.6, 3.3.4
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.12.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.14.1
sys-devel/binutils:       2.24-r2
sys-devel/gcc:            4.7.3-r1, 4.8.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.18-r1
Repositories: gentoo sunrise gamerlay Techwolf pinkbyte luman voyageur nikai yarik-overlay zugaina belak bangert maggu2810-overlay maekke pentoo amielke-overlay manual bibletime
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.1/conf /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS=" http://mirror.ovh.net/gentoo-distfiles/ http://ftp.heanet.ie/pub/gentoo/ http://mirror.ovh.net/gentoo-distfiles/ http://www.die.unipd.it/pub/Linux/distributions/gentoo-sources/ rsync://rsync3.it.gentoo.org/gentoo-sources/ ftp://ftp.unina.it/pub/linux/distributions/gentoo/"
LANG="it_IT.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /var/lib/layman/gamerlay /var/lib/layman/techwolf /var/lib/layman/pinkbyte /var/lib/layman/luman /var/lib/layman/voyageur /var/lib/layman/nikai /var/lib/layman/yarik-overlay /var/lib/layman/zugaina /var/lib/layman/belak /var/lib/layman/bangert /var/lib/layman/maggu2810-overlay /var/lib/layman/maekke /var/lib/layman/pentoo /var/lib/layman/amielke-overlay /usr/portage/local/manual /var/lib/layman/bibletime"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3ds 64bit X a52 aac aacs aalib acl acpi ads aften aiglx akode alias alsa amd64 amr ao apache apm apng audiofile autoreplace autotrace avahi avi bash-completion berkdb bitmap-fonts bluetooth bluray bmp branding browserplugin bzip bzip2 cairo cdaudio cdda cdr cli clucene connectionstatus consolekit contactnotes cracklib crypt cuda cups cvd cvs cxx dbus declarative dia dialup djvu dri dtmf dts dv dvd dvdr dvdread dvi dynamicplugin ebook efi emboss encode ethereal exif fam farstream fat ffmpeg firefox flac fluidsynth fontconfig foomaticdb fortran freetds frei0r gbm gdbm geolocation gif gimp git gles gles2 glib glitz gphoto2 gpm gps gpu groupwise gstreamer gtk gtk3 h323 highlight history hvm i8x0 iconv icu ieee1394 imagemagick innodb ios iphone ipod ipv6 irc ithreads jack java javascript jingle jpeg jpeg2k kde kdenlive kdepim kerberos kipi kontact kqemu lame laptop lcms ldap libkms libnotify lm_sensors lucene m4a mad marble mbrola mdb mdnsresponder-compat mercurial midi mime minizip mmx mmxext mng modules moonlight mozilla mp3 mp4 mpeg mpeg2 mplayer msn mssql multilib musepack musicbrainz mysql ncurses netmeeting nls nowlistening npt1 nptl nptlonly nsplugin ntfs nvidia odbc ogg openal openexr opengl openipmi openmp opus oss pam pango pcmcia pcre pda pdf perl phonon plasma pmu png policykit portaudio postgres ppds python python3 qemu qt qt3support qt4 quicktime rar raw rdesktop rdp readline reiserfs reports samba sametime sane scanner sdl semantic-desktop session sip sipim skype smp sms soundtouch speex spell sqlite sse sse2 ssh ssl ssse3 startup-notification subtitles subversion svg tcpd texteffect texteffects theora tidy tiff timidity tk tordns translator truetype truetype-fonts twolame type1-fonts udev udisks unicode upower usb utempter v4l v4l2 vcd vdpau video virtualbox vnc vorbis vpx wav wavpack webkit webpresence wicd wifi win32codecs win64 winbind winetriks winpopup wlm wmf wxwidgets wxwindows x264 xcb xcomposite xen xetex xine xinerama xml xmp xscreensaver xv xvid xvmc yahoo zeroconf zlib" ABI_X86="64" ALSA_CARDS="snd_hda_intel" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev joystick synaptics wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="it en it_IT" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby18 ruby21" SANE_BACKENDS="*" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa nouveau v4l v4l2" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 6 Dirkjan Ochtman (RETIRED) gentoo-dev 2014-03-02 16:48:55 UTC
Upstream has patches.
Comment 7 eroen 2014-03-03 18:30:33 UTC
Created attachment 371658 [details]
python-3.2.5-r3 build.log

This also affects dev-lang/python-3.2.5-r3.

x86_64-pc-linux-gnu-gcc -pthread -fPIC -DNDEBUG -march=core2 -O2 -pipe -fwrapv -DNDEBUG -march=core2 -O2 -pipe -fwrapv -IInclude -I. -I/var/tmp/portage/dev-lang/python-3.2.5-r3/work/Python-3.2.5/Include -I/var/tmp/portage/dev-lang/python-3.2.5-r3/work/x86_64-pc-linux-gnu -c /var/tmp/portage/dev-lang/python-3.2.5-r3/work/Python-3.2.5/Modules/readline.c -o build/temp.linux-x86_64-3.2/var/tmp/portage/dev-lang/python-3.2.5-r3/work/Python-3.2.5/Modules/readline.o
/var/tmp/portage/dev-lang/python-3.2.5-r3/work/Python-3.2.5/Modules/readline.c: In function ‘setup_readline’:
/var/tmp/portage/dev-lang/python-3.2.5-r3/work/Python-3.2.5/Modules/readline.c:915:24: error: ‘Function’ undeclared (first use in this function)
     rl_startup_hook = (Function *)on_startup_hook;
                        ^
/var/tmp/portage/dev-lang/python-3.2.5-r3/work/Python-3.2.5/Modules/readline.c:915:24: note: each undeclared identifier is reported only once for each function it appears in
/var/tmp/portage/dev-lang/python-3.2.5-r3/work/Python-3.2.5/Modules/readline.c:915:34: error: expected expression before ‘)’ token
     rl_startup_hook = (Function *)on_startup_hook;
                                  ^
/var/tmp/portage/dev-lang/python-3.2.5-r3/work/Python-3.2.5/Modules/readline.c:917:36: error: expected expression before ‘)’ token
     rl_pre_input_hook = (Function *)on_pre_input_hook;                                    ^
/var/tmp/portage/dev-lang/python-3.2.5-r3/work/Python-3.2.5/Modules/readline.c:920:41: error: ‘CPPFunction’ undeclared (first use in this function)
     rl_attempted_completion_function = (CPPFunction *)flex_complete;
                                         ^
/var/tmp/portage/dev-lang/python-3.2.5-r3/work/Python-3.2.5/Modules/readline.c:920:54: error: expected expression before ‘)’ token
     rl_attempted_completion_function = (CPPFunction *)flex_complete;
                                                      ^
Comment 8 kaszynek 2014-03-06 20:35:26 UTC
I have the same problem with readline 6.3.
Python emerges correctly with readline 6.2_p5-r1.
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2014-03-07 15:11:32 UTC
*** Bug 503734 has been marked as a duplicate of this bug. ***
Comment 10 Joshua Kinard gentoo-dev 2014-03-08 10:38:15 UTC
readline Upstream explanation:
https://lists.gnu.org/archive/html/bug-readline/2014-03/msg00003.html

"""
Yes, those old-style function typedefs have been deprecated for a couple
of releases now.  I finally removed them in readline-6.3.

Chet
"""
Comment 11 Rafał Mużyło 2014-03-09 04:45:44 UTC
*** Bug 503944 has been marked as a duplicate of this bug. ***
Comment 12 SpanKY gentoo-dev 2014-03-10 00:54:08 UTC
upstream has the issue fixed, but i have no idea how patches make it into our python package, so i don't want to just dump more patches into files/ ...
Comment 13 account-removed 2014-03-10 01:32:24 UTC
I can confirm that python-3.3 now compiles.
However, 2.7 still fails with the usual errors.
Comment 14 Joshua Kinard gentoo-dev 2014-03-10 01:39:07 UTC
Considering that these functions were already deprecated in readline-6.2 and earlier, would it make sense to patch readline-6.3 instead to temporarily add them back until we work out the changes in Python?
Comment 15 Ben Kohler gentoo-dev 2014-03-11 15:24:18 UTC
*** Bug 504224 has been marked as a duplicate of this bug. ***
Comment 16 account-removed 2014-03-11 17:07:32 UTC
(In reply to Joshua Kinard from comment #14)
> Considering that these functions were already deprecated in readline-6.2 and
> earlier, would it make sense to patch readline-6.3 instead to temporarily
> add them back until we work out the changes in Python?

Readline deprecated and removed them for a reason.
Older pythons aren't really ever going to fix it (unless older python is still actively developed), so it makes more sense to patch python.
Comment 17 Mike Gilbert gentoo-dev 2014-03-12 01:59:20 UTC
(In reply to SpanKY from comment #12)
> upstream has the issue fixed, but i have no idea how patches make it into
> our python package, so i don't want to just dump more patches into files/ ...

Honestly, I've been taking them straight from Arfrever's overlay for the last several releases.

I will see about throwing together a git repo and a Makefile this weekend.
Comment 18 Mike Gilbert gentoo-dev 2014-03-15 20:59:44 UTC
  15 Mar 2014; Mike Gilbert <floppym@gentoo.org> python-2.7.6.ebuild:
  Backport upstream fixes for bug 503180.
Comment 19 Mike Gilbert gentoo-dev 2014-03-15 21:33:08 UTC
If someone needs this back-ported to 2.6 or 3.2, just let me know.
Comment 20 Jory A. Pratt gentoo-dev 2014-03-15 21:42:43 UTC
*** Bug 504644 has been marked as a duplicate of this bug. ***
Comment 21 account-removed 2014-03-16 02:28:10 UTC
(In reply to Mike Gilbert from comment #19)
> If someone needs this back-ported to 2.6 or 3.2, just let me know.

Having it backported to 2.6 and 2.7 would be nice.
Comment 22 Mike Gilbert gentoo-dev 2014-03-16 18:36:46 UTC
+  16 Mar 2014; Mike Gilbert <floppym@gentoo.org> python-2.6.9.ebuild:
+  Backport fix for bug 503180.