Author Topic: wxSmith has a blackout!  (Read 7597 times)

Offline Danois

  • Multiple posting newcomer
  • *
  • Posts: 13
wxSmith has a blackout!
« on: September 19, 2026, 08:15:45 pm »
I am using C::B 25.03 from Kubuntu 26.04 (Wayland) repos. The first issue I had was the startup hanging which I temporarily fixed by renaming the wxSmith related zip's in "/usr/share/codeblocks". Since I have built Gdk-Pixbuf to version 2.42.12 and stored the libraries in "~/.local/lib" and used LD_LIBRARY_PATH to enable C::B to find those libraries. Now C::B starts as expected and there are no problems / errors when loading a wxSmith resources in the IDE, so I assume that wxSmith is (technically) working as it should. The issue is that whenever I load a resource, the wxFrame is displayed correctly for a brief moment whereafter the entire wxSmith area in the IDE goes black and stays like that.

Does anyone know a fix for this issue?

I have been looking at this build guide for building the entire C::B IDE from sources, but that looks.. Eherm.. Less palatable...... ;-)

Offline christo

  • Developer
  • Multiple posting newcomer
  • *****
  • Posts: 95
Re: wxSmith has a blackout!
« Reply #1 on: September 20, 2026, 05:05:49 am »
Hi Danois, could you please check if AppImage detailed in https://forums.codeblocks.org/index.php/topic,26313.msg178904.html#msg178904 works?

Offline Danois

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: wxSmith has a blackout!
« Reply #2 on: September 21, 2026, 07:27:09 pm »
Hi Danois, could you please check if AppImage detailed in https://forums.codeblocks.org/index.php/topic,26313.msg178904.html#msg178904 works?

I have tested the AppImage, and the issues I have mentioned in this topic are not present with the AppImage version. I have also been looking at the "real" build guide and I'm goint to try to build C::B from sources and see how it goes. If the build succeeds, I'm using that and if not I'll use the AppImage.

Thanks so far! :-)

Offline christo

  • Developer
  • Multiple posting newcomer
  • *****
  • Posts: 95
Re: wxSmith has a blackout!
« Reply #3 on: September 22, 2026, 03:58:44 am »
Please see the steps I use to build on my ubuntu 24.04, hope this is helpful for you

Code
#wxWidgets install
sudo apt install libwxgtk3.2-dev

#Alternatively wxWidgets build from source
git clone https://github.com/wxWidgets/wxWidgets.git
cd wxWidgets
git checkout v3.3.3
git submodule update --init
mkdir build-v3.3.3/
cd build-v3.3.3/
CC=/usr/local/bin/gcc-15.2.0 CPP=/usr/local/bin/cpp-15.2.0 CXX=/usr/local/bin/g++-15.2.0 ../configure --enable-xrc --enable-monolithic --enable-debug --enable-stc --enable-webview
make -j$(( $(nproc) - 1 ))
sudo make install

#install deps
sudo apt install libtool cmake

#Build C::B
cd ~/codeblocks-code
ACLOCAL_FLAGS="-I /usr/local/share/aclocal" ./bootstrap #ACLOCAL_FLAGS required only when installed wxwidgets from source
./configure --with-contrib-plugins=all --prefix=/opt/codeblocks/
make -j$(( $(nproc) - 1 )) install -k

Offline Danois

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: wxSmith has a blackout!
« Reply #4 on: September 24, 2026, 07:26:49 pm »
Thank you for your suggestion. I spun up a VM with a clean instance of Kubuntu 26.04 (I assume the following works for any *buntu), and this is what worked:

Code
#!/bin/bash
set -e

# Required packages
sudo apt update
sudo apt install -y build-essential libtool pkg-config libglib2.0-dev libgtk-3-dev libwxgtk3.2-dev subversion

# Get the source
cd "$(xdg-user-dir DOCUMENTS)"
svn checkout svn://svn.code.sf.net/p/codeblocks/code/trunk codeblocks-code
cd codeblocks-code

# Build & install
./bootstrap
./configure --with-contrib-plugins=all,-NassiShneiderman --prefix=/opt/codeblocks
make -j $(nproc)
sudo make install

# Desktop integration
mkdir -p ~/.local/share/applications
cat /opt/codeblocks/share/applications/codeblocks.desktop | \
  sed 's/^Exec=.*/Exec=\/opt\/codeblocks\/bin\/codeblocks \%F/' | \
  sed 's/^Icon=.*/Icon=application-x-codeblocks/' > ~/.local/share/applications/codeblocks.desktop

mkdir -p ~/.local/share/icons/hicolor/48x48/mimetypes
ln -s /opt/codeblocks/share/icons/hicolor/48x48/mimetypes/* ~/.local/share/icons/hicolor/48x48/mimetypes/

mkdir -p ~/.local/share/mime/packages
ln -s /opt/codeblocks/share/mime/packages/* ~/.local/share/mime/packages/

There are a couple of things, though.. Whilst running "configure .." i got an error that seemed to be related to a missing library (zlib), but after a lot of investigation I found out that the macro "PKG_CHECK_MODULES( .. )" was unavailable because the package "pkg-config" was not installed. I would suggest to either check for the presence of this package during bootstrap:

Code
# Test if pkg-config/pkgconf exists or else PKG_CHECK_MODULES(..) is not generated
if test -z "`which pkg-config`" && test -z "`which pkgconf`"; then
  echo "pkg-config or pkgconf is required. Aborting build..."
  exit 1
fi

The portability of this approach is unknown, though.. You could also use AC_CHECK_LIB in configure.ac instead:

Code
AC_CHECK_LIB([z], [compress2], [], [AC_MSG_ERROR([ZLib (libz) was not found!])])

Which is portable.

During the first launch of C::B, i created a new wxWidgets project and landed on wxSmith which took up all the space of the main window and from there I had to go to the View menu and show the "Manager" before I could find the headers / sources. If you are not familiar with C::B, that is not very intuitive and I would suggest that the Manager showing the "Projects" tab is always displayed when C::B is launched for the first time.

EDIT: I posted the wrong "bootstrap" snippet, "pkg-config --version" should have been "which pkg-config" which is corrected now.
« Last Edit: Yesterday at 11:40:38 am by Danois »

Offline christo

  • Developer
  • Multiple posting newcomer
  • *****
  • Posts: 95
Re: wxSmith has a blackout!
« Reply #5 on: Yesterday at 06:47:34 pm »
Change to fail configure with a clear error when pkg-config is unavailable is added to svn r14039

Offline Danois

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: wxSmith has a blackout!
« Reply #6 on: Yesterday at 07:37:27 pm »
Change to fail configure with a clear error when pkg-config is unavailable is added to svn r14039

Sounds great! Just mind that the macro may be provided from other packages, like "pkgconf" on Arch based systems. As far as I recall, the package must be available during bootstrap so user must re-run bootstrap or "autoreconf -if" if the package is installed after the initial bootstrap.

EDIT: I just looked at "configure" and it seems like the test is already present:

Code
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes

EDIT2: The package "pkg-config" is a placeholder which pulls in package "pkgconf" instead, both packages provide "/usr/bin/pkg-config", so no need to check for multiple packages.
« Last Edit: Yesterday at 08:28:32 pm by Danois »

Offline Danois

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: wxSmith has a blackout!
« Reply #7 on: Today at 12:04:28 pm »
Just to make sure that this was not a fluke, I tested it again by running the command "sudo apt remove -y pgkconf pkg-config" which also removed the following dependent packages, some of which are required to build C::B:

Code
REMOVING:
  libatk-bridge2.0-dev  libdbus-1-dev          libglycin-2-dev  libxft-dev
  libatk1.0-dev         libfontconfig-dev      libgtk-3-dev     pkgconf
  libatspi2.0-dev       libgdk-pixbuf-2.0-dev  libharfbuzz-dev
  libcairo2-dev         libgio-2.0-dev         libpango1.0-dev
  libdatrie-dev         libglib2.0-dev         libthai-dev

Then I ran "./bootstrap" which produced the following output:

Code
Using 'svn --xml info' to get the revision
Found revision: '14038' '2026-09-21 09:14:07'
removed [* 190 files *]
Note: If you want to build debian packages you have to first run the debian/setup_control.sh script. See the script for details how to use it.
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:27: installing './compile'
configure.ac:23: installing './missing'
src/base/tinyxml/Makefile.am: installing './depcomp'
configure.ac:21: warning: The macro 'AC_HELP_STRING' is obsolete.
configure.ac:21: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
./lib/autoconf/general.m4:1534: AC_ARG_ENABLE is expanded from...
m4/acinclude.m4:87: CODEBLOCKS_CHECK_DEBUG is expanded from...
configure.ac:21: the top level
configure.ac:32: warning: The macro 'AC_CONFIG_HEADER' is obsolete.
configure.ac:32: You should run autoupdate.
./lib/autoconf/status.m4:719: AC_CONFIG_HEADER is expanded from...
configure.ac:32: the top level
configure.ac:57: warning: The macro 'AC_HEADER_STDC' is obsolete.
configure.ac:57: You should run autoupdate.
./lib/autoconf/headers.m4:663: AC_HEADER_STDC is expanded from...
configure.ac:57: the top level
configure.ac:65: warning: The macro 'AC_HEADER_TIME' is obsolete.
configure.ac:65: You should run autoupdate.
./lib/autoconf/headers.m4:702: AC_HEADER_TIME is expanded from...
configure.ac:65: the top level
configure.ac:82: warning: The macro 'AC_HELP_STRING' is obsolete.
configure.ac:82: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
./lib/autoconf/general.m4:1534: AC_ARG_ENABLE is expanded from...
configure.ac:82: the top level
configure.ac:173: warning: The macro 'AC_HELP_STRING' is obsolete.
configure.ac:173: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
m4/acinclude.m4:4: CODEBLOCKS_GET_PLATFORM is expanded from...
configure.ac:173: the top level
configure.ac:174: warning: The macro 'AC_HELP_STRING' is obsolete.
configure.ac:174: You should run autoupdate.
./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
./lib/autoconf/general.m4:1534: AC_ARG_ENABLE is expanded from...
m4/acinclude.m4:136: CODEBLOCKS_ENABLE_SETTINGS is expanded from...
configure.ac:174: the top level
configure.ac:174: warning: The macro 'AC_TRY_COMPILE' is obsolete.
configure.ac:174: You should run autoupdate.
./lib/autoconf/general.m4:2845: AC_TRY_COMPILE is expanded from...
m4/acinclude.m4:136: CODEBLOCKS_ENABLE_SETTINGS is expanded from...
configure.ac:174: the top level

Finally I ran the command "./configure --with-contrib-plugins=all,-NassiShneiderman --prefix=/opt/codeblocks" which gave the following output:

Code
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking whether configure should try to set CFLAGS/CXXFLAGS/CPPFLAGS/LDFLAGS... yes
checking whether to enable debugging... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether sleep supports fractional seconds... yes
checking filesystem timestamp resolution... 0.01
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking xargs -n works... yes
checking how to create a ustar tar archive... gnutar
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for x86_64-pc-linux-gnu-gcc... no
checking for gcc... gcc
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for x86_64-pc-linux-gnu-g++... no
checking for x86_64-pc-linux-gnu-c++... no
checking for x86_64-pc-linux-gnu-gpp... no
checking for x86_64-pc-linux-gnu-aCC... no
checking for x86_64-pc-linux-gnu-CC... no
checking for x86_64-pc-linux-gnu-cxx... no
checking for x86_64-pc-linux-gnu-cc++... no
checking for x86_64-pc-linux-gnu-cl.exe... no
checking for x86_64-pc-linux-gnu-FCC... no
checking for x86_64-pc-linux-gnu-KCC... no
checking for x86_64-pc-linux-gnu-RCC... no
checking for x86_64-pc-linux-gnu-xlC_r... no
checking for x86_64-pc-linux-gnu-xlC... no
checking for x86_64-pc-linux-gnu-clang++... no
checking for g++... g++
checking whether the compiler supports GNU C++... (cached) yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... (cached) none needed
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/x86_64-linux-gnu-ld
checking if the linker (/usr/bin/x86_64-linux-gnu-ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/x86_64-linux-gnu-ld option to reload object files... -r
checking for file... file
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ranlib... ranlib
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for sys/time.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/x86_64-linux-gnu-ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/x86_64-linux-gnu-ld -m elf_x86_64
checking if the linker (/usr/bin/x86_64-linux-gnu-ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/x86_64-linux-gnu-ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/x86_64-linux-gnu-ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether the compiler supports GNU C++... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking for g++ option to enable C++11 features... (cached) none needed
checking dependency style of g++... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking for gcc... (cached) gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to enable C11 features... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gawk... (cached) mawk
checking whether g++ supports C++17 features with -std=c++17... yes
checking whether the linker accepts -Wl,--no-undefined... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for egrep... (cached) /usr/bin/grep -E
checking for fcntl.h... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for sys/param.h... yes
checking for unistd.h... (cached) yes
checking for malloc.h... yes
checking for sys/malloc.h... no
checking for malloc/malloc.h... no
checking for _Bool... yes
checking for stdbool.h that conforms to C99 or later... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... yes
checking for working volatile... yes
checking whether closedir returns void... no
checking for GNU libc compatible malloc... yes
checking for working memcmp... yes
checking whether lstat correctly handles trailing slash... yes
checking whether stat accepts an empty string... no
checking for vprintf... yes
checking for atexit... yes
checking for getcwd... yes
checking for isascii... yes
checking for memchr... yes
checking for memmove... yes
checking for memset... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strcspn... yes
checking for strdup... yes
checking for strrchr... yes
checking for strstr... yes
checking for dlopen in -ldl... yes
checking for pthread_create in -lpthread... yes
checking for snprintf... yes
checking for vsnprintf... yes
checking whether to disable system libraries and use bundled libraries... no
./configure: line 25601: syntax error near unexpected token `zlib,'
./configure: line 25601: `      PKG_CHECK_MODULES(zlib, zlib, HAVE_ZLIB=yes, HAVE_ZLIB=no)'

Because the existence of "pkg-config" is actually tested during a successful "./configure ..", as shown earlier, I assume that the macro "PKG_CHECK_MODULES( .. )" is used before the existence "pkg-config" is checked.

If I at this state run the command "sudo apt install pkg-config", and then re-run "./configure .." the error is still present and I have to run "./bootstrap" (or "autoreconf -if") to fix the issue.

I think that the check for "pkg-config" should be done earlier during "./configure .. ", and if not found user must be instructed to re-run "./bootstrap" after installing it.

I hope this helps and clarifies things! :-)