As I understand, there is no binary release of codeblocks 20.03 for the arm architecture.
Unfortunately, all my attempts to build wxGTK-2.8.12 failed. Because wxGTK-2.8.12 requires gtk+-2.8.0 which is no longer supported by the "sudo apt-get install -y libwxgtk2.8-dev" command. Attempts to build gtk+-2.8.0 also failed.
wxWidgets 3.1.4 are installed normally but I can't build a codeblocks on wxWidgets 3.1.4.
Does anyone have any idea how to install a code block on the arm architecture (Raspberry pi os)?
I suggest having a read in the forum for the following search results "wxWidgets 3.1.4" to see if/how you can use wxWidgets 3.1.4 when building the CB trunk code.
Attempt to build code blocks on wxWidgets 3.1.4 gives me the following error after "make" command:
Quotemain.cpp: In member function 'bool MainFrame::OnDropFiles(wxCoord, wxCoord, const wxArrayString&)':
main.cpp:2682:22: error: 'wxPaintEvent::wxPaintEvent(wxWindowBase*)' is private within this context
wxPaintEvent e;
^
In file included from /usr/local/include/wx-3.1/wx/wx.h:24,
from /usr/local/include/wx-3.1/wx/wxprec.h:42,
from ./sdk_common.h:24,
from ./sdk_precomp.h:13,
from ./sdk.h:17:
/usr/local/include/wx-3.1/wx/event.h:2379:14: note: declared private here
explicit wxPaintEvent(wxWindowBase* window = NULL);
Why are you installing 3.1.4? Regular 3.0.x is probably enough.
Also to use recent wx you need this patch https://sourceforge.net/p/codeblocks/code/11991/
After downloading the codeblocks from the SVN repository, the codeblocks was compiled and installed well even thru wxWidgets 3.1.4 (thank you AndrewCot and oBFusCATed). However, there was a problem when running it through the terminal. I'm getting an error:
Quotecodeblocks: symbol lookup error: codeblocks: undefined symbol: cbEVT_DEBUGGER_UPDATED
"sudo apt-get update", "sudo rpi-eeprom-update -a" and "sudo apt full-upgrade" did not give anything.
Small warnings like:
Quotelibtool: warning: relinking 'libabbreviations.la'
...
libtool: warning: relinking 'libtodo.la'
...
were when installing the codeblocks however I don't think it's related.
Maybe the problem was in the installation of dependencies. How can this be verified?
This happens when you mix package based codeblocks and manual "make install" codeblocks. Remove one or the other or use "./configure --prefix=/somehting/different/from/default"
I apologise for my stupid question but could you explain me more precisely what and where I should delete.
I installed the codeblocks in a different folder than the default ("./configure --prefix=/opt/codeblocks-svn") but after trying to run the codeblocks I get the following window with an error message:
QuoteCannot find resources...
Code::Blocks was configured to be installed in '/usr/local/share/codeblocks'.
Pleas use the command-line switch '--prefix' or set the CODEBLOCKS_DATA_DIR environment variable to point where Code::Blocks is installed, or try re-installing the application...
Thank you in advance for your help.
Here is how I build Code::Blocks under Ubuntu, I guess it should work under PI4 as well
$ git clone https://github.com/obfuscated/codeblocks_sf
$ cd codeblocks_sf/
$ ./bootstrap
$ ./configure --with-contrib-plugins=all --with-wx-config=/usr/bin/wx-config --prefix=/ssd1/cb/
$ make
$ sudo make install
The value after --prefix is where the "make install" installs the binaries. Obviously a number of packages are required.
Another option you have (admittedly more work) is to cross compile from e.g. Ubuntu to PI4, see link in the Wiki http://wiki.codeblocks.org/index.php/Off-site_documentation
MBajor:
Do you have any codeblocks related files outside of /opt/codeblocks-svn?
If you have and they are in a path that is searched before your current install path you'll have problems.
I'm talking specifically about library search paths.
cacb after the "./configure --with-contrib-plugins=all --with-wx-config=/usr/bin/wx-config --prefix=/ssd1/cb/" command I facing an error:
Quoteconfigure: error: Could not find a version of the library!
But the "./configure --with-contrib-plugins=all --with-wx-config=/usr/bin/wx-config --prefix=/ssd1/cb/" command really helped me a lot for wxSmith. Thank you!
oBFusCATed Eventually I decided to completely reinstall the operating system.
After reinstalling, I encountered a lot of errors:
error:
Quote./bootstrap: 70: ./bootstrap: libtoolize: not found
Solution:
Quotesudo apt-get install libtool
error:
Quoteconfigure.ac:141: warning: macro 'AM_OPTIONS_WXCONFIG' not found in library
configure.ac:142: warning: macro 'AM_PATH_WXCONFIG' not found in library
configure.ac:26: installing './compile'
configure.ac:22: installing './missing'
src/base/tinyxml/Makefile.am: installing './depcomp'
configure.ac:141: error: possibly undefined macro: AM_OPTIONS_WXCONFIG
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:142: error: possibly undefined macro: AM_PATH_WXCONFIG
Solution first make command:
Quoteexport ACLOCAL_FLAGS="-I `wx-config --prefix`/share/aclocal"
./bootstrap
error:
Quoteconfigure: error: Package requirements (hunspell) were not met:
No package 'hunspell' found
Solution:
Quotesudo apt install libhunspell-dev
error:
Quoteconfigure: error: Package requirements (gamin) were not met:
No package 'gamin' found
Solution:
Quotesudo apt-get install libgamin-dev libgamin0
error:
Quote/bin/bash: zip: command not found
Solution:
Quotesudo apt-get install zip
error:
Quotefatal error: boost/spirit/include/classic.hpp: No such file or directory
#include <boost/spirit/include/classic.hpp>
Solution:
Quoteapt-get install libboost-all-dev
...
After this I successfully installed the svn codeblocks. But that's not exactly what I wanted. Because I wanted codeblocks 20.03. But attempt to build him give me an error which solution I can't find in internet.
Quote/tmp/ccg9Nnhb.s: Assembler messages:
/tmp/ccg9Nnhb.s:938: Error: bad instruction `int3'
make[4]: *** [Makefile:597: dragscrollcfg.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory '/home/pi/Downloads/codeblocks-20.03/src/plugins/contrib/dragscroll'
make[3]: *** [Makefile:639: all-recursive] Error 1
make[3]: Leaving directory '/home/pi/Downloads/codeblocks-20.03/src/plugins/contrib'
make[2]: *** [Makefile:535: all-recursive] Error 1
make[2]: Leaving directory '/home/pi/Downloads/codeblocks-20.03/src/plugins'
make[1]: *** [Makefile:545: all-recursive] Error 1
make[1]: Leaving directory '/home/pi/Downloads/codeblocks-20.03/src'
make: *** [Makefile:676: all-recursive] Error 1
How exactly can I fix this error?
This last thing is fixed in trunk. I don't remember if we backported the fix to the 20.03 branch.