Ref [1] http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux
Ref [2] http://www.friendlyarm.net/forum/topic/26
1.
-------------------------------
[q.yang@localhost ~]$ mkdir ~/devel
2.Checking the presence of GTK+ library
---------------------------------------
[q.yang@localhost ~]$ rpm -qa |grep gtk
pygtk2-codegen-2.12.1-6.fc9.i386
gtk-nodoka-engine-0.7.1-2.fc9.i386
gtk-doc-1.9-4.fc9.noarch
authconfig-gtk-5.4.4-1.fc9.i386
gtkmm24-2.12.7-1.fc9.i386
gtksourceview2-2.2.2-1.fc9.i386
gtkhtml2-2.11.1-3.fc9.i386
pygtk2-doc-2.12.1-6.fc9.i386
pygtksourceview-2.2.0-1.fc9.i386
usermode-gtk-1.98-1.fc9.i386
gtk2-engines-2.14.3-1.fc9.i386
gnome-python2-gtkhtml2-2.19.1-28.fc9.i386
gtk2-2.12.12-2.fc9.i386
gtkspell-2.0.11-8.fc9.i386
gtk-sharp2-2.12.1-1.fc9.i386
GConf2-gtk-2.22.0-1.fc9.i386
pygtk2-libglade-2.12.1-6.fc9.i386
pygtk2-2.12.1-6.fc9.i386
xdg-user-dirs-gtk-0.7-1.fc9.i386
pygtk2-devel-2.12.1-6.fc9.i386
gtkhtml3-3.18.3-1.fc9.i386
gtk2-devel-2.12.12-2.fc9.i386
[q.yang@localhost ~]$ ll /usr/lib/ | grep libgtk
lrwxrwxrwx 1 root root 21 2010-06-04 02:47 libgtkhtml-2.so.0 -> libgtkhtml-2.so.0.0.0
-rwxr-xr-x 1 root root 451304 2008-02-10 14:34 libgtkhtml-2.so.0.0.0
lrwxrwxrwx 1 root root 25 2010-06-07 18:04 libgtkhtml-3.14.so.19 -> libgtkhtml-3.14.so.19.1.0
-rwxr-xr-x 1 root root 764296 2008-06-30 21:58 libgtkhtml-3.14.so.19.1.0
lrwxrwxrwx 1 root root 22 2010-06-07 17:50 libgtkmm-2.4.so.1 -> libgtkmm-2.4.so.1.0.30
-rwxr-xr-x 1 root root 3446444 2008-04-12 22:43 libgtkmm-2.4.so.1.0.30
-rwxr-xr-x 1 root root 24160 2008-09-20 19:23 libgtksharpglue-2.so
lrwxrwxrwx 1 root root 29 2010-06-07 17:50 libgtksourceview-2.0.so.0 -> libgtksourceview-2.0.so.0.0.0
-rwxr-xr-x 1 root root 264908 2008-07-02 01:00 libgtksourceview-2.0.so.0.0.0
lrwxrwxrwx 1 root root 20 2010-06-04 02:36 libgtkspell.so.0 -> libgtkspell.so.0.0.0
-rwxr-xr-x 1 root root 21540 2008-02-10 14:29 libgtkspell.so.0.0.0
lrwxrwxrwx 1 root root 27 2010-06-07 18:23 libgtk-x11-2.0.so -> libgtk-x11-2.0.so.0.1200.12
lrwxrwxrwx 1 root root 27 2010-06-07 17:47 libgtk-x11-2.0.so.0 -> libgtk-x11-2.0.so.0.1200.12
-rwxr-xr-x 1 root root 4233032 2008-11-21 19:06 libgtk-x11-2.0.so.0.1200.12
3. Checking the presence of libwxGTK library
---------------------------------------
A. Download source if not installed or no yum rpm package available.
[q.yang@localhost ~]$ cd devel/
[q.yang@localhost devel]$ ll
-rw-rw-r-- 1 q.yang q.yang 13078779 2010-07-21 16:27 wxGTK-2.8.11.tar.gz
[q.yang@localhost devel]$ tar zxf wxGTK-2.8.11.tar.gz
[q.yang@localhost devel]$ cd wxGTK-2.8.11
B. Config, compile and install.
[q.yang@localhost wxGTK-2.8.11]$ mkdir build_gtk2_shared_monolithic_unicode
[q.yang@localhost wxGTK-2.8.11]$ cd build_gtk2_shared_monolithic_unicode/
[q.yang@localhost build_gtk2_shared_monolithic_unicode]$ ../configure --prefix=/opt/wx/2.8 \
> --enable-xrc \
> --enable-monolithic \
> --enable-unicode
......................
..................
config.status: creating contrib/src/net/Makefile
config.status: creating lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h
config.status: executing wx-config commands
Configured wxWidgets 2.8.11 for `i686-pc-linux-gnu'
Which GUI toolkit should wxWidgets use? GTK+ 2 with support for gnomeprint
Should wxWidgets be compiled into single library? yes
Should wxWidgets be compiled in debug mode? no
Should wxWidgets be linked as a shared library? yes
Should wxWidgets be compiled in Unicode mode? yes
What level of wxWidgets compatibility should be enabled?
wxWidgets 2.4 no
wxWidgets 2.6 yes
Which libraries should wxWidgets use?
jpeg sys
png sys
regex builtin
tiff sys
zlib sys
odbc no
expat sys
libmspack no
sdl no
[q.yang@localhost build_gtk2_shared_monolithic_unicode]$ make
[root@localhost build_gtk2_shared_monolithic_unicode]# make install
...................................................................
...................................................................
if test ! -d /opt/wx/2.8/include/wx-2.8/`dirname $f` ; then \
/usr/bin/install -c -d /opt/wx/2.8/include/wx-2.8/`dirname $f`; \
fi; \
/usr/bin/install -c -m 644 ../include/$f /opt/wx/2.8/include/wx-2.8/$f; \
done
------------------------------------------------------
The installation of wxWidgets is finished. On certain
platforms (e.g. Linux) you'll now have to run ldconfig
if you installed a shared library and also modify the
LD_LIBRARY_PATH (or equivalent) environment variable.
wxWidgets comes with no guarantees and doesn't claim
to be suitable for any purpose.
Read the wxWidgets Licence on licencing conditions.
------------------------------------------------------
C. Added /opt/wx/2.8/bin into $PATH
[q.yang@localhost build_gtk2_shared_monolithic_unicode]$ vi ~/.bash_profile
[q.yang@localhost build_gtk2_shared_monolithic_unicode]$ source ~/.bash_profile
[q.yang@localhost build_gtk2_shared_monolithic_unicode]$ echo $PATH
/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/bin:/bin:/usr/bin:/home/q.yang/bin:/sbin:/usr/sbin:/home/q.yang/j2sdk1.4.2_12/bin:/home/q.yang/j2sdk1.4.2_12/jre/bin:/home/q.yang/eclipse_workspace/MyMacProj/bin:/home/q.yang/bin:/sbin:/usr/sbin:/opt/wx/2.8/bin:/home/q.yang/j2sdk1.4.2_12/bin:/home/q.yang/j2sdk1.4.2_12/jre/bin:/home/q.yang/eclipse_workspace/MyMacProj/bin
D. Some extra changes.
[root@localhost build_gtk2_shared_monolithic_unicode]# vi /etc/ld.so.conf
[root@localhost build_gtk2_shared_monolithic_unicode]# exit
exit
[q.yang@localhost build_gtk2_shared_monolithic_unicode]$ cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
include /opt/wx/2.8/lib
[root@localhost build_gtk2_shared_monolithic_unicode]# ldconfig
[q.yang@localhost build_gtk2_shared_monolithic_unicode]$ wx-config --prefix
/opt/wx/2.8
[q.yang@localhost build_gtk2_shared_monolithic_unicode]$ wx-config --libs
-L/opt/wx/2.8/lib -pthread -lwx_gtk2u-2.8
[q.yang@localhost build_gtk2_shared_monolithic_unicode]$ which wx-config
/opt/wx/2.8/bin/wx-config
4. Getting Code::Blocks sources
---------------------------------------------------------------
[q.yang@localhost devel]$ svn checkout svn://svn.berlios.de/codeblocks/trunk
.....................................
...................................
A trunk/TODO
A trunk/codeblocks.spec.in
A trunk/acinclude.m4
A trunk/codeblocks.plist.in
A trunk/COPYING
A trunk/Makefile.am
A trunk/update_revision.sh
A trunk/NEWS
A trunk/bootstrap
A trunk/codeblocks.pc.in
A trunk/README.debian
Checked out revision 6411.
[q.yang@localhost trunk]$ ./bootstrap
...............................
configure.in:77: error: possibly undefined macro: AM_OPTIONS_WXCONFIG
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.in:78: error: possibly undefined macro: AM_PATH_WXCONFIG
[root@localhost trunk]# echo `wx-config --prefix`/share/aclocal >> /usr/share/aclocal/dirlist
[q.yang@localhost trunk]$ ./bootstrap THIS TIME IT'LL HAVE NO ERROR.
5. Install code:block
---------------------------------------
[q.yang@localhost trunk]$ ./configure ALL INSTALLATION WILL BE USING DEFAULT SETTING.
[q.yang@localhost trunk]$./configure --prefix=/opt/codeblocks20100721-svn --with-contrib-plugins=all
......................................
config.status: creating src/include/config.h
config.status: src/include/config.h is unchanged
config.status: executing depfiles commands
*************************************************
* Code::Blocks source tree has been configured. *
*************************************************
You can now build Code::Blocks by issuing 'make'.
When the build is complete, become root and install
it by issuing 'make install'.
[q.yang@localhost trunk]$ make
........error occurred during make ..... in particular in /plug-in/...
[root@localhost trunk]# make install
.............................
PATH="$PATH:/sbin" ldconfig -n /opt/codeblocks20100721-svn/lib/wxSmithContribItems
----------------------------------------------------------------------
Libraries have been installed in:
/opt/codeblocks20100721-svn/lib/wxSmithContribItems
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
....................................
CParser.cpp:111: error: 'preprocessor' was not declared in this scope
CParser.cpp:115: error: 'comment' was not declared in this scope
CParser.cpp:119: error: 'special_w' was not declared in this scope
CParser.cpp:145: error: 'parse_info' was not declared in this scope
CParser.cpp:145: error: expected primary-expression before 'const'
CParser.cpp:145: error: expected `;' before 'const'
CParser.cpp:151: error: 'info' was not declared in this scope
make[4]: *** [CParser.lo] Error 1
make[4]: Leaving directory `/home/q.yang/devel/trunk/src/plugins/contrib/NassiShneiderman'
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/home/q.yang/devel/trunk/src/plugins/contrib'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/q.yang/devel/trunk/src/plugins'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/q.yang/devel/trunk/src'
make: *** [install-recursive] Error 1
6. Last thing to do before running code:blocks
-------------------------------------------------------
[q.yang@localhost trunk]$ /opt/codeblocks20100721-svn/bin/codeblocks
/opt/codeblocks20100721-svn/bin/codeblocks: error while loading shared libraries: libwx_gtk2u-2.8.so.0: cannot open shared object file: No such file or directory
[root@localhost trunk]# vi /etc/ld.so.conf
[root@localhost trunk]# ldconfig
[q.yang@localhost trunk]$ cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/opt/wx/2.8/lib
/opt/codeblocks20100721-svn/lib
7. DONE ---- Code::blocks can be started now
--------------------------------------------------
[q.yang@localhost trunk]$ /opt/codeblocks20100721-svn/bin/codeblocks
Initialize EditColourSet .....
Initialize EditColourSet: done.
8. Set Compiler to use LTIB arm tool Chain
----------------------------------------------
Code:Blocks svn build rev 6411
1. navigate to home/username and edit .bash_profile
LTIB_TOOL_CHAIN_FREESCALE_PATH=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi
PATH=$PATH:$HOME/bin:/sbin:/usr/sbin:/opt/wx/2.8/bin:$LTIB_TOOL_CHAIN_FREESCALE_PATH:/opt/codeblocks20100721-svn/bin/
2. $source .bash_profile
3. Go to Settings/Compiler and debugger and in Select compiler find GNU
ARM GCC compiler, select it and Set as default or it reverts to GNU GCC
Compiler everytime you start a new project
4. in the tab Toolchain executables (make sure this window is maximised or
you don’t see this tab!) and Compiler’s installation directory put
/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi (bin not necessary)
5. now in the Program Files window:
manually select and map the c/c++ compiler, linker with actual 'commands'
C compiler arm-none-linux-gnueabi-gcc-4.1.2
C++ compiler arm-none-linux-gnueabi-g++
Linker for dynamic libs arm-none-linux-gnueabi-gcc-g++
Linker for static libs arm-none-linux-gnueabi-ar
Debugger gdb (Make sure [*] cross gdb (runs on build machine) ticked in LTIB, so that u can find gdb in ~/lpc3250/ltib-qs/bin/ )
make program make
Then add /usr/bin/ into addtional path so that compiler can find where is 'make' command.
Successfully passed GDB debugging after adding and enabling [*]cross gdb Tool Chain in LTIB, and configured it in Code blocks(/ltib-qs/bin/gdb). Here's the screen shot when using LTIB tool chain for debugging.
Successfully passed GDB debugging after intalling CodeSourcery Tool Chain, and configured it in Code blocks. Here's the screen shot when using code sourcery.
To make it easy to identify, you can rename the compiler
Tuesday, July 20, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment