PDA

View Full Version : Compile Error In Ubuntu Linux



Kurisu
04-11-2008, 01:34 PM
Problems Fixed, But I'll leave the post in case anyone else has similar issues.


I'm installing 0.8.1 at the moment, and received the following errors while trying to compile

Appears to be something wrong with my alsa... Which in all honesty I'm not surprised by. Suggested fixes?

Error message:

g++ -DPACKAGE_NAME=\"ClanLib\" -DPACKAGE_TARNAME=\"clanlib\" -DPACKAGE_VERSION=\"0.8.1\" "-DPACKAGE_STRING=\"ClanLib 0.8.1\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"clanlib\" -DVERSION=\"0.8.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_KD_H=1 -DHAVE_SYS_VT_H=1 -DUSE_I386_ASSEMBLER=1 -DHAVE_FSTAB_H=1 -DHAVE_LIBZ=1 -DHAVE_LIBSDL_GFX=1 -DHAVE_GLX_GETPROCADDRESSARB=1 -DUSE_GETADDR=1 -I. -I. -g -O2 -I../../Sources -MT soundoutput.lo -MD -MP -MF .deps/soundoutput.Tpo -c soundoutput.cpp -fPIC -DPIC -o .libs/soundoutput.o
In file included from soundoutput.cpp:43:
Unix/soundoutput_alsa.h:37:29: error: alsa/asoundlib.h: No such file or directory
Unix/soundoutput_alsa.h:49: error: ISO C++ forbids declaration of 'snd_pcm_t' with no type
Unix/soundoutput_alsa.h:49: error: expected ';' before '*' token
Unix/soundoutput_alsa.h:50: error: 'snd_pcm_uframes_t' does not name a type
Unix/soundoutput_alsa.h:51: error: 'snd_pcm_uframes_t' does not name a type
soundoutput.cpp: In constructor 'CL_SoundOutput::CL_SoundOutput(const CL_SoundOutput_Description&)':
soundoutput.cpp:73: error: 'class CL_SoundOutput_alsa' has no member named 'handle'
make[2]: *** [soundoutput.lo] Error 1
make[2]: Leaving directory `/home/chris/Desktop/ClanLib-0.8.1/Sources/Sound'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/chris/Desktop/ClanLib-0.8.1/Sources'
make: *** [all-recursive] Error 1




Solution: I went into my Package manager and added any Packages that looked important (In synaptic, any with the ubuntu logo next to them, always the Dev versions)

Fixed it right up.

Qwerto
04-17-2008, 05:11 AM
Although there is a workaround for you, it is much more beautiful to fix this in configure.ac and then give error messages already in configure.


...
if test "$enable_clanSound" != "no"; then
echo "Checking for clanSound stuff"
echo "============================"
if test "$WIN32" = "yes"; then
CLANLIB_CHECK_LIB(dsound,[#include <dsound.h>
int main() { return 0; } void used_stuff() {DirectSoundCreate(NULL, NULL, NULL);}],
clanSound, [ *** Cannot find directsound libs],[-ldxguid -lwinmm])
else
dnl OSS header check
AC_CHECK_HEADER([sys/soundcard.h], [], CLANLIB_DISABLE_MODULE(clanSound,[ *** Cannot find sys/soundcard.h]))
+++ AC_CHECK_HEADER([alsa/asoundlib.h], [], CLANLIB_DISABLE_MODULE(clanSound,[ *** Cannot find alsa/asoundlib.h]))
fi
fi
...

The +++ is the new line that I want to add. ok?

RobBrit
08-18-2008, 05:38 PM
The package you want is libasound2-dev, which is the ALSA library.