Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 741969 - media-sound/audacity-2.4.2-r1[-flac] - ld: src/CMakeFiles/Audacity.dir/ondemand/ODDecodeFlacTask.cpp.o: in function `ODFlacDecoder::ReadHeader()': ODDecodeFlacTask.cpp:(.text+0x768): undefined reference to `FLAC::Decoder::File::File()'
Summary: media-sound/audacity-2.4.2-r1[-flac] - ld: src/CMakeFiles/Audacity.dir/ondema...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Professional Audio Applications Maintainers
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-09-12 19:32 UTC by ernsteiswuerfel
Modified: 2024-04-16 22:57 UTC (History)
5 users (show)

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


Attachments
emerge --info (file_741969.txt,5.91 KB, text/plain)
2020-09-12 19:32 UTC, ernsteiswuerfel
Details
build.log.xz (audacity-2.4.2-r1:20200912-191053.log.xz,25.16 KB, application/x-xz)
2020-09-12 19:33 UTC, ernsteiswuerfel
Details
build.log 2.4.2-r1 (media-sound:audacity-2.4.2-r1:20210302-222059.log,745.85 KB, text/x-log)
2021-03-02 22:26 UTC, Jeffrey Lin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2020-09-12 19:32:36 UTC
Encountered at tatt-testing bug #740054.

All builds with USE='-flac' fail:
USE='-alsa -doc -ffmpeg flac id3tag jack -ladspa -lv2 -mad -ogg oss -portmidi portmixer portsmf -sbsms -twolame -vamp -vorbis -vst' succeeded for =media-sound/audacity-2.4.2-r1
USE='-alsa -doc -ffmpeg -flac id3tag jack -ladspa lv2 mad -ogg oss -portmidi -portmixer portsmf sbsms -twolame -vamp -vorbis -vst' failed for =media-sound/audacity-2.4.2-r1
USE='alsa doc -ffmpeg flac -id3tag -jack ladspa -lv2 mad ogg oss -portmidi portmixer -portsmf -sbsms twolame -vamp -vorbis -vst' succeeded for =media-sound/audacity-2.4.2-r1
USE='-alsa doc -ffmpeg -flac id3tag jack ladspa -lv2 -mad ogg oss -portmidi portmixer -portsmf sbsms -twolame vamp -vorbis -vst' failed for =media-sound/audacity-2.4.2-r1
USE='alsa -doc -ffmpeg flac -id3tag jack ladspa -lv2 -mad -ogg -oss -portmidi -portmixer -portsmf -sbsms twolame vamp -vorbis -vst' succeeded for =media-sound/audacity-2.4.2-r1
USE='alsa -doc ffmpeg flac id3tag -jack ladspa lv2 mad -ogg oss portmidi -portmixer portsmf sbsms twolame vamp vorbis -vst' succeeded for =media-sound/audacity-2.4.2-r1
USE='-alsa doc -ffmpeg -flac id3tag -jack ladspa lv2 mad ogg oss -portmidi portmixer portsmf sbsms twolame -vamp -vorbis vst' failed for =media-sound/audacity-2.4.2-r1
USE='alsa doc ffmpeg flac id3tag jack ladspa -lv2 -mad ogg oss portmidi portmixer portsmf sbsms -twolame -vamp vorbis vst' succeeded for =media-sound/audacity-2.4.2-r1
USE='alsa -doc -ffmpeg -flac id3tag jack ladspa lv2 mad -ogg -oss -portmidi portmixer portsmf -sbsms twolame -vamp vorbis vst' failed for =media-sound/audacity-2.4.2-r1
USE='-alsa -doc -ffmpeg -flac id3tag jack ladspa lv2 mad -ogg oss -portmidi portmixer -portsmf sbsms twolame -vamp vorbis vst' failed for =media-sound/audacity-2.4.2-r1
USE='alsa doc -ffmpeg -flac id3tag -jack ladspa lv2 -mad -ogg -oss -portmidi portmixer portsmf sbsms -twolame vamp vorbis vst' failed for =media-sound/audacity-2.4.2-r1
USE='-alsa doc -ffmpeg -flac -id3tag jack ladspa lv2 mad ogg -oss portmidi -portmixer portsmf sbsms twolame vamp vorbis vst' failed for =media-sound/audacity-2.4.2-r1

