I just tried building from source in Ubuntu 18.04.
svn checkout svn://svn.code.sf.net/p/codeblocks/code/trunk
cd trunk
./bootstrap
./update-revision.sh
./configure --with-contrib=all
make
sudo make install
No errors were reported in make but when I try to run it I get:
codeblocks: symbol lookup error: codeblocks: undefined symbol: _ZTI32IncrementalSelectIteratorIndexed
Does anyone have any idea what went wrong?
Here my script for mageia:
I build wxWidgets and C::B
# \see https://github.com/wxWidgets/wxWidgets.git
export WX_TAG="v3.1.4"
function install_dependencies()
{
su
urpmi autoconf libtool automake lib64squirrel-devel hunspell hunspell-fr hunspell-en lib64hunspell-devel lib64wxgtku3.0-devel lib64tinyxml-devel lib64gamin-devel
exit
}
# A lancer avant pour être certain d'avoir le nécessaire pour construire le projet.
# install_dependencies
# Absolute path to this script, e.g. /home/user/bin/foo.sh
SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
cd "$SCRIPTPATH"
export CXX=g++
export CC=gcc
export OUT_WX="$SCRIPTPATH/bin/wxwidgets"
export OUT_CB="$SCRIPTPATH/bin/codeblocks"
function wxwidgets_build()
{
cd wxwidgets-code
git reset --hard
git clean -f -d
git pull
git checkout "tags/$WX_TAG"
git submodule update --recursive
cd "$SCRIPTPATH"
if [ ! -d ./bin ]; then
mkdir bin
fi
cd bin
if [ -d "$OUT_WX" ]; then
rm -r -v -f "$OUT_WX"
fi
mkdir wxwidgets
cd wxwidgets
"$SCRIPTPATH/wxwidgets-code/configure" --disable-debug --disable-debug-flag --enable-unicode --enable-cxx11 --with-opengl --with-expat=builtin --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --with-libtiff=builtin --with-zlib=builtin
nice make -j $(($(nproc) -1))
}
function codeblocks_build()
{
cd "$SCRIPTPATH"
if [ ! -d ./bin ]; then
mkdir bin
fi
cd bin
if [ -d "$OUT_CB" ]; then
rm -r -v -f "$OUT_CB"
fi
mkdir codeblocks
cd "$SCRIPTPATH"
cd codeblocks-code
read -r -p 'Souhaitez vous reconstruire Codeblocks ou repartir de la précédente compilation? ( taper "o" pour oui ou "n" pour non ): '
if [ "${REPLY}" == 'o' ]; then
svn cleanup
svn revert --recursive .
svn update
# vous pouvez faire : «cd codeblock-code | svn cleanup --remove-unversioned avant de
# lancer le script pour tre sre de re-partir zro.
if [ -f ./configure ]; then
make clean
make distclean
make clean-bin
make clean-zipfiles
else
./bootstrap
fi
./configure --disable-pch --with-wx-config="$OUT_WX/wx-config" --prefix=$OUT_CB --with-contrib-plugins=all
fi
make -j $(($(nproc) -1))
make install
}
if [ ! -d ./wxwidgets-code ]; then
git clone https://github.com/wxWidgets/wxWidgets.git wxwidgets-code
cd wxwidgets-code
git submodule update --init --recursive
wxwidgets_build
else
read -r -p 'Souhaitez vous re-compiler wxWidgets? ( taper "o" pour oui ou "n" pour non ): '
if [ "${REPLY}" == 'o' ]; then
wxwidgets_build
fi
fi
if [ ! -d ./codeblocks_code ]; then
svn checkout http://svn.code.sf.net/p/codeblocks/code/trunk codeblocks-code
fi
codeblocks_build
OK, apt remove codeblocks leaves libcodeblocks behind. I needed to apt remove libcodeblocks.
Next issue. When I run codeblocks I get codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory
libcodeblocks.so exists in /usr/local/lib
Oddly if I install to a non-standard prefix e.g /home/myhome/whatever and run it from there, it finds libcodeblocks from /home/myhome/whatever/lib/ and runs correctly.