Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 637110 - media-sound/audacity-2.2.0[-midi]: multiple compilation errors in AudioIO.cpp
Summary: media-sound/audacity-2.2.0[-midi]: multiple compilation errors in AudioIO.cpp
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Professional Audio Applications Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-10 23:22 UTC by Matt Whitlock
Modified: 2018-02-21 11:08 UTC (History)
7 users (show)

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


Attachments
build.log (build.log,432.54 KB, text/plain)
2017-11-10 23:22 UTC, Matt Whitlock
Details
2.2.0-support-without-midi.patch (2.2.0-support-without-midi.patch,4.84 KB, patch)
2017-11-11 01: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-11-10 23:22:43 UTC
Created attachment 503542 [details]
build.log

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

x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I.  -std=c++11 -Wno-deprecated-declarations -D__STDC_CONSTANT_MACROS -DLIBDIR=\"/usr/lib64\"   -I../lib-src/portaudio-v19/include    -I../lib-src/lib-widget-extra -I/usr/lib64/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread          -I../lib-src/libnyquist      -I../lib-src/portmidi     -I/usr/lib64/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -Wno-unused-local-typedefs -I../lib-src/portmixer/include -march=native -O3 -ggdb -pipe -DwxDEBUG_LEVEL=0 --std=gnu++11  -Wall -I../include -I../lib-src/FileDialog             -c -o audacity-AudioIO.o `test -f 'AudioIO.cpp' || echo './'`AudioIO.cpp
AudioIO.cpp: In constructor 'AudioIO::ScrubQueue::ScrubQueue(double, double, wxLongLong, double, long int, const ScrubbingOptions&)':
AudioIO.cpp:960:20: warning: 'AudioIO::ScrubQueue::mUpdating' will be initialized after [-Wreorder]
    mutable wxMutex mUpdating;
                    ^~~~~~~~~
AudioIO.cpp:958:15: warning:   'const long int AudioIO::ScrubQueue::mMaxDebt' [-Wreorder]
    const long mMaxDebt;
               ^~~~~~~~
AudioIO.cpp:533:4: warning:   when initialized here [-Wreorder]
    ScrubQueue(double t0, double t1, wxLongLong startClockMillis,
    ^~~~~~~~~~
AudioIO.cpp: In function 'double SystemTime(bool)':
AudioIO.cpp:983:26: error: 'PaUtil_GetTime' was not declared in this scope
    return PaUtil_GetTime() - streamStartTime;
                          ^
AudioIO.cpp: In member function 'bool AudioIO::StartPortAudioStream(double, unsigned int, unsigned int, sampleFormat)':
AudioIO.cpp:1798:7: error: 'mAudioOutLatency' was not declared in this scope
       mAudioOutLatency = info->outputLatency;
       ^~~~~~~~~~~~~~~~
AudioIO.cpp:1799:7: error: 'mSystemMinusAudioTimePlusLatency' was not declared in this scope
       mSystemMinusAudioTimePlusLatency += mAudioOutLatency;
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AudioIO.cpp: In lambda function:
AudioIO.cpp:3964:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for( i = 0; (int)i < numChannels; i++ )
                         ~~~~~~~^~~~~~~~~~~~~
AudioIO.cpp: In function 'void DoSoftwarePlaythrough(const void*, sampleFormat, unsigned int, float*, int)':
AudioIO.cpp:4579:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for (int i=0; i < inputChannels; i++) {
                  ~~^~~~~~~~~~~~~~~
AudioIO.cpp: In function 'int audacityAudioCallback(const void*, void*, long unsigned int, const PaStreamCallbackTimeInfo*, PaStreamCallbackFlags, void*)':
AudioIO.cpp:4622:18: error: 'class AudioIO' has no member named 'mCallbackCount'
    if (gAudioIO->mCallbackCount++ == 0) {
                  ^~~~~~~~~~~~~~
AudioIO.cpp:4624:18: error: 'class AudioIO' has no member named 'mStartTime'; did you mean 'mTime'?
        gAudioIO->mStartTime = SystemTime(gAudioIO->mUsingAlsa) - gAudioIO->mT0;
                  ^~~~~~~~~~
AudioIO.cpp:4885:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          for (int c = 0; c < numPlaybackChannels; c++)
                          ~~^~~~~~~~~~~~~~~~~~~~~
AudioIO.cpp:5004:29: error: 'class AudioIO' has no member named 'mMidiOutputComplete'; did you mean 'mMixerOutputVol'?
                   gAudioIO->mMidiOutputComplete = true,
                             ^~~~~~~~~~~~~~~~~~~
AudioIO.cpp:5067:26: error: 'class AudioIO' has no member named 'mMidiOutputComplete'; did you mean 'mMixerOutputVol'?
                gAudioIO->mMidiOutputComplete = true,
                          ^~~~~~~~~~~~~~~~~~~
make[2]: *** [Makefile:3171: audacity-AudioIO.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/media-sound/audacity-2.2.0/work/audacity-minsrc-2.2.0/src'
make[1]: *** [Makefile:1585: all] Error 2
make[1]: Leaving directory '/var/tmp/portage/media-sound/audacity-2.2.0/work/audacity-minsrc-2.2.0/src'
make: *** [Makefile:808: all-recursive] Error 1
Comment 1 Matt Whitlock 2017-11-11 01:28:32 UTC
Created attachment 503556 [details, diff]
2.2.0-support-without-midi.patch

The attached patch allows media-sound/audacity-2.2.0 to build and run successfully with USE="-midi".
Comment 2 Saul Peebsen 2017-11-16 19:13:55 UTC
Had same issue, thank you for patch, it worked!
Comment 3 Simon 2017-12-10 00:18:46 UTC
@Matt Whitlock, do you know if there's an upstream bug for this?
Comment 4 Matt Whitlock 2017-12-11 16:51:35 UTC
(In reply to Simon from comment #3)
> @Matt Whitlock, do you know if there's an upstream bug for this?

I have no idea. I assumed upstream doesn't care about (or test) all possible combinations of their configure options. Let's face it: Gentoo is practically the only distro that lets users build software in severely stripped down configurations.
Comment 5 Vincent-Xavier JUMEL 2017-12-14 21:48:12 UTC
Same patch applies to 2.2.1
Comment 6 Vladimir 2018-01-19 23:49:47 UTC
If someone is interested, this patch and a couple of other patches may be used with the ebuild I suggested in Bug 624264
Comment 7 Larry the Git Cow gentoo-dev 2018-02-21 11:08:55 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18dbd4fcf1bca48ad8b368346bfe73e2f2f40f02

commit 18dbd4fcf1bca48ad8b368346bfe73e2f2f40f02
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2018-02-21 10:42:32 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2018-02-21 11:08:50 +0000

    media-sound/audacity: Fixed compilation with USE="-midi"
    
    Thanks to Matt Whitlock for providing the initial patch.
    
    Closes: https://bugs.gentoo.org/637110
    Package-Manager: Portage-2.3.24, Repoman-2.3.6

 media-sound/audacity/audacity-2.2.2.ebuild         |   8 +
 .../audacity/files/audacity-2.2.2-midi.patch       | 168 +++++++++++++++++++++
 2 files changed, 176 insertions(+)