On Mon, Aug 13, 2018 at 09:31:23AM -0500, Hartmut Kaiser wrote:
> 
> > On Mon, Aug 13, 2018 at 08:06:25AM -0500, Hartmut Kaiser wrote:
> > > FWIW, I have merged #3402 just now.
> >
> > Thanks!
> >
> > I have got as far as linking libhpx now - somehow there is a -ldl in
> > link.txt (and in the generated pkg-config .pc files). I have been hunting
> > through the cmake files where it comes from, but haven't found it. Any
> > ideas? (dlopen and friends are in many OS's system library as opposed to
> > libdl.)
> 
> libdl is handled here:
> https://github.com/STEllAR-GROUP/hpx/blob/master/CMakeLists.txt#L1230-L1232

Thanks I searched for ldl and libdl... This gets me further:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c780ea50ef..69e8261dce 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1227,9 +1227,15 @@ if(NOT WIN32)
     endif()
   endif()
 
-  if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
-    hpx_libraries(dl)
-  endif()
+  # XXXPW if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
+    find_library(DL_LIBRARY NAMES dl)
+    if(DL_LIBRARY)
+      message(STATUS "dl library found")
+      hpx_libraries(dl)
+    else()
+      message(STATUS "dl library not found")
+    endif()
+  # XXXPW endif()
 
   if(NOT APPLE AND NOT ("${HPX_PLATFORM_UC}" STREQUAL "ANDROID"))
     hpx_libraries(rt)


but there are lots of ways of skinning that cat - have you a preferred
way of doing AC_CHECK_LIB([dl],[dlopen]) ?

(On linking I get:

CMakeFiles/hpx.dir/runtime/threads/executors/this_thread_executors.cpp.o: In 
function `hpx::threads::coroutines::detail::context_base::~context_base()':
this_thread_executors.cpp:(.text._ZN3hpx7threads10coroutines6detail12context_baseD2Ev[_ZN3hpx7threads10coroutines6detail12context_baseD5Ev]+0x41):
 undefined reference to 
`hpx::threads::coroutines::detail::posix::use_guard_pages'
)

Cheers,

Patrick
_______________________________________________
hpx-users mailing list
hpx-users@stellar.cct.lsu.edu
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users

Reply via email to