Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hydrogen 1.2.4 fails to compile when LASH is enabled #2076

Closed
xaviermiller opened this issue Dec 8, 2024 · 4 comments
Closed

Hydrogen 1.2.4 fails to compile when LASH is enabled #2076

xaviermiller opened this issue Dec 8, 2024 · 4 comments
Labels
Milestone

Comments

@xaviermiller
Copy link

xaviermiller commented Dec 8, 2024

Hydrogen version * : 1.2.4
Operating system + version : Gentoo Linux
Audio driver + version :


With LASH enabled, hydrogen 1.2.4 fails to build

`FAILED: src/cli/CMakeFiles/h2cli.dir/main.cpp.o
/usr/bin/x86_64-pc-linux-gnu-g++ -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_TESTCASE_BUILDDIR="/var/tmp/portage/media-sound/hydrogen-1.2.4/work/hydrogen-1.2.4_build" -DQT_TESTLIB_LIB -DQT_WIDGETS_LIB -DQT_XMLPATTERN
S_LIB -DQT_XML_LIB -I/var/tmp/portage/media-sound/hydrogen-1.2.4/work/hydrogen-1.2.4_build/src/cli -I/var/tmp/portage/media-sound/hydrogen-1.2.4/work/hydrogen-1.2.4/src/cli -I/var/tmp/portage/media-sound/hydrogen-1.2.4/work/hydrogen-1.2.
4_build/src/cli/h2cli_autogen/include -I/var/tmp/portage/media-sound/hydrogen-1.2.4/work/hydrogen-1.2.4/src -I/var/tmp/portage/media-sound/hydrogen-1.2.4/work/hydrogen-1.2.4_build/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/QtTest -isy
stem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtWidgets -O2 -pipe -fomit-frame-pointer -march=broadwell -mmmx -mpopcnt -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -mavx2 -mfma -mbmi -mbmi2 -maes -mpclmul -madx -mabm -mcx
16 -mf16c -mfsgsbase -mfxsr -msahf -mlzcnt -mmovbe -mprfchw -mrdrnd -mrdseed -mxsave -mxsaveopt --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=broadwell -fno-implement-inlines -std=gnu++17 -fPIC
-MD -MT src/cli/CMakeFiles/h2cli.dir/main.cpp.o -MF src/cli/CMakeFiles/h2cli.dir/main.cpp.o.d -o src/cli/CMakeFiles/h2cli.dir/main.cpp.o -c /var/tmp/portage/media-sound/hydrogen-1.2.4/work/hydrogen-1.2.4/src/cli/main.cpp
/var/tmp/portage/media-sound/hydrogen-1.2.4/work/hydrogen-1.2.4/src/cli/main.cpp: In function ‘int main(int, char**)’:
/var/tmp/portage/media-sound/hydrogen-1.2.4/work/hydrogen-1.2.4/src/cli/main.cpp:342:49: error: passing ‘const QString’ as ‘this’ argument discards qualifiers [-fpermissive]
342 | sSongFilename = "";
| ^~
In file included from /usr/include/qt5/QtCore/qcoreapplication.h:44,
from /usr/include/qt5/QtCore/QCoreApplication:1,
from /var/tmp/portage/media-sound/hydrogen-1.2.4/work/hydrogen-1.2.4/src/cli/main.cpp:28:
/usr/include/qt5/QtCore/qstring.h:838:40: note: in call to ‘QString& QString::operator=(const char*)’
838 | inline QT_ASCII_CAST_WARN QString &operator=(const char ch)
| ^~~~~~~~
/var/tmp/portage/media-sound/hydrogen-1.2.4/work/hydrogen-1.2.4/src/cli/main.cpp:343:53: error: passing ‘const QString’ as ‘this’ argument discards qualifiers [-fpermissive]
343 | sSongFilename.append( QString::fromLocal8Bit(lash_event_get_string(lash_event)) );
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/qt5/QtCore/qstring.h:546:14: note: in call to ‘QString& QString::append(const QString&)’
546 | QString &append(const QString &s);
| ^~~~~~
/var/tmp/portage/media-sound/hydrogen-1.2.4/work/hydrogen-1.2.4/src/cli/main.cpp:344:53: error: passing ‘const QString’ as ‘this’ argument discards qualifiers [-fpermissive]
344 | sSongFilename.append("/hydrogen.h2song");
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/usr/include/qt5/QtCore/qstring.h:850:40: note: in call to ‘QString& QString::append(const char
)’
850 | inline QT_ASCII_CAST_WARN QString &append(const char *s)
| ^~~~~~
ninja: build stopped: subcommand failed.

`

Indeed, sSongFileName is defined as const QString and is then modified at line 342

Hydrogen 1.2.3 did not define sSongFileName as const...

@theGreatWhiteShark
Copy link
Contributor

Hey @xaviermiller ,

Unfortunately, I can neither test the LASH code locally or in our build pipeline since LASH support was removed since a while in a Linux OSs I do use. Could you check whether #2077 fixes compilation?

But this bit rot is bad. We really need to remove all the LASH stuff too.

If you are interested in session management, I wound highly recommend to check out NSM via e.g. RaySession. Hydrogen should provide almost full support.

@xaviermiller
Copy link
Author

xaviermiller commented Dec 10, 2024

It's working. I will check if Lash support is still used in Gentoo. This was enabled on my config to check a lot of audio programs and utilities.

EDIT: there is an old discussion on replace LASH by ladish

@theGreatWhiteShark
Copy link
Contributor

EDIT: there is an old discussion on replace LASH by ladish

Yes. We had one too (#1645). Turns out ladish is supporting NSM by now and I do not see any reason stick to LASH. But I never used it in production. Do you still see a reason to keep it?

@theGreatWhiteShark theGreatWhiteShark added this to the 1.2.5 milestone Dec 11, 2024
@theGreatWhiteShark
Copy link
Contributor

Closed with #2077

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants