hydrogen-music / hydrogen

The advanced drum machine for Linux, macOS, and Windows
http://www.hydrogen-music.org
GNU General Public License v2.0
1.01k stars 172 forks source link

build failure on gentoo - hydrogen-1.2.2-r1 fails to compile under Gentoo Linux x86_64 Kernel: 6.1.19 #1944

Open darkicekeel opened 4 months ago

darkicekeel commented 4 months ago

Hydrogen version * : Installed versions: 1.2.1-r1 Available versions: 1.2.2-r1 Operating system + version : OS: build.log Audio driver + version : PulseAudio (on PipeWire 1.0.0) 15.0.0


hydrogen-1.2.2-r1 fails to compile under gentoo amd64 at this point

`[168/179] /usr/bin/x86_64-pc-linux-gnu-g++ -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -I/var/tmp/portage/media-sound/hydrogen-1.2.2-r1/work/hydrogen-1.2.2_build/src/gui -I/var/tmp/portage/media-sound/hydrogen-1.2.2-r1/work/hydrogen-1.2.2/src/gui -I/var/tmp/portage/media-sound/hydrogen-1.2.2-r1/work/hydrogen-1.2.2_build/src/gui/hydrogen_autogen/include -I/var/tmp/portage/media-sound/hydrogen-1.2.2-r1/work/hydrogen-1.2.2/src/gui/src -I/var/tmp/portage/media-sound/hydrogen-1.2.2-r1/work/hydrogen-1.2.2_build/src -I/var/tmp/portage/media-sound/hydrogen-1.2.2-r1/work/hydrogen-1.2.2/src -I/usr/include/lash-1.0 -I/usr/include/opus -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtXmlPatterns -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtSvg -O2 -pipe -march=native -fno-implement-inlines -std=gnu++17 -fPIC -MD -MT src/gui/CMakeFiles/hydrogen.dir/src/Widgets/LCDDisplay.cpp.o -MF src/gui/CMakeFiles/hydrogen.dir/src/Widgets/LCDDisplay.cpp.o.d -o src/gui/CMakeFiles/hydrogen.dir/src/Widgets/LCDDisplay.cpp.o -c /var/tmp/portage/media-sound/hydrogen-1.2.2-r1/work/hydrogen-1.2.2/src/gui/src/Widgets/LCDDisplay.cpp ninja: build stopped: subcommand failed.

theGreatWhiteShark commented 4 months ago

Hey @darkicekeel

First of all, the sources you are using (1.2.2-r1) seems to be a patched version of Hydrogen. At least it does appear to be based on a tag we provide ourselves. Does the same problem occur within the releases/1.2 branch?

Apart from that this might be the first compilation failure for the ninja CMake generator I have seen. Usually we use the Make one. It might be my little exposure to CMake+ninja but I can not make much of the logs. I only see which file caused the build to fail but not which line and why. The remainder looks just like stack trace for ninja itself. Is there a specific reason you patched Hydrogen to use ninja?

darkicekeel commented 4 months ago

can't say man, it's just on the repos, i was emerging like the last time, and last time it compiled. can't find that version right now, seems like it was removed from portage. tell me how to help you finding the wrong here

cme commented 4 months ago

I note the output says "If you need support, post the output of emerge --info '=media-sound/hydrogen-1.2.2-r1::gentoo'" but I think this is an issue for the Gentoo package maintainers rather than Hydrogen itself.

Ah, okay, there's already a bug on Gentoo's bugzilla: https://bugs.gentoo.org/922034

From the error message shown there, might be that we need to includue <QFileDialog> but we're missing the dependency due to using precompiled headers but somehow in the Gentoo configuration precompiled headers are disabled.

darkicekeel commented 4 months ago

so, do I need to wait for updates?

theGreatWhiteShark commented 4 months ago

so, do I need to wait for updates?

Well, you could compile Hydrogen from the releases/1.2 branch yourself or use the latest AppImage.

cme commented 4 months ago

You could also check that your cmake version is reasonably up-to-date. The Hydrogen build system uses precompiled headers which mask this issue. If you and others are running into it, then either

  1. the Gentoo package must have patched the CMakeLists.txt's to remove the PCH configuration, or
  2. the cmake version in use is prior to 3.16, in which case it doesn't have PCH support and the Hydrogen build system won't use it, and would run into this error.
darkicekeel commented 4 months ago

so, do I need to wait for updates?

Well, you could compile Hydrogen from the releases/1.2 branch yourself or use the latest AppImage.

maybe the appimage solution will suit for a while.

darkicekeel commented 4 months ago

You could also check that your cmake version is reasonably up-to-date. The Hydrogen build system uses precompiled headers which mask this issue. If you and others are running into it, then either

  1. the Gentoo package must have patched the CMakeLists.txt's to remove the PCH configuration, or
  2. the cmake version in use is prior to 3.16, in which case it doesn't have PCH support and the Hydrogen build system won't use it, and would run into this error.

cmake --version cmake version 3.27.9

my system is pretty updated to the present. i don't think i can force a different version of cmake only for hydrogen. i'll ask also inside some gentoo channels, but if it's possible then i think it would be tricky

darkicekeel commented 4 months ago

maybe also the flatpak version would do the job for a while anyway it'd be better also for other gentoo users who love to make music, to have some infos about written online

cme commented 4 months ago

cmake --version cmake version 3.27.9

Well, that's definitely up-to-date enough, so it should have used PCH and should have successfully built. I've checked the ebuild files and patches at https://packages.gentoo.org/packages/media-sound/hydrogen and it doesn't look like the gentoo maintainers have disabled PCH. So I'm at a loss to explain why it doesn't build if you've got a recent cmake.

I see Gentoo take pull requests so the temptation to fix this for them is great, but I'd need to actually have a Gentoo system to test so... :/

theGreatWhiteShark commented 4 months ago

So I'm at a loss to explain why it doesn't build if you've got a recent cmake.

I also tried to reproduce it with those patches, ninja, all the CXXFLAG and cmake options in the log, even with that exact same cmake version. But it still builds at my end.

Maybe the reason is hidden in the gentoo_common_config.cmake or gentoo_toolchain.cmake file occurring in the log but not being present in the repo. @darkicekeel do you by any chance know where to retrieve them from?

darkicekeel commented 3 months ago

no man, i'll wait for further developments on upper levels. hopefully some devs will take a look and patch. previously everything was ok

darkicekeel commented 3 months ago

let's keep this open for other contributors