tenacityteam / tenacity-legacy

THIS REPO IS NOT MAINTAINED ANYMORE. Please see https://codeberg.org/tenacityteam/tenacity for Tenacity, which is maintained.
https://tenacityaudio.org
Other
6.78k stars 258 forks source link

AboutDialog fails to build when any optional feature is disabled #424

Closed Be-ing closed 3 years ago

Be-ing commented 3 years ago

Likely a regression from #361

[435/829] Building CXX object src/CMakeFiles/Tenacity.dir/AboutDialog.cpp.o
FAILED: src/CMakeFiles/Tenacity.dir/AboutDialog.cpp.o 
/usr/bin/ccache /usr/bin/c++ -DAUDACITY_DLL_API="" -DBUILDING_AUDACITY -DCMAKE -DEXPERIMENTAL_DRAGGABLE_PLAY_HEAD -DEXPERIMENTAL_EASY_CHANGE_KEY_BINDINGS -DEXPERIMENTAL_EFFECT_MANAGEMENT -DEXPERIMENTAL_FULL_WASAPI -DEXPERIMENTAL_HALF_WAVE -DEXPERIMENTAL_KEY_VIEW -DEXPERIMENTAL_MIDI_OUT -DEXPERIMENTAL_MODULE_PREFS -DEXPERIMENTAL_NOISE_REDUCTION -DEXPERIMENTAL_NOTETRACK_OVERLAY -DEXPERIMENTAL_NYQUIST_SPLIT_CONTROL -DEXPERIMENTAL_PUNCH_AND_ROLL -DEXPERIMENTAL_REALTIME_AUDACITY_EFFECTS -DEXPERIMENTAL_SCIENCE_FILTERS -DEXPERIMENTAL_SCROLLING_LIMITS -DEXPERIMENTAL_SCRUBBING_SCROLL_WHEEL -DEXPERIMENTAL_SCRUBBING_SUPPORT -DEXPERIMENTAL_SPECTRAL_EDITING -DEXPERIMENTAL_SYNC_LOCK -DEXPERIMENTAL_THEMING -DEXPERIMENTAL_TWO_TONE_TIME_RULER -DEXPERIMENTAL_ZERO_PADDED_SPECTROGRAMS -DEXPERIMENTAL_ZOOM_TOGGLE_BUTTON -DHAVE_LRINT -DHAVE_LRINTF -DHAVE_MLOCK -DSTRINGS_API="" -DSTRING_UTILS_API="" -DTenacity_EXPORTS -DUTILITY_API="" -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -Isrc/private -I../include -I../src -I../lib-src/libsoxr/src -I../lib-src/twolame/libtwolame -I../lib-src/portsmf/include -I../lib-src/libnyquist -I../lib-src/libsbsms/include -Icmake-proxies/soundtouch/public -I../lib-src/soundtouch/include -I../lib-src/libvamp -I../libraries/lib-string-utils -I../libraries/lib-strings -I../libraries/lib-utility -isystem /app/include/wx-3.1 -isystem /app/lib/wx/include/gtk3-unicode-3.1 -isystem /app/include/lilv-0 -isystem /app/include/serd-0 -isystem /app/include/sord-0 -isystem /app/include/sratom-0 -isystem /app/include/suil-0 -isystem /usr/include/glib-2.0 -isystem /usr/lib/aarch64-linux-gnu/glib-2.0/include -isystem /usr/include/gtk-3.0 -isystem /usr/include/pango-1.0 -isystem /usr/include/harfbuzz -isystem /usr/include/freetype2 -isystem /usr/include/libpng16 -isystem /usr/include/libmount -isystem /usr/include/blkid -isystem /usr/include/fribidi -isystem /usr/include/cairo -isystem /usr/include/pixman-1 -isystem /usr/include/gdk-pixbuf-2.0 -isystem /usr/include/gio-unix-2.0 -isystem /usr/include/atk-1.0 -isystem /usr/include/at-spi2-atk/2.0 -isystem /usr/include/dbus-1.0 -isystem /usr/lib/aarch64-linux-gnu/dbus-1.0/include -isystem /usr/include/at-spi-2.0 -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -O3 -DNDEBUG -include /run/build/tenacity/_flatpak_build/src/private/configunix.h -DAUDACITY_VERSION=3 -DAUDACITY_RELEASE=0 -DAUDACITY_REVISION=4 -DAUDACITY_MODLEVEL=0 -DAUDACITY_VERSION_STRING=L\"3.0.4-alpha\" -DAUDACITY_FILE_VERSION=L\"3,0,4,0\" -DPROHIBITED==delete -Dsafenew=new -DWXINTL_NO_GETTEXT_MACRO -U_DEBUG -DIS_ALPHA -DUSE_ALPHA_MANUAL -pthread -std=gnu++17 -MD -MT src/CMakeFiles/Tenacity.dir/AboutDialog.cpp.o -MF src/CMakeFiles/Tenacity.dir/AboutDialog.cpp.o.d -o src/CMakeFiles/Tenacity.dir/AboutDialog.cpp.o -c ../src/AboutDialog.cpp
../src/AboutDialog.cpp: In member function ‘void AboutDialog::CreateInformationTab(ShuttleGui&)’:
../src/AboutDialog.cpp:241:88: error: ‘USE_PORTMIXER’ was not declared in this scope
  241 |     AddBuildInfoRow(&informationStr, wxT("PortMixer"), XO("Sound card mixer support"), USE_PORTMIXER ? enabled : disabled);
      |                                                                                        ^~~~~~~~~~~~~
Be-ing commented 3 years ago

@emabrey can you look into this?

emabrey commented 3 years ago

Yeah this is my bad. I forgot to add in the code to fix this. I anticipated this problem when I was working on this, but I just lost track of it while I was working on it I guess.

TheEvilSkeleton commented 3 years ago

Are there any workaround to this for now?

Be-ing commented 3 years ago

Thanks for looking into this @emabrey.

@TheEvilSkeleton I've been commenting out the code in the about dialog locally. :/

TheEvilSkeleton commented 3 years ago

@Be-ing can you show me how/where/what you commented? I don't know much about programming. I wouldn't mind making a patch for the flatpak for the time being, so we can at least get a working flatpak publicly as soon as possible.

Be-ing commented 3 years ago

Here is the line that is failing in your Flatpak build: https://github.com/tenacityteam/tenacity/blob/a30f84e449eb3bcbb722a1e8b346a92a5c89904d/src/AboutDialog.cpp#L241

Just add // to the front of the line. Or wait for @emabrey to fix the bug.

vchernin commented 3 years ago

@TheEvilSkeleton I made a quick patch that the Flatpak can use, and made a PR for your Flatpak repo. https://github.com/TheEvilSkeleton/flatpaks/pull/6

emabrey commented 3 years ago

I forgot to put the #ifdefs back because I was going to modify the CMake configuration, but upon looking through it there's no quick and easy way to do this that I can figure. I wanted to use the ternary setup since there is a lot of chance for #ifdef to hide code compilation problems, but they didn't configure CMake to spit out the macros at all if there is an OFF configuration.

Right now the cmake config options get mapped like so:

use_portmixer = ON, local, system, etc. -> #define USE_PORTMIXER = 1 use_portmixer = OFF -> USE_PORTMIXER = <undefined>

So I just added some ifdefs to revert the changes I was going to make until I can finish it.

Be-ing commented 3 years ago

I forgot to put the #ifdefs back

I am confused. #361 did not remove #ifdefs for these optional features.