Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 604718 - media-libs/flac-1.3.2 prints debug infos (caused by Gentoo-Patch)
Summary: media-libs/flac-1.3.2 prints debug infos (caused by Gentoo-Patch)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 540072
  Show dependency tree
 
Reported: 2017-01-05 03:44 UTC by Stefan Briesenick (RETIRED)
Modified: 2017-01-13 18:38 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Briesenick (RETIRED) gentoo-dev 2017-01-05 03:44:07 UTC
well, I don't know if it is a upstream bug or just a wrong compile option, but since 1.3.2 flac prints following after regular header:

CPU info (x86-64):
  SSE3 ....... Y
  SSSE3 ...... Y
  SSE41 ...... Y
  SSE42 ...... Y
  AVX ........ Y
  FMA ........ n
  AVX2 ....... n
  AVX OS sup . Y

it's even printed with --totally-silent, as soon "flac" is compressing or testing files. This breaks many scripts here and is "ugly" to say the least.

it's even printed with libsndfile and SoX when working with FLACs. So it seems to be buried inside of libFLAC, not in the executable.

I had to mask it locally for the time being.

Can someone have a look at it, please?

thanks!
Comment 1 Mateusz Lenik 2017-01-05 09:44:30 UTC
Looks like this is the relevant code: http://git.xiph.org/?p=flac.git;a=blob;f=src/libFLAC/cpu.c;h=9a3feaa545e8e900ec4722b4756768b53d427103;hb=601c051df40d186bf1b22f0262721157599b92be#l401

That print is hidden behind #ifdef DEBUG, but I don't have debug USE enabled for this package so it must be defined somewhere else.
Comment 2 Stefan Briesenick (RETIRED) gentoo-dev 2017-01-05 12:41:39 UTC
if nothing helps, patch it out for the time being. But it should reported upstream I guess.
Comment 3 Stefan Briesenick (RETIRED) gentoo-dev 2017-01-05 12:51:16 UTC
#ifdef DEBUG
#include <stdio.h>

#define dfprintf fprintf
#else
/* This is bad practice, it should be a static void empty function */
#define dfprintf(file, format, ...)
#endif


easy fix would be to replace the "#ifdef DEBUG" to "#ifdef FLAC_DEBUG" or something like that. But I try to find the place where DEBUG is set. Maybe buried inside autotools stuff...
Comment 4 Stefan Briesenick (RETIRED) gentoo-dev 2017-01-05 13:01:49 UTC
ok, it's not an upstream bug!

compiled it manually after ebuild ... unpack. No Debug output!

So maybe that $(use_enable debug) causes some harm. I try to figure it out.
Comment 5 Stefan Briesenick (RETIRED) gentoo-dev 2017-01-05 13:10:18 UTC
ok, it have to be buried inside the gentoo patches!

if I only unpack the source with "ebuild .. unpack", there's no debug output. But if I use also "ebuild .. prepare", we have the debug output.
Comment 6 Stefan Briesenick (RETIRED) gentoo-dev 2017-01-05 13:23:41 UTC
flac-1.3.2-cflags.patch

there's an unconditional -DDEBUG.

WHY?!

It's not there in flac-1.3.1-cflags.patch.

after manually uncomment this:

   CPPFLAGS="-DDEBUG $CPPFLAGS"

inside the patched configure, there's no more debug output.

So I guess, we (well, 'me') found it. Please fix!

Thanks!
Comment 7 Stefan Briesenick (RETIRED) gentoo-dev 2017-01-05 13:24:38 UTC
/uncomment/comment out/ ;-)
Comment 8 Stefan Briesenick (RETIRED) gentoo-dev 2017-01-08 20:18:25 UTC
ping.

current version is broken by gentoo patch. No one feels responsible to fix it?
Comment 9 David Seifert gentoo-dev 2017-01-13 18:38:35 UTC
I've fixed it and submitted all the patches upstream. With USE="-debug":
flac 1.3.2
Copyright (C) 2000-2009  Josh Coalson, 2011-2016  Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

a2002011001-e02.wav: wrote 5440305 bytes, ratio=0,568


With USE="debug":
flac 1.3.2
Copyright (C) 2000-2009  Josh Coalson, 2011-2016  Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

CPU info (x86-64):
  SSE3 ....... Y
  SSSE3 ...... Y
  SSE41 ...... Y
  SSE42 ...... Y
  AVX ........ Y
  FMA ........ n
  AVX2 ....... n
  AVX OS sup . Y
a2002011001-e02.wav: wrote 5440305 bytes, ratio=0,568


This seems correct to me. Reopen if issues persist.

commit 29397cdf2756c3fc6db869cd0e7e3db59536e9c5
Author: David Seifert <soap@gentoo.org>
Date:   Fri Jan 13 19:35:16 2017 +0100

    media-libs/flac: Make debugging info dependent on USE="debug"
    
    Gentoo-bug: 604718