]> xenbits.xensource.com Git - people/andrewcoop/hwloc.git/commitdiff
config/hwloc.m4: Don't prevent plugins in embed...
authorBrice Goglin <brice.goglin@inria.fr>
Thu, 9 May 2013 13:12:05 +0000 (13:12 +0000)
committerBrice Goglin <brice.goglin@inria.fr>
Thu, 9 May 2013 13:12:05 +0000 (13:12 +0000)
config/hwloc.m4: Don't prevent plugins in embedded mode

There's no reason for hwloc to prevent it.
But users will have to explicitly enable plugins by setting
enable_plugins=yes before calling HWLOC_SETUP_CORE()
and by loading ltdl manually.

See the thread that ends at
  http://www.open-mpi.org/community/lists/hwloc-devel/2013/05/3731.php

Advise embedders about possible horrible problems.

This commit was SVN r5610.

config/hwloc.m4
doc/hwloc.doxy

index 059b72ebcb21f93b8ad6cd58f5a7641c293ee58c..818fcc681fc6512d9885ac91d676e3f231da1e0e 100644 (file)
@@ -1040,12 +1040,6 @@ EOF])
     AS_IF([test "x$enable_plugins" = "xyes" -a "x$hwloc_windows" = "xyes"],
       [AC_MSG_WARN([Plugins not supported on non-native Windows build, plugins support cannot be enabled.])
        AC_MSG_ERROR([Cannot continue])])
-    # plugins are not supported in embedded mode (indeed, all the LTDL
-    # setup stuff is up in hwloc's private configure.ac -- not down
-    # here in hwloc.m4)
-    AS_IF([test "x$enable_plugins" = "xyes" -a "$hwloc_mode" = "embedded"],
-          [AC_MSG_WARN([Embedded mode not supported with plugins])
-           AC_MSG_ERROR([Cannot continue])])
 
     AC_ARG_WITH([hwloc-plugins-path],
                AC_HELP_STRING([--with-hwloc-plugins-path=dir:...],
index 114777fba51a9b66d1b985c58e1e31fa43ce52c0..c88023ef6f5da52db2f4614bf7df2ccec31aaf93 100644 (file)
@@ -2147,6 +2147,9 @@ is registered to the hwloc core.
 Components are then only enabled if the topology configuration
 requests it, as explained in the previous sections.
 
+Also note that plugins should carefully be enabled and used when
+embedding hwloc in another project, see \ref embed for details.
+
 \section plugins_adding Adding new discovery components and plugins
 
 The types and functions cited below are declared in the hwloc/plugins.h header.
@@ -2338,6 +2341,17 @@ you can directly integrate hwloc's m4 configure macro into your
 configure script.  You can then invoke hwloc's configuration tests and
 build setup by calling an m4 macro (see below).
 
+Although hwloc dynamic shared object plugins may be used in embedded
+mode, the embedder project will have to manually setup libltdl in its
+build system so that hwloc can load its plugins at run time.
+Also, embedders should be aware of complications that can arise due to
+public and private linker namespaces (e.g., if the embedder project is
+loaded into a private namespace and then hwloc tries to dynamically
+load its plugins, such loading may fail since the hwloc plugins can't
+find the hwloc symbols they need).
+The embedder project is <b>strongly</b> advised not to use hwloc's
+dynamically loading plugins / libltdl capability.
+
 \section embedding_m4 Using hwloc's M4 Embedding Capabilities
 
 Every project is different, and there are many different ways of