edisionnano / QDiskInfo

QDiskInfo is a frontend for smartctl (part of the smartmontools package). It provides a user experience similar to CrystalDiskInfo. It shows the SMART (Self-Monitoring, Analysis, and Reporting Technology) data of modern hard disk drives.
GNU General Public License v3.0
180 stars 13 forks source link

Help newbies compile #15

Closed gnarlin closed 2 months ago

gnarlin commented 4 months ago

In order to compile on Ubuntu 24.04 I needed to install qt6-base-dev and libxkbcommon-dev. Maybe mention the name of the packages required to compile in the compilation instructions for common distributions.

edisionnano commented 4 months ago

You shouldn't need qt6-base-dev if you compile with Qt5 (-DQT_VERSION_MAJOR=5)

gnarlin commented 4 months ago

I tried that too but I was also missing the qt5 version.

CMake Error at CMakeLists.txt:17 (find_package): By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt5", but CMake did not find one.

Could not find a package configuration file provided by "Qt5" with any of the following names:

Qt5Config.cmake
qt5-config.cmake

Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR" to a directory containing one of the above files. If "Qt5" provides a separate development package or SDK, be sure it has been installed.

-- Configuring incomplete, errors occurred!

edisionnano commented 4 months ago

I'm not opposed to adding the command to install dependencies to compile and run the app on common distros (arch, ubuntu, debian, fedora, suse) but I would need people to test on a clean install which are needed.

edisionnano commented 4 months ago

I booted up an Ubuntu VM, I needed these packages build-essential cmake libgl1-mesa-dev libxkbcommon-dev qt6-base-dev qt6-wayland smartmontools I will create VMs for fedora and suse too

calciume commented 3 months ago

Packages you will need for Fedora: cmake git mesa-libGL-devel libxkbcommon-devel qt6-qtbase-devel qt6-qtwayland-devel smartmontools Fedora package names are wacky

citizenserious commented 3 months ago

Packages you will need for Fedora: cmake git mesa-libGL-devel libxkbcommon-devel qt6-qtbase-devel qt6-qtwayland-devel smartmontools Fedora package names are wacky

