Bug 233337

Summary: WebKitGTK-2.34 will not build
Product: WebKit Reporter: kwanza.pili
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: kkinnunen
Priority: P2    
Version: WebKit Local Build   
Hardware: PC   
OS: Unspecified   

Description kwanza.pili 2021-11-18 15:21:12 PST
I have tried to build both WebKitGTK-2.34.1 and WebKitGTK-2.34.0 from source on a Linux system without success. For clarity, earlier versions of  WebKitGTK will build successfully on the same system, for example version 2.32.4. So the issue is confined to the 2.34.x versions. The error is consistent:

ld.gold: error: Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-cd2e8cfa-2.cpp.o: requires dynamic R_X86_64_PC32 reloc against 'executeJSCJITProbe' which may overflow at runtime; recompile with -fPIC

Yet the actual compilation instruction contains the very command it wants:

FAILED: lib/libjavascriptcoregtk-4.0.so.18.19.6 
: && /usr/bin/c++ -fPIC -fdiagnostics-color=always -Wextra -Wall -Wno-expansion-to-defined -Wno-nonnull -Wno-array-bounds -Wno-noexcept-type -Wno-psabi -Wno-misleading-indentation -Wno-maybe-uninitialized -Wwrite-strings -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -Wno-tautological-compare  -fno-strict-aliasing -fno-exceptions -fno-rtti -O3 -DNDEBUG  -Wl,--no-undefined  -fuse-ld=gold -Wl,--disable-new-dtags -shared -Wl,-soname,libjavascriptcoregtk-4.0.so.18 -o lib/libjavascriptcoregtk-4.0.so.18.19.6 ...

The problem appears to arise from its insistence on building a static library for libWTFGTK.a as seen in the end of the build statement below:

/usr/lib64/libglib-2.0.so  /usr/lib64/libglib-2.0.so  lib/libWTFGTK.a  /usr/lib64/libicudata.so  /usr/lib64/libicui18n.so  /usr/lib64/libicuuc.so  -ldl  /usr/lib64/libgio-2.0.so  /usr/lib64/libgobject-2.0.so  /usr/lib64/libglib-2.0.so  -lpthread  /usr/lib64/libz.so  /usr/lib64/libsystemd.so

Why would it try to build a static library when everything else is shared?? I should emphasise that the compile/linker is she same one used to successfully build WebKitGTK-2.32.4. Therefore the problem is peculiar to WebKitGTK-2.34.x.
Comment 1 kwanza.pili 2021-11-26 05:06:23 PST
Scratch this. I discovered that the problem was due to my system having "icu-69.1". So the issue really is that:
"WebKitGTK-2.34 will not build with icu < 70.0."