[...]
/usr/lib/gcc/powerpc-unknown-linux-gnu/9.3.0/../../../../powerpc-unknown-linux-gnu/bin/ld: src/CMakeFiles/Audacity.dir/ondemand/ODDecodeFlacTask.cpp.o:(.data.rel.ro._ZTV10ODFLACFile[_ZTV10ODFLACFile]+0xa0): undefined reference to `FLAC::Decoder::File::init(char const*)'
/usr/lib/gcc/powerpc-unknown-linux-gnu/9.3.0/../../../../powerpc-unknown-linux-gnu/bin/ld: src/CMakeFiles/Audacity.dir/ondemand/ODDecodeFlacTask.cpp.o:(.data.rel.ro._ZTV10ODFLACFile[_ZTV10ODFLACFile]+0xa4): undefined reference to `FLAC::Decoder::File::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/lib/gcc/powerpc-unknown-linux-gnu/9.3.0/../../../../powerpc-unknown-linux-gnu/bin/ld: src/CMakeFiles/Audacity.dir/ondemand/ODDecodeFlacTask.cpp.o:(.data.rel.ro._ZTV10ODFLACFile[_ZTV10ODFLACFile]+0xa8): undefined reference to `FLAC::Decoder::File::init_ogg(_IO_FILE*)'
/usr/lib/gcc/powerpc-unknown-linux-gnu/9.3.0/../../../../powerpc-unknown-linux-gnu/bin/ld: src/CMakeFiles/Audacity.dir/ondemand/ODDecodeFlacTask.cpp.o:(.data.rel.ro._ZTV10ODFLACFile[_ZTV10ODFLACFile]+0xac): undefined reference to `FLAC::Decoder::File::init_ogg(char const*)'
/usr/lib/gcc/powerpc-unknown-linux-gnu/9.3.0/../../../../powerpc-unknown-linux-gnu/bin/ld: src/CMakeFiles/Audacity.dir/ondemand/ODDecodeFlacTask.cpp.o:(.data.rel.ro._ZTV10ODFLACFile[_ZTV10ODFLACFile]+0xb0): undefined reference to `FLAC::Decoder::File::init_ogg(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
 * ERROR: media-sound/audacity-2.4.2-r1::gentoo failed (compile phase):
 *   ninja -v -j1 -l0 failed
 * 
 * Call stack:
 *     ebuild.sh, line  125:  Called src_compile
 *   environment, line 2077:  Called cmake_src_compile
 *   environment, line  737:  Called cmake_build
 *   environment, line  706:  Called eninja
 *   environment, line 1161:  Called die
 * The specific snippet of code:
 *       "$@" || die "${nonfatal_args[@]}" "${*} failed"
Comment 1 ernsteiswuerfel archtester 2020-09-12 19:32:58 UTC
Created attachment 659871 [details]
emerge --info
Comment 2 ernsteiswuerfel archtester 2020-09-12 19:33:37 UTC
Created attachment 659874 [details]
build.log.xz
Comment 3 Miroslav Šulc gentoo-dev 2020-09-13 09:47:13 UTC
it fails when linking on-demand feature of audacity which is claimed to be withdrawn from audacity in 2.3.3+: https://alphamanual.audacityteam.org/man/On-Demand_Loading

anyway, flac use flag is the only use flag that has to be enabled to compile it successfully so it seems it's not optional as of now.

atm i'm not 100% sure making flac lib mandatory is the correct solution, maybe it's an upstream issue.

anyway, thank you for the report. will try to find the appropriate solution to fix it.
Comment 4 Jeffrey Lin 2021-03-02 22:26:50 UTC
Created attachment 689163 [details]
build.log 2.4.2-r1

The issue I hit was:

In file included from /tmp/portage/media-sound/audacity-2.4.2-r1/work/audacity-Audacity-2.4.2/src/ProjectFileManager.cpp:54:
/tmp/portage/media-sound/audacity-2.4.2-r1/work/audacity-Audacity-2.4.2/src/ondemand/ODDecodeFlacTask.h:35:10: fatal error: FLAC++/decoder.h: No such file or directory
   35 | #include "FLAC++/decoder.h"
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
Comment 5 Larry the Git Cow gentoo-dev 2024-04-16 22:57:22 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72e8c24fcd0beb997a88f7d185a02a212abafe37

commit 72e8c24fcd0beb997a88f7d185a02a212abafe37
Author:     Aliaksei Urbanski <aliaksei.urbanski@gmail.com>
AuthorDate: 2024-04-16 19:03:31 +0000
Commit:     Yixun Lan <dlan@gentoo.org>
CommitDate: 2024-04-16 22:53:49 +0000

    media-sound/audacity: fix various issues
    
    The flac USE flag was mistakenly used
    instead of the opus USE flag for configuring.
    
    Also, Audacity 3.4.2 introduced a brand new
    USE_OPUSFILE option which must be set properly.
    
    These changes:
      - fix the opus USE flag
      - add proper REQUIRED_USE
      - replace media-sound/mpg123 with media-sound/mpg123-base
      - move dev-libs/rapidjson from RDEPEND to DEPEND
      - fix missing `#include <limits>` for 2.4.2-r4
      - limit media-video/ffmpeg to <5 for 2.4.2-r4
      - add x11-base/xorg-proto to DEPEND
      - add some ASM to BDEPEND
      - add audacity-3.4.2-audiocom-std-string.patch to PATCHES for 3.3.3-r1
      - add audacity-2.4.2-fix-libflac-undefined-references.patch to PATCHES for 2.4.2-r4
      - reset KEYWORDS for 2.4.2-r4 and 3.3.3-r1
    
    Closes: https://bugs.gentoo.org/741969
    Closes: https://bugs.gentoo.org/884747
    Closes: https://bugs.gentoo.org/910723
    Closes: https://bugs.gentoo.org/922595
    Closes: https://bugs.gentoo.org/927659
    Closes: https://github.com/gentoo/gentoo/pull/35903
    Co-authored-by: Matthew White <mehw.is.me@inventati.org>
    Signed-off-by: Aliaksei Urbanski <aliaksei.urbanski@gmail.com>
    Signed-off-by: Yixun Lan <dlan@gentoo.org>

 media-sound/audacity/audacity-2.4.2-r4.ebuild      | 135 +++++++++++++++++++++
 ...acity-3.3.3.ebuild => audacity-3.3.3-r1.ebuild} |  33 ++---
 ...acity-3.4.2.ebuild => audacity-3.4.2-r1.ebuild} |  24 ++--
 media-sound/audacity/audacity-9999.ebuild          |  24 ++--
 ...audacity-2.4.2-add-missing-include-limits.patch |  10 ++
 ...ty-2.4.2-fix-libflac-undefined-references.patch |  61 ++++++++++
 media-sound/audacity/metadata.xml                  |   4 +-
 7 files changed, 258 insertions(+), 33 deletions(-)