Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 219993 - media-libs/xine-lib cddb retrieval fails on 64 bit systems
Summary: media-libs/xine-lib cddb retrieval fails on 64 bit systems
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High minor (vote)
Assignee: Gentoo Media-video project
URL: http://forums.gentoo.org/viewtopic-t-...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-02 00:57 UTC by Kenton Groombridge
Modified: 2009-01-08 18:48 UTC (History)
3 users (show)

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


Attachments
New xine-lib that references patch to fix cddb lookups on 64 bit systems. (xine-lib-1.1.13.ebuild,5.54 KB, text/plain)
2008-06-15 20:37 UTC, Kenton Groombridge
Details
cddb patch (xine-lib-cddb.patch,1.21 KB, text/plain)
2008-06-15 20:38 UTC, Kenton Groombridge
Details
xine-lib-1.1.15-cddb.patch (xine-lib-1.1.15-cddb.patch,952 bytes, patch)
2008-12-13 21:15 UTC, Jouni Rinne
Details | Diff
xine-lib-1.1.15-r2.diff (xine-lib-1.1.15-r2.diff,417 bytes, patch)
2008-12-13 21:16 UTC, Jouni Rinne
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kenton Groombridge 2008-05-02 00:57:57 UTC
I tried to find a way to report this upstream, but couldn't.  I found that xine-lib cddb retrieval was failing on my 64 bit system, but worked on my 32 bit systems.  This initially showed up in Amarok which uses the xine engine.

I found that editing the file ./src/input/input_cdda.c

and changing disc_id from unsigned long to unsigned int fixed the problem.  This is only a hack as unsigned int isn't always the same length depending on the system, but whatever it is, it needs to be a 32 bit value.  I used to program and I am familiar with figuring out bugs, but suck when knowing how to properly port 32 bit code to a 64 bit system.

Reproducible: Always

Actual Results:  
CDDB lookup fails on xine-lib built on 64 bit systems.

Expected Results:  
CDDB lookup should work on all systems.

emerge --info
Portage 2.1.5_rc6 (default-linux/amd64/2007.0, gcc-4.3.0, glibc-2.7-r2, 2.6.25-gentoo-r1 x86_64)
=================================================================
System uname: 2.6.25-gentoo-r1 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
Timestamp of tree: Thu, 01 May 2008 23:34:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r2
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.3
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.62
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.25-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -mtune=athlon64 -msse3 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.0/env /usr/kde/4.0/share/config /usr/kde/4.0/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=athlon64 -mtune=athlon64 -msse3 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://mirror.datapipe.net/gentoo http://gentoo.mirrors.easynews.com/linux/gentoo/ http://gentoo.mirrors.pair.com/"
LANG="en_US"
LC_ALL="en_US"
LDFLAGS=""
LINGUAS="en en_US"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=120"
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/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 7zip S3TC X a52 aac acpi aften alsa amarok amd64 amrnb arts audiofile bash-completion berkdb binary-drivers bzip2 cairo cddb cdparanoia cdr cdrom cracklib crypt css cups curl dbus divx dri dv dvd dvdr dvdread emoticon encode expat fame ffmpeg fftw firefox flac foomaticdb gdbm gif gimp glibc-omitfp glitz glut gzip hal iconv ieee1394 imagemagick imlib iproute2 java javascript joystick jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility lame libvisual live lm_sensors logitech-mouse lzo mad midi mjpeg mmx mmxext mng mp2 mp3 mp4 mpeg mpeg2 mplayer musicbrainz ncurses network nls normalize nptl nptlonly nsplugin nspr nvidia offensive ogg openal opengl openmp pam pango pcre perl physfs png ppds python qt3 qt3support qt4 quicktime rar readline realmedia rt61pci rtc samba scanner sdl smartcard sound sse sse2 ssl subtitles svg svgz sysfs syslog tcpd theora threadsafe tiff transcode truetype type1 unicode unzip urandom usb userlocales utempter v4l2 vcd visualization vorbis wav wifi wma wmf wmp xcomposite xine xorg xpm xscreensaver xvid xvmc zip zlib" ALSA_CARDS="emu10k1" 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" CAMERAS="canon ptp2" ELIBC="glibc" INPUT_DEVICES="keyboard evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-05-02 16:04:12 UTC
Which version of media-libs/xine-lib
Comment 2 Kenton Groombridge 2008-05-02 17:27:37 UTC
(In reply to comment #1)
> Which version of media-libs/xine-lib

Sorry about the forgetting the obvious.  1.1.12, but I tried older versions as well all with the same results.  This may be in all versions as far as I know.

Thanks,
Ken
Comment 3 Kenton Groombridge 2008-06-15 20:36:45 UTC
I had some time so I did a little research and created the attached patch.  CDDB lookups should now work on all systems (32 and 64 bit).  I tested with xine-lib 1.1.11.1, 1.1.12, and 1.1.13 that was just released.  Also attached is an ebuild for 1.1.13 that utilizes this patch.

Ken
Comment 4 Kenton Groombridge 2008-06-15 20:37:44 UTC
Created attachment 156983 [details]
New xine-lib that references patch to fix cddb lookups on 64 bit systems.
Comment 5 Kenton Groombridge 2008-06-15 20:38:18 UTC
Created attachment 156985 [details]
cddb patch
Comment 6 Paramonov Valeriy 2008-06-25 15:04:33 UTC
Ebuild test passed :) Works fine for me on amd64 platform

