Installing Code::Blocks from source on Solaris

From Code::Blocks
Revision as of 21:45, 1 December 2006 by Murlock (talk | contribs)


for Solaris 10 x86 and gcc

Note:

  • for this tutorial, I've used a clean and new fresh installation of Solaris 10 6/6 with all package (but without any other software)
  • If a command begin with a $, it 's the normal user otherwise with #, it's root
  • this tutorial is not for a production server
  • feel free to contact me ( murlock at free.fr ) for any problems
  • you can find a french version [[1]]


wxWidgets

  • Modifying PATH to incldue ar & create target directories for wxWidgets & CodeBlocks
$ export PATH=$PATH:/usr/ccs/bin
$ su
# mkdir /usr/local
# mkdir /usr/local/test_cb
# chmod 777 /usr/local/test_cb
# exit


  • Download the 2.6.3 version ([wxALL]) of [wxWidgets]
  • Uncompress in a directory (for exemple ~/prog/wxwidgets ) with
$ gunzip wxWidgets.tar.gz && tar xvf wxWidgets.tar
  • Configure, compile & install of wxWidgets (in debug mode)
$ ./configure --with-gtk --disable-compat24 --enable-config --enable-protocols --enable-ftp --enable-http --enable-fileproto --enable-arcstream --enable-cmdline --enable-datetime --enable-ffile --enable-file --enable-filesystem --enable-fontmap --enable-fs_inet --enable-fs_zip --enable-log --enable-stdpaths --enable-stopwatch --enable-streams --enable-sysoptions --enable-textbuf --enable-textfile --enable-timer --enable-unicode --enable-html --enable-htmlhelp --enable-xrc --enable-constraints --enable-printarch --enable-mdi --enable-mdidoc --enable-loggui --enable-logwin --enable-logdialog --enable-protocol --enable-protocol-http --enable-protocol-ftp --enable-protocol-file --enable-threads --enable-docview --enable-help --enable-palette --enable-image --enable-gif --enable-pcx --enable-iff --enable-coldlg --enable-filedlg --enable-finddlg --enable-fontdlg --enable-dirdlg --enable-msgdlg --enable-numberdlg --enable-splash --enable-textdlg --enable-tipdlg --enable-progressdlg --enable-wizarddlg --enable-menus --enable-miniframe --enable-tooltips --enable-splines --enable-mousewheel --enable-validators --enable-busyinfo --enable-joystick --enable-dragimage --enable-palette --enable-image --enable-gif --enable-pcx --enable-iff --enable-pnm --enable-xpm --enable-clipboard --enable-dnd --enable-controls   --enable-button        --enable-bmpbutton     --enable-calendar      --enable-caret         --enable-checkbox      --enable-checklst      --enable-choice --enable-choicebook --enable-combobox   --enable-datepick   --enable-display    --enable-gauge      --enable-grid       --enable-imaglist   --enable-listbook   --enable-listbox    --enable-listctrl   --enable-notebook   --enable-radiobox   --enable-radiobtn   --enable-sash       --enable-scrollbar  --enable-slider     --enable-spinbtn    --enable-spinctrl   --enable-splitter   --enable-statbmp    --enable-statbox    --enable-statline   --enable-stattext   --enable-statusbar  --enable-tabdialog  --enable-textctrl   --enable-togglebtn  --enable-toolbar    --enable-tbarnative --enable-tbarsmpl  --enable-treectrl  --enable-tipwindow --enable-popupwin  --enable-commondlg --enable-choicedlg  --enable-debug --prefix=/usr/local/test_cb/ 
$ gmake && gmake install


prerequis

  • Before playing with CodeBlocks, you have to install four softwares :
    • from the Companion DVD Software of Sun (cf [to download them]),
    • you need to install theses packages : SFWaconf, SFWamake, SFWltool (and pkgadd -d ) from Blastwave, Subversion (cf [the how to]) with
$ pkg-get -i subversion
  • You have to check if ""/usr/sfw/lib/libstdc++.la"" is empty or not... If it's empty, you have to install the sun patch 123648-01 or following [correction sur ""libstdc++.la""]

CodeBlocks

  • Go to a directory (for exemple ~/prog/codeblocks)
  • Modify your PATH (for including automake, autoconf, libtool & wxWidgets) and M4 for wxWidgets
$ export PATH=$PATH:/opt/sfw/bin:/usr/local/test_cb/bin/
$ export ACLOCAL_FLAGS="-I `wx-config --prefix`/share/aclocal"
  • Download the SVN version of CodeBlocks :
$ /opt/csw/bin/svn checkout svn://svn.berlios.de/codeblocks/trunk
$ cd trunk

UPDATE: you don't have to do that anymore

  • You have to remove thoses two lines from bootstrap :
export WANT_AUTOMAKE='1.7'
export WANT_AUTOCONF='2.5'


  • You have to correct Makefile with this [patch] :

in src/src/wxAUI/Makefile.am, add the following line

libwxaui_la_LDFLAGS = `pkg-config --libs gtk+-2.0`

before

libwxaui_la_SOURCES = manager.cpp

and in src/src/Makefile.am, please modify this line :

codeblocks_LDFLAGS =

to have that :

codeblocks_LDFLAGS = `pkg-config --libs gtk+-2.0`
  • Configuring CodeBlocks :
$ export CXXFLAGS=-DwxHIDE_READONLY=0
$ export CFLAGS=-DwxHIDE_READONLY=0
$ ./configure --prefix=/usr/local/test_cb/  --enable-debug
$ gmake && gmake install

  • For one file, you'll have an error for compiling ( strlen undefined) due to missing #include <string.h>, please add and relaunch gmake