Skip to contentSkip to conversation

webkitgtk: Link libatomic on RISCV

PATCH In review Khem Raj 2 participants 4 messages Mar 9, 2021

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 webkitgtk: Link libatomic on RISCV

This fixes linking failures
Source/WTF/wtf/text/StringImpl.h:1115: undefined reference to `__atomic_compare_exchange_1'

---
 .../webkitgtk/webdriver-libatomic.patch       | 23 +++++++++++++++++++
 meta/recipes-sato/webkit/webkitgtk_2.30.5.bb  |  3 +++
 2 files changed, 26 insertions(+)
 create mode 100644 meta/recipes-sato/webkit/webkitgtk/webdriver-libatomic.patch
meta/recipes-sato/webkit/webkitgtk/webdriver-libatomic.patch new file +23 -0
new file mode 100644
index 0000000000..bd9ac9d1f5
@@ -0,0 +1,23 @@
+link with libatomic
+
+This fixes build with C11
+
+lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/Assertions.cpp.o:/usr/include/c++/11.0.1/bits/atomic_base.h:520: more undefined references to `__atomic_compare_exchange_1' follow
+| collect2: error: ld returned 1 exit status
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+
+--- a/Source/WTF/wtf/CMakeLists.txt
++++ b/Source/WTF/wtf/CMakeLists.txt
+@@ -529,6 +529,10 @@ list(APPEND WTF_LIBRARIES
+     ICU::uc
+ )
+ 
++list(APPEND WTF_LIBRARIES
++     -Wl,--as-needed -Wl,-latomic -Wl,--no-as-needed
++)
++
+ set(WTF_INTERFACE_LIBRARIES WTF)
+ set(WTF_INTERFACE_INCLUDE_DIRECTORIES ${WTF_FRAMEWORK_HEADERS_DIR})
+ set(WTF_INTERFACE_DEPENDENCIES WTF_CopyHeaders)
meta/recipes-sato/webkit/webkitgtk_2.30.5.bb +3 -0
index a1dd76ce81..3daf31f7d3 100644
@@ -20,6 +20,9 @@ SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
            file://include_xutil.patch \
            file://reduce-memory-overheads.patch \
            "
+SRC_URI_append_riscv64 = " file://webdriver-libatomic.patch"
+SRC_URI_append_riscv32 = " file://webdriver-libatomic.patch"
+
 SRC_URI[sha256sum] = "7d0dab08e3c5ae07bec80b2822ef42e952765d5724cac86eb23999bfed5a7f1f"
 
 inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gtk-doc
Signature · 1 line
2.30.1
#1 lore raw

Please send the patches upstream first, I wouldn’t normally ask for it explicitly, but there’s a history of webkit patches that are forever pending and cause pain on version updates.

Alex

Quoted 68 lines · Khem Raj

This fixes linking failures Source/WTF/wtf/text/StringImpl.h:1115: undefined reference to `__atomic_compare_exchange_1'

---
 .../webkitgtk/webdriver-libatomic.patch       | 23 +++++++++++++++++++
 meta/recipes-sato/webkit/webkitgtk_2.30.5.bb  |  3 +++
 2 files changed, 26 insertions(+)
 create mode 100644

meta/recipes-sato/webkit/webkitgtk/webdriver-libatomic.patch

meta/recipes-sato/webkit/webkitgtk/webdriver-libatomic.patch new file +5 -0
new file mode 100644
index 0000000000..bd9ac9d1f5
@@ -0,0 +1,23 @@
+link with libatomic
+
+This fixes build with C11
+
+lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/Assertions.cpp.o:/usr/include/c++/11.0.1/bits/atomic_base.h:520:

more undefined references to `__atomic_compare_exchange_1' follow +| collect2: error: ld returned 1 exit status

