Skip to contentSkip to conversation

one more build fix related to dso linking change

PATCH In review Nitin A Kamble 2 participants 3 messages Jan 19, 2011 – Jan 21, 2011

lore
Share & tools
lore
#0 lore raw

cover one more build fix related to dso linking change

Found out zipper was also failing to link due to the dso linking change in the gcc. It is fixed in this set.

Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: nitin/dso_linking_change
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=nitin/dso_linking_change

Thanks,
Nitin A Kamble <[email protected]>
---

Nitin A Kamble (1):
zypper: fix build issue with gcc dso linking change

 .../zypper/dso_linking_change_build_fix.patch      |   58 ++++++++++++++++++++
 meta/recipes-extended/zypper/zypper_git.bb         |    4 +-
 2 files changed, 60 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-extended/zypper/zypper/dso_linking_change_build_fix.patch
Signature · 1 line
1.7.3.4
#1 lore raw

PATCH 1/1 zypper: fix build issue with gcc dso linking change

All the libraries needs to be specified explicitely with the new gcc dso linking change patch. This was causing build errors for this recipe. Specifying the libpthread library explicitely for linking to work without errors.

---
 .../zypper/dso_linking_change_build_fix.patch      |   58 ++++++++++++++++++++
 meta/recipes-extended/zypper/zypper_git.bb         |    4 +-
 2 files changed, 60 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-extended/zypper/zypper/dso_linking_change_build_fix.patch
