Alan DeKok schrieb:
> [EMAIL PROTECTED] wrote:
> > I'm trying to use FreeRadius-1.0.0-pre3 on Solaris7.
> 
>   That's fairly old.

Exactly the same problem with FreeRadius-1.0.0 - oh,
your point was not that pre3 is old, but rather that
Solaris 7 is old...
Well, yes, but I don't think newer Solaris functions have
a native (runtime) linker that's much different...

> > trying to link -lcrypto -lssl (wrong order) instead of
> using
> > -lssl -lcrypto.
> 
>   Hmm... it works in that order on the systems I've
> tested.

It depends on the linker.  GNU ld should be happy
with both, AFAIK, while Solaris native ld requires
the correct ordering. Moreover, I'm having static
libs for OpenSSL (simplifies distribution of  own
binaries), in that case even GNU ld would be
unhappy with -lcrypto -lssl, IIRC.

> > In contrast to last november's patch, I tried to get
> away with
> > just changing aclocal.m4 (changing AC_SMART_CHECK_LIB
> > to always add new libraries in front of the already
> known ones,
> > since that order seems much more reasonable anyway,
> 
>   I don't see why.

ld is/can be order sensitive, i.e. -llib1 -llib2 is not the
same as -llib2 -llib1 (i.e. if lib2 references symbols
from lib1, the first will fail while the second will succeed.
Thats always true (on Unix systems), if you are using
static libs, for dynamic libs it depends on the system).

If one already determined that gcc something -llib1
works fine,  you know that lib1 does not depend on
lib2, so lib1 and lib2 are either independent or
lib2 could depend on lib1.  Appending new libs in
configure tests (i.e. testing -llib1 -llib2) now will
only work if either the libraries are independent
or if you are using dynamic libs and compiling on
one of the "lucky" systems. Prepending new
libs in configure tests (i.e. testing -llib2 -llib1) will
always work.

> $ LIBS="-L_OpenSSL_Lib_Directory -lssl -lcrypto"
> ./configure

Yes, right. That's much better than trying to use "LDFLAGS"
which aren't referenced in all (any?) makefiles.

However, it makes me wonder, what was the point of
--with-openssl-includes/libraries?

BTW, my other problem is that Solaris 7 _does_ have
inet_pton, but it doesn't know about AF_INET6 or
struct in6_addr, so compiling misc.c doesn't work
without changing something. Right now, I'm hacking
autoconf.h after running configure (undefining
HAVE_INET_PTON and HAVE_INET_NTOP), but
having a test for AF_INET6 in configure(.in) [e.g.
AC_CHECK_COMPILE some piece of source code
which includes the right header(s) for IPv6 and
references AF_INET6] and doing something like 
#if defined (HAVE_AF_INET6) && defined(HAVE_INET_NTOP)
in misc.c would be much nicer...

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to