Audacious Media player on Haiku OS

Hello,
I compiled Audacious Media Player on Haiku OS.
You can find more details here:

http://redmine.audacious-media-player.org/issues/659

I hope you will find it interesting.
Sincerely.

4 Likes

Excellent! It’s my favourite audio player in Linux and the one I use all the time. Will give this a try, massive thank you!

Hi Carlo, can you provide a download link?

Awesome! Thank you! Please, share a link with the binaries :slight_smile:

Love it. Can’t wait to try out the binaries or HPKG. Gimme gimme! :slight_smile:

This is the way I followed for generating Audacious on Haiku.

For compiling Audacious Player for Haiku, you need to download the latest sources from its GIT repository.
Hopefully, the author has kindly included a fix in the sources, but they are still suffering of the -lm library missing when linking.
So, after getting them, you have to remove all “-lm” from the Makefiles.

The sources of the player require (I think) C++11, so you are forced to use newer GCC.
Compiling it with 2.95 toolchain is actually impossible.
For this reason, after you got the source ready, you have to switch the system with “setarch x86”.

The player needs several third party library for working, for the core and for the plugins.
The GTK libraries are not available in Haiku, but you can still get it working with QT interfaces.
Audacious needs QT 5.2 or newer and GLIB for making working these user interfaces.
Sadly, the QT audio plugin compiles fine, but it does not produce any sound output.
Hopefully, SDL audio out plugin works perfectly and it is the one that I have used in my tests.

So, assuming you have already installed the various libraries, you can configure the core with:

./autogen.sh
./configure --prefix=/boot/common --disable-gtk --enable-qt
make
make install

Then, you can compile the plugins with:

./autogen.sh
export PKG_CONFIG_PATH=/boot/common/lib/pkgconfig
./configure --prefix=/boot/common --disable-gtk --enable-qt --disable-wavpack --disable-neon
make
make install

I disabled wavpack and neon plugins because I have not found them for the X86 arch in the HaikuDepot app.
This thing can probably change in the future.
Since the QT audio plugin does not work for some unknown reasons to me, you may also want to add “–disable-qtaudio” option for preventing the generation of the QT audio plugin, which was the preferred way for getting sound output, unfortunately: SDL out plugin works, but it produces only 16 bit audio out if I’m not mistaken. Better than nothing anyways.
Finally, for running the player, write:

export LIBRARY_PATH=$LIBRARY_PATH:/boot/common/lib
cd /boot/common/bin
./audacious

And the player will start.

This is the first time that I compiled something on Haiku, so probably I did not do everything in the best way.
If you want, I can share the binaries that I compiled in this way, but I have not a space for uploading, sorry…

Sincerely.

Since yesterday, Haiku has a libm and the compiler will accept the -lm switch. So that’s one less fix for you.

1 Like

Sounds like a simple enough build process now to create a recipe in Haiku Ports.

Chris

More information about it:

PLAYER DEPENDENCIES: FOR RUNTIME:
libiconv_x86-1.13.1-6-x86_gcc2.hpkg
gettext_x86-0.19.6-2-x86_gcc2.hpkg
gettext_x86_libintl-0.19.6-2-x86_gcc2.hpkg
ncurses_x86-5.9-9-x86_gcc2.hpkg
glib2_x86-2.38.1-4-x86_gcc2.hpkg
libffi_x86-3.0.13-1-x86_gcc2.hpkg
icu55_x86-55.1-1-x86_gcc2.hpkg
fontconfig_x86-2.11.1-3-x86_gcc2.hpkg
qt5_x86-5.5.1-2-x86_gcc2.hpkg

PLAYER DEPENDENCIES: FOR COMPILING OR PLUGIN DEVELOPMENT:
libiconv_x86_devel-1.13.1-6-x86_gcc2.hpkg
ncurses_x86_devel-5.9-9-x86_gcc2.hpkg
glib2_x86_devel-2.38.1-4-x86_gcc2.hpkg
libffi_x86_devel-3.0.13-1-x86_gcc2.hpkg
pkgconfig_x86-0.27.1-2-x86_gcc2.hpkg
qt5_x86_devel-5.5.1-2-x86_gcc2.hpkg

