jarp53
January 8, 2023, 1:07pm
1
the name of the game is Jag: https://github.com/LibreGames/jag and this is what my terminal shows
[jr@jr-z68x Downloads]$ ls
jag-master jag-master.zip
[jr@jr-z68x Downloads]$ cd jag-master
[jr@jr-z68x jag-master]$ qmake
Info: creating stash file /home/jr/Downloads/jag-master/.qmake.stash
[jr@jr-z68x jag-master]$ make
/usr/bin/uic menu.ui -o ui_menu.h
g++ -c -pipe -O2 -flto -fno-fat-lto-objects -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_X11EXTRAS_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_CORE_LIB -I. -I/usr/include/qt -I/usr/include/qt/QtOpenGL -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtX11Extras -I/usr/include/qt/QtGui -I/usr/include/qt/QtXml -I/usr/include/qt/QtCore -I. -I. -I/usr/lib/qt/mkspecs/linux-g++ -o main.o main.cpp
main.cpp:23:10: fatal error: SDL/SDL_mixer.h: No such file or directory
23 | #include “SDL/SDL_mixer.h”
| ^~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:918: main.o] Error 1
[jr@jr-z68x jag-master]$
is there an easy fix or maybe that’s why this game is not included in arch
pycrk
January 8, 2023, 1:22pm
2
install the following package and try again
sdl2_mixer
jake99
January 9, 2023, 10:13am
4
There need to be a couple of interventions before this can be built, also very poorly written qmake project file.
First make sure that you have sdl2 and sdl2_mixer
yay -S sdl2 sdl2_mixer
After that execute the following to build the game
sed -i 's/\-lSDL/-lSDL2/g' Game.pro
qmake
sed -i 's/SDL\///g' main.cpp gamesound.h
OLDINCPATH=$(grep -E ^INCPATH Makefile | cut -d '=' -f 2)
OLDCXXFLAGS=$(grep -E ^CXXFLAGS Makefile | cut -d '=' -f 2)
make INCPATH="${OLDINCPATH} $(sdl2-config --cflags)" CXXFLAGS="${OLDCXXFLAGS} $(sdl2-config --libs)"
I’ve managed to build it like this and its working
jarp53
January 9, 2023, 3:26pm
5
did not get any errors in the terminal but the game doesn’t show up any where; I did a restart but nothing
jake99
January 9, 2023, 6:42pm
6
Ok, so the build is successful. How are you starting up the game? Are you getting any output?
From the project folder try
bin/jag
Here it is running on my machine right now
jarp53
January 9, 2023, 9:05pm
7
does what I mean is not any where I look in bin and user/share/ I even type whereis and nothing
jake99
January 9, 2023, 10:01pm
8
Ah, I think I get it now. Previous commands will just build the game, but will not install it.
When in the project dir run
sudo make install
And the game will bi installed in /usr/games
. You can then run it with /usr/games/jag
.
jarp53
January 10, 2023, 2:12pm
9
I sure appreciate your help and I don’t blame you if you want to quit, now I need to make a file inside a file? and in /bin all my files are lowercase , and there is no /usr/games is usr/share . here is the terminal output
[jr@jr-z68x jag-master]$ sudo make install
g++ -Wl,-O1 -pipe -O2 -flto=8 -fno-fat-lto-objects -fuse-linker-plugin -Wl,-rpath-link,/usr/lib -fPIC -o bin/jag main.o gamewidget.o gamescene.o gameitem.o gamepaint.o gamecontrol.o baseitem.o gamemenu.o gametools.o hammertool.o bighammertool.o bombtool.o gamesound.o menucontrol.o gameprofile.o thundertool.o smallhammertool.o clocktool.o gamestock.o randomkilltool.o mixertool.o unblocktool.o twintool.o displaywrapper.o gamebonus.o gamestatics.o gamestat.o gamebackground.o consttools.o gamexml.o scaler.o qrc_resources.o moc_gamewidget.o moc_gamescene.o moc_gamemenu.o moc_gametools.o moc_hammertool.o moc_bighammertool.o moc_bombtool.o moc_gamesound.o moc_gameprofile.o moc_thundertool.o moc_smallhammertool.o moc_clocktool.o moc_randomkilltool.o moc_mixertool.o moc_unblocktool.o moc_twintool.o moc_gamebonus.o moc_consttools.o -lXrandr -lX11 -lSDL22 -lSDL22_mixer /usr/lib/libQt5OpenGL.so /usr/lib/libQt5Widgets.so /usr/lib/libQt5X11Extras.so /usr/lib/libQt5Gui.so /usr/lib/libQt5Xml.so /usr/lib/libQt5Core.so -lGL -lpthread
/usr/bin/ld: cannot find -lSDL22: No such file or directory
/usr/bin/ld: cannot find -lSDL22_mixer: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:374: bin/jag] Error 1
[jr@jr-z68x jag-master]$
jake99
January 10, 2023, 4:01pm
10
Hey, no worries. We were all beginners at some point
I see what the problem is, it seems like you ran all the commands a couple of times, so sed did 2 replacements and now you have -lSDL22, instead of -lSDL2, etc.
Lets start from the beginning.
From the project directory execute the following to return the project to the original state
make clean
git reset --hard
git clean -fxd
Now do every step again to build and install
sed -i 's/\-lSDL/-lSDL2/g' Game.pro
qmake
sed -i 's/SDL\///g' main.cpp gamesound.h
OLDINCPATH=$(grep -E ^INCPATH Makefile | cut -d '=' -f 2)
OLDCXXFLAGS=$(grep -E ^CXXFLAGS Makefile | cut -d '=' -f 2)
make INCPATH="${OLDINCPATH} $(sdl2-config --cflags)" CXXFLAGS="${OLDCXXFLAGS} $(sdl2-config --libs)"
sudo make install
And that should build and install it to /usr/games/jag
Good luck
1 Like
jarp53
January 10, 2023, 9:31pm
11
now I’m up to ISDL2222 , I think I need more than “make clean” is there a way to delete all that I’ve done and start over? and I guess I should have told you that I downloaded the package rather than cloning the link, I don’t know if that makes any difference
jarp53
January 11, 2023, 1:16am
12
hey never mind the system just die, this always happens when I upgrade the nvidia driver; so thank you very much for trying to help me
jake99
January 11, 2023, 5:33pm
13
You were so close Anyway, deleting the directory and just unpacking that zip package you downloaded would give you a clean start, too.
Regarding nvidia drivers, please open a new thread and maybe someone can help you with your issues.