Also this solved my bug http://bugs.gentoo.org/show_bug.cgi?id=225941
Great work!
Comment 7 Alexis Ballier gentoo-dev 2008-06-25 15:22:48 UTC
(In reply to comment #5)
> Created an attachment (id=156985) [edit]
> cddb patch


Please send it upstream, I haven't found any such change in their mercurial repository. Did they accept/reject the patch ?
Comment 8 Kenton Groombridge 2008-08-17 03:27:50 UTC
I tried myself to report this upstream.  It appears to be ignored.  I just applied to xine-lib-1.1.15 and it still works perfectly.  It would be nice to implement this patch in the ebuild since many other packages utilize the xine engine and are broken because of this.
Comment 9 Alexis Ballier gentoo-dev 2008-08-18 09:18:15 UTC
Seems you'll probably need to change a few other things in the code.
I see such things :
this->cddb.disc_id     = _cdda_get_cddb_id(this);
and the function is declared as:
static unsigned long _cdda_get_cddb_id(cdda_input_plugin_t *this)

So, afaict, there would be type mismatches here too if you change disc_id to uint32_t :/

it's really worth opening a bug on http://bugs.xine-project.org/

meanwhile, Diego, could you please have a look at this ?
Comment 11 Jouni Rinne 2008-12-13 21:14:37 UTC
I can't understand why this patch hasn't been included in the xine-lib-1.1.15 ebuild, without it 64-bit xine-lib is useless as an Amarok CD-playing backend. Here's a patch adapted from the link supplied by Alexis above, it's quite similar as Kenton's patch.
Comment 12 Jouni Rinne 2008-12-13 21:15:43 UTC
Created attachment 175229 [details, diff]
xine-lib-1.1.15-cddb.patch
Comment 13 Jouni Rinne 2008-12-13 21:16:35 UTC
Created attachment 175231 [details, diff]
xine-lib-1.1.15-r2.diff
Comment 14 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-12-21 02:36:11 UTC
(In reply to comment #11)
> I can't understand why this patch hasn't been included in the xine-lib-1.1.15
> ebuild, without it 64-bit xine-lib is useless as an Amarok CD-playing backend.
> Here's a patch adapted from the link supplied by Alexis above, it's quite
> similar as Kenton's patch.
> 

It is not an outlandish scenario to wait for upstream to fix the code first. Also, comment #10 should be answered to see if it helps in your situation as an upstream fix is _highly_ preferred over anything else.

@media-video team: I am removing amd64, please add us back when there is something in the the portage tree to test or file a new bug. (We have too many bugs to adequately keep up with random test requests with manually patching) Thanks.
Comment 15 Alexis Ballier gentoo-dev 2009-01-08 18:48:06 UTC
should be fixed in 1.1.16