PLUGIN DEPENDENCIES: FOR RUNTIME:
libxml2_x86-2.9.2-1-x86_gcc2.hpkg
libogg_x86-1.3.2-1-x86_gcc2.hpkg
libvorbis_x86-1.3.5-2-x86_gcc2.hpkg
flac_x86-1.3.1-1-x86_gcc2.hpkg
readline_x86-6.3-2-x86_gcc2.hpkg
libsndfile_x86-1.0.27-1-x86_gcc2.hpkg
fluidsynth_x86-1.1.6-2-x86_gcc2.hpkg
libtool_x86_libltdl-2.4.2-1-x86_gcc2.hpkg
mpg123_x86-1.22.4-1-x86_gcc2.hpkg
libmodplug_x86-0.8.8.4-2-x86_gcc2.hpkg
libsamplerate_x86-0.1.8-1-x86_gcc2.hpkg
dbus_x86-1.8.6-1-x86_gcc2.hpkg
lame_x86-3.99.5-5-x86_gcc2.hpkg
libcdio_x86-0.93-2-x86_gcc2.hpkg
libcddb_x86-1.3.2-1-x86_gcc2.hpkg
faad2_x86-2.7-1-x86_gcc2.hpkg
mesa_x86-10.1.0-2-x86_gcc2.hpkg

PLUGIN DEPENDENCIES: FOR COMPILING
libxml2_x86_devel-2.9.2-1-x86_gcc2.hpkg
libogg_x86_devel-1.3.2-1-x86_gcc2.hpkg
libvorbis_x86_devel-1.3.5-2-x86_gcc2.hpkg
flac_x86_devel-1.3.1-1-x86_gcc2.hpkg
fluidsynth_x86_devel-1.1.6-2-x86_gcc2.hpkg
mpg123_x86_devel-1.22.4-1-x86_gcc2.hpkg
libsndfile_x86_devel-1.0.27-1-x86_gcc2.hpkg
libmodplug_x86_devel-0.8.8.4-2-x86_gcc2.hpkg
libsamplerate_x86_devel-0.1.8-1-x86_gcc2.hpkg
dbus_x86_devel-1.8.6-1-x86_gcc2.hpkg
lame_x86_devel-3.99.5-5-x86_gcc2.hpkg
libcdio_x86_devel-0.93-2-x86_gcc2.hpkg
libcddb_x86_devel-1.3.2-1-x86_gcc2.hpkg
faad2_x86_devel-2.7-1-x86_gcc2.hpkg
mesa_x86_devel-10.1.0-2-x86_gcc2.hpkg

PLUGIN DEPENDENCIES: OPTIONAL (until QT audio won’t work)
libsdl_x86-1.2.15-9-x86_gcc2.hpkg (RUNTIME)
libsdl_x86_devel-1.2.15-9-x86_gcc2.hpkg (DEVELOPMENT)

MISSING libraries:
libcdio_cdda >= 0.70
libsidplayfp >= 1.0
libbs2b >= 3.0.0
libsoxr
libcue
libmms
liblirc
wavpack >= 4.31
neon >= 0.27

At the time of writing, this is the configuration of the supported formats:

Configuration:

  Install path:                           /boot/home/inst_aud/lib/audacious

  GTK+ support:                           no
  Qt support:                             yes

  Audio Formats
  -------------
  Audio CD:                               no
  Free Lossless Audio Codec:              yes
  Ogg Vorbis:                             yes
  MIDI (via FluidSynth):                  yes
  MPEG-1 Layer I/II/III (via mpg123):     yes
  MPEG-2/4 AAC:                           yes
  WavPack:                                no

  External Decoders
  -----------------
  FFmpeg/Libav:                           ffmpeg
  libsndfile:                             yes

  Chiptunes
  ---------
  AdLib synthesizer (adplug):             yes
  Commodore 64 audio (sid):               no
  Game Music Emu (spc, nsf, gbs, etc.):   yes
  ModPlug:                                yes
  Nintendo DS audio (xsf):                yes
  PlayStation audio (psf/psf2):           yes
  Vortex Tracker (vtx):                   yes

  Other Inputs
  ------------
  Metronome:                              yes
  Tone Generator:                         yes

  Effects
  -------
  Bauer stereophonic-to-binaural (bs2b):  no
  Channel Mixer:                          yes
  Crystalizer:                            yes
  Dynamic Range Compressor:               yes
  Echo/Surround:                          yes
  Extra Stereo:                           yes
  LADSPA Host (requires GTK+):            no
  Sample Rate Converter:                  yes
  Silence Removal:                        yes
  SoX Resampler:                          no
  Speed and Pitch:                        yes
  Voice Removal:                          yes

  Outputs
  -------
  Advanced Linux Sound Architecture:      no
  Jack Audio Connection Kit:              no
  Open Sound System:                      no
  PulseAudio:                             no
  Simple DirectMedia Layer:               yes
  Sndio:                                  no
  Win32 waveOut:                          no
  FileWriter:                             yes
    -> MP3 encoding:                      yes
    -> Vorbis encoding:                   yes
    -> FLAC encoding:                     yes

  Playlists
  ---------
  Cue sheets:                             no
  M3U playlists:                          yes
  Microsoft ASX (legacy):                 yes
  Microsoft ASX 3.0:                      yes
  PLS playlists:                          yes
  XML Sharable Playlist Format (XSPF):    yes

  Transports
  ----------
  FTP, SFTP, SMB (via GIO):               yes
  HTTP/HTTPS (via neon):                  no
  MMS (via libmms):                       no

  General
  -------
  Alarm (requires GTK+):                  no
  Ampache browser (requires Qt):          no
  Delete Files:                           yes
  GNOME Shortcuts:                        no
  libnotify OSD:                          no
  Linux Infrared Remote Control (LIRC):   no
  MPRIS 2 Server:                         yes
  Scrobbler 2.0:                          yes
  Song Change:                            yes

  Qt Support
  ----------
  Qt Multimedia output:                   yes
  Qt Interface:                           yes
  Winamp Classic Interface:               yes
  Album Art:                              yes
  LyricWiki viewer:                       yes
  OpenGL Spectrum Analyzer:               yes
  Playlist Manager:                       yes
  Search Tool:                            yes
  Song Info:                              yes
  Status Icon:                            yes

