Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 156539 - USE=flac emerge timidity++2.13.2-r3 fails.
Summary: USE=flac emerge timidity++2.13.2-r3 fails.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
: 159175 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-11-28 12:16 UTC by Malcolm Lashley (RETIRED)
Modified: 2007-01-11 19:23 UTC (History)
1 user (show)

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


Attachments
patch to compile with FLAC libraries (flac_a.c.diff,681 bytes, patch)
2006-12-30 04:36 UTC, Terminus MGK II [Secundus]
Details | Diff
my patch file (flac_a.c.diff,519 bytes, text/plain)
2007-01-08 23:09 UTC, Markus Giese
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Malcolm Lashley (RETIRED) gentoo-dev 2006-11-28 12:16:08 UTC
USE=flac emerge timidity++ fails.

x86_64-pc-linux-gnu-gcc  -O2 -march=k8 -pipe -Wall -g -ggdb  -L/usr/lib64 -o calcnewt  calcnewt.o  -lasound -lm -ldl -lpthread -lm -ldl -lpthread -ltk -ltcl  -lXm -lXaw3d -lXmu -lXt -lSM -lICE -lXext -lX11 -lm -ldl -lpthread -L/usr/lib -lFLAC -lm -lncurses -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -ldl -lpng -lz    -ljack  
flac_a.c:478:136: warning: "/*" within comment
flac_a.c: In function 'flac_output_open':
flac_a.c:480: warning: passing argument 1 of 'FLAC__stream_encoder_set_metadata_callback' from incompatible pointer type
flac_a.c:480: warning: passing argument 2 of 'FLAC__stream_encoder_set_metadata_callback' from incompatible pointer type
flac_a.c: In function 'output_data':
flac_a.c:716: warning: implicit declaration of function 'safe_malloc'
flac_a.c:716: warning: cast to pointer from integer of different size
flac_a.c:753: warning: suggest parentheses around comparison in operand of |
flac_a.c:777: warning: suggest parentheses around comparison in operand of |
flac_a.c: In function 'close_output':
flac_a.c:816: error: 'FLAC_options' has no member named 'isogg'
flac_a.c:857: error: invalid storage class for function 'acntl'
flac_a.c:873: error: expected declaration or statement at end of input
flac_a.c: In function 'flac_session_close':
flac_a.c:323: warning: control reaches end of non-void function
make[2]: *** [flac_a.o] Error 1

