webview: GTK 2/3 symbols detected. Using GTK 2/3 and GTK 4 in the same process is not supported

This is a soft error but I’d like to have it documented.

When re-configuring with CMake, the application crashes with the error given below.

The solution is to configure once and remove all build files when doing a reconfigure.

What OS are you using?

Linux <snip> 6.10.10-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 12 Sep 2024 17:21:02 +0000 x86_64 GNU/Linux

What programming language are you using (C/C++/Go/Rust)?

gcc --version

gcc (GCC) 14.2.1 20240910
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

clang --version

clang version 18.1.8
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bi

go version:

no Go installed

rustc --version

rustc 1.83.0-nightly (c52c23b6f 2024-09-16)

What did you expect to see and what you saw instead?

One message in the terminal after starting the example:

(process:10172): Gtk-ERROR **: 17:05:26.254: GTK 2/3 symbols detected. Using GTK 2/3 and GTK 4 in the same process is not supported

I expect the application to start.

Interestingly, this only happens with a rebuild. If I fully remove the build directory and try again it does work.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 19 (10 by maintainers)

Commits related to this issue

Most upvoted comments

@SteffenL I’ve made the pull request. If you have the time please take a look at it 😃

The file to investigate is cmake/webview.cmake.