Problem building samples on Ubuntu 18.04

Started by fightlessbirds, April 07, 2020, 23:28:44

Previous topic - Next topic

fightlessbirds

Apologies in advance if this is a newbie problem. I mainly work in Windows but I'd like to build for Linux as well. I've got a fresh install of Ubuntu 18.04 and made sure to install all of the dependencies mentioned on this page but I'm getting a compile error when I try to build the sample projects:

[ 40%] Compiling:SDL_poll.c
gcc -I/home/shibe/.local/share/BlitzMax/mod/sdl.mod/sdl.mod -I/home/shibe/.local/share/BlitzMax/mod -I/home/shibe/.local/share/BlitzMax/mod/brl.mod/blitz.mod -I/home/shibe/.local/share/BlitzMax/mod/sdl.mod/sdl.mod/include/linuxx64 -I/home/shibe/.local/share/BlitzMax/mod/sdl.mod/sdl.mod/SDL/include -I/home/shibe/.local/share/BlitzMax/mod/brl.mod/stream.mod  -mmmx -m3dnow -msse -msse2 -DHAVE_LINUX_VERSION_H -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/lib64/dbus-1.0/include -DTHREADED  -w -DBMX_NG -fno-strict-aliasing -fpie -fno-exceptions -c -O3 -msse3  -g -o /home/shibe/.local/share/BlitzMax/mod/sdl.mod/sdl.mod/SDL/src/core/unix/.bmx/scu_SDL_poll.c.debug.linux.x64.o /home/shibe/.local/share/BlitzMax/mod/sdl.mod/sdl.mod/SDL/src/core/unix/SDL_poll.c
In file included from /home/shibe/.local/share/BlitzMax/mod/sdl.mod/sdl.mod/SDL/src/audio/nas/SDL_nasaudio.c:34:0:
/home/shibe/.local/share/BlitzMax/mod/sdl.mod/sdl.mod/SDL/src/audio/nas/SDL_nasaudio.h:29:10: fatal error: audio/audiolib.h: No such file or directory
#include <audio/audiolib.h>
          ^~~~~~~~~~~~~~~~~~
compilation terminated.
Build Error: failed to compile (256) /home/shibe/.local/share/BlitzMax/mod/sdl.mod/sdl.mod/SDL/src/audio/nas/SDL_nasaudio.c


Has anyone encountered this and knows how to get around it?

Derron


markcwm

Quote from: BruceyHallo, you might also try installing libaudio-dev, or you could edit the header in sdl.mod/sdl.mod/include/linuxx64/SDL_config.h, and comment out the parts that refer to SDL_AUDIO_DRIVER_NAS. Then rebuild.

SDL generally requires more libraries available at compile time than at runtime - in order to better support the different libraries people will have on their systems. The libraries are loaded at runtime as required, so although you might compile in support for libaudio (for example), it may never actually be used by someone using your software.

fightlessbirds

#3
Quote from: Derron on April 08, 2020, 06:41:08
-> install the "libaudio-dev" package

This resolved my problem and I can now build the samples. Thank you! It would be excellent if the Linux guide on blitzmax.org could be updated to include this library also. ;)

Derron

Already raised the issue in one of the available channels - here the discord chat channel of NG (see footer on the website).

bye
Ron