Re: [AD] 3.9.33 Unix patch (non-root users and ld.so.conf advice)

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Mon, Oct 16, 2000 at 08:47:42AM +0200, Laurent Desnogues wrote:
> George Foot wrote:
> > 
> > I'm not sure whether the test on /etc/ld.so.conf is appropriate
> > for other platforms, so if anybody uses one it'd be good to know
> > whether this should only occur on Linux systems, and also
> > whether the LD_LIBRARY_PATH environment variable is universal or
> > Linux-specific.
> 
>    Under Solaris 2.5.1 and Solaris 7, /etc/ld.so.conf does
> not exist.  In fact, these systems rely only upon
> LD_LIBRARY_PATH (though I may be wrong...).
> 
>    Under HP-UX 10.20, LD_LIBRARY_PATH doest not even exist,
> it's called SHLIB_PATH.  But since it defaults to empty, I
> guess there's a file somewhere or it has a built-in list of
> paths (for security reasons).
> 
>    Yep, I know these OSes are exotic ;)

We ought to support them if possible though. :)

Any ideas what we should do about this then?  One thing is to
only perform this test on Linux, which is probably the most
common Unixy OS used with Allegro.  If /etc/ld.so.conf really is
only used in Linux, we should only check it there.  It might be
better to only perform the test if the file exists, to cater for
any other OSes using that system without having to know about
them specifically, but that would break if some OS uses that
file in a different way.

We should probably also check in LD_LIBRARY_PATH, since if the
target directory is already there then we don't need to
complain.  This would then work on Solaris, but not HP-UX.  We
could test in $LD_LIBRARY_PATH:$SHLIB_PATH.  Hmm.

If we find that the target directory isn't in any of these
things, we also need to give the user a little guidance as to
how to add it (in particular, where to add it!).  In Linux,
/etc/ld.so.conf is the appropriate place for doing it globally,
and for a single user (or if you don't have root access) it's
LD_LIBRARY_PATH.  I guess in Solaris for a permanent global
solution you need to find where LD_LIBRARY_PATH is first set, or
just stick something it /etc/profile to update it.  I'm not sure
how far we should go in this direction though; to some extent,
people running weird OSes ought to know how to use them. :) It's
only a problem with Linux because it's so much trying to target
the less knowledgable users these days.

If we do go into any depth, the deep stuff should be hidden away
in readme.uni and the error message should only mention a couple
of things and point to the longer description in case the user
is interested in that.

George

-- 
Random project update:
22/06/2000: AllegroGL documentation:  http://allegrogl.sourceforge.net/
        See under `Documentation' for the AllegroGL Reference Manual in
        various formats.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/