No sound if from source code

Help with Setup, Hardware, Performance or other Issues...Or just pimp your rig.
Post Reply
trpted
Private First Class
Private First Class
Posts: 201
Joined: Mon Feb 21, 2005 8:29 pm

No sound if from source code

Post by trpted » Tue May 05, 2020 11:46 pm

I downloaded and Compiled the source code but one issue. No sound at all.

At Settings -> Audio Settings, it reports back for sound volume Unavailable.

Any ideas?

Also please tell me if you need the output from the commands that is/are used to make from source code.

Please and thank you.

User avatar
blast
General
General
Posts: 4785
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: No sound if from source code

Post by blast » Wed May 06, 2020 2:12 am

Does the version string show -SDL or -SDL2 at the end? What operating system is this?
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image

trpted
Private First Class
Private First Class
Posts: 201
Joined: Mon Feb 21, 2005 8:29 pm

Re: No sound if from source code

Post by trpted » Wed May 06, 2020 5:46 pm

#1
blast wrote:
Wed May 06, 2020 2:12 am
Does the version string show -SDL or -SDL2 at the end?
While I know how to get the version, how do I get that string to show?

Because all it shows is
BZFlag client 2.4.18.20200423-MAINT-linux-gnu (protocol 0221) http://BZFlag.org/
Copyright (c) 1993-2018 Tim Riker
#2
blast wrote:
Wed May 06, 2020 2:12 am
What operating system is this?
Last of the LTS that support 32bit on Lubuntu. So that is Lubuntu 18.04.4 LTS.


---
#3 When I issued the command /usr/games/bzflag -version

it reported back
BZFlag client 2.4.12.20171104-MAINT-linux-gnu-SDL (protocol 0221) http://BZFlag.org/
Copyright (c) 1993-2017 Tim Riker
but that is not from source code and the sounds works. That is from using Synaptic Package Manager or for sudo apt-get bzflag for my OS.

User avatar
tainn
Private First Class
Private First Class
Posts: 217
Joined: Sun Nov 18, 2018 7:25 pm
Location: zone of the phantoms

Re: No sound if from source code

Post by tainn » Wed May 06, 2020 10:22 pm

When you open up the client, the top row in the message box should start with a red text saying:

Code: Select all

BZFlag version: ...
The line should end with either SDL or SDL2.

User avatar
blast
General
General
Posts: 4785
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: No sound if from source code

Post by blast » Wed May 06, 2020 10:44 pm

Because the version string doesn't end with -SDL or -SDL2, that means you're using native Linux platform code. This hasn't been tested in years and likely doesn't work well. Install the SDL2 development files and re-run configure and make.

Code: Select all

sudo apt-get install automake autoconf g++ libtool make libc-ares-dev libcurl3-dev libgl1-mesa-dev libglu1-mesa-dev libncurses-dev libsdl2-dev zlib1g-dev libglew-dev
./configure
make
I'd also suggest purging the installed bzflag packages so you don't have the old version lying around. BZFlag version 2.4.20 is also out now.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image

trpted
Private First Class
Private First Class
Posts: 201
Joined: Mon Feb 21, 2005 8:29 pm

Re: No sound if from source code

Post by trpted » Thu May 07, 2020 2:11 am

I tried that but now

Code: Select all


user@pc-name:~/Downloads/bzflag/bzflag-2.4.20/src/bzflag$ /home/user/Downloads/bzflag/bzflag-2.4.20/src/bzflag/bzflag
dbus[32505]: arguments to dbus_message_new_method_call() were incorrect, assertion "path != NULL" failed in file ../../../dbus/dbus-message.c line 1362.
This is normally a bug in some application using the D-Bus library.

  D-Bus not built with -rdynamic so unable to print a backtrace
Aborted (core dumped)
user@pc-name:~/Downloads/bzflag/bzflag-2.4.20/src/bzflag$ ./bzflag
dbus[32644]: arguments to dbus_message_new_method_call() were incorrect, assertion "path != NULL" failed in file ../../../dbus/dbus-message.c line 1362.
This is normally a bug in some application using the D-Bus library.

  D-Bus not built with -rdynamic so unable to print a backtrace
Aborted (core dumped)
user@pc-name:~/Downloads/bzflag/bzflag-2.4.20/src/bzflag$ 
I do not want to issue make install at this time, since it is now doing this.

User avatar
blast
General
General
Posts: 4785
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: No sound if from source code

Post by blast » Thu May 07, 2020 3:05 am

I've never seen that error before. We don't call any dbus functions, so that may be a bug in whatever version of SDL2 is packaged with your Lubuntu. Also, if you're running the game from the source clone, you should run src/bzflag/bzflag from the root of the source, not ./bzflag from the src/bzflag directory.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image

trpted
Private First Class
Private First Class
Posts: 201
Joined: Mon Feb 21, 2005 8:29 pm

Re: No sound if from source code

Post by trpted » Thu May 07, 2020 10:43 am

Ok.

#1 How do I know it is a bug with the version of SDL2 is packaged with my Lubuntu?

#2 I tried to run bzflag with src/bzflag/bzflag from the root source and I got the same result.

User avatar
blast
General
General
Posts: 4785
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: No sound if from source code

Post by blast » Thu May 07, 2020 10:54 am

You could try building with SDL1 to see if it works better.

Code: Select all

sudo apt-get install libsdl1.2-dev libsdl-sound1.2-dev
make clean
./configure --with-SDL=1
make
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image

trpted
Private First Class
Private First Class
Posts: 201
Joined: Mon Feb 21, 2005 8:29 pm

Re: No sound if from source code

Post by trpted » Thu May 07, 2020 12:45 pm

That worked, thank you. :)

Post Reply