Problem lies here in flac_a.c - the ifdef needs to be up one line...

  if (flac_options.isogg) {
#ifdef AU_OGGFLAC
    if ((ctx->state.ogg = OggFLAC__stream_encoder_get_state(ctx->encoder.ogg.stream)) != OggFLAC__STREAM_ENCODER_OK) {

emerge --info
Portage 2.1.2_rc2-r2 (default-linux/amd64/2006.0, gcc-4.1.1, glibc-2.5-r0, 2.6.18-gentoo-r2 x86_64)
=================================================================
System uname: 2.6.18-gentoo-r2 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4400+
Gentoo Base System version 1.12.6
Last Sync: Mon, 27 Nov 2006 17:50:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
dev-util/confcache:  0.4.2-r1
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -pipe -Wall -g -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/NX/etc /usr/NX/home /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=k8 -pipe -Wall -g -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache collision-protect cvs distlocks metadata-transfer multilib-strict parallel-fetch sandbox sfperms splitdebug strict"
GENTOO_MIRRORS="http://194.117.143.70 http://212.219.56.132/sites/www.ibiblio.org/gentoo/ ftp://212.219.56.133/sites/www.ibiblio.org/gentoo/ http://85.25.128.62 http://ftp.club-internet.fr/pub/mirrors/gentoo http://212.219.56.133/sites/www.ibiblio.org/gentoo/ ftp://212.219.56.134/sites/www.ibiblio.org/gentoo/ ftp://194.117.143.72/mirrors/gentoo http://ftp.heanet.ie/pub/gentoo/ http://212.219.56.134/sites/www.ibiblio.org/gentoo/"
LINGUAS="en_GB"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--stats --progress"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/malc/gentoo-x86"
SYNC="rsync://rsync.uk.gentoo.org/gentoo-portage"
USE="amd64 X a52 aac aiglx alsa amr apache2 avi bash-completion berkdb bitmap-fonts bluetooth browserplugin cdr cli cracklib crosscompile crypt cscope cups curl dbus dlloader dri dts dv dvb dvd dvdr eds elibc_glibc emboss encode ethereal evo examples exif f77 fastcgi ffmpeg firefox flac foomaticdb fortran gif gimp gimpprint glitz glut gphoto2 gpm gstreamer gtk gtk2 hal iconv ieee1394 imagemagick imap imlib input_devices_keyboard input_devices_mouse input_devices_wacom ipod ipv6 isdnlog jack java jikes joystick jpeg kde kernel_linux lesstif libwww linguas_en_GB lirc_devices_devinput lirc_devices_kworld live lzw lzw-tiff mad mbox mikmod motif mozilla mp3 mpeg msn mysql nagios-ntp nagios-ping nagios-ssh ncurses nls nptl nptlonly nsplugin nvidia offensive oggvorbis opengl pam pcre pda pdf pdflib perl pic png pnp pppd python qt qt3 qt4 quicktime rdesktop readline reflection rrdcgi rrdtool samba sdl sensord session smp snmp spell spl ssl svg symlink tcltk tcpd theora tiff truetype truetype-fonts trusted type1-fonts udev uk_bleb uk_rt unicode ups usb userland_GNU userlocales v4l v4l2 video_cards_nv video_cards_nvidia visualization wifi x264 xcomposite xine xinerama xml2 xorg xosd xpm xprint xscreensaver xv xvid yahoo yv12 zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-12-26 21:07:09 UTC
*** Bug 159175 has been marked as a duplicate of this bug. ***
Comment 2 Terminus MGK II [Secundus] 2006-12-30 04:36:34 UTC
Created attachment 104973 [details, diff]
patch to compile with FLAC libraries
Comment 3 Terminus MGK II [Secundus] 2006-12-30 04:37:56 UTC
I have created a patch to fix this:

*** flac_a.c    Sun May 23 07:35:44 2004
--- flac_a.c    Sat Dec 30 13:24:08 2006
***************
*** 813,819 ****
      return;
    }
-
-   if (flac_options.isogg) {
  #ifdef AU_OGGFLAC
      if ((ctx->state.ogg = OggFLAC__stream_encoder_get_state(ctx->encoder.ogg.stream)) != OggFLAC__STREAM_ENCODER_OK) {
        ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "OggFLAC stream encoder is invalid (%s)",
--- 813,818 ----
      return;
    }
  #ifdef AU_OGGFLAC
+   if (flac_options.isogg) {
      if ((ctx->state.ogg = OggFLAC__stream_encoder_get_state(ctx->encoder.ogg.stream)) != OggFLAC__STREAM_ENCODER_OK) {
        ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "OggFLAC stream encoder is invalid (%s)",

Apply it in <tmd_src_dir>/timidity
Comment 4 Markus Giese 2006-12-30 05:40:55 UTC
sorry i dont understand what to do :

*** flac_a.c    Sun May 23 07:35:44 2004
--- flac_a.c    Sat Dec 30 13:24:08 2006
***************
*** 813,819 ****
      return;
    }
-
-   if (flac_options.isogg) {
  #ifdef AU_OGGFLAC
      if ((ctx->state.ogg =
OggFLAC__stream_encoder_get_state(ctx->encoder.ogg.stream)) !=
OggFLAC__STREAM_ENCODER_OK) {
        ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "OggFLAC stream encoder is invalid
(%s)",
--- 813,818 ----
      return;
    }
  #ifdef AU_OGGFLAC
+   if (flac_options.isogg) {
      if ((ctx->state.ogg =
OggFLAC__stream_encoder_get_state(ctx->encoder.ogg.stream)) !=
OggFLAC__STREAM_ENCODER_OK) {
        ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "OggFLAC stream encoder is invalid
(%s)",


i have created a script in /var/tmp/portage/timid../work/Timi.../timi/ calles patch1, i tried to simply  run this or compile it with gcc. but nothing seems to be working. its the first time i try to apply a patch, i am not even sure if i selected the correct code i thought functions always end with } and not with , 

i am a very beginner so please be kind ;-) THX a LOT
Comment 5 Terminus MGK II [Secundus] 2006-12-30 06:40:47 UTC
(In reply to comment #4)
> sorry i dont understand what to do :
> 
> *** flac_a.c    Sun May 23 07:35:44 2004
> --- flac_a.c    Sat Dec 30 13:24:08 2006
> ***************
> *** 813,819 ****
>       return;
>     }
> -
> -   if (flac_options.isogg) {
>   #ifdef AU_OGGFLAC
>       if ((ctx->state.ogg =
> OggFLAC__stream_encoder_get_state(ctx->encoder.ogg.stream)) !=
> OggFLAC__STREAM_ENCODER_OK) {
>         ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "OggFLAC stream encoder is invalid
> (%s)",
> --- 813,818 ----
>       return;
>     }
>   #ifdef AU_OGGFLAC
> +   if (flac_options.isogg) {
>       if ((ctx->state.ogg =
> OggFLAC__stream_encoder_get_state(ctx->encoder.ogg.stream)) !=
> OggFLAC__STREAM_ENCODER_OK) {
>         ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "OggFLAC stream encoder is invalid
> (%s)",
> 
> 
> i have created a script in /var/tmp/portage/timid../work/Timi.../timi/ calles
> patch1, i tried to simply  run this or compile it with gcc. but nothing seems
> to be working. its the first time i try to apply a patch, i am not even sure if
> i selected the correct code i thought functions always end with } and not with
> , 
> 
> i am a very beginner so please be kind ;-) THX a LOT
> 


You should apply it to /var/tmp/portage/timidity++-2.13.2-r2/work/TiMidity++-2.13.2/timidity like this
patch -p0 < flac_a.c.diff

That is:

ebuild /usr/portage/media-sound/timidity++/timidity++-2.13.2-r3.ebuild fetch
ebuild /usr/portage/media-sound/timidity++/timidity++-2.13.2-r3.ebuild unpack
cd /var/tmp/portage/timidity++-2.13.2-r2/work/TiMidity++-2.13.2/timidity
patch -p0 < flac_a.c.diff
ebuild /usr/portage/media-sound/timidity++/timidity++-2.13.2-r3.ebuild compile
ebuild /usr/portage/media-sound/timidity++/timidity++-2.13.2-r3.ebuild install
ebuild /usr/portage/media-sound/timidity++/timidity++-2.13.2-r3.ebuild qmerge
Comment 6 Markus Giese 2006-12-30 15:13:42 UTC
not possible :( 

i did :
ebuild /usr/portage/media-sound/timidity++/timidity++-2.13.2-r3.ebuild fetch
ebuild /usr/portage/media-sound/timidity++/timidity++-2.13.2-r3.ebuild unpack
cd /var/tmp/portage/timidity++-2.13.2-r2/work/TiMidity++-2.13.2/timidity
except this 
cd /var/tmp/portage/timidity++-2.13.2-r3/work/TiMidity++-2.13.2/timidity .. then when i try to patch : 

# patch -p0 < patch.diff
patch: **** malformed patch at line 11: OggFLAC__stream_encoder_get_state(ctx->encoder.ogg.stream)) !=


what to do now ?
Comment 7 Terminus MGK II [Secundus] 2006-12-31 03:22:10 UTC
(In reply to comment #6)

What do you mean by?

> except this 
> cd /var/tmp/portage/timidity++-2.13.2-r3/work/TiMidity++-2.13.2/timidity ..

You have to be in that particulary dirctory when patching. (The directory where file flac_a.c is situated).

> 
> what to do now ?
> 

Apply the patch into that directory. Obviously you have to be root.

The bug had been sorted upstream and should be resolved into portage in a few days.
Comment 8 Markus Giese 2006-12-31 05:02:02 UTC
i was in the dir where the flac file is, i was root
but i get this strange error.. could you tell me what to do, because i want to know what went wrong..... THX A LOT , happy new year..
Comment 9 Terminus MGK II [Secundus] 2006-12-31 05:41:20 UTC
Comment on attachment 104973 [details, diff]
patch to compile with FLAC libraries

--- flac_a.c    2004-05-23 07:35:44.000000000 +0300
+++ flac_a.c    2006-12-30 13:24:08.000000000 +0200
@@ -812,9 +812,8 @@
     flac_session_close();
     return;
   }
-
-  if (flac_options.isogg) {
 #ifdef AU_OGGFLAC
+  if (flac_options.isogg) {
     if ((ctx->state.ogg = OggFLAC__stream_encoder_get_state(ctx->encoder.ogg.stream)) != OggFLAC__STREAM_ENCODER_OK) {
       ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "OggFLAC stream encoder is invalid (%s)",
                OggFLAC__StreamEncoderStateString[ctx->state.ogg]);
Comment 10 Markus Giese 2007-01-08 22:58:07 UTC
so far so good, with the new code i was able to patch the file, but now it stops at this point : 

ebuild /usr/portage/media-sound/timidity++/timidity++-2.13.2-r3.ebuild compile



Comment 11 Markus Giese 2007-01-08 23:00:15 UTC
# patch -p0 < flac_a.c.diff
patching file flac_a.c
patch: **** malformed patch at line 12: OggFLAC__stream_encoder_get_state(ctx->encoder.ogg.stream)) !=
Comment 12 Markus Giese 2007-01-08 23:09:33 UTC
Created attachment 106131 [details]
my patch file

IT CANT be so difficult. here is the file i am using for patching ... copy & paste problems or what the hell goes wrong all the time
Comment 13 Diego Elio Pettenò (RETIRED) gentoo-dev 2007-01-10 19:47:34 UTC
Fixed now in -r3.
Comment 14 Markus Giese 2007-01-11 19:23:53 UTC
not for, the problem wasnt the unpatched version. even with the patched one i couldnt install timidity++. but i finally have found the problem !! i emerged        flac without OGG useflag, maybe some check should be added in timidity... thx a lot