Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 300629 - opal-3.6.6 fails to compile with celt use flag enabled (celt-0.7.0-r2)
Summary: opal-3.6.6 fails to compile with celt use flag enabled (celt-0.7.0-r2)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Mounir Lamouri (volkmar) (RETIRED)
URL: http://sourceforge.net/tracker/index....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-11 21:15 UTC by Matti Nykyri
Modified: 2010-02-28 10:43 UTC (History)
2 users (show)

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


Attachments
Patch to fix the problem (opal-3.6.6_fixCelt.patch,1.57 KB, patch)
2010-01-11 21:17 UTC, Matti Nykyri
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matti Nykyri 2010-01-11 21:15:39 UTC
opal-3.6.6 is incompatible with celt-0.7.0-r2. Problem is with opal-3.6.6 source code, but I made a patch to opal 3.6.6 to fix the problem. Emerging opal-3.6.6 ~amd64 with celt use flag will first install celt-0.7.0-r2 ~amd64. Emerge fails later with opal-3.6.6:

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

make[2]: Entering directory `/var/tmp/portage/net-libs/opal-3.6.6/work/opal-3.6.6/plugins/audio/celt'                                                                                                 
[CC] celtcodec.c                                                                                   
cc1: warning: command line option "-fno-visibility-inlines-hidden" is valid for C++/ObjC++ but not for C                                                                                              
celtcodec.c: In function 'init_mode':                                                              
celtcodec.c:55: warning: passing argument 3 of 'celt_mode_create' makes pointer from integer without a cast                                                                                           
celtcodec.c:55: error: too many arguments to function 'celt_mode_create'                           
celtcodec.c: In function 'celt_create_encoder':                                                    
celtcodec.c:77: error: too few arguments to function 'celt_encoder_create'
celtcodec.c: In function 'celt_create_decoder':
celtcodec.c:99: error: too few arguments to function 'celt_decoder_create'
celtcodec.c: In function 'celt_codec_encoder':
celtcodec.c:146: error: 'celt_int16_t' undeclared (first use in this function)
celtcodec.c:146: error: (Each undeclared identifier is reported only once
celtcodec.c:146: error: for each function it appears in.)
celtcodec.c:146: error: expected expression before ')' token
celtcodec.c:146: error: too few arguments to function 'celt_encode'
make[2]: *** [celtcodec.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/net-libs/opal-3.6.6/work/opal-3.6.6/plugins/audio/celt'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/var/tmp/portage/net-libs/opal-3.6.6/work/opal-3.6.6/plugins'
make: *** [subdirs] Error 2
make: *** Waiting for unfinished jobs....
 *
 * ERROR: net-libs/opal-3.6.6 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 4928:  Called die
 * The specific snippet of code:
 *       emake ${makeopts} || die "emake failed"
 *  The die message:
 *   emake failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/net-libs/opal-3.6.6/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-libs/opal-3.6.6/temp/environment'.
 *
!!! When you file a bug report, please include the following information:
GENTOO_VM=sun-jdk-1.6  CLASSPATH="" JAVA_HOME="/opt/sun-jdk-1.6.0.17"
JAVACFLAGS="-source 1.4 -target 1.4" COMPILER=""
and of course, the output of emerge --info

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

emerge --info:

Portage 2.1.6.13 (default/linux/amd64/10.0/desktop, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.31-gentoo-r6_roi x86_64)                                                                                   
=================================================================                                  
System uname: Linux-2.6.31-gentoo-r6_roi-x86_64-AMD_Athlon-tm-_64_Processor_3800+-with-gentoo-1.12.13                                                                                                 
Timestamp of tree: Tue, 05 Jan 2010 15:15:02 +0000                                                 
app-shells/bash:     4.0_p35                                                                       
dev-java/java-config: 1.3.7-r1, 2.1.9-r2                                                           
dev-lang/python:     2.5.4-r2, 2.6.4                                                               
dev-python/pycrypto: 2.1.0_beta1                                                                   
dev-util/cmake:      2.6.4-r3                                                                      
sys-apps/baselayout: 1.12.13                                                                       
sys-apps/sandbox:    1.6-r2                                                                        
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                                     
sys-devel/binutils:  2.18-r3                                                                       
sys-devel/gcc-config: 1.4.1                                                                        
sys-devel/libtool:   2.2.6b                                                                        
virtual/os-headers:  2.6.27-r2                                                                     
ACCEPT_KEYWORDS="amd64"                                                                            
CBUILD="x86_64-pc-linux-gnu"                                                                       
CFLAGS="-march=athlon64 -O2 -ggdb -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/share/X11/xkb /usr/share/config /var/bind"                                                                 
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /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/udev/rules.d"                            
CXXFLAGS="-march=athlon64 -O2 -ggdb -pipe"                                                         
DISTDIR="/usr/portage/distfiles"                                                                   
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"                                                                                 
GENTOO_MIRRORS="ftp://trumpetti.atm.tut.fi/gentoo/ http://trumpetti.atm.tut.fi/gentoo/ http://ds.thn.htu.se/linux/gentoo http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo http://distfiles.gentoo.org"                                                                                       
LANG="en_US.UTF-8"                                                                                 
LDFLAGS="-Wl,-O1"                                                                                  
LINGUAS="en fi"                                                                                    
MAKEOPTS="-j2"                                                                                     
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"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amarok amd64 apm avahi avi berkdb bineditor bitmap-fonts bittorrent bluetooth bootsplash branding bzip2 cairo calendar cdda cdio cdr celt chroot clamav clamd cli consolekit cracklib crypt crypto_libgcrypt crypto_openssl css cups cxx dbus dc1394 dcc dga dirac directfb dlloader dmi dolby-record-switch dri dts dv dvb dvbplayer dvd dvdr dvdread dx eds emacs emacs-w3 emboss encode esd ethereal evo examples fam fbcon fbsplash ffmpeg fi firefox flac font-server fortran ftp ftruncate gdbm gif gimp glut gmp gnome gpm gs gsm gstreamer gtk gzip h323 hal http httpd iconv ieee1394 imap ipv6 isdnlog j2ee jai java javacomm javascript jbig jce jcs jmx joystick jpeg jpeg2k jumpplay kde kipi ldap libclamav libg++ libnotify linuxthreads-tls live lm_sensors mad maildir matroska mcal messages mikmod mime ming mmx mmxext mng modules mozilla mp3 mp4 mp4live mpeg mpeg2 mplayer msn mudflap multilib mysql nagios-ntp nagios-ssh nas ncurses new-login nforce2 nfs nls nntp nptl nptlonly nsplugin ntfs nvidia nvtv objc objc++ office ogg on-the-fly-crypt openal opengl openmp pam pcre pdf pdflib perl perlsuid php pmu png postgres ppds pppd python qt qt3support qt4 quicktime quotas readline reflection rtc rtsp samba schroedinger scp sdl sdl-image session sftp shout sip skins sockets speex spell spl sqlite sse sse2 ssl startup-notification stream svg sysfs tcpd themes threads thunar tiff transcode truetype truetype-fonts type1-fonts udev unicode usb v4l v4l2 vcd vdpau vfat vlm vorbis widescreen wma wxwindows x264 xcomposite xfs xine xinerama xml xorg xosd xscreensaver xulrunner xv xvid xvmc zlib zrtp" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse joystick evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en fi" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia v4l"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

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

When opal-3.6.6 is patched with this file, problem is fixed and compilation finished:

------------------------------------------------------------------------------
--- opal-3.6.6.orig/plugins/audio/celt/celtcodec.c      2009-09-22 03:57:45.000000000 +0300
+++ opal-3.6.6/plugins/audio/celt/celtcodec.c   2010-01-11 19:24:02.000000000 +0200        
@@ -52,7 +52,7 @@                                                                          
 {                                                                                         
   int error = 0;                                                                          
                                                                                           
-  celt->mode = celt_mode_create(codec->sampleRate, 1, codec->parm.audio.samplesPerFrame, &error);
+  celt->mode = celt_mode_create(codec->sampleRate, codec->parm.audio.samplesPerFrame, &error);   
   if (celt->mode == NULL) {                                                                      
     return FALSE;                                                                                
   }                                                                                              
@@ -74,7 +74,9 @@                                                                                 
     return NULL;                                                                                 
   }                                                                                              

-  celt->encoder_state = celt_encoder_create(celt->mode);
+  int error = 0;
+
+  celt->encoder_state = celt_encoder_create(celt->mode, 1, &error);
   if (celt->encoder_state == NULL ) {
     celt_mode_destroy(celt->mode);
     free(celt);
@@ -96,7 +98,9 @@
     return NULL;
   }

-  celt->decoder_state = celt_decoder_create(celt->mode);
+  int error = 0;
+
+  celt->decoder_state = celt_decoder_create(celt->mode, 1, &error);
   if (celt->decoder_state == NULL ) {
     celt_mode_destroy(celt->mode);
     free(celt);
@@ -143,9 +147,9 @@
     return FALSE;

 #ifdef HAVE_CELT_0_5_0_OR_LATER
-  byteCount = celt_encode(celt->encoder_state, (celt_int16_t *)fromPtr, NULL, (char *)toPtr, celt->bytes_per_packet);
+  byteCount = celt_encode(celt->encoder_state, (celt_int16 *)fromPtr, NULL, (char *)toPtr, celt->bytes_per_packet);
 #else
-  byteCount = celt_encode(celt->encoder_state, (celt_int16_t *)fromPtr, (char *)toPtr, celt->bytes_per_packet);
+  byteCount = celt_encode(celt->encoder_state, (celt_int16 *)fromPtr, (char *)toPtr, celt->bytes_per_packet);
 #endif
   if (byteCount < 0) {
        return 0;
Comment 1 Matti Nykyri 2010-01-11 21:17:18 UTC
Created attachment 216118 [details, diff]
Patch to fix the problem

This patch fixes the problem on amd64.
Comment 2 Peter Volkov (RETIRED) gentoo-dev 2010-01-11 22:05:30 UTC
Thank you for report Matti. Assigning on maintainers.
Comment 3 Peter Volkov (RETIRED) gentoo-dev 2010-02-28 10:43:17 UTC
Well, I've contacted upstream and a bit different patch was suggested. It was commited to the tree. Fixed.