qmc2 / qmc2-mame-fe

QMC2 - M.A.M.E. Catalog / Launcher II
40 stars 3 forks source link

[SOLVED] Can't build on Debian. #4

Closed N3tFX closed 2 years ago

N3tFX commented 2 years ago

I tried to build v0.242 on Debian 11 (bullseye), but it failed with the message:

/bin/sh: 1: qmake-qt5: not found

I am pretty sure qmake for qt5 is install on the system, plus I never had problems building the previous versions. What am I doing wrong?

P.S. Glad to see you here and doing well, René.

qmc2 commented 2 years ago

What's the name of the binary for running qmake? On most other platforms it's qmake-qt5, but it seems to be just "qmake" on Debian?

In this case, try

make DISTCFG=1

If this doesn't help, I'll try it myself tomorrow.

PS: you can also use

make QMAKE=/path/to/qmake

N3tFX commented 2 years ago

Both your solutions worked, but now it fails with:

Project ERROR: Unknown module(s) in QT: multimedia multimediawidgets

libqt5multimediawidgets5 is installed on the system.

Also, I had to clone the repository. The source package from the releases pages complaint that it wasn't a git repository (or something like that).

qmc2 commented 2 years ago

Do you have the package "qtmultimedia5-dev" installed?

Ups, sorry for that. Seems "my fault" with the released version. I have to try that as well. Thanks for the input.

qmc2 commented 2 years ago

Just for clarification regarding "my fault"... you received a message like

fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

right? But it should have continued and build QMC2 just fine. At least it does that here.

qmc2 commented 2 years ago

I have changed the Makefile (in the master branch) to redirect git output to stderr to /dev/null (or "nul" on Windows) in order to avoid confusion.

N3tFX commented 2 years ago

After installing qtmultimedia5-dev and using the make DISTCFG=1 flag the build worked fine.

But now I've encountered another problem. I used the PREFIX, SYSCONFDIR, DATADIR, MAN_DIR flags to install QMC2 to /opt/QMC2 but I can't. When I try make install without root privileges, I get an error:

Installing QMC2 v0.242 mkdir: cannot create directory ‘//usr/local/share/qmc2’: Permission denied mkdir: cannot create directory ‘//etc/qmc2’: Permission denied make: *** [Makefile:1104: install] Error 1

I used to be able to install it in a custom folder before. How can I install all the files in a custom folder?

qmc2 commented 2 years ago

Give some time, I have to check... I'm surprised it doesn't work.

qmc2 commented 2 years ago

Actually, it should work because I didn't change anything of this.

Are PREFIX, SYSCONFDIR, DATADIR or MAN_DIR given on the "make install" command or are they defined as environment variables? Or do you set them in the Makefile? All three methods are supposed to work, though.

qmc2 commented 2 years ago

Oh, and did you set these vars at compile time or only when installing? Note that you have to set at least SYSCONFDIR and DATADIR also at compile time!

qmc2 commented 2 years ago

I've installed a little Debian 11 in a VM and it actually seems to be working just nicely, if I set the vars on every make command!

If there is already compiled code, note that you have to run

make DISTCFG=1 distclean

before you try again. Then do a

make DISTCFG=1 SYSCONFDIR=/my/sysconfdir PREFIX=/my/prefix

to build it. Then run the same command with "install":

make DISTCFG=1 SYSCONFDIR=/my/sysconfdir PREFIX=/my/prefix install

qmc2 commented 2 years ago

Also, this is my list of installed Qt 5 packages, just in case:

root@debian:~# apt list --installed | grep qt5

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libqt5concurrent5/unknown,stable,now 5.15.2+dfsg-9 amd64 [installed,automatic]
libqt5core5a/unknown,stable,now 5.15.2+dfsg-9 amd64 [installed,automatic]
libqt5dbus5/unknown,stable,now 5.15.2+dfsg-9 amd64 [installed,automatic]
libqt5gui5/unknown,stable,now 5.15.2+dfsg-9 amd64 [installed,automatic]
libqt5multimedia5/unknown,stable,now 5.15.2-3 amd64 [installed,automatic]
libqt5multimediagsttools5/unknown,stable,now 5.15.2-3 amd64 [installed,automatic]
libqt5multimediaquick5/unknown,stable,now 5.15.2-3 amd64 [installed,automatic]
libqt5multimediawidgets5/unknown,stable,now 5.15.2-3 amd64 [installed,automatic]
libqt5network5/unknown,stable,now 5.15.2+dfsg-9 amd64 [installed,automatic]
libqt5opengl5-dev/stable,now 5.15.2+dfsg-9 amd64 [installed,automatic]
libqt5opengl5/unknown,stable,now 5.15.2+dfsg-9 amd64 [installed,automatic]
libqt5positioning5/unknown,stable,now 5.15.2+dfsg-2 amd64 [installed,automatic]
libqt5printsupport5/unknown,stable,now 5.15.2+dfsg-9 amd64 [installed,automatic]
libqt5qml5/unknown,stable,now 5.15.2+dfsg-6 amd64 [installed,automatic]
libqt5qmlmodels5/unknown,stable,now 5.15.2+dfsg-6 amd64 [installed,automatic]
libqt5qmlworkerscript5/unknown,stable,now 5.15.2+dfsg-6 amd64 [installed,automatic]
libqt5quick5/unknown,stable,now 5.15.2+dfsg-6 amd64 [installed,automatic]
libqt5quickparticles5/unknown,stable,now 5.15.2+dfsg-6 amd64 [installed,automatic]
libqt5quickshapes5/stable,now 5.15.2+dfsg-6 amd64 [installed,automatic]
libqt5quicktest5/stable,now 5.15.2+dfsg-6 amd64 [installed,automatic]
libqt5quickwidgets5/unknown,stable,now 5.15.2+dfsg-6 amd64 [installed,automatic]
libqt5script5/unknown,stable,now 5.15.2+dfsg-2 amd64 [installed,automatic]
libqt5scripttools5/stable,now 5.15.2+dfsg-2 amd64 [installed,automatic]
libqt5sensors5/unknown,stable,now 5.15.2-2 amd64 [installed,automatic]
libqt5sql5-sqlite/unknown,stable,now 5.15.2+dfsg-9 amd64 [installed,automatic]
libqt5sql5/unknown,stable,now 5.15.2+dfsg-9 amd64 [installed,automatic]
libqt5svg5-dev/stable,now 5.15.2-3 amd64 [installed]
libqt5svg5/unknown,stable,now 5.15.2-3 amd64 [installed,automatic]
libqt5test5/unknown,stable,now 5.15.2+dfsg-9 amd64 [installed,automatic]
libqt5webchannel5/unknown,stable,now 5.15.2-2 amd64 [installed,automatic]
libqt5webkit5-dev/stable,now 5.212.0~alpha4-11 amd64 [installed]
libqt5webkit5/unknown,stable,now 5.212.0~alpha4-11 amd64 [installed,automatic]
libqt5widgets5/unknown,stable,now 5.15.2+dfsg-9 amd64 [installed,automatic]
libqt5xml5/unknown,stable,now 5.15.2+dfsg-9 amd64 [installed,automatic]
libqt5xmlpatterns5-dev/stable,now 5.15.2-3 amd64 [installed]
libqt5xmlpatterns5/unknown,stable,now 5.15.2-3 amd64 [installed,automatic]
qt5-gtk-platformtheme/unknown,stable,now 5.15.2+dfsg-9 amd64 [installed,automatic]
qt5-qmake-bin/stable,now 5.15.2+dfsg-9 amd64 [installed,automatic]
qt5-qmake/stable,now 5.15.2+dfsg-9 amd64 [installed,automatic]
qt5-qmltooling-plugins/stable,now 5.15.2+dfsg-6 amd64 [installed,automatic]
N3tFX commented 2 years ago

This is the command I used:

make PREFIX=/opt/QMC2 BINDIR=/opt/QMC2/local/bin SYSCONFDIR=/opt/QMC2/etc DATADIR=/opt/QMC2/usr/local/share MAN_DIR=/opt/QMC2/usr/local/man DISTCFG=1 -j5

I've also tried it in a folder in the /home/user space in order to avoid any permissions conflict with the /opt folder, but it also failed with the same message complaining about permissions. I don't know why this is happening. I've installed many apps with make install in the /opt folder (I have given write permissions to the user).

N3tFX commented 2 years ago

When it starts compiling the first lines are these:

Configuring build of QMC2 v0.242 /usr/bin/qmake -makefile -o Makefile.qmake VERSION=0.242 QMC2_MINGW=0 SDL=2 TARGET=qmc2-sdlmame CONFIG+=warn_off CONFIG+=release LIBS+='-lSDL2' INCLUDEPATH+='/usr/include/SDL2' 'DEFINES+=QMC2_SDLMAME QMC2_VERSION=0.242 BUILD_OS_NAME=Linux BUILD_OS_RELEASE=5.10.0-13-amd64 BUILD_MACHINE=x86_64 PREFIX=/opt/QMC2 DATADIR="/opt/QMC2/usr/local/share" SYSCONFDIR="/opt/QMC2/etc" QMC2_JOYSTICK=1 QMC2_PHONON=0 QMC2_MULTIMEDIA=1 QMC2_FADER_SPEED=500 QMC2_BROWSER_EXTRAS_ENABLED QMC2_BROWSER_PLUGINS_ENABLED QMC2_BROWSER_JAVA_ENABLED QMC2_BROWSER_JAVASCRIPT_ENABLED QMC2_YOUTUBE_ENABLED QMC2_BUNDLED_MINIZIP QMC2_BUNDLED_ZLIB _REENTRANT' qmc2.pro

It seems that it accepts the PREFIX, SYSCONFDIR, DATADIR new paths.

N3tFX commented 2 years ago

Success.

It seems that the problem was that I wasn't passing the PREFIX, SYSCONFDIR flags to the make install command also. Like this: make DISTCFG=1 SYSCONFDIR=/opt/QMC2/etc PREFIX=/opt/QMC2 install

Plus, I needed to install rsync to my system.

Thank you for your help.

qmc2 commented 2 years ago

Great to hear that.