On 2018-04-18 11:36, Alberto Garcia wrote:
> On Wed, Apr 18, 2018 at 08:36:29AM +0200, Karsten Merker wrote:
> > Source: webkit2gtk
> > Version: 2.20.1-1
> > X-Debbugs-CC: debian-ri...@lists.debian.org
> > User: debian-ri...@lists.debian.org
> > Usertags: riscv64
> > 
> > Hello,
> > 
> > webkit2gtk 2.20.1-1 FTBFS on the riscv64 architecture with "undefined
> > reference to `__atomic_compare_exchange_1'". Full log at:
> 
> Is there any way that I can have access to / set up a riscv64 build
> environment in order to debug this problem?
> 
> Or, do you have a working patch for this ?

The correct way to link with -pthread instead of -lpthread is to use
define THREADS_PREFER_PTHREAD_FLAG before importing the Thread package:

--- webkit2gtk-2.20.1.orig/Source/cmake/OptionsGTK.cmake
+++ webkit2gtk-2.20.1/Source/cmake/OptionsGTK.cmake
@@ -32,6 +32,7 @@ find_package(LibSoup 2.42.0 REQUIRED)
 find_package(LibXml2 2.8.0 REQUIRED)
 find_package(PNG REQUIRED)
 find_package(Sqlite REQUIRED)
+set(THREADS_PREFER_PTHREAD_FLAG ON)
 find_package(Threads REQUIRED)
 find_package(ZLIB REQUIRED)
 find_package(ATK REQUIRED)

The explanations can be found there:
https://cmake.org/Bug/view.php?id=14767

I haven't tried the patch for webkit2gtk, but it works for qtwebkit. In
addition I guess it's necessary to add support for riscv64 in various
places of WTF, by defining WTF_CPU_RISCV64. At least it's the case also
for qtwebkit.

This leads me to the question about where we should send all the patches
common to all the forks? Is it fine sending them to bugs.webkit.org?

Thanks,
Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurel...@aurel32.net                 http://www.aurel32.net

Attachment: signature.asc
Description: PGP signature

Reply via email to