Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Even more informative error messages when dlopen fails
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 20 Apr 2017 12:40:27 +0000 (14:40 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 20 Apr 2017 12:40:27 +0000 (14:40 +0200)
src/smpi/smpi_global.cpp

index 3ba9c79..3d9c926 100644 (file)
@@ -603,7 +603,7 @@ int smpi_main(const char* executable, int argc, char *argv[])
         void* handle = dlopen(target_executable.c_str(), RTLD_LAZY | RTLD_LOCAL | RTLD_DEEPBIND);
         unlink(target_executable.c_str());
         if (handle == nullptr)
-          xbt_die(bprintf("dlopen failed. Errno: %d (%s)", errno, strerror(errno)));
+          xbt_die(bprintf("dlopen failed: %s (errno: %d -- %s)", dlerror(), errno, strerror(errno)));
         smpi_entry_point_type entry_point = smpi_resolve_function(handle);
         if (!entry_point)
           xbt_die("Could not resolve entry point");