[Bf-committers] Re: Re: Clues about OpenAL linking issue

GSR gsr.b3d at infernal-iceberg.com
Fri Oct 21 12:54:15 CEST 2005


Hi,
cwant at ualberta.ca (2005-10-20 at 1755.14 -0600):
> GSR wrote:
> > Under which distros that is not needed so there was a reason to not
> > patch the makefiles?
> I'm against this -- less dependencies is better. As an
> example, on IRIX the version of sdl distributed with
> 'freeware' links to aalib ... do we really want to insist
> that people have an ascii art library installed in order
> to run blender? Similarly, blender doesn't use ogg vorbis,
> so why insist users have it installed?

Well, what I am against is about broken build system. There is no
shipped OpenAL with Blender, make lacks the LLIBS and scons is set to
work (via use_openal = 'false', not via linking). Simplest then would
be making make match scons, thus making OpenAL an add-on. IOW, patch
the makefiles, in a different way (see patch).

> I say either build without openal, or build your
> own openal (which is how I build blender).

Let see, at least for the record, so we have this documented, search
engines can catch it... When people build using make and get something
like the following at linking of the final binary:

/usr/lib/libopenal.a(al_ext_mp3.o): In function `alutLoadMP3_LOKI':
: undefined reference to `SMPEG_new_data'
/usr/lib/libopenal.a(al_ext_mp3.o): In function `alutLoadMP3_LOKI':
: undefined reference to `SMPEG_wantedSpec'
/usr/lib/libopenal.a(al_ext_mp3.o): In function `alutLoadMP3_LOKI':
: undefined reference to `SMPEG_actualSpec'
/usr/lib/libopenal.a(al_ext_mp3.o): In function `MP3_Callback':
: undefined reference to `SMPEG_status'
/usr/lib/libopenal.a(al_ext_mp3.o): In function `MP3_Callback':
: undefined reference to `SMPEG_play'
/usr/lib/libopenal.a(al_ext_mp3.o): In function `MP3_Callback':
: undefined reference to `SMPEG_playAudio'
/usr/lib/libopenal.a(al_ext_mp3.o): In function `MP3_Callback':
: undefined reference to `SMPEG_stop'
/usr/lib/libopenal.a(al_ext_mp3.o): In function `MP3_Callback':
: undefined reference to `SMPEG_rewind'
/usr/lib/libopenal.a(al_ext_mp3.o): In function `MP3_Callback':
: undefined reference to `SMPEG_enableaudio'
/usr/lib/libopenal.a(al_ext_mp3.o): In function `MP3_Callback':
: undefined reference to `SMPEG_enablevideo'
/usr/lib/libopenal.a(al_ext_mp3.o): In function `mp3bid_insert':
: undefined reference to `SMPEG_stop'
/usr/lib/libopenal.a(al_ext_mp3.o): In function `mp3bid_insert':
: undefined reference to `SMPEG_delete'
/usr/lib/libopenal.a(al_ext_mp3.o): In function `mp3bid_remove':
: undefined reference to `SMPEG_stop'
/usr/lib/libopenal.a(al_ext_mp3.o): In function `mp3bid_remove':
: undefined reference to `SMPEG_delete'
/usr/lib/libopenal.a(al_ext_vorbis.o): In function `alutLoadVorbis_LOKI':
: undefined reference to `ov_open_callbacks'
/usr/lib/libopenal.a(al_ext_vorbis.o): In function `alutLoadVorbis_LOKI':
: undefined reference to `ov_info'
/usr/lib/libopenal.a(al_ext_vorbis.o): In function `Vorbis_Callback':
: undefined reference to `ov_read'
/usr/lib/libopenal.a(al_ext_vorbis.o): In function `VorbHandle_delete':
: undefined reference to `ov_clear'
/usr/lib/libopenal.a(alsa.o): In function `openal_load_alsa_library':
: undefined reference to `snd_strerror'
/usr/lib/libopenal.a(alsa.o): In function `openal_load_alsa_library':
: undefined reference to `snd_pcm_info_sizeof'
/usr/lib/libopenal.a(alsa.o): In function `openal_load_alsa_library':
: undefined reference to `snd_pcm_hw_params_malloc'
/usr/lib/libopenal.a(alsa.o): In function `openal_load_alsa_library':
: undefined reference to `snd_pcm_hw_params_free'
/usr/lib/libopenal.a(alsa.o): In function `openal_load_alsa_library':
: undefined reference to `snd_pcm_close'
/usr/lib/libopenal.a(alsa.o): In function `openal_load_alsa_library':
: undefined reference to `snd_pcm_hw_params'
/usr/lib/libopenal.a(alsa.o): In function `openal_load_alsa_library':
: undefined reference to `snd_pcm_hw_params_any'
/usr/lib/libopenal.a(alsa.o): In function `openal_load_alsa_library':
: undefined reference to `snd_pcm_hw_params_get_buffer_size'
/usr/lib/libopenal.a(alsa.o): In function `openal_load_alsa_library':
: undefined reference to `snd_pcm_hw_params_get_channels'
/usr/lib/libopenal.a(alsa.o): In function `openal_load_alsa_library':
: undefined reference to `snd_pcm_hw_params_get_period_size'
/usr/lib/libopenal.a(alsa.o): In function `openal_load_alsa_library':
: undefined reference to `snd_pcm_hw_params_set_access'
/usr/lib/libopenal.a(alsa.o): In function `openal_load_alsa_library':
: undefined reference to `snd_pcm_hw_params_set_buffer_size'
/usr/lib/libopenal.a(alsa.o): In function `openal_load_alsa_library':
: undefined reference to `snd_pcm_hw_params_set_channels'
/usr/lib/libopenal.a(alsa.o): In function `openal_load_alsa_library':
: undefined reference to `snd_pcm_hw_params_set_format'
/usr/lib/libopenal.a(alsa.o): In function `openal_load_alsa_library':
: undefined reference to `snd_pcm_hw_params_set_period_size'
/usr/lib/libopenal.a(alsa.o): In function `openal_load_alsa_library':
: undefined reference to `snd_pcm_hw_params_set_periods'
/usr/lib/libopenal.a(alsa.o): In function `openal_load_alsa_library':
: undefined reference to `snd_pcm_hw_params_set_rate'
/usr/lib/libopenal.a(alsa.o): In function `openal_load_alsa_library':
: undefined reference to `snd_pcm_hw_params_set_rate_near'
/usr/lib/libopenal.a(alsa.o): In function `openal_load_alsa_library':
: undefined reference to `snd_pcm_hw_params_sizeof'
/usr/lib/libopenal.a(alsa.o): In function `openal_load_alsa_library':
: undefined reference to `snd_pcm_open'
/usr/lib/libopenal.a(alsa.o): In function `openal_load_alsa_library':
: undefined reference to `snd_pcm_nonblock'
/usr/lib/libopenal.a(alsa.o): In function `openal_load_alsa_library':
: undefined reference to `snd_pcm_prepare'
/usr/lib/libopenal.a(alsa.o): In function `openal_load_alsa_library':
: undefined reference to `snd_pcm_readi'
/usr/lib/libopenal.a(alsa.o): In function `openal_load_alsa_library':
: undefined reference to `snd_pcm_resume'
/usr/lib/libopenal.a(alsa.o): In function `openal_load_alsa_library':
: undefined reference to `snd_pcm_writei'
/usr/lib/libopenal.a(arts.o): In function `openal_load_arts_library':
: undefined reference to `arts_init'
/usr/lib/libopenal.a(arts.o): In function `openal_load_arts_library':
: undefined reference to `arts_free'
/usr/lib/libopenal.a(arts.o): In function `openal_load_arts_library':
: undefined reference to `arts_suspend'
/usr/lib/libopenal.a(arts.o): In function `openal_load_arts_library':
: undefined reference to `arts_suspended'
/usr/lib/libopenal.a(arts.o): In function `openal_load_arts_library':
: undefined reference to `arts_error_text'
/usr/lib/libopenal.a(arts.o): In function `openal_load_arts_library':
: undefined reference to `arts_play_stream'
/usr/lib/libopenal.a(arts.o): In function `openal_load_arts_library':
: undefined reference to `arts_record_stream'
/usr/lib/libopenal.a(arts.o): In function `openal_load_arts_library':
: undefined reference to `arts_close_stream'
/usr/lib/libopenal.a(arts.o): In function `openal_load_arts_library':
: undefined reference to `arts_read'
/usr/lib/libopenal.a(arts.o): In function `openal_load_arts_library':
: undefined reference to `arts_write'
/usr/lib/libopenal.a(arts.o): In function `openal_load_arts_library':
: undefined reference to `arts_stream_set'
/usr/lib/libopenal.a(arts.o): In function `openal_load_arts_library':
: undefined reference to `arts_stream_get'
/usr/lib/libopenal.a(esd.o): In function `openal_load_esd_library':
: undefined reference to `esd_open_sound'
/usr/lib/libopenal.a(esd.o): In function `openal_load_esd_library':
: undefined reference to `esd_standby'
/usr/lib/libopenal.a(esd.o): In function `openal_load_esd_library':
: undefined reference to `esd_resume'
/usr/lib/libopenal.a(esd.o): In function `openal_load_esd_library':
: undefined reference to `esd_play_stream'
/usr/lib/libopenal.a(esd.o): In function `openal_load_esd_library':
: undefined reference to `esd_close'
collect2: ld returned 1 exit status

