Bug 227840 - [GTK] 2.33.2: cmake fails on detecting libsoup
Summary: [GTK] 2.33.2: cmake fails on detecting libsoup
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Local Build
Hardware: PC Linux
: P3 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2021-07-09 07:50 PDT by Tomasz Kłoczko
Modified: 2021-07-10 18:10 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Kłoczko 2021-07-09 07:50:37 PDT
+ cd webkitgtk-2.33.2
+ CFLAGS='-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections'
+ CXXFLAGS='-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -fno-rtti -fno-exceptions'
+ FFLAGS='-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -I/usr/lib64/gfortran/modules'
+ FCFLAGS='-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -I/usr/lib64/gfortran/modules'
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,--gc-sections -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
+ CC=/usr/bin/gcc
+ CXX=/usr/bin/g++
+ FC=/usr/bin/gfortran
+ AR=/usr/bin/gcc-ar
+ NM=/usr/bin/gcc-nm
+ RANLIB=/usr/bin/gcc-ranlib
+ export CFLAGS CXXFLAGS FFLAGS FCFLAGS LDFLAGS CC CXX FC AR NM RANLIB
+ /usr/bin/cmake -B x86_64-redhat-linux-gnu -D BUILD_SHARED_LIBS=ON -D CMAKE_AR=/usr/bin/gcc-ar -D CMAKE_BUILD_TYPE=RelWithDebInfo -D CMAKE_C_FLAGS_RELEASE=-DNDEBUG -D CMAKE_CXX_FLAGS_RELEASE=-DNDEBUG -D CMAKE_Fortran_FLAGS_RELEASE=-DNDEBUG -D CMAKE_INSTALL_PREFIX=/usr -D CMAKE_NM=/usr/bin/gcc-nm -D CMAKE_RANLIB=/usr/bin/gcc-ranlib -D CMAKE_VERBOSE_MAKEFILE=ON -D DBUILD_SHARED_LIBS=ON -D INCLUDE_INSTALL_DIR=/usr/include -D LIB_INSTALL_DIR=/usr/lib64 -D LIB_SUFFIX=64 -D SHARE_INSTALL_PREFIX=/usr/share -D SYSCONF_INSTALL_DIR=/etc -S . -D ANALYZERS=OFF -D DEBUG_FISSION=OFF -D ENABLE_ACCELERATED_2D_CANVAS=OFF -D ENABLE_BUBBLEWRAP_SANDBOX=ON -D ENABLE_DRAG_SUPPORT=ON -D ENABLE_GTKDOC=ON -D ENABLE_INTROSPECTION=ON -D ENABLE_MEDIA_SOURCE=ON -D ENABLE_MINIBROWSER=ON -D ENABLE_QUARTZ_TARGET=OFF -D ENABLE_SHAREABLE_RESOURCE=ON -D ENABLE_SPELLCHECK=ON -D ENABLE_TOUCH_EVENTS=ON -D ENABLE_VIDEO=ON -D ENABLE_WAYLAND_TARGET=ON -D ENABLE_WEB_AUDIO=ON -D ENABLE_WEB_CRYPTO=ON -D ENABLE_WEBDRIVER=ON -D ENABLE_X11_TARGET=ON -D PORT=GTK -D SHOW_BINDINGS_GENERATION_PROGRESS=OFF -D USE_64KB_PAGE_BLOCK=ON -D USE_GTK4=OFF -D USE_LD_GOLD=OFF -D USE_LIBHYPHEN=ON -D USE_LIBNOTIFY=ON -D USE_LIBSECRET=ON -D USE_OPENJPEG=ON -D USER_AGENT_BRANDING=G2V -D USE_SYSTEMD=ON -D USE_THIN_ARCHIVES=ON -D USE_WOFF2=ON -D USE_WPE_RENDERER=ON -G Ninja
-- The C compiler identification is GNU 11.1.1
-- The CXX compiler identification is GNU 11.1.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The CMake build type is: RelWithDebInfo
-- Found Perl: /usr/bin/perl (found suitable version "5.34.0", minimum required is "5.10.0")
-- Found PerlModules: TRUE  found components: JSON::PP
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.11", minimum required is "2.7.0")
-- Found Ruby: /usr/bin/ruby (found suitable version "3.0.1", minimum required is "1.9")
-- Enabling ccache: Couldn't find ccache program. Not enabling it.
-- Performing Test C_COMPILER_SUPPORTS_-fno-strict-aliasing
-- Performing Test C_COMPILER_SUPPORTS_-fno-strict-aliasing - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-fno-strict-aliasing
-- Performing Test CXX_COMPILER_SUPPORTS_-fno-strict-aliasing - Success
-- Performing Test C_COMPILER_SUPPORTS_-fno-exceptions
-- Performing Test C_COMPILER_SUPPORTS_-fno-exceptions - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-fno-exceptions
-- Performing Test CXX_COMPILER_SUPPORTS_-fno-exceptions - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-fno-rtti
-- Performing Test CXX_COMPILER_SUPPORTS_-fno-rtti - Success
-- Performing Test C_COMPILER_SUPPORTS_-Wno-tautological-compare
-- Performing Test C_COMPILER_SUPPORTS_-Wno-tautological-compare - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-tautological-compare
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-tautological-compare - Success
-- Performing Test C_COMPILER_SUPPORTS_-Wcast-align
-- Performing Test C_COMPILER_SUPPORTS_-Wcast-align - Success
-- Performing Test C_COMPILER_SUPPORTS_-Wformat-security
-- Performing Test C_COMPILER_SUPPORTS_-Wformat-security - Success
-- Performing Test C_COMPILER_SUPPORTS_-Wmissing-format-attribute
-- Performing Test C_COMPILER_SUPPORTS_-Wmissing-format-attribute - Success
-- Performing Test C_COMPILER_SUPPORTS_-Wpointer-arith
-- Performing Test C_COMPILER_SUPPORTS_-Wpointer-arith - Success
-- Performing Test C_COMPILER_SUPPORTS_-Wundef
-- Performing Test C_COMPILER_SUPPORTS_-Wundef - Success
-- Performing Test C_COMPILER_SUPPORTS_-Wwrite-strings
-- Performing Test C_COMPILER_SUPPORTS_-Wwrite-strings - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wcast-align
-- Performing Test CXX_COMPILER_SUPPORTS_-Wcast-align - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wformat-security
-- Performing Test CXX_COMPILER_SUPPORTS_-Wformat-security - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wmissing-format-attribute
-- Performing Test CXX_COMPILER_SUPPORTS_-Wmissing-format-attribute - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wpointer-arith
-- Performing Test CXX_COMPILER_SUPPORTS_-Wpointer-arith - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wundef
-- Performing Test CXX_COMPILER_SUPPORTS_-Wundef - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wwrite-strings
-- Performing Test CXX_COMPILER_SUPPORTS_-Wwrite-strings - Success
-- Performing Test C_COMPILER_SUPPORTS_-Qunused-arguments
-- Performing Test C_COMPILER_SUPPORTS_-Qunused-arguments - Failed
-- Performing Test C_COMPILER_SUPPORTS_-Wno-maybe-uninitialized
-- Performing Test C_COMPILER_SUPPORTS_-Wno-maybe-uninitialized - Success
-- Performing Test C_COMPILER_SUPPORTS_-Wno-parentheses-equality
-- Performing Test C_COMPILER_SUPPORTS_-Wno-parentheses-equality - Failed
-- Performing Test C_COMPILER_SUPPORTS_-Wno-misleading-indentation
-- Performing Test C_COMPILER_SUPPORTS_-Wno-misleading-indentation - Success
-- Performing Test C_COMPILER_SUPPORTS_-Wno-psabi
-- Performing Test C_COMPILER_SUPPORTS_-Wno-psabi - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Qunused-arguments
-- Performing Test CXX_COMPILER_SUPPORTS_-Qunused-arguments - Failed
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-maybe-uninitialized
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-maybe-uninitialized - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-parentheses-equality
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-parentheses-equality - Failed
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-misleading-indentation
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-misleading-indentation - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-psabi
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-psabi - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-noexcept-type
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-noexcept-type - Success
-- Performing Test C_COMPILER_SUPPORTS_-Wno-expansion-to-defined
-- Performing Test C_COMPILER_SUPPORTS_-Wno-expansion-to-defined - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-expansion-to-defined
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-expansion-to-defined - Success
-- Performing Test C_COMPILER_SUPPORTS_-Wall
-- Performing Test C_COMPILER_SUPPORTS_-Wall - Success
-- Performing Test C_COMPILER_SUPPORTS_-Wextra
-- Performing Test C_COMPILER_SUPPORTS_-Wextra - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wall
-- Performing Test CXX_COMPILER_SUPPORTS_-Wall - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-Wextra
-- Performing Test CXX_COMPILER_SUPPORTS_-Wextra - Success
-- Performing Test C_COMPILER_SUPPORTS_-fcolor-diagnostics
-- Performing Test C_COMPILER_SUPPORTS_-fcolor-diagnostics - Failed
-- Performing Test C_COMPILER_SUPPORTS_-fdiagnostics-color=always
-- Performing Test C_COMPILER_SUPPORTS_-fdiagnostics-color=always - Success
-- Performing Test CXX_COMPILER_SUPPORTS_-fcolor-diagnostics
-- Performing Test CXX_COMPILER_SUPPORTS_-fcolor-diagnostics - Failed
-- Performing Test CXX_COMPILER_SUPPORTS_-fdiagnostics-color=always
-- Performing Test CXX_COMPILER_SUPPORTS_-fdiagnostics-color=always - Success
-- Performing Test ATOMICS_ARE_BUILTIN
-- Performing Test ATOMICS_ARE_BUILTIN - Success
-- Performing Test STD_FILESYSTEM_IS_AVAILABLE
-- Performing Test STD_FILESYSTEM_IS_AVAILABLE - Success
-- Looking for features.h
-- Looking for features.h - found
-- Looking for errno.h
-- Looking for errno.h - found
-- Looking for langinfo.h
-- Looking for langinfo.h - found
-- Looking for sys/mman.h
-- Looking for sys/mman.h - found
-- Looking for pthread_np.h
-- Looking for pthread_np.h - not found
-- Looking for sys/param.h
-- Looking for sys/param.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for sys/timeb.h
-- Looking for sys/timeb.h - found
-- Looking for linux/memfd.h
-- Looking for linux/memfd.h - found
-- Looking for _aligned_malloc
-- Looking for _aligned_malloc - not found
-- Looking for IsDebuggerPresent
-- Looking for IsDebuggerPresent - not found
-- Looking for localtime_r
-- Looking for localtime_r - found
-- Looking for malloc_trim
-- Looking for malloc_trim - found
-- Looking for strnstr
-- Looking for strnstr - not found
-- Looking for timegm
-- Looking for timegm - found
-- Looking for vasprintf
-- Looking for vasprintf - found
-- Looking for regexec
-- Looking for regexec - found
-- Looking for pthread_main_np
-- Looking for pthread_main_np - not found
-- Looking for timingsafe_bcmp
-- Looking for timingsafe_bcmp - not found
-- Looking for SIGTRAP
-- Looking for SIGTRAP - found
-- Performing Test HAVE_STAT_BIRTHTIME_value
-- Performing Test HAVE_STAT_BIRTHTIME_value - Failed
-- Performing Test HAVE_TM_GMTOFF_value
-- Performing Test HAVE_TM_GMTOFF_value - Success
-- Performing Test HAVE_TM_ZONE_value
-- Performing Test HAVE_TM_ZONE_value - Success
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of __int128_t
-- Check size of __int128_t - done
CMake Warning at Source/cmake/WebKitFeatures.cmake:90 (message):
  Building with USE_64KB_PAGE_BLOCK on an architecture other than aarch64 is
  unusual.  Are you sure you want USE_64KB_PAGE_BLOCK?
