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.77k stars 256 forks source link

Build fails against wxWidgets GTK2 port (GTK2 and GTK3 used together) instead of early configuration failure #682

Open alkaris2 opened 2 years ago

alkaris2 commented 2 years ago

Guidelines

Version/Commit hash

No response

Describe the bug.

Build compiler fails at KeyboardCapture.cpp.o

[397/750] Building CXX object src/CMakeFiles/Tenacity.dir/KeyboardCapture.cpp.o
FAILED: src/CMakeFiles/Tenacity.dir/KeyboardCapture.cpp.o 
/usr/bin/ccache /usr/bin/c++ -DCMAKE -DEXPERIMENTAL_DRAGGABLE_PLAY_HEAD -DEXPERIMENTAL_EASY_CHANGE_KEY_BINDINGS -DEXPERIMENTAL_EFFECT_MANAGEMENT -DEXPERIMENTAL_FULL_WASAPI -DEXPERIMENTAL_HALF_WAVE -DEXPERIMENTAL_KEY_VIEW -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_IPO -DHAVE_LRINT -DHAVE_LRINTF -DHAVE_MLOCK -DSTRINGS_API="" -DSTRING_UTILS_API="" -DTENACITY_DLL_API="" -DTenacity_EXPORTS -DUTILITY_API="" -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING=1 -D_SILENCE_CXX17_NEGATORS_DEPRECATION_WARNING=1 -D__WXGTK__ -I/home/alkaris/tenacity-git/src/tenacity/build/src/private -I/home/alkaris/tenacity-git/src/tenacity/include -I/home/alkaris/tenacity-git/src/tenacity/src -I/home/alkaris/tenacity-git/src/tenacity/lib-src/libnyquist/. -I/home/alkaris/tenacity-git/src/tenacity/libraries/lib-string-utils -I/home/alkaris/tenacity-git/src/tenacity/libraries/lib-strings -I/home/alkaris/tenacity-git/src/tenacity/libraries/lib-utility -isystem /usr/lib/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -isystem /usr/include/lilv-0 -isystem /usr/include/suil-0 -isystem /usr/include/gtk-3.0 -isystem /usr/include/pango-1.0 -isystem /usr/include/glib-2.0 -isystem /usr/lib/glib-2.0/include -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/lzo -isystem /usr/include/pixman-1 -isystem /usr/include/gdk-pixbuf-2.0 -isystem /usr/include/gio-unix-2.0 -isystem /usr/include/cloudproviders -isystem /usr/include/atk-1.0 -isystem /usr/include/at-spi2-atk/2.0 -isystem /usr/include/dbus-1.0 -isystem /usr/lib/dbus-1.0/include -isystem /usr/include/at-spi-2.0 -pthread -g -include /home/alkaris/tenacity-git/src/tenacity/build/src/private/configunix.h -DAUDACITY_VERSION=3 -DAUDACITY_RELEASE=0 -DAUDACITY_REVISION=4 -DAUDACITY_MODLEVEL=0 -DAUDACITY_VERSION_STRING=L\"\" -DAUDACITY_FILE_VERSION=L\"3,0,4,0\" -DPROHIBITED==delete -Dsafenew=new -DWXINTL_NO_GETTEXT_MACRO -D_DEBUG=1 -DIS_ALPHA -DUSE_ALPHA_MANUAL -pthread -std=gnu++17 -MD -MT src/CMakeFiles/Tenacity.dir/KeyboardCapture.cpp.o -MF src/CMakeFiles/Tenacity.dir/KeyboardCapture.cpp.o.d -o src/CMakeFiles/Tenacity.dir/KeyboardCapture.cpp.o -c /home/alkaris/tenacity-git/src/tenacity/src/KeyboardCapture.cpp
In file included from /usr/include/gtk-3.0/gdk/gdkapplaunchcontext.h:30,
                 from /usr/include/gtk-3.0/gdk/gdk.h:32,
                 from /usr/include/gtk-3.0/gtk/gtk.h:30,
                 from /home/alkaris/tenacity-git/src/tenacity/src/KeyboardCapture.cpp:19:
/usr/include/gtk-3.0/gdk/gdktypes.h:143:39: error: conflicting declaration ‘typedef struct _GdkWindow GdkWindow’
  143 | typedef struct _GdkWindow             GdkWindow;
      |                                       ^~~~~~~~~
In file included from /usr/include/wx-3.0/wx/event.h:14,
                 from /home/alkaris/tenacity-git/src/tenacity/src/KeyboardCapture.h:17,
                 from /home/alkaris/tenacity-git/src/tenacity/src/KeyboardCapture.cpp:11:
/usr/include/wx-3.0/wx/defs.h:3477:33: note: previous declaration as ‘typedef struct _GdkDrawable GdkWindow’
 3477 |     typedef struct _GdkDrawable GdkWindow;
      |                                 ^~~~~~~~~
[406/750] Building CXX object src/CMakeFiles/Tenacity.dir/Lyrics.cpp.o
ninja: build stopped: subcommand failed.

Tried installing from Pamac and Pacman on Manjaro, but it fails to build every time. Built in clean chroot, did git clone from repository fresh, fails at same point every time. Fails at the Ninja subcommand for whatever unknown reason, since the error message is so vague it doesn't outline what exactly failed or why.

Expected behavior

It's expected to build cleanly without issues, but doesn't.

OS

Manjaro

Additional context

No response

This issue is not a duplicate

leio commented 2 years ago

It feels like somehow it has picked wxGTK port against GTK2, but thinks it's using GTK3, so the extra integration code is told to pick up gtk3 headers and then it obviously conflicts like that. We need to see your configure stage output instead.

leio commented 2 years ago

Wait, no. GTK2 just isn't supported by the current code, but it doesn't error out then. So to get around this, you need to use and point it to a GTK3 using wxWidgets instead, and as part of this ticket we should either add GTK2 support, or at least make the configure step error out early on this. Right now toplevel CMakeLists.txt just explicitly uses GTK 3.0, without first checking what version wxWidgets uses. I recall discussing this somewhere before, so we might have another issue about it somewhere too.

leio commented 2 years ago

That mentioned other issue is https://github.com/tenacityteam/tenacity/issues/574