[Openal-devel] freealut 1.0.0 release candidate 1
Sven Panne
Sven.Panne at aedion.de
Sun Dec 4 09:25:33 PST 2005
Am Samstag, 3. Dezember 2005 19:12 schrieb Prakash Punnoor:
> > proposed and change the README and alut.html accordingly. Furthermore, I
> > think that the output of "openal-config --libs" is missing a lot of
> > things: The other libraries libopenal.so depends on (libvorbis, libartsc,
> > ...), a flag for using pthreads, etc. I'll take a lot at that, too.
>
> Are you sure? For me it works just specifiying -lopenal -alut to compile
> test progs, regardless what was compiled into openal.
I think the big question is: What should "alut-config --libs" / "pkg-config
--libs alut" report? Only the direct library dependencies or their transitive
closure? Looking at some examples on my Linux box I must admit that currently
I don't have a clue, as there seems to be no standard here. :-( But
pkg-config has a Requires: field, hmmm...
We have to consider 2 cases here:
* Dynamic linking: The capabilities of different platform vary quite a lot
here (that's the whole point of libtool, BTW), with e.g. Linux being one of
the easiest to use. As an example: To compile and link a GLUT application on
Linux it suffices to state a single "-lglut" flag, all the libraries GLUT
depends on (OpenGL, GLX, X11, ...) are figured out automatically, because
every dynamic library knows the libraries itself depends on. In our case:
"-lalut" is enough, plus perhaps "-pthread".
* Static linking: Here things are normally quite different, you have to
specify the transitive closure of *all* libraries in the right order.
Any advice on what to do is highly appreciated... Meanwhile I'll try to dig up
some info on this topic, too.
> Try for yourself, esp using the flag -Wl,--as-needed. If you specify eg
> -lvorbis (and openal was comiled with it) your exe will be linked to
> vorbis, regardless whether it actually uses vorbis or not. But using the
> as-needed flag prevents from linking to vorbis, as ld understands it is
> actually not needed...and will only bloat your executeable.
Well, "bloating" is an exaggeration here: On ELF systems only a dependency is
recorded, not the actual contents of unnecessary libraries. And ALUT *does*
use Vorbis, if only indirectly. The question is: Who records this dependency?
I'm away on a business trip the next few days, so it looks like RC2 has to
wait a little bit...
Cheers,
S.
More information about the Openal-devel
mailing list