Call Stack (most recent call first):
  Source/cmake/OptionsGTK.cmake:4 (WEBKIT_OPTION_BEGIN)
  Source/cmake/WebKitCommon.cmake:216 (include)
  CMakeLists.txt:20 (include)


-- Found Cairo: /usr/lib64/libcairo.so (found suitable version "1.17.4", minimum required is "1.14.0")
-- Found Fontconfig: /usr/lib64/libfontconfig.so (found suitable version "2.13.94", minimum required is "2.8.0")
-- Found Freetype: /usr/lib64/libfreetype.so (found suitable version "2.10.4", minimum required is "2.4.2")
-- Found LibGcrypt: /usr/lib64/libgcrypt.so (found suitable version "1.9.3-unknown", minimum required is "1.6.0")
-- Found GLIB: /usr/include/glib-2.0;/usr/lib64/glib-2.0/include (found suitable version "2.68.3", minimum required is "2.44.0")
-- Found the following HarfBuzz libraries:
--  HarfBuzz (required): /usr/lib64/libharfbuzz.so
--  ICU (required): /usr/lib64/libharfbuzz-icu.so
-- Found HarfBuzz: /usr/include/harfbuzz (found suitable version "2.8.2", minimum required is "0.9.18")
-- Found the following ICU libraries:
--   data (required)
--   i18n (required)
--   uc (required)
-- Found ICU: /usr/include (found suitable version "69.1", minimum required is "60.2")
-- Found JPEG: /usr/lib64/libjpeg.so (found version "62")
-- Found LibXml2: /usr/lib64/libxml2.so (found suitable version "2.9.12", minimum required is "2.8.0")
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11")
-- Found PNG: /usr/lib64/libpng.so (found version "1.6.37")
-- Found SQLite3: /usr/lib64/libsqlite3.so (found version "3.36.0")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Checking for module 'atk'
--   Found atk, version 2.36.0
-- Found ATK: /usr/include/atk-1.0 (found suitable version "2.36.0", minimum required is "2.16.0")
-- Found the following WebP libraries:
--  WebP (required): /usr/lib64/libwebp.so
--  demux (required): /usr/lib64/libwebpdemux.so
-- Found WebP: /usr/include
-- Checking for module 'atspi-2'
--   Found atspi-2, version 2.40.2
-- Found ATSPI: /usr/include/at-spi-2.0;/usr/include/dbus-1.0;/usr/lib64/dbus-1.0/include;/usr/include/glib-2.0;/usr/lib64/glib-2.0/include (Required is at least version "2.5.3")
-- Checking for module 'egl'
--   Found egl, version 1.5
-- Found EGL: /usr/include
-- Checking for module 'gl'
--   Found gl, version 1.2
-- Found OpenGL: /usr/include
-- Looking for include file GL/glx.h
-- Looking for include file GL/glx.h - found
-- Checking for module 'glesv2'
--   Found glesv2, version 3.2
-- Found OpenGLES2: /usr/lib64/libGLESv2.so (found version "3.2")
-- Checking for module 'gtk+-3.0'
--   Found gtk+-3.0, version 3.24.30
-- Checking for module 'gtk+-unix-print-3.0'
--   Found gtk+-unix-print-3.0, version 3.24.30
-- Found GTK: 3.24.30 (Required is at least version "3.22.0")
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:556 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPkgConfig.cmake:778 (_pkg_check_modules_internal)
  Source/cmake/FindLibSoup.cmake:45 (pkg_check_modules)
  Source/cmake/WebKitFindPackage.cmake:105 (_find_package)
  Source/cmake/OptionsGTK.cmake:216 (find_package)
  Source/cmake/WebKitCommon.cmake:216 (include)
  CMakeLists.txt:20 (include)


