Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 281130 - app-accessibility/speech-dispatcher fails to build with glibc 2.10
Summary: app-accessibility/speech-dispatcher fails to build with glibc 2.10
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: glibc-2.10
  Show dependency tree
 
Reported: 2009-08-11 18:47 UTC by Christoph Brill (egore) (RESIGNED)
Modified: 2009-09-10 13:03 UTC (History)
4 users (show)

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


Attachments
0001-Fix-build-with-recent-gcc.patch (0001-Fix-build-with-recent-gcc.patch,1.10 KB, patch)
2009-08-11 18:48 UTC, Christoph Brill (egore) (RESIGNED)
Details | Diff
_GNU_SOURCE (speech-dispatcher-0.6.7-getline.patch,1.25 KB, patch)
2009-09-05 17:55 UTC, Samuli Suominen (RETIRED)
Details | Diff
Use autotools to check if getline is present or not. (speech-dispatcher-0.6.7-getline.patch,1.61 KB, patch)
2009-09-07 15:47 UTC, Samuli Suominen (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Brill (egore) (RESIGNED) 2009-08-11 18:47:33 UTC
I tried installing speech-dispatcher and it failed because of incompatible definition of getline. I fixed it by removing the offending lines from the code. IIRC this is gcc 4.4 related (as I'm not sure I'm not adding it to the tracker bug).

Reproducible: Always
Comment 1 Christoph Brill (egore) (RESIGNED) 2009-08-11 18:48:32 UTC
Created attachment 200954 [details, diff]
0001-Fix-build-with-recent-gcc.patch

The patch that removes the incompatible function declarations.
Comment 2 William Hubbs gentoo-dev 2009-08-18 16:46:50 UTC
I have worked another bug very similar to this, and it actually appears
to be glibc related.  But, I need to see your 'emerge --info' to confirm
this.

Thanks much.

William

Comment 3 Christoph Brill (egore) (RESIGNED) 2009-08-18 19:03:26 UTC
Here's the emerge --info.

Portage 2.2_rc38 (default/linux/amd64/2008.0/desktop, gcc-4.4.0, glibc-2.10.1-r0, 2.6.30-gentoo-r2 x86_64)
=================================================================
System uname: Linux-2.6.30-gentoo-r2-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4400+-with-gentoo-2.0.1
Timestamp of tree: Sun, 16 Aug 2009 05:00:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p24
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.6.2-r1
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r3
sys-apps/sandbox:    2.0
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -ggdb -march=k8"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /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 /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -ggdb -march=k8"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.cambrium.nl/pub/os/linux/gentoo/ ftp://mirror.muntinternet.net/pub/gentoo/ http://de-mirror.org/distro/gentoo/ http://mirror.netcologne.de/gentoo/ http://mirror.muntinternet.net/pub/gentoo/"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,--as-needed"
LINGUAS="de pl en es es_ES en_US"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlays/x11 /usr/local/overlays/gnome /usr/local/overlays/java-overlay /usr/local/overlays/sunrise /usr/local/overlays/suka /usr/local/overlays/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 3ds 7zip S3TC X a52 aac acct ace acl acpi ads aim alsa amd64 ao apache2 applet archive artworkextra aspell aspnet aspnet2 aspnetedit async audiofile avahi babl berkdb binary-drivers bluetooth bonjour boost branding bzip2 cairo cal3d ccache cdaudio cdda cddb cdio cdparanoia cdr cdrom cegui cg chm cli colordiff consolekit cpio cpufreq cracklib crypt cscope css csv ctype ctyps cups curl daap dbus devhelp device-mapper devil dhcp dia dirac disk-partition divx dri dts dvd dvdnav dvdr dvdread dvi editor eds emboss encode eog epiphany esd evo exif exiv2 expat fam fat fbcon ffmpeg filter firefox flac flash fluidsynth fontconfig foomaticdb freeimage freesound ftp fuse gadu galago games gconf gd gdbm gedit geoip gif gimp git glade glib glitz glsa glut gmedia gnome gnome-keyring gnome-print gnomecanvas gphoto2 gpm gps graphite grub gstreamer gtk gtkhtml gtksourceview guile gupnp gzip h323 hal hddtemp howl-compat hvm iconv icq id3 id3tag imagemagick imap imlib inherit-graph inkjar inotify introspection iproute2 ipv6 irc irrlicht isdnlog jai java java5 java6 javamail javascript jmf joystick jpeg jpeg2k json kdehiddenvisibility kerberos kvm ladspa lame latex lcms ldap libburn libffi libnotify libsamplerate libsoup libunique libwnck lm_sensors lzma lzo mad maps math matroska mdnsresponder-compat mikmod mjpeg mmap mmx mmxext mng mod module modules mono mouse mp2 mp3 mp4 mpeg mpeg2 mplayer msn mtp mudflap multilib mysql mysqli nautilus ncurses nemesi neon network networking nls nptl nptlonly nsplugin ntfs numa obex ode ogg ogre openal openexr opengl openmp openstreetmap openvpn pam pango parted pccts pcre pdf pdo perl php pidgin pmount png policykit poppler portage postscript ppds pppd prediction pulseaudio python qt3support qt4 quicktime radio rar rdesktop readline reflection regex reiser4 reiserfs remote resolvconf rhythmbox rtc ruby samba scanner schroedinger sdl server session sip smp sndfile sound sourceview speech speechd speex spell spl sql sqlite sqlite3 srt sse sse2 ssh ssl startup-notification subversion suexec svg svgz sysfs syslog t1lib taglib tagwriting tcpd teletext tex tga theora threads tidy tiff timidity tokenizer totem truetype unicode unzip upnp urandom usb userlocales v4l v4l2 valgrind vapigen vcd vde verse vim-syntax vim-with-x visualization vnc vncviewer vorbis vte wav webdav webkit wma wmf wmp wxwindows x264 xattr xcb xcomposite xerces-c xml xmlreader xmlrpc xmlwriter xmp xorg xpm xrandr xscreensaver xsl xulrunner xv xvid yahoo zeroconf zip zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul 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" CAMERAS="canon casio_qv" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de pl en es es_ES en_US" SANE_BACKENDS="snapscan" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 William Hubbs gentoo-dev 2009-08-18 20:46:04 UTC
Ok, this is an issue with glibc 2.10.

I am running stable glibc and speech-dispatcher builds fine.  I have
forwarded your patch upstream to see if they can suggest a better way to
fix it since if I apply the patch it generates compiler warnings against
stable glibc.
Comment 5 Viktor S 2009-08-31 22:29:31 UTC
Seems to me like a really bad idea to remove the call completely. Just rename the function instead to something like sd_getline?
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2009-09-04 08:54:53 UTC
0.6.7-r1
Comment 7 William Hubbs gentoo-dev 2009-09-04 13:53:38 UTC
Re-opening this bug for the following reasons:

- I was waiting for upstream to respond regarding whether or not they had
a better idea for a patch.
- the current patch causes compiler warnings if you are running glibc
  2.9.
 - Also, I haven't addressed comment #5 yet.

Comment 8 William Hubbs gentoo-dev 2009-09-04 15:06:29 UTC
Reopening bug.
Comment 9 William Hubbs gentoo-dev 2009-09-05 16:53:24 UTC
The issue  is that the prototypes of getline removed by the patch are
needed to keep gcc from complaining if the user is using <glibc-2.10.

I need to find a way to test in the code for this and keep the
prototypes only in that situation.
Comment 10 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-09-05 17:09:36 UTC
Adding a -D_GNU_SOURCE to the build is not enough?
Comment 11 William Hubbs gentoo-dev 2009-09-05 17:36:37 UTC
All,

what I need to fix this issue is a patch for speech-dispatcher which
will skip over the included prototype for getline if the
user is using < glibc-2.10.  Can you suggest a way to detect this situation?

Thanks much,

William

Comment 12 Samuli Suominen (RETIRED) gentoo-dev 2009-09-05 17:55:38 UTC
Created attachment 203213 [details, diff]
_GNU_SOURCE

How about.. ?
Comment 13 William Hubbs gentoo-dev 2009-09-05 18:06:33 UTC
Diego and Ssuominen,

you gave me an idea for a patch to try.  I want to test here with a
patch that puts the prototypes in #ifndef _GNU_SOURCE ... #endif, since
getline is visible in glibc-2.10 if that is not defined, but earlier glibc
if it is defined.
Comment 14 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-09-05 18:51:20 UTC
No, really.

If the package was using getline *before* it was POSIX, it should be requesting GNU extensions…
Comment 15 William Hubbs gentoo-dev 2009-09-05 20:08:07 UTC
Looking over the package again,

part of the build requests GNU extentions, but part of it doesn't.

So, if I put -D_GNU_SOURCE in modules/Makefile.am and remove the
prototypes of getline() from  modules/main.c
and modules/module_utils.h as suggested in the original patch, would that
be the way to fix this?

Comment 16 SpanKY gentoo-dev 2009-09-06 15:56:49 UTC
you could do it that way, or `append-cppflags -D_GNU_SOURCE`.  updating Makefile.am requires rebuilding autotools, so if you dont have to already, best to avoid it.
Comment 17 William Hubbs gentoo-dev 2009-09-06 19:37:11 UTC
All,

I just committed an update based on the suggestion in comment #16.

Can someone who is running glibc 2.10 check to be sure this builds now?

If it does, feel free to close this bug.

Thanks,

William

Comment 18 Samuli Suominen (RETIRED) gentoo-dev 2009-09-06 19:48:28 UTC
* Cannot find $EPATCH_SOURCE!  Value for $EPATCH_SOURCE is:
 *                                                          
 *   /home/ssuominen/gentoo-x86/app-accessibility/speech-dispatcher/files/speech-dispatcher-0.6.7-getline-ss.patch
 *   ( speech-dispatcher-0.6.7-getline-ss.patch )             
Comment 19 William Hubbs gentoo-dev 2009-09-06 20:34:59 UTC
All,

the extra call to epatch has been removed, try again.

Comment 20 Samuli Suominen (RETIRED) gentoo-dev 2009-09-07 15:47:13 UTC
Created attachment 203368 [details, diff]
Use autotools to check if getline is present or not.
Comment 21 Samuli Suominen (RETIRED) gentoo-dev 2009-09-07 17:14:07 UTC
Comment on attachment 203368 [details, diff]
Use autotools to check if getline is present or not.

Forget about this one.
Comment 22 William Hubbs gentoo-dev 2009-09-07 19:36:24 UTC
All,

I just committed a fix which removes the compiler warnings about getline() on a glibc 2.9 system.  Can someone try to emerge speech-dispatcher again on a glibc 2.10 system and see if it builds successfully?  If it does, feel free to close this bug.

Thanks,

William

Comment 23 Samuli Suominen (RETIRED) gentoo-dev 2009-09-10 13:03:42 UTC
The one in portage works, closing.