Thank you very much for this! I just recently get rid of windows and are now using fedora 40 KDE. Searched for a Crystaldisk alternative because it saved my data bunch of times. After a long, long search, even before switching to Linux. Finally, I found this (: thanks to all contributors very much for your work!

So of course I ran into the error :D

CMake Error at CMakeLists.txt:17 (find_package):
  By not providing "FindQt6.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt6", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt6" with any of
  the following names:

    Qt6Config.cmake
    qt6-config.cmake

  Add the installation prefix of "Qt6" to CMAKE_PREFIX_PATH or set "Qt6_DIR"
  to a directory containing one of the above files.  If "Qt6" provides a
  separate development package or SDK, be sure it has been installed.

-- Configuring incomplete, errors occurred!

after installing the dependencies you mentioned it worked:

sudo dnf install cmake git mesa-libGL-devel libxkbcommon-devel qt6-qtbase-devel qt6-qtwayland-devel smartmontools

Thought I mention this for the record.

Also, I had to ask AI to tell me the difference between make -j$(nproc) and sudo make install might be trivial to experienced users. So would be nice if you could adjust the instructions for user like me. I am willing to assist.

edisionnano commented 3 months ago

The make command byitself compiles the code, -j is an argument to set the number of threads to use, nproc is a command that outputs a number equal to the threads of your CPU, by using $() we turn its output to a variable. make -j$(nproc) means compile using all the threads for maximum compilation speed. sudo make install just installs the app. Heads up for Fedora users, there's also an unofficial copr https://copr.fedorainfracloud.org/coprs/birkch/QDiskInfo/

calciume commented 3 months ago

If you are using Fedora and do not use KDE Plasma, I would recommend against using the copr repo. The dependencies are pretty ridiculous.

repoquery --requires QDiskInfo

cmake
cmake(Qt6Core)
desktop-file-utils
extra-cmake-modules
libQt6Core.so.6()(64bit)
libQt6Core.so.6(Qt_6)(64bit)
libQt6Core.so.6(Qt_6.7)(64bit)
libQt6Gui.so.6()(64bit)
libQt6Gui.so.6(Qt_6)(64bit)
libQt6Widgets.so.6()(64bit)
libQt6Widgets.so.6(Qt_6)(64bit)
libc.so.6(GLIBC_2.34)(64bit)
libgcc_s.so.1()(64bit)
libgcc_s.so.1(GCC_3.0)(64bit)
libgcc_s.so.1(GCC_3.3.1)(64bit)
libstdc++.so.6()(64bit)
libstdc++.so.6(CXXABI_1.3)(64bit)
libstdc++.so.6(CXXABI_1.3.9)(64bit)
libstdc++.so.6(GLIBCXX_3.4)(64bit)
plasma-desktop
plasma-integration
plasma-workspace
rtld(GNU_HASH)

Why is plasma desktop needed?? I compiled this on Gnome with no issues. There might be a way to exclude that dependency that I don't know about but you're probably better off compiling it anyways. Edit: Also, they don't even ship smartmontools! Who knows if this will even run when you install it?

edisionnano commented 3 months ago

Ah I see, not very nice then. I found this one on reddit, perhaps you can tell the maintainer so that they can improve it. https://www.reddit.com/r/kde/comments/1dl5f0y/comment/lbh7v28/

edisionnano commented 2 months ago

@calciume I notified the maintainer and they seem to have fixed the issues with the dependencies

h3o66 commented 2 months ago

If you are using Fedora and do not use KDE Plasma, I would recommend against using the copr repo. The dependencies are pretty ridiculous.

repoquery --requires QDiskInfo

cmake
cmake(Qt6Core)
desktop-file-utils
extra-cmake-modules
libQt6Core.so.6()(64bit)
libQt6Core.so.6(Qt_6)(64bit)
libQt6Core.so.6(Qt_6.7)(64bit)
libQt6Gui.so.6()(64bit)
libQt6Gui.so.6(Qt_6)(64bit)
libQt6Widgets.so.6()(64bit)
libQt6Widgets.so.6(Qt_6)(64bit)
libc.so.6(GLIBC_2.34)(64bit)
libgcc_s.so.1()(64bit)
libgcc_s.so.1(GCC_3.0)(64bit)
libgcc_s.so.1(GCC_3.3.1)(64bit)
libstdc++.so.6()(64bit)
libstdc++.so.6(CXXABI_1.3)(64bit)
libstdc++.so.6(CXXABI_1.3.9)(64bit)
libstdc++.so.6(GLIBCXX_3.4)(64bit)
plasma-desktop
plasma-integration
plasma-workspace
rtld(GNU_HASH)

Why is plasma desktop needed?? I compiled this on Gnome with no issues. There might be a way to exclude that dependency that I don't know about but you're probably better off compiling it anyways. Edit: Also, they don't even ship smartmontools! Who knows if this will even run when you install it?

Fixed the dependency and updated it to the latest version. Seems like I forgot to take out the depdendency out from some other package what I took as template.

citizenserious commented 2 months ago

I would like to switch to an installation via the copr repo to get updates more convenient. How do I uninstall the makefile installation? sudo make uninstall is not configured yet.

Is this all I need to delete?

/usr/local/bin/QDiskInfo
/usr/local/share/applications/QDiskInfo.desktop
/usr/local/share/icons/hicolor/scalable/apps/QDiskInfo.svg
edisionnano commented 2 months ago

I would like to switch to an installation via the copr repo to get updates more convenient. How do I uninstall the makefile installation? sudo make uninstall is not configured yet.

Is this all I need to delete?

/usr/local/bin/QDiskInfo
/usr/local/share/applications/QDiskInfo.desktop
/usr/local/share/icons/hicolor/scalable/apps/QDiskInfo.svg

make uninstall is not a command, that is correct. I updated the readme to add uninstallation instructions. Basically make install generates a file called install_manifest.txt inside the build directory which lists all paths it installed. You can then run

sudo xargs rm < install_manifest.txt

to undo make install

edisionnano commented 2 months ago

I think that we can close this now