[nas] nas on Mac OS X?

Erik Auerswald auerswal at unix-ag.uni-kl.de
Tue Jan 25 12:12:09 MST 2011


Hi Ray,

On Mon, Jan 24, 2011 at 03:54:43PM -0500, Raymond Toy wrote:
> On 1/24/11 2:57 PM, Erik Auerswald wrote:
> >
> > Ray, could you please verify if the attached patch results in
> > 1) adding -lXau to the linking of libaudio.so (see above)
> Let me start from scratch and apply your patch....

Thanks for doing this!

> Yes, libaudio.so is linked with -lXau.  And otools -L (the OSX
> equivalent of ldd) shows that libaudio.so depends on libXau.

OK, I have applied my patch to svn as this is a step in the right
direction.

> > 2) still results in a broken build on OS X?
> The clients are still broken.  For example, auplay is linked against the
> static libaudio.a, not the dynamic libaudio:

Hm, the same happens on linux, but linking to Xt suffices to link Xau.

> So, I guess the configuration is not using shared libraries as it should
> or we need to add -lXau when building the clients.
> 
> I guess this is because when I run make World, I get warnings from
> NetAudio.tmpl that SharedLibX is not defined.  I do see, though, that
> darwinLib.tmpl has #define HasSharedLibraries YES.

On Debian/Sid (unstable) the file /usr/lib/X11/config/lnxLib.rules defines
HasSharedLibraries YES, but during build I get:

In file included from ./Imakefile:26,
                 from /usr/lib/X11/config/Imake.tmpl:2293,
                 from Imakefile.c:35:
./../config/NetAudio.tmpl:123: warning: "SharedLibX" is not defined

In NetAudio.tmpl we have:
#define SharedLibAudio          SharedLibX

But SharedLibX is not mentioned anywhere in /usr/lib/X11/config/. There
is a definition for SharedLibX11 and changing NetAudio.tmpl to use this
instead of SharedLibX results in linking dynamically against libaudio.

Ray, could you test if this works for you as well? See the attached patch.

I don't know if this is a plain bug or the definition someday changed
from SharedLibX to SharedLibX11. We probably need to add some logic to
set SharedLibX if SharedLibX11 is set.

A quick grep shows that no *LibX defines are found under
/usr/lib/X11/config/, there are only defindes for *LibX11. Seems as if
we need to fix all of them in NetAudio.tmpl.

Thanks,
Erik
-- 
There are two ways of constructing a software design: One way is to make
it so simple that there are obviously no deficiencies and the other way
is to make it so complicated that there are no obvious deficiencies.
                        -- C.A.R. Hoare



More information about the Nas mailing list