Amanda-Users

Re: Solaris 8 compile problem with amanda 2.4.4

2003-06-23 11:27:22
Subject: Re: Solaris 8 compile problem with amanda 2.4.4
From: "Jim Mozley" <jim.mozley AT exponential-e DOT com>
To: "Jon LaBadie" <jon AT jgcomp DOT com>, "amanda-users" <amanda-users AT amanda DOT org>
Date: Mon, 23 Jun 2003 16:32:45 +0100
*This message was transferred with a trial version of CommuniGate(tm) Pro*
Jon,

> The line below, quoted from one of your earlier messages, should make the
> setting of LD_LIBRARY_PATH superfluous.
>
> >> CFLAGS="-L/usr/local/lib -L/usr/lib" LDFLAGS="-R/usr/local/lib"
>
> Both are ld(1) options and could be listed as LDFLAGS though it would
> not affect much as gcc passes any -L options on to ld.  I would hope
> the inclusion of /usr/lib is unneeded.  Any compiler/linker worth its
> salt on unix would be looking there as a default.

I thought that specifying it like this was probably duplication, but after a
bit one tries anything, then one tries everything all at once!

> Does Sol 8 on sparc include the crle command?  Running this should tell
> you (and let you modify) what lib directories are looked at at runtime
> without a need to set LD_LIBRARY_PATH.  I don't think it affects the
> compile/link, just the runtime dynamic linker.  Here is a sample output:
>
> $ crle
>
> Configuration file [3]: /var/ld/ld.config
>   Default Library Path (ELF):
/usr/lib:/usr/sfw/lib:/opt/sfw/lib:/usr/local/lib
>   Trusted Directories (ELF): /usr/lib/secure  (system default)
>
> Command line:
>   crle -c /var/ld/ld.config -l
/usr/lib:/usr/sfw/lib:/opt/sfw/lib:/usr/local/lib
>
>
> That is modified from the default by the inclusion of /usr/local/lib and
> probably the "sfw/lib" dirs.  The -R option is the used to specify lib
dirs
> specific to an executable (like X window system libs for X programs).  The
> -R puts the lib dir location into the executable.  These techniques are
> generally considered more secure than using LD_LIBRARY_PATH and some nasty
> person could point to a libdir with "trojan horse functions" like a funky
> printf, or amanda's get_disklist_entry function :).

It looks like this could be the problem, although I have build on the
platform with the same compiler in the past and amanda worked! I wonder if a
Solaris OS patch has changed something.

> 1. try "file /usr/local/lib/libgcc_s*".  Are they Sparc modules?  Every
once in
>    a while I put a Sparc module on my x86 systems.  Know what, they don't
work :)

They are sparc modules but I'm on a sparc chip (just doubled checked
though - thanks)

> 2. you have installed and uninstalled several times.  Might you have two
competing
>    amanda installations and the amcheck you are running is not the newly
built one?

I'm doing make uninstall;make distclean between each compile and checking I
don't have amanda executables in /usr/local/sbin

Regards,

Jim