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

compile error 3.1.1 on rhel 7 #97

Open
lphabc opened this issue Sep 15, 2022 · 7 comments
Open

compile error 3.1.1 on rhel 7 #97

lphabc opened this issue Sep 15, 2022 · 7 comments
Labels
bug Something isn't working unconfirmed

Comments

@lphabc
Copy link

lphabc commented Sep 15, 2022

  • Linux-distro (kernel version): 3.10.0-957.el7.x86_64
  • Desktop Environment (KDE/GNOME etc.): Gnome
  • Qt Version: Qt5
  • KDiskMark Version: 3.1.1
  • FIO Version: fio-3.1-2

Description: cpack -G RPM

tmp/kdisk/KDiskMark-3.1.1/src/mainwindow.cpp: In member function ‘virtual void MainWindow::changeEvent(QEvent*)’:
/tmp/kdisk/KDiskMark-3.1.1/src/mainwindow.cpp:216:58: error: expected ‘)’ before ‘:’ token
if (const QLocale locale = AppSettings().locale(): locale == AppSettings::defaultLocale())
^
/tmp/kdisk/KDiskMark-3.1.1/src/mainwindow.cpp:216:98: error: could not convert ‘locale’ from ‘const QLocale’ to ‘bool’
if (const QLocale locale = AppSettings().locale(): locale == AppSettings::defaultLocale())
^
gmake[2]: *** [CMakeFiles/kdiskmark.dir/src/mainwindow.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/kdiskmark.dir/all] Error 2
gmake: *** [all] Error 2

Steps To Reproduce: Follow your directions for building.

@lphabc lphabc added bug Something isn't working unconfirmed labels Sep 15, 2022
@lphabc
Copy link
Author

lphabc commented Sep 15, 2022

/tmp/kdisk/KDiskMark-3.1.1/src/mainwindow.cpp: In member function ‘virtual void MainWindow::changeEvent(QEvent*)’:
/tmp/kdisk/KDiskMark-3.1.1/src/mainwindow.cpp:216:58: error: expected ‘)’ before ‘;’ token
if (const QLocale locale = AppSettings().locale(); locale == AppSettings::defaultLocale())
^
/tmp/kdisk/KDiskMark-3.1.1/src/mainwindow.cpp:216:58: error: could not convert ‘locale’ from ‘const QLocale’ to ‘bool’
/tmp/kdisk/KDiskMark-3.1.1/src/mainwindow.cpp:216:97: error: invalid use of non-static member function
if (const QLocale locale = AppSettings().locale(); locale == AppSettings::defaultLocale())
^
gmake[2]: *** [CMakeFiles/kdiskmark.dir/src/mainwindow.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/kdiskmark.dir/all] Error 2
gmake: *** [all] Error 2

Copied and pasted wrong one sorry.

@JonMagon
Copy link
Owner

RHEL7 comes with GCC 4.8, which isn't supporting using syntax, you can rewrite it

    case QEvent::LocaleChange: {
-       if (const QLocale locale = AppSettings().locale(); locale == AppSettings::defaultLocale())
+       const QLocale locale = AppSettings().locale();
+       if (locale == AppSettings::defaultLocale())
            AppSettings::applyLocale(locale);
        break;
    }

@lphabc
Copy link
Author

lphabc commented Sep 19, 2022

Thanks, that worked great. Now the only problem is I'm getting the following message:
Cannot launch daemon, file not found or permissions invalid
Thank You.

@lphabc
Copy link
Author

lphabc commented Sep 19, 2022

Saw the following in /var/log/messages
dbus[3219]: [system] Activated service 'dev.jonmagon.kdiskmark.helperinterface' failed: Cannot launch daemon, file not found or permissions invalid

@lphabc
Copy link
Author

lphabc commented Sep 19, 2022

Found it. kdiskmark_helper was in /usr/libexec where the /usr/share/dbus-1/system-services/dev.jonmagon,kdiskmark.helperinterfaces.service was pointing to /usr/local/libexec/kdiskmark_helper

I made a link for /usr/libexec/kdiskmark_helper to /usr/local/libexec/kdiskmark_helper

@JonMagon
Copy link
Owner

Found it. kdiskmark_helper was in /usr/libexec where the /usr/share/dbus-1/system-services/dev.jonmagon,kdiskmark.helperinterfaces.service was pointing to /usr/local/libexec/kdiskmark_helper

I made a link for /usr/libexec/kdiskmark_helper to /usr/local/libexec/kdiskmark_helper

Interesting. CMakeLists.txt has not been edited? It uses KDE_INSTALL_LIBEXECDIR for kdiskmark_helper installing and dev.jonmagon.kdiskmark.helperinterfaces.service configuring, should be the same.

@lphabc
Copy link
Author

lphabc commented Sep 27, 2022

No hasn't been changed and has DESTINATION ${KDE_INSTALL_LIBEXECDIR}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unconfirmed
Projects
None yet
Development

No branches or pull requests

2 participants