meta/recipes-sato/webkit/webkitgtk/webdriver-libatomic.patch new file +17 -0
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+
+--- a/Source/WTF/wtf/CMakeLists.txt
++++ b/Source/WTF/wtf/CMakeLists.txt
+@@ -529,6 +529,10 @@ list(APPEND WTF_LIBRARIES
+     ICU::uc
+ )
+
++list(APPEND WTF_LIBRARIES
++     -Wl,--as-needed -Wl,-latomic -Wl,--no-as-needed
++)
++
+ set(WTF_INTERFACE_LIBRARIES WTF)
+ set(WTF_INTERFACE_INCLUDE_DIRECTORIES ${WTF_FRAMEWORK_HEADERS_DIR})
+ set(WTF_INTERFACE_DEPENDENCIES WTF_CopyHeaders)
meta/recipes-sato/webkit/webkitgtk_2.30.5.bb +3 -0
index a1dd76ce81..3daf31f7d3 100644
@@ -20,6 +20,9 @@ SRC_URI = "
 https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
            file://include_xutil.patch \
            file://reduce-memory-overheads.patch \
            "
+SRC_URI_append_riscv64 = " file://webdriver-libatomic.patch"
+SRC_URI_append_riscv32 = " file://webdriver-libatomic.patch"
+
 SRC_URI[sha256sum] =

"7d0dab08e3c5ae07bec80b2822ef42e952765d5724cac86eb23999bfed5a7f1f"

inherit cmake pkgconfig gobject-introspection perlnative features_check
upstream-version-is-even gtk-doc
--
2.30.1

author
#2 lore raw

upstream is informed about this via
https://bugs.webkit.org/show_bug.cgi?id=222959

Quoted 66 lines · Alexander Kanavin

Please send the patches upstream first, I wouldn’t normally ask for it explicitly, but there’s a history of webkit patches that are forever pending and cause pain on version updates.

Alex

Quoted 60 lines · Khem Raj

This fixes linking failures
Source/WTF/wtf/text/StringImpl.h:1115: undefined reference to `__atomic_compare_exchange_1'

---
 .../webkitgtk/webdriver-libatomic.patch       | 23 +++++++++++++++++++
 meta/recipes-sato/webkit/webkitgtk_2.30.5.bb  |  3 +++
 2 files changed, 26 insertions(+)
 create mode 100644 meta/recipes-sato/webkit/webkitgtk/webdriver-libatomic.patch
meta/recipes-sato/webkit/webkitgtk/webdriver-libatomic.patch new file +23 -0
new file mode 100644
index 0000000000..bd9ac9d1f5
@@ -0,0 +1,23 @@
+link with libatomic
+
+This fixes build with C11
+
+lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/Assertions.cpp.o:/usr/include/c++/11.0.1/bits/atomic_base.h:520: more undefined references to `__atomic_compare_exchange_1' follow
+| collect2: error: ld returned 1 exit status
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+
+--- a/Source/WTF/wtf/CMakeLists.txt
++++ b/Source/WTF/wtf/CMakeLists.txt
+@@ -529,6 +529,10 @@ list(APPEND WTF_LIBRARIES
+     ICU::uc
+ )
+
++list(APPEND WTF_LIBRARIES
++     -Wl,--as-needed -Wl,-latomic -Wl,--no-as-needed
++)
++
+ set(WTF_INTERFACE_LIBRARIES WTF)
+ set(WTF_INTERFACE_INCLUDE_DIRECTORIES ${WTF_FRAMEWORK_HEADERS_DIR})
+ set(WTF_INTERFACE_DEPENDENCIES WTF_CopyHeaders)
meta/recipes-sato/webkit/webkitgtk_2.30.5.bb +3 -1
index a1dd76ce81..3daf31f7d3 100644
@@ -20,6 +20,9 @@ SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
            file://include_xutil.patch \
            file://reduce-memory-overheads.patch \
            "
+SRC_URI_append_riscv64 = " file://webdriver-libatomic.patch"
+SRC_URI_append_riscv32 = " file://webdriver-libatomic.patch"
+
 SRC_URI[sha256sum] = "7d0dab08e3c5ae07bec80b2822ef42e952765d5724cac86eb23999bfed5a7f1f"
 
 inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gtk-doc
--

2.30.1

#3 lore raw

Thanks!

Alex

Quoted 84 lines · Khem Raj

upstream is informed about this via
https://bugs.webkit.org/show_bug.cgi?id=222959

Quoted 2 lines · Alexander Kanavin

Please send the patches upstream first, I wouldn’t normally ask for it

explicitly, but there’s a history of webkit patches that are forever pending and cause pain on version updates.

