Frodo45127 / rpfm

Rusted PackFile Manager (RPFM) is a... reimplementation in Rust and Qt5 of PackFile Manager (PFM), one of the best modding tools for Total War Games.
MIT License
366 stars 58 forks source link

Cannot install on Linux (os error 2) #175

Closed DavidTagt closed 2 years ago

DavidTagt commented 3 years ago

Hello, I don't know if this is the correct place to ask this, but I'm having trouble installing/building this on Linux (Manjaro).

This is the error message I get:

...
Compiling sentry-core v0.22.0
error: failed to run custom build command for `qt_gui v0.5.0`

Caused by:
  process didn't exit successfully: `/home/davidt/Applications/rpfm-2.5.3/target/debug/build/qt_gui-0b5bcd069c342f3a/build-script-build` (exit status: 1)
  --- stdout
  Current Qt version (5.15.2) is unknown to qt_gui crate. Using closest known version (5.14.0)

  --- stderr
  [2021-07-26T10:20:02Z ERROR ritual_common::errors] Error:
  [2021-07-26T10:20:02Z ERROR ritual_common::errors]    failed to run command: "cmake" "-Wno-dev" "/home/davidt/.cargo/registry/src/github.com-1ecc6299db9ec823/qt_gui-0.5.0/c_lib" "-DRITUAL_LIBRARY_TYPE=STATIC" "-DRITUAL_CPP_LIB_VERSION=51400" "-DRITUAL_INCLUDE_PATH=/usr/include/qt;/usr/include/qt/QtGui;/usr/include/qt/QtCore" "-DRITUAL_LIBRARY_PATH=/usr/lib" "-DRITUAL_FRAMEWORK_PATH=" "-DRITUAL_LINKED_LIBS=Qt5Gui;Qt5Core" "-DRITUAL_LINKED_FRAMEWORKS=" "-DRITUAL_COMPILER_FLAGS=-std=gnu++11 -fPIC" "-DRITUAL_QT=1" "-DRITUAL_QT=1" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_INSTALL_PREFIX=/home/davidt/Applications/rpfm-2.5.3/target/debug/build/qt_gui-e54d4442c013b735/out/c_lib_install"
  [2021-07-26T10:20:02Z ERROR ritual_common::errors]    No such file or directory (os error 2)
warning: build failed, waiting for other jobs to finish...
error: build failed

I've tried with cargo build and cargo --release but I get the same error. I've made sure I've installed all dependencies listed in https://frodo45127.github.io/rpfm/chapter_comp.html

I see another person has had a similar issue before, https://github.com/Frodo45127/rpfm/issues/129 but only closed the issue without clarifying if or how they solved the issue.

Thankful for any help.

Frodo45127 commented 3 years ago

Just pushed an update for the linux instructions. You need CMake, and you may need to edit a couple of header files on the system. Also, if you just want to use it, not compile it to change the code, there's a PKGBUILD on the install folder of the repo that should work for arch and derivates, though you will still need to edit the headers I talk about in the compilation instructions.

DavidTagt commented 3 years ago

I've followed the instructions, edited the headers and decided to try the PKGBUILD. And it worked! I ran into a small problem, however. The script failed with error message:

==> Starting pkgver()...
/home/davidt/Applications/rpfm-2.5.3/install/arch/PKGBUILD: line 16: cd: rpfm-git: No such file or directory
==> ERROR: A failure occurred in pkgver().
    Aborting...

Changing pkgname=('rpfm-git') to pkgname=('rpfm') in the PKGBUILD script solved the problem and allowed the installation to continue. The problem was that the script created a folder called "rpfm" and then tried to go into a folder called "rpfm-git". I don't know if this was only something on my end or not, I'm pretty new at Linux. This was my first time installing PKGBUILD, actually :P.

Now I'm just wondering.... How do I launch the program?

Frodo45127 commented 3 years ago

Not sure what PKGBUILD you used, but the one from master already had the fixes for that at the time you wrote that message. In fact, line 16 doesn't have a cd anymore: image for launching the program, it's installed on /usr/share/bin, so you can access it from anywhere calling ./rpfm_ui or /rpfm_cli. Also, a shortcut should've been added to the system shortcuts, so kde and gnome should be able to find it automatically and show it as a normal program.

DavidTagt commented 3 years ago

I used the package under "releases", not master. In the PKGBUILD from the release, package version is listed as "pkgver=2.5.3.2244.g41f0756d" and in master it is "pkgver=2.5.3.2239.gc89dfb8d". This is the pkgbuild and variables. Note that pkgname is wrong since I changed that. old version

But yeah, my bad for using old code. Something went wrong during the install anyway, since I get this error command not found

Is it safe to just delete the files on the disk and start over? KDE doesn't recognize it as a program either. Uninstalling via pacman doesn't work, same error. There's nothing in /usr/share/bin, so I guess I messed up bad.

Frodo45127 commented 3 years ago

yeah, that file is outdated. And my bad, it's "rpfm_ui", not "./rpfm_ui". The second one only works if you're in the folder with the program. If you managed to get it installed, pacman should be able to uninstall it. If not, try getting the PKGBUILD from master. That one should build and install properly. Also, you need the .desktop file from the install/arch folder in the same folder as the PKGBUILD, so it can install the shortcut.

DavidTagt commented 2 years ago

Hello again! I went on vacation soon after I wrote my last message and just forgot about this until now. I'm sorry for that. Anyway, I tried your suggestion, and it installed without a problem! I still have the same error however:

if I could display an emoji crying I would. What am i doing wrong? Please and thank you.

Frodo45127 commented 2 years ago

Rust binaries are not build on the root folder of the project, but on target/[debug/release], depending what profile you built. Check on those folders and see if it's there.

DavidTagt commented 2 years ago

Yup, built the release profile, and lo! There they were, 4 executables in all!

Thank you so much for your help, absolutely solid work dude.