The solutions are one of the following:

- Put NAN_NO_OPENAL=true in a file named user-def.mk placed in the
  base dir. Or set that env var before running make (same result).

- Build OpenAL making sure it does not use all those libs.

- Make sure LLIBS includes the proper -l arguments, as seen in a
  previous post.

If anything is wrong or missing, please say it.

I attached the patch to fix the Makefile by getting rid of the dep, so
first solution is applied for the user.

GSR
 
-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /cvsroot/bf-blender/blender/Makefile,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile
--- Makefile    9 Apr 2005 22:40:33 -0000       1.12
+++ Makefile    21 Oct 2005 01:48:40 -0000
@@ -38,9 +38,11 @@

 sinclude user-def.mk

-# To build without openAL, uncomment the following line, or set it as
-# an environment variable, or put it uncommented in user-def.mk:
-# export NAN_NO_OPENAL=true
+# To build with OpenAL, comment the following line, or set it to false
+# via environment variable or user-def.mk with export NAN_NO_OPENAL=false
+# Probably requires compiling your own OpenAL or making sure source/nan_link.mk
+# has LLIBS with -lesd -lartsc -lasound -lvorbis -lvorbisfile -logg -lsmpeg
+export NAN_NO_OPENAL ?= true

 export NANBLENDERHOME=$(shell pwd)
 MAKEFLAGS=-I$(NANBLENDERHOME)/source --no-print-directory


More information about the Bf-committers mailing list