[OE-core] [PATCH 1/1] cmake-native: fix symbol not found error on old distros

nitin.a.kamble at intel.com nitin.a.kamble at intel.com
Wed Sep 14 10:13:16 UTC 2011


From: Nitin A Kamble <nitin.a.kamble at intel.com>

more information in the patch file

This also adds dependency on the build system to have libstdc++-static
package being installed.

Signed-off-by: Nitin A Kamble <nitin.a.kamble at intel.com>
---
 meta/recipes-devtools/cmake/cmake-native_2.8.5.bb  |    4 ++-
 .../cmake/fix_for_running_on_older_distros.diff    |   26 ++++++++++++++++++++
 2 files changed, 29 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-devtools/cmake/cmake/fix_for_running_on_older_distros.diff

diff --git a/meta/recipes-devtools/cmake/cmake-native_2.8.5.bb b/meta/recipes-devtools/cmake/cmake-native_2.8.5.bb
index 3fe0c2e..4cd12f0 100644
--- a/meta/recipes-devtools/cmake/cmake-native_2.8.5.bb
+++ b/meta/recipes-devtools/cmake/cmake-native_2.8.5.bb
@@ -1,7 +1,9 @@
 require cmake.inc
 inherit native
 
-PR = "${INC_PR}.1"
+PR = "${INC_PR}.2"
+
+SRC_URI += "file://fix_for_running_on_older_distros.diff"
 
 SRC_URI[md5sum] = "3c5d32cec0f4c2dc45f4c2e84f4a20c5"
 SRC_URI[sha256sum] = "5e18bff75f01656c64f553412a8905527e1b85efaf3163c6fb81ea5aaced0b91"
diff --git a/meta/recipes-devtools/cmake/cmake/fix_for_running_on_older_distros.diff b/meta/recipes-devtools/cmake/cmake/fix_for_running_on_older_distros.diff
new file mode 100644
index 0000000..9a46f2e
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/fix_for_running_on_older_distros.diff
@@ -0,0 +1,26 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+Fixes bug: [YOCTO #1459]
+
+When sstate files are shared from newer distro machine to older distro machine, 
+the binaries can fail to run due to missing newer symbols from the newer 
+libraries as seen bellow:
+
+      U _ZNSt15_List_node_base7_M_hookEPS_@@GLIBCXX_3.4.14
+      U _ZNSt15_List_node_base9_M_unhookEv@@GLIBCXX_3.4.14
+
+This patch makes libstdc++ linking static. so the build system need to have libstdc++-static package installed before building cmake.
+
+Date: 2011/09/09
+Signed-off-by: Nitin A Kamble <nitin.a.kamble at intel.com>
+diff -rup 1/CompileFlags.cmake 3/CompileFlags.cmake
+--- 1/CompileFlags.cmake	2011-09-09 06:02:22.404136990 -0700
++++ 3/CompileFlags.cmake	2011-09-09 06:02:27.869137440 -0700
+@@ -10,6 +10,7 @@
+ # See the License for more information.
+ #=============================================================================
+ 
++SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libstdc++")
+ #-----------------------------------------------------------------------------
+ # set some special flags for different compilers
+ #
-- 
1.7.6





More information about the Openembedded-core mailing list