Installing Code::Blocks from source on Mageia 7: Difference between revisions
Created page with "This a small tutorial from my own web site: [http://www.suryavarman.fr/compiler-codeblocks-sur-mageia7/] Here the translation: Download the sources: For this small tutorial,..." |
No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
This a small tutorial from | This a small tutorial from this original french web site: | ||
[http://www.suryavarman.fr/compiler-codeblocks-sur-mageia7/] | [http://www.suryavarman.fr/compiler-codeblocks-sur-mageia7/] | ||
Here the translation: | Here the translation: | ||
Download the sources: | |||
== Download the sources: == | |||
For this small tutorial, i propose to create a folder: Codeblocks. | For this small tutorial, i propose to create a folder: Codeblocks. | ||
And to open a console at this path. | And to open a console at this path. | ||
| Line 42: | Line 44: | ||
</nowiki> | </nowiki> | ||
Install the dependancies: | |||
== Install the dependancies: == | |||
Remark for hunspell select your languages. | Remark for hunspell select your languages. | ||
| Line 50: | Line 54: | ||
exit | exit | ||
</nowiki> | </nowiki> | ||
Update the repository, build and install localy: | |||
The build will be install into the folder Codeblocks/bin. | |||
To that execute the next script in the Codeblocks folder. | |||
build.sh: | |||
<nowiki> | |||
# Absolute path to this script, e.g. /home/user/bin/foo.sh | |||
SCRIPT=$(readlink -f "$0") | |||
# Absolute path this script is in, thus /home/user/bin | |||
SCRIPTPATH=$(dirname "$SCRIPT") | |||
cd "$SCRIPTPATH" | |||
cd codeblocks-code | |||
svn revert --recursive . | |||
svn update | |||
# You can call «cd codeblock-code | svn cleanup --remove-unversioned» before to launch this script to clean all the generated files. | |||
if [ -f ./configure ]; then | |||
make clean | |||
make distclean | |||
make clean-bin | |||
make clean-zipfiles | |||
else | |||
./bootstrap | |||
fi | |||
./configure --prefix="$SCRIPTPATH/bin" --with-contrib-plugins=all | |||
make -j $(($(nproc) -1)) | |||
make install | |||
</nowiki> | |||
== Trobleshooting: == | |||
<nowiki> | |||
./configure: line 21397: AM_OPTIONS_WXCONFIG: command not found | |||
./configure: line 21398: syntax error near unexpected token `3.0.0,' | |||
./configure: line 21398: `AM_PATH_WXCONFIG(3.0.0, wxWin=1)' | |||
</nowiki> | |||
Maybe you have generate the ./configure file before to have install the wx3 dev libraries. You can try to clean all the generated files like that: | |||
<nowiki> | |||
cd codeblock-code | |||
svn cleanup --remove-unversioned | |||
cd .. | |||
</nowiki> | |||
After that call again the last script build.sh. | |||
If it doesn't work you can begin an investigation here: | |||
https://wiki.wxwidgets.org/Autoconf | |||
Latest revision as of 17:14, 4 January 2021
This a small tutorial from this original french web site: [1]
Here the translation:
Download the sources:
For this small tutorial, i propose to create a folder: Codeblocks. And to open a console at this path.
The hierarchy will be like that:
/Codeblocks*
|
*-/bin # binaries generated by the command
| # «make install»
|
*-/codeblocks-code* # sources
| |
| *-configure # generate by «bootstrap»
|
*-build.sh # This script generate the «configure»
# file, make and build the solution.
# The binaries will be install into
# the «bin» folder.
First clone the Codeblocks repository :
svn checkout https://svn.code.sf.net/p/codeblocks/code/trunk codeblocks-code
The folder will be like that:
...\Codeblocks\codeblocks-code
It's propable that the transfer failed lots of time. To pass-through you have to repeat the checkout like that:
cd codeblocks-code svn cleanup cd .. svn checkout https://svn.code.sf.net/p/codeblocks/code/trunk codeblocks-code
Install the dependancies:
Remark for hunspell select your languages.
su urpmi autoconf libtool automake lib64squirrel-devel hunspell hunspell-fr hunspell-en lib64hunspell-devel lib64wxgtku3.0-devel lib64tinyxml-devel lib64gamin-devel exit
Update the repository, build and install localy:
The build will be install into the folder Codeblocks/bin. To that execute the next script in the Codeblocks folder.
build.sh:
# Absolute path to this script, e.g. /home/user/bin/foo.sh
SCRIPT=$(readlink -f "$0")
# Absolute path this script is in, thus /home/user/bin
SCRIPTPATH=$(dirname "$SCRIPT")
cd "$SCRIPTPATH"
cd codeblocks-code
svn revert --recursive .
svn update
# You can call «cd codeblock-code | svn cleanup --remove-unversioned» before to launch this script to clean all the generated files.
if [ -f ./configure ]; then
make clean
make distclean
make clean-bin
make clean-zipfiles
else
./bootstrap
fi
./configure --prefix="$SCRIPTPATH/bin" --with-contrib-plugins=all
make -j $(($(nproc) -1))
make install
Trobleshooting:
./configure: line 21397: AM_OPTIONS_WXCONFIG: command not found ./configure: line 21398: syntax error near unexpected token `3.0.0,' ./configure: line 21398: `AM_PATH_WXCONFIG(3.0.0, wxWin=1)'
Maybe you have generate the ./configure file before to have install the wx3 dev libraries. You can try to clean all the generated files like that:
cd codeblock-code svn cleanup --remove-unversioned cd ..
After that call again the last script build.sh.
If it doesn't work you can begin an investigation here: https://wiki.wxwidgets.org/Autoconf
