I am trying to compoile the current trunk under Linux using CB.
In the updated SVN sources I found two workspaces for UNIX, both having 3.0 in the name and rigged for 3.0. I did not see any 3.2 versions.
CodeBlocks_wx30-unix.workspace
ContribPlugins_wx30-unix.workspace
I opened the first one
CodeBlocks_wx30-unix.workspace and tried to compile the "All" target. The wxWidgets version was a repository installed "3.0-dev", so it should fit with the project settings with "3.0".
I got only into the first prokect "Code::Blocks wx3.0.x - Unix" and got strange compile errors I had not seen anywhere before (see below).
It compiled the TinyXML files and before linking them I get this "/bin/sh syntax error". I did not find out where a batch file comes into this compile process.
g++ -Wall -std=c++11 -fPIC (invalid) -fmessage-length=0 -fexceptions -Winvalid-pch -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DcbDEBUG -DCB_PRECOMP -iquote.objs30/include -I.objs30/include -I. -Isdk/wxscintilla/include -Iinclude/tinyxml -Iinclude/tinyxml -c /home/%USER/data/codeblocks_svn/trunk/src/base/tinyxml/tinyxmlparser.cpp -o .objs30/base/tinyxml/tinyxmlparser.o
/bin/sh: 1: Syntax error: "(" unexpected
Process terminated with status 2 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))
Does someone have successfully compiled CB from another CB in Linux recently?
To rule out that this might be connected to the wx3.0 version, I downloaded and installed wx3.2.4, installed it as root in
/usr/bin and installed CB from the downloaded sources using the standard autotools approach.
The gave me a running and working CB with this spec
Name : Code::Blocks
Version : svn-r13403
SDK Version : 2.25.0
Scintilla Version : 3.7.5
Author : The Code::Blocks Team
E-mail : info@codeblocks.org
Website : https://www.codeblocks.org
OS : Linux 4.15.0-213-generic x86_64
Scaling factor : 1,000000
Detected scaling factor: 1,000000
Display PPI : 96x96
Display count : 1
Display 0 : XY=[0,0]; Size=[1920,1080]; Primary
wxWidgets Library (wxGTK port)
Version 3.2.4 (Unicode: wchar_t, debug level: 1),
compiled at Dec 9 2023 18:26:36
Runtime version of toolkit used is 3.22.
Compile-time GTK+ version is 3.22.30.
Then I repeated the procedure with the newly and with the new "wx3.2" installed.
Result: the same errors.
Next I tried to set the project file to wx3.2 by changing the "build options/custom variables" to fit 3.2 as wxWidget version.
Same result.
So I am getting out of ideas. Any suggestions?
Thanks!
PS: The autotools would compile the trunk fine with wx3.0, but I got "undefined references" at runtime. The first I got was "UserVariableManager::ParseCommandLine" which in the sources I found in a
libcodeblocks class. I did not see any unusual wxWidget code in there. I'd be interested to know the oldest compatible wxVersion to run CB (I do not care about optimizsations), because usually 3.2 is not part of the default repositories yet (e.g. the current UbuntuLTS 22.04 still ships with 3.0). I'd be much nicer w/o downloading and comiling wx manually.
PPS: I checked the forum and wiki for info on Building CB with CB, The only section I found in the wiki was
https://wiki.codeblocks.org/index.php/Installing_Code::Blocks#Working_on_Code::Blocks_sources_from_within_Code::Blocks.21. According to this it should work right out of the box.