Le 08/05/2013 13:09, Jeff Squyres (jsquyres) a écrit : > 2. My thoughts were preventing hwloc from going thru some of the pain that > OMPI went thru w embedding. Libibverbs has the same problem. If you have > middleware that uses plugins that, in turn, uses plugins, it's a bit > complicated to support fully static builds properly (OMPI and hwloc do, but > libibverbs doesn't easily, but still, it may require a rebuild of hwloc with > enable-static). Also, the problem with opening DSOs in private namespaces > still exists; there's no good solution for that (when both the middleware and > hwloc use plugins).
But this issue is only in the embedders (OMPI), not in the embeddee (hwloc), right? I can get plugins to work in tests/embedded by adding 2 lines to its configure.ac (see the attached patch, which also removes your error message and creates a shared lib containing libhwloc_embedded). In short, I don't really see what risk we would be taking on the hwloc side if we keep embedding+plugins possible (and still don't enable plugins by default). > 3. Open MPI also get flack for embedding lib ltdl and libevent. Although > libltdl now has the built in options for using an external libltdl (which is > what the distros use), why go down this road if we don't need to embed > libltdl? OK Brice
diff --git a/config/hwloc.m4 b/config/hwloc.m4 index 059b72e..818fcc6 100644 --- a/config/hwloc.m4 +++ b/config/hwloc.m4 @@ -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:...], diff --git a/tests/embedded/Makefile.am b/tests/embedded/Makefile.am index 9f658f0..eae3c8c 100644 --- a/tests/embedded/Makefile.am +++ b/tests/embedded/Makefile.am @@ -10,12 +10,13 @@ AM_CPPFLAGS = $(HWLOC_EMBEDDED_CPPFLAGS) TESTS = main noinst_PROGRAMS = main -noinst_LTLIBRARIES = libdo_test.la +lib_LTLIBRARIES = libdo_test.la libdo_test_la_SOURCES = do_test.c +libdo_test_la_LIBADD = $(HWLOC_EMBEDDED_LDADD) $(HWLOC_EMBEDDED_LIBS) main_SOURCES = main.c -main_LDADD = libdo_test.la $(HWLOC_EMBEDDED_LDADD) $(HWLOC_EMBEDDED_LIBS) +main_LDADD = libdo_test.la main_DEPENDENCIES = libdo_test.la EXTRA_DIST = run-embedded-tests.sh diff --git a/tests/embedded/configure.ac b/tests/embedded/configure.ac index d697e58..8e57207 100644 --- a/tests/embedded/configure.ac +++ b/tests/embedded/configure.ac @@ -19,10 +19,12 @@ cat <<EOF EOF HWLOC_SET_SYMBOL_PREFIX([mytest_]) +enable_plugins=yes HWLOC_SETUP_CORE([hwloc-tree], [hwloc_setup=happy], [hwloc_setup=unhappy]) AS_IF([test "$hwloc_setup" = "unhappy"], [AC_MSG_ERROR([Cannot build hwloc core])]) HWLOC_DO_AM_CONDITIONALS +LIBS="$LIBS -lltdl" cat <<EOF === Done configuring hwloc (embedded mode)