-- Configuring incomplete, errors occurred!
See also "/home/tkloczko/rpmbuild/BUILD/webkitgtk-2.33.2/x86_64-redhat-linux-gnu/CMakeFiles/CMakeOutput.log".
See also "/home/tkloczko/rpmbuild/BUILD/webkitgtk-2.33.2/x86_64-redhat-linux-gnu/CMakeFiles/CMakeError.log".

I' using 3.20.5. I have installed libsoup 2.72.0 devel resources of 

[tkloczko@barrel webkitgtk-2.33.2]$ rpm -ql libsoup-devel | grep /lib64
/usr/lib64/libsoup-2.4.so
/usr/lib64/libsoup-gnome-2.4.so
/usr/lib64/pkgconfig/libsoup-2.4.pc
/usr/lib64/pkgconfig/libsoup-gnome-2.4.pc
Comment 1 Michael Catanzaro 2021-07-09 08:30:58 PDT
You either need libsoup3 (highly recommended, it enables HTTP/2) or else -DUSE_SOUP2=ON for the fallback behavior.
Comment 2 Michael Catanzaro 2021-07-09 08:33:31 PDT
(In reply to Tomasz Kłoczko from comment #0)
> CMake Warning at Source/cmake/WebKitFeatures.cmake:90 (message):
>   Building with USE_64KB_PAGE_BLOCK on an architecture other than aarch64 is
>   unusual.  Are you sure you want USE_64KB_PAGE_BLOCK?
> Call Stack (most recent call first):
>   Source/cmake/OptionsGTK.cmake:4 (WEBKIT_OPTION_BEGIN)
>   Source/cmake/WebKitCommon.cmake:216 (include)
>   CMakeLists.txt:20 (include)

This disables JIT, so it's going to result in terrible performance, and also bmalloc, including all our heap security features. You almost certainly don't want this....
Comment 3 Tomasz Kłoczko 2021-07-09 10:12:48 PDT
(In reply to Michael Catanzaro from comment #1)
> You either need libsoup3 (highly recommended, it enables HTTP/2) or else
> -DUSE_SOUP2=ON for the fallback behavior.

And that is the problem that webkitgtk cmake instead checking first libsoup-2.4 and if not found libsoup-3.0 (or in reverse order) is forring tiu use -DUSE_SOUP2=ON.

At the moment all projects which uses webkitgtk are still uisng gtk 3.x so linking with gtk 3.x and gtk 4.0 (use libsoup-3.0  seems requires gtk 4.x) does not make any sense and probably will cause symbol clkash.
Comment 4 Tomasz Kłoczko 2021-07-09 10:13:39 PDT
(In reply to Michael Catanzaro from comment #1)
> You either need libsoup3 (highly recommended, it enables HTTP/2) or else
> -DUSE_SOUP2=ON for the fallback behavior.

And that is the problem that webkitgtk cmake instead checking first libsoup-2.4 and if not found libsoup-3.0 (or in reverse order) is forring tiu use -DUSE_SOUP2=ON.

At the moment all projects which uses webkitgtk are still uisng gtk 3.x so linking with gtk 3.x and gtk 4.0 (use libsoup-3.0  seems requires gtk 4.x) does not make any sense and probably will cause symbol clkash.
Comment 5 Patrick Griffis 2021-07-10 09:48:30 PDT
Just to clarify, libsoup has nothing to do with GTK3 or GTK4.
Comment 6 Tomasz Kłoczko 2021-07-10 09:58:32 PDT
OK my mistake.
Comment 7 Michael Catanzaro 2021-07-10 18:10:24 PDT
(In reply to Tomasz Kłoczko from comment #4)
> And that is the problem that webkitgtk cmake instead checking first
> libsoup-2.4 and if not found libsoup-3.0 (or in reverse order) is forring
> tiu use -DUSE_SOUP2=ON.

We want the build to fail unless you manually pass -DUSE_SOUP2=ON, since that is a fallback option. It should not be possible to silently miss that libsoup3 is now expected, so automatically falling back to libsoup2 is not desired.

The error message could be better, though....