Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 618326 - media-sound/audacity-2.1.3 USE=-midi - TrackPanel.cpp:3723:48: error: 'class Track' has no member named 'GetRate'; did you mean 'GetMute'?
Summary: media-sound/audacity-2.1.3 USE=-midi - TrackPanel.cpp:3723:48: error: 'class ...
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: PATCH
Depends on: 658644
Blocks:
  Show dependency tree
 
Reported: 2017-05-13 02:28 UTC by Matt Whitlock
Modified: 2020-09-19 11:53 UTC (History)
6 users (show)

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


Attachments
TrackPanel-Track-GetRate.patch (TrackPanel-Track-GetRate.patch,1.20 KB, patch)
2017-05-13 02:28 UTC, Matt Whitlock
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Whitlock 2017-05-13 02:28:56 UTC
Created attachment 472458 [details, diff]
TrackPanel-Track-GetRate.patch

$ emerge -Opqtv audacity
[ebuild     U ] media-sound/audacity-2.1.3 [2.1.1] USE="alsa ffmpeg flac lame mad portmixer vorbis vst -doc -id3tag -jack -ladspa -libav -lv2 -midi -nls -sbsms -soundtouch -twolame -vamp" CPU_FLAGS_X86="sse"


Build fails with these errors:

TrackPanel.cpp: In member function 'virtual void TrackPanel::DoSlide(wxMouseEvent&)':
TrackPanel.cpp:3723:48: error: 'class Track' has no member named 'GetRate'; did you mean 'GetMute'?
          desiredSlideAmount = rint(mouseTrack->GetRate() * desiredSlideAmount) /
                                                ^~~~~~~
TrackPanel.cpp:3724:25: error: 'class Track' has no member named 'GetRate'; did you mean 'GetMute'?
             mouseTrack->GetRate();  // set it to a sample point
                         ^~~~~~~

Errors appear to be caused by a missed refactoring in an #ifdef'd section of code that is compiled only if USE_MIDI is undefined.

Attached patch corrects the code to what was apparently intended.

Dropping this patch into /etc/portage/patches/media-sound/audacity/ allows media-sound/audacity-2.1.3[-midi] to build successfully.

I recognize that this patch should be submitted upstream, but Audacity's Bugzilla doesn't allow new users. Maybe the Gentoo package maintainer has an Audacity Bugzilla account and could submit this patch.
Comment 1 David Flogeras 2017-07-05 21:55:26 UTC
Hit this as well after 2.1.3 stabled.

Also, is midi useflag actually required for soundtouch?  They seem unrelated.
Comment 2 Andrey 2017-07-06 04:58:33 UTC
I'm hitting this too on KEYWORDS=amd64 with
media-sound/audacity-2.1.3-r1::gentoo USE="alsa -doc ffmpeg flac -id3tag -jack -ladspa lame -libav -lv2 -mad -midi nls portmixer -sbsms -soundtouch -twolame -vamp vorbis -vst" CPU_FLAGS_X86="sse"

The attached patch by Matt (attachment 472458 [details, diff]) works for me.
With the patch audacity compiles and starts fine.
Comment 3 Luke-Jr 2018-04-13 06:36:55 UTC
I can also confirm the patch fixes the Audacity build.
Comment 4 Joseph 2018-04-15 01:53:04 UTC
How do you apply this patch? 

I copied this file: TrackPanel-Track-GetRate.patch
to: /etc/portage/patches//media-sound/audacity-2.1.3-r1/ (dir) 

but I still get an error:
/var/tmp/portage/media-sound/audacity-2.1.3-r1/temp/epatch.log

PATCH: /etc/portage/patches//media-sound/audacity-2.1.3-r1/TrackPanel-Track-GetRate.patch
CMD: patch -p1 -g0 -E --no-backup-if-mismatch 
PWD: /var/tmp/portage/media-sound/audacity-2.1.3-r1/work/audacity-minsrc-2.1.3
Comment 5 Matt Whitlock 2018-04-15 02:03:27 UTC
(In reply to Joseph from comment #4)
> I copied this file: TrackPanel-Track-GetRate.patch
> to: /etc/portage/patches//media-sound/audacity-2.1.3-r1/ (dir) 
> 
> but I still get an error

Perhaps you are applying other patches that are conflicting? This patch applies cleanly for me.

>>> Unpacking source...
>>> Unpacking audacity-minsrc-2.1.3.tar.xz to /var/tmp/portage/media-sound/audacity-2.1.3-r1/work
>>> Source unpacked in /var/tmp/portage/media-sound/audacity-2.1.3-r1/work
 * Applying user patches from /etc/portage/patches//media-sound/audacity-2.1.3 ...
 *   TrackPanel-Track-GetRate.patch ...                                                                                      [ ok ]
 * Done with patching
>>> Preparing source in /var/tmp/portage/media-sound/audacity-2.1.3-r1/work/audacity-minsrc-2.1.3 ...
>>> Source prepared.
Comment 6 Larry the Git Cow gentoo-dev 2020-09-19 11:53:08 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5cc9d2c25be36ffe088cb39216f042bd1116eedd

commit 5cc9d2c25be36ffe088cb39216f042bd1116eedd
Author:     Miroslav Šulc <fordfrog@gentoo.org>
AuthorDate: 2020-09-19 11:52:45 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2020-09-19 11:52:59 +0000

    media-sound/audacity: removed obsolete 2.2.2 and 2.3.3
    
    Closes: https://bugs.gentoo.org/699946
    Closes: https://bugs.gentoo.org/646820
    Closes: https://bugs.gentoo.org/618326
    Closes: https://bugs.gentoo.org/626586
    Closes: https://bugs.gentoo.org/632712
    Package-Manager: Portage-3.0.7, Repoman-3.0.1
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 media-sound/audacity/Manifest                      |   4 -
 media-sound/audacity/audacity-2.2.2.ebuild         | 131 ----------------
 media-sound/audacity/audacity-2.3.3.ebuild         | 137 -----------------
 .../audacity/files/audacity-2.2.1-portmixer.patch  |  36 -----
 .../audacity/files/audacity-2.2.2-automake.patch   |  48 ------
 .../audacity/files/audacity-2.2.2-midi.patch       | 168 ---------------------
 .../audacity/files/audacity-2.3.3-fno-common.patch |  62 --------
 media-sound/audacity/metadata.xml                  |   3 -
 8 files changed, 589 deletions(-)