Brad Nicholes wrote:
Correct.  Both the gmond binary and the metric modules have to be running
the same APR code in the same process.  If both are statically linked to a
libapr they would both have to initialize their own APR library, create
their own memory pools, sockets, etc.  They would not be able to share
anything such as registering a module cleanup routine on a gmond owned
memory pool.  This is the reason why it was necessary to move to a
dynamically loaded libapr for 3.1 and why --enable-static-build disables
all of the loadable module functionality.  The only way around it would be
to not allow a loadable metric module to use any APR functions or be passed
any APR created data.  This would greatly restrict the functionality of a
loadable module.  So building ganglia 3.1.x statically no matter which
version of APR you use, basically gets you ganglia 3.0.5.

This doesn't discount the idea of delivering a separate tarball with that
contains the external libraries, it just doesn't solve the dynamic vs
static linking issue.

There are two issues here:
  1) supporting statically compiled binaries
  2) having the library code in-tree or provided separately

Static binaries are wonderful in some cases, and have saved my bacon a number of times (although not with ganglia specifically). I've seen other projects provide "-static" option that creates static libraries, based on whatever versions are found. This could either replace, or be in addition to --enable-static-build (although the difference should be explained in the configure --help options).

Can the dynamically loaded metric modules could be statically linked? Obviously, you lose the "dynamic" part, but would retain the ability to monitor things. I've also heard that it is also possible to link some libraries statically, but leave others dynamic. Perhaps that is also an option?

If a separate tarball of apr/expat/confuse are provided, then I think it would be appropriate to include a short bit of documentation along the lines of "compile these three libraries as follows... Run the main ganglia ./configure script with --foo and --bar to use them"

--
Jesse Becker
NHGRI Linux support (Digicon Contractor)

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to