Quoted 7 lines

Alex

Quoted 3 lines · Khem Raj

This fixes linking failures Source/WTF/wtf/text/StringImpl.h:1115: undefined reference to

`__atomic_compare_exchange_1'

Quoted 7 lines
Quoted 7 lines
---
 .../webkitgtk/webdriver-libatomic.patch       | 23 +++++++++++++++++++
 meta/recipes-sato/webkit/webkitgtk_2.30.5.bb  |  3 +++
 2 files changed, 26 insertions(+)
 create mode 100644

meta/recipes-sato/webkit/webkitgtk/webdriver-libatomic.patch

Quoted 2 lines
Quoted 2 lines

diff --git

a/meta/recipes-sato/webkit/webkitgtk/webdriver-libatomic.patch b/meta/recipes-sato/webkit/webkitgtk/webdriver-libatomic.patch

Quoted 10 lines

meta/recipes-sato/webkit/webkitgtk/webdriver-libatomic.patch line 4

Quoted 10 lines

new file mode 100644
index 0000000000..bd9ac9d1f5

meta/recipes-sato/webkit/webkitgtk/webdriver-libatomic.patch new file +4 -0
@@ -0,0 +1,23 @@
+link with libatomic
+
+This fixes build with C11
+

+lib/../Source/WTF/wtf/CMakeFiles/WTF.dir/Assertions.cpp.o:/usr/include/c++/11.0.1/bits/atomic_base.h:520:
more undefined references to `__atomic_compare_exchange_1' follow

Quoted 11 lines
Quoted 11 lines
meta/recipes-sato/webkit/webkitgtk/webdriver-libatomic.patch new file +11 -0
+| collect2: error: ld returned 1 exit status
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+
+--- a/Source/WTF/wtf/CMakeLists.txt
++++ b/Source/WTF/wtf/CMakeLists.txt
+@@ -529,6 +529,10 @@ list(APPEND WTF_LIBRARIES
+     ICU::uc
+ )
+
Quoted 8 lines

Review

Quoted 8 lines
meta/recipes-sato/webkit/webkitgtk/webdriver-libatomic.patch new file +7 -0
++list(APPEND WTF_LIBRARIES
++     -Wl,--as-needed -Wl,-latomic -Wl,--no-as-needed
++)
++
+ set(WTF_INTERFACE_LIBRARIES WTF)
+ set(WTF_INTERFACE_INCLUDE_DIRECTORIES ${WTF_FRAMEWORK_HEADERS_DIR})
+ set(WTF_INTERFACE_DEPENDENCIES WTF_CopyHeaders)
(quoted diff) +0 -0

b/meta/recipes-sato/webkit/webkitgtk_2.30.5.bb

Quoted 4 lines

meta/recipes-sato/webkit/webkitgtk_2.30.5.bb SRC_URI = "

Quoted 4 lines

index a1dd76ce81..3daf31f7d3 100644

meta/recipes-sato/webkit/webkitgtk_2.30.5.bb +0 -0
@@ -20,6 +20,9 @@ SRC_URI = "

https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \

Quoted 7 lines

meta/recipes-sato/webkit/webkitgtk_2.30.5.bb SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \

Quoted 7 lines
meta/recipes-sato/webkit/webkitgtk_2.30.5.bb +3 -0
            file://include_xutil.patch \
            file://reduce-memory-overheads.patch \
            "
+SRC_URI_append_riscv64 = " file://webdriver-libatomic.patch"
+SRC_URI_append_riscv32 = " file://webdriver-libatomic.patch"
+
 SRC_URI[sha256sum] =

"7d0dab08e3c5ae07bec80b2822ef42e952765d5724cac86eb23999bfed5a7f1f"

Quoted 2 lines

meta/recipes-sato/webkit/webkitgtk_2.30.5.bb SRC_URI = " · line 27

Quoted 2 lines
meta/recipes-sato/webkit/webkitgtk_2.30.5.bb +0 -0
 inherit cmake pkgconfig gobject-introspection perlnative

features_check upstream-version-is-even gtk-doc

Quoted 6 lines
Quoted 6 lines
meta/recipes-sato/webkit/webkitgtk_2.30.5.bb +0 -1
--

2.30.1