meta/recipes-extended/zypper/zypper/dso_linking_change_build_fix.patch new file +58 -0
new file mode 100644
index 0000000..0da196f
@@ -0,0 +1,58 @@
+after gcc linking has changed, all the libraries must be explicitely specified 
+This patch avoids these linking errors:
+
+| Linking CXX executable zypp-refresh
+| cd /build_disk/poky_build/build0/tmp/work/i586-poky-linux/zypper-1.4.7-git0+9eb0e248e06c8d20ad054be2439149d9ede37531-r2/git/src && /build_disk/poky_build/build0/tmp/sysroots/x86_64-linux/usr/bin/cmake -E cmake_link_script CMakeFiles/zypp-refresh.dir/link.txt --verbose=1
+| /build_disk/poky_build/build0/tmp/sysroots/x86_64-linux/usr/bin/i586-poky-linux/i586-poky-linux-g++   -march=i586  --sysroot=/build_disk/poky_build/build0/tmp/sysroots/i586-poky-linux  -fpermissive -g -O2 -Wall -Woverloaded-virtual -fstack-protector  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed CMakeFiles/zypp-refresh.dir/zypp-refresh.cc.o  -o zypp-refresh -rdynamic -lzypp
+| /build_disk/poky_build/build0/tmp/sysroots/x86_64-linux/usr/libexec/i586-poky-linux/gcc/i586-poky-linux/4.5.1/ld: �: invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition
+| /build_disk/poky_build/build0/tmp/sysroots/i586-poky-linux/lib/libpthread.so.0: could not read symbols: Bad value
+| collect2: ld returned 1 exit status
+| make[2]: *** [src/zypp-refresh] Error 1
+| make[2]: Leaving directory `/build_disk/poky_build/build0/tmp/work/i586-poky-linux/zypper-1.4.7-git0+9eb0e248e06c8d20ad054be2439149d9ede37531-r2/git'
+| make[1]: *** [src/CMakeFiles/zypp-refresh.dir/all] Error 2
+
+
+| Linking CXX executable zypper
+| cd /build_disk/poky_build/build0/tmp/work/i586-poky-linux/zypper-1.4.7-git0+9eb0e248e06c8d20ad054be2439149d9ede37531-r3/git/src && /build_disk/poky_build/build0/tmp/sysroots/x86_64-linux/usr/bin/cmake -E cmake_link_script CMakeFiles/zypper.dir/link.txt --verbose=1
+| /build_disk/poky_build/build0/tmp/sysroots/x86_64-linux/usr/bin/i586-poky-linux/i586-poky-linux-g++   -march=i586  --sysroot=/build_disk/poky_build/build0/tmp/sysroots/i586-poky-linux  -fpermissive -g -O2 -Wall -Woverloaded-virtual -fstack-protector  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed CMakeFiles/zypper.dir/main.cc.o  -o zypper -rdynamic libzypper_lib.a -lzypp -lreadline -laugeas -laugeas
+| /build_disk/poky_build/build0/tmp/sysroots/x86_64-linux/usr/libexec/i586-poky-linux/gcc/i586-poky-linux/4.5.1/ld: �: invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition
+| /build_disk/poky_build/build0/tmp/sysroots/i586-poky-linux/lib/libpthread.so.0: could not read symbols: Bad value
+| collect2: ld returned 1 exit status
+| make[2]: *** [src/zypper] Error 1
+
+
+| Linking CXX executable zypper
+| cd /build_disk/poky_build/build0/tmp/work/i586-poky-linux/zypper-1.4.7-git0+9eb0e248e06c8d20ad054be2439149d9ede37531-r3/git/src && /build_disk/poky_build/build0/tmp/sysroots/x86_64-linux/usr/bin/cmake -E cmake_link_script CMakeFiles/zypper.dir/link.txt --verbose=1
+| /build_disk/poky_build/build0/tmp/sysroots/x86_64-linux/usr/bin/i586-poky-linux/i586-poky-linux-g++   -march=i586  --sysroot=/build_disk/poky_build/build0/tmp/sysroots/i586-poky-linux  -fpermissive -g -O2 -Wall -Woverloaded-virtual -fstack-protector  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed CMakeFiles/zypper.dir/main.cc.o  -o zypper -rdynamic libzypper_lib.a -lzypp -lreadline -laugeas -laugeas -lpthread
+| /build_disk/poky_build/build0/tmp/sysroots/x86_64-linux/usr/libexec/i586-poky-linux/gcc/i586-poky-linux/4.5.1/ld: �: invalid DSO for symbol `clock_gettime@@GLIBC_2.2' definition
+| /build_disk/poky_build/build0/tmp/sysroots/i586-poky-linux/lib/librt.so.1: could not read symbols: Bad value
+| collect2: ld returned 1 exit status
+| make[2]: *** [src/zypper] Error 1
+
+
+Nitin A Kamble <[email protected]>
+Date: 2011/01/19
+
+
+Index: git/src/CMakeLists.txt
+===================================================================
+--- git.orig/src/CMakeLists.txt	2010-12-20 00:02:02.000000000 -0800
++++ git/src/CMakeLists.txt	2011-01-19 09:23:13.432758255 -0800
+@@ -93,7 +93,7 @@
+ TARGET_LINK_LIBRARIES( zypper_lib ${ZYPP_LIBRARY} ${READLINE_LIBRARY} -laugeas ${AUGEAS_LIBRARY} )
+ 
+ ADD_EXECUTABLE( zypper main.cc )
+-TARGET_LINK_LIBRARIES( zypper zypper_lib ${ZYPP_LIBRARY} ${READLINE_LIBRARY} -laugeas ${AUGEAS_LIBRARY} )
++TARGET_LINK_LIBRARIES( zypper zypper_lib ${ZYPP_LIBRARY} ${READLINE_LIBRARY} -laugeas ${AUGEAS_LIBRARY} pthread rt )
+ 
+ 
+ INSTALL(
+@@ -115,7 +115,7 @@
+ 
+ # zypp-refresh utility
+ ADD_EXECUTABLE( zypp-refresh zypp-refresh.cc )
+-TARGET_LINK_LIBRARIES( zypp-refresh ${ZYPP_LIBRARY} )
++TARGET_LINK_LIBRARIES( zypp-refresh ${ZYPP_LIBRARY} pthread )
+ INSTALL(
+   TARGETS zypp-refresh
+   RUNTIME DESTINATION ${INSTALL_PREFIX}/sbin
meta/recipes-extended/zypper/zypper_git.bb +2 -2
index c8895e5..b9e2e85 100644
@@ -6,13 +6,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3201406e350b39e05a82e28b5020f413"
 
 DEPENDS  = "libzypp augeas"
 RRECOMMENDS_${PN} = "procps"
-PR = "r2"
+PR = "r3"
 
 inherit cmake
 
 SRC_URI = "git://gitorious.org/opensuse/zypper.git;protocol=git \
            file://cmake.patch \
-          "
+           file://dso_linking_change_build_fix.patch "
 S = "${WORKDIR}/git"
 
 PV = "1.4.7-git${SRCPV}"
Signature · 1 line
1.7.3.4
#2 lore raw
In reply to Nitin A Kamble
Quoted 11 lines · Nitin A Kamble

Found out zipper was also failing to link due to the dso linking change in the gcc. It is fixed in this set.

Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: nitin/dso_linking_change
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=nitin/dso_linking_change

Thanks,
Nitin A Kamble<[email protected]>
---

Quoted 8 lines

Nitin A Kamble (1):
zypper: fix build issue with gcc dso linking change

  .../zypper/dso_linking_change_build_fix.patch      |   58 ++++++++++++++++++++
  meta/recipes-extended/zypper/zypper_git.bb         |    4 +-
  2 files changed, 60 insertions(+), 2 deletions(-)

create mode 100644 meta/recipes-extended/zypper/zypper/dso_linking_change_build_fix.patch

Pulled into Master

Thanks
Sau!