From 9dfaf42a70cdd4378bb0636b5ae8c41e6d9725f4 Mon Sep 17 00:00:00 2001 From: Tae-Jeong Lee Date: Mon, 26 Aug 2013 23:03:57 +0900 Subject: [PATCH] Added logs to help debugging regarding dynamic linking loader error. [Issue#] N/A [Problem] When a dependency error occured during wrt-plugins installation, the dynamic linking loader works strangely after that. Because of that, to help debugging, some logs were added. [Cause] N/A [Solution] Added some 'stderr' logs regarding dynamic linking loader error. It will show the reason of fail to dlopen(). Change-Id: I964db7d7434274549197d79655cf7eea50884ea7 --- src/jobs/plugin_install/plugin_install_task.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/jobs/plugin_install/plugin_install_task.cpp b/src/jobs/plugin_install/plugin_install_task.cpp index 2b90704..097f9ac 100644 --- a/src/jobs/plugin_install/plugin_install_task.cpp +++ b/src/jobs/plugin_install/plugin_install_task.cpp @@ -176,15 +176,22 @@ void PluginInstallTask::stepLoadPluginLibrary() LogDebug("Loading plugin: " << filename.Filename()); + fprintf(stderr, " - Try to dlopen() : [%s] ", filename.Fullpath().c_str()); + void *dlHandle = dlopen(filename.Fullpath().c_str(), RTLD_LAZY); if (dlHandle == NULL) { const char* error = (const char*)dlerror(); + fprintf(stderr, + "-> Failed!\n %s\n", + (error != NULL ? error : "unknown")); LogError( "Failed to load plugin: " << filename.Filename() << ". Reason: " << (error != NULL ? error : "unknown")); ThrowMsg(Exceptions::PluginLibraryError, "Library error"); } + fprintf(stderr, "-> Done.\n"); + const js_entity_definition_t *rawEntityList = NULL; get_widget_entity_map_proc *getWidgetEntityMapProcPtr = NULL; -- 2.7.4