There is also another problem that needs to be investigated: every time you press STOP button in the WINAMP user interface or you quit the QTGUI user interface, this message appears on screen:

QObject::~QObject: Timers cannot be stopped from another thread

I hope you will find this useful.

I can also confirm that Audacious now compiles fine without touching the makefiles.

Hello! I’m trying to compile it, but when run the configure script:

./autogen.sh
./configure --prefix=/boot/common --disable-gtk --enable-qt

I get the error:

configure: error: Package requirements (Qt5Core >= 5.2) were not met:

No package 'Qt5Core' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables QTCORE_CFLAGS
and QTCORE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

If I type the qmake command, I have Qt5.5 correctly installed:

~/Compilar/audacious-master> qmake --version
QMake version 3.0
Using Qt version 5.5.1 in /packages/qt5_x86-5.5.1-2/.self/lib/x86
~/Compilar/audacious-master>

Did you tweak some configuration?
Thank you!!! :slight_smile:

Did you set up the GCC5 environment with:
setarch x86

Chris

that’s right: try to type instead:

gcc -v

and be sure that you selected the right toolchain.
Be also sure that you installed all dependencies that I listed in my previous post: pkg-config-x86 is the tool to be used to verify that a package is correctly installed.

BTW, I have also tried to compile a bit better Audacious, but evidently, although I read the various documents and I spent some time for it, I’m unable to create a conform package.

I think that two packages should be made, one with the binaries of the player and one with the include files and libraries to be installed if an user wants to develop plugins.

For example, how do I need to set up the directories when I launch the configure script?
Do I need to include an icon somewhere?
If somebody would be so kind to help me to create these packages (my first ones), it would be great, after all I started to use Haiku just few days ago…
Or, alternatively, somebody could do these packages and I will look the options and the package script files to learn for the future.

Sincerely.

Did you look into using haikuporter? There’s much information in the wiki and checking out the haikuports source, there’s much to be learned from studying the existing recipes.

Regards,
Humdinger

Thank you! I was missing to install the following package:
pkgconfig_x86-0.27.1-2-x86_gcc2.hpkg

Now, it compile perfectly. Thanks again! :slight_smile:

And did you get also the player emitting sounds?

Not yet… I’m getting an error when compile one of the plugins, and then, when try to start the app, get a D-BUS error. I will continue to try… :slight_smile:

What error are you getting with the plugins? As a total newbie, I just downloaded the packages with the HaikuDepot application and, after libm had been added, I did not a change to the sources.

When I launch Audacious, on the console it prints:

ERROR: dbus-server.cc:865 [dbus_server_init]: D-Bus error: impossibile determinare l’indirizzo del bus di sessione (non implementato per questo S.O.)

and it just says that D-Bus i actually unimplemented in Haiku, but this does not prevent the execution of the player. I liked to compile everything, but if you do not like to see this message, you can just disable DBUS support by adding “–disable-dbus” to the options of the configure. I would suggest to keep DBUS support compiled anyways, when it will exists your executables will be already ok.