Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Help compiling BZFlag with SDL2
Help compiling BZFlag with SDL2
I've been having issues with a game called BZFlag where the tank intermittently stops moving. I've posted this issue on the BZFlag forum https://forums.bzflag.org/viewtopic.php?f=2&t=20017 and I'm having the same issue with my new install of Debian Buster. If you scroll down towards the bottom, someone found the solution, but I have no idea where to start about recompiling BZFlag with SDL2.
Can someone give me step-by-step instruction on how to approach this as I have no experience with this?
Thanks
Can someone give me step-by-step instruction on how to approach this as I have no experience with this?
Thanks
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: Help compiling BZFlag with SDL2
Head_on_a_Stick wrote:Try the flatpak instead, it might be fixed for that.
So I have good news and bad news. The Flatpak version works but 1) It's very sluggish for some reason. 2) I'm really not a fan of Flatpaks.
I'd rather have a compiled version with SDL2 and would be nice to understand/learn how to compile..
Thanks for the help though.
- stevepusser
- Posts: 12930
- Joined: 2009-10-06 05:53
- Has thanked: 41 times
- Been thanked: 72 times
Re: Help compiling BZFlag with SDL2
You could try rebuilding the package from the Debian sources, except use the SDL 2 -dev packages instead of the SDL 1.2 ones in debian/control--replace "libsdl1.2-dev" with "libsdl2-dev".
MX Linux packager and developer
- stevepusser
- Posts: 12930
- Joined: 2009-10-06 05:53
- Has thanked: 41 times
- Been thanked: 72 times
Re: Help compiling BZFlag with SDL2
It also turns out that you need to force the use of SDL in the debian/rules file by editing line 14 to read:
Since it only takes a couple minutes if you know what you're doing, I've also set up an OBS repo with SDL 2 builds for various Debian and Ubuntu releases. https://build.opensuse.org/package/show ... DL2/bzflag
Code: Select all
CONFIGURE_OPTS := --prefix=/usr --datarootdir=/usr/share/games --with-SDL2
MX Linux packager and developer
Re: Help compiling BZFlag with SDL2
Where do I find this debian/control file? I've downloaded the source from here https://packages.debian.org/buster/bzflag. The file I downloaded is bzflag_2.4.18.orig.tar.gz from the right side column.stevepusser wrote:You could try rebuilding the package from the Debian sources, except use the SDL 2 -dev packages instead of the SDL 1.2 ones in debian/control--replace "libsdl1.2-dev" with "libsdl2-dev".
I've then extracted the files but don't see debian/control.
Re: Help compiling BZFlag with SDL2
So I think I got the files I need now. I've made the mod's you've mention in the /debain/control and debian/rules files.
But I get an error when trying to build. I know I'm missing something or using the wrong command.
I issued this command
What folder do I run the build command from and if I don't have the right command, what do I use?
But I get an error when trying to build. I know I'm missing something or using the wrong command.
Code: Select all
guido@debian:~/Downloads/bzflag-master$ dpkg-buildpackage -us -uc
dpkg-buildpackage: info: source package bzflag
dpkg-buildpackage: info: source version 2.4.18-1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Markus Koschany <apo@debian.org>
dpkg-buildpackage: info: host architecture amd64
dpkg-source --before-build .
dpkg-checkbuilddeps: error: Unmet build dependencies: groff libc-ares-dev libcpputest-dev libcurl4-gnutls-dev | libcurl4-dev | libcurl-dev libglew-dev libncurses5-dev | libncurses-dev
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
Code: Select all
dpkg-buildpackage -us -uc
- stevepusser
- Posts: 12930
- Joined: 2009-10-06 05:53
- Has thanked: 41 times
- Been thanked: 72 times
Re: Help compiling BZFlag with SDL2
This is the immediate cause of your build failure:
Let me organize that a bit better:
The build-deps separated by the "|" are alternatives, so install the first in each of those alternatives:
You need to add an epoch to the beginning of the version in the first stanza of debian/changelog; otherwise the Debian version will always be trying to upgrade over your custom version. Add a "1:" to the start of the version to make it look like:
bzflag (1:2.4.18-1........stuff)
Code: Select all
dpkg-checkbuilddeps: error: Unmet build dependencies: groff libc-ares-dev libcpputest-dev libcurl4-gnutls-dev | libcurl4-dev | libcurl-dev libglew-dev libncurses5-dev | libncurses-dev
Code: Select all
dpkg-checkbuilddeps: error: Unmet build dependencies: groff libc-ares-dev libcpputest-dev
libcurl4-gnutls-dev | libcurl4-dev | libcurl-dev libglew-dev
libncurses5-dev | libncurses-dev
Code: Select all
apt-get install groff libc-ares-dev libcpputest-dev libcurl4-gnutls-dev libncurses5-dev
bzflag (1:2.4.18-1........stuff)
MX Linux packager and developer
Re: Help compiling BZFlag with SDL2
Yay!! It compiled.
Thanks Steve!!
So, now I see it created all kinds of files.
Do I just install bzflag-data_2.4.18-1_all.deb file?
Thanks Steve!!
So, now I see it created all kinds of files.
Code: Select all
guido@debian:~/Downloads$ ls
bzflag_2.4.18-1_all.deb bzflag_2.4.18-1.dsc bzflag-data_2.4.18-1_all.deb bzflag-server-dbgsym_2.4.18-1_amd64.deb
bzflag_2.4.18-1_amd64.buildinfo bzflag_2.4.18.orig.tar.gz bzflag-master
bzflag_2.4.18-1_amd64.changes bzflag-client_2.4.18-1_amd64.deb bzflag-master.tar.gz
bzflag_2.4.18-1.debian.tar.xz bzflag-client-dbgsym_2.4.18-1_amd64.deb bzflag-server_2.4.18-1_amd64.deb
- stevepusser
- Posts: 12930
- Joined: 2009-10-06 05:53
- Has thanked: 41 times
- Been thanked: 72 times
Re: Help compiling BZFlag with SDL2
You need to install bzflag-data, bzflag-client, and bzflag deb packages. All at once if using apt on the command line to do so, or in that order if one at a time with gdebi or deepin-package-installer.
But the coolest way is to install local-apt-repository and put the deb files into /srv/local-apt-repository (create the folder). That way they will just appear as updates over the stock Debian packages you have installed after you update apt.
As root or with sudo in the folder with the debs that you build:
But the coolest way is to install local-apt-repository and put the deb files into /srv/local-apt-repository (create the folder). That way they will just appear as updates over the stock Debian packages you have installed after you update apt.
As root or with sudo in the folder with the debs that you build:
Code: Select all
apt-get install local-apt-repository
mkdir -p /srv/local-apt-repository
cp *.deb /srv/local-apt-repository
apt-get update
apt-get upgrade
Last edited by stevepusser on 2020-01-08 01:46, edited 1 time in total.
MX Linux packager and developer
Re: Help compiling BZFlag with SDL2
stevepusser wrote:You need to install bzflag-data, bzflag-client, and bzflag deb packages. All at once if using apt on the command line to do so, or in that order if one at a time with gdebi or deepin-package-installer.
But the coolest way is to install local-apt-repository and put the deb files into /srv/local-apt-repository (create the folder). That way they will just appear as updates over the stock Debian packages you have installed after you update apt.
Cool! Will give this a try when I get home from work today.
Thanks again!