I use a procedure to build a RPM for Code::Blocks. This procedure worked fine with wxWidgets up to 3.2.8. It doesn't work with wxWidgets 3.3.x.
I work on a "empty" AlmaLinux 9.6 computer so that /usr/local contains wxWidgets and C::B only.
I build wxWidgets, build and install its RPM.
Then I configure and build C::B without problem.
I install C::B with "sudo make install". It runs fine.
I remove wxWidgets and build the C::B RPM with the contents of /usr/local and the file /etc/ld.so.conf.d/wxContribItems.conf containing /usr/local/lib/codeblocks/wxContribItems/.
I remove C::B with "sudo make uninstall".
I install wxWidgets and C::B RPMs.
When C::B is run from the command line it fails with this message :
Loading toolbar...
addr2line: 'codeblocks': No such file
./src/aui/auibook.cpp(2881): assert "Assert failure" failed in FindTab(): Window unexpectedly not found in any tab control
It displays its splash window, a Debug report "codeblocks" dialog box, overlapped by an alert box with the message above.
If I reinstall C::B with "sudo make install" without removing the RPM it still fails with the same message.
If I remove it with "sudo make uninstall" and reinstall it with "sudo make install" without removing the RPM it works.
What's going wrong ?
I have seen this "Assert failure" failed in FindTab() lately several times as well. I built cb with wxWidgets 3.3 trunk via bootstrap, configure and make on Linux, mainly Arch and Ubuntu. It started around two weeks ago or so. I suspect a bug in cb or one or more plugins dealing with the logwindow tabs. I also observed a collapsed right most tab in the logwindow. I think it was like message length zero. It does not always occur. This might be a hint to an uninitialized variable faulty logic or a race condition. You can try to disable one plugin after another and see whether the assert still occurs. Start with clangd_client. You can start cb with flag --safe-mode do disable the plugins. I have not seen the assert for a few days.
Can you please check with ldd $(which codeblocks) | grep -i wx whether it calls the intended versions of wxWidgets-3.3 libraries.
There are numerous bugs or at least dubious spots in cb. Try scan-build (https://clang.llvm.org/docs/analyzer/user-docs/CommandLineUsage.html#scan-build (https://clang.llvm.org/docs/analyzer/user-docs/CommandLineUsage.html#scan-build)) or use cppcheck and you see what I mean.
When there is debugrpt it often mentions that an exception has been thrown and includes a stacktrace. So far so good. Unfortunately, I never saw any further message like what() included. What a bummer!
Your distro usually comes with a particular wxWidgets version. A package you want to install might depend on that. If you want to compile cb with another version of wxWidgets (e.g. trunk), you can install it in a different directory e.g. in /opt/wx. cb can be configured to use that during compilation instead of the system wide one. You do not have to delete it. Different wxWidgets versions can coexist.
This is a snippet from my cb Makefile for an out-of-tree build parallel to the trunk directory:
PREFIX=/usr/local
WX_PREFIX=/opt/wx
build=build
trunk=trunk
bootstrap:
(cd $(trunk) && ACLOCAL_FLAGS="-I `$(WX_PREFIX)/bin/wx-config --prefix`/share/aclocal" ./bootstrap )
config:
-mkdir -p $(build)
(cd $(build)) && \
LT_SYS_LIBRARY_PATH=$(WX_PREFIX)/lib \
CC=${CC} CXX=${CXX} ../$(trunk)/configure \
--enable-debug=yes \
--enable-pch=no \
--prefix=$(PREFIX) \
--with-wx-config=$(WX_PREFIX)/bin/wx-config --with-wx-prefix=$(WX_PREFIX) \
--with-contrib-plugins=all,-NassiShneiderman,-codesnippets,-dragscroll)
And this is a snippet from my wxWidgets Makefile:
WX_PREFIX=/opt/wx
config:
-mkdir -p $(build)
(cd $(build) && ../$(build)/configure --prefix=$(WX_PREFIX) --with-cxx=17 --with-gtk --without-libtiff \
--enable-debug)
install:
(cd $(build) && $(MAKE) install)
echo $(WX_PREFIX)/lib >/etc/ld.so.conf.d/wxwidgets.conf
make uninstall is quite unsafel. With cb it is usually working if you also nuke all cb specific directories. The better way is to build a package, in your case rpm and install/remove that. On Ubuntu I used checkinstall a lot.