Thursday, June 26, 2008

Setting Up a Symbian C++ Development Environment with Linux(Ubuntu)

Below are the steps i followed.

Step 1: Install Ubuntu 8.04 on a 32Bit system.

Step 2: The Default Ubuntu Install does not come with any Development Tools so you have to use ubuntu apt-get command to install tools and libraries we require.
a) sudo apt-get install build-essential [Compiler to build symbian build system ]
b) sudo apt-get install zlib1g zlib1g-dev [ZLIB Header files needed while building symbian build system ]
c) sudo apt-get install libssl-dev [OpenSSL Header files needed while building symbian build system (signsis / createsis etc)]
d) sudo apt-get install flex [Requred if you want to compile the gcce cross compiler on your own].
e) sudo apt-get install bison [Requred if you want to compile the gcce cross compiler on your own].

Step 3: You have to download some build scripts, compiler [/code] and SDKs
a) gnupoc-package latest. {http://www.4shared.com/account/file/52785287/c117ddb6/gnupoc-package-109tar.html}[It will contain the EKA2 and EKA1 toolchain].
b) gcc cross compiler for symbian source. {http://www.symbianos.org/download/gcc-539-2aeh-source.tar.bz2} [If you are compiling for Pre-v9 devices]
c) gcce cross compiler for symbian source. {http://www.codesourcery.com/gnu_toolchains/arm/releases/2005Q1C} [If you are compiling for 9.x devices]
d) gcc and gcce cross compiler binaries for symbian [If you donot want to compile gcc / gcce from source]
i. http://www.4shared.com/account/file/52785285/2f19bc9a/gnu-csl-arm-2005Q1C-arm-none-symbianelf-i686-pc-linux-gnutar.html

Step 4: Copy all downloaded files [step 3] files to "~/" of your system.

Step 5: Install symbian install Scripts for linux:
tar -zxvf gnupoc-package-1.09.tar.gz

Step 6: Install ARM Build system
If you want to compile tools your self:
a) cd gnupoc-package-1.09/tools
b) ./install_gcc_539 ../../gcc-539-2aeh-source.tar.bz2 ~/symbian-gcc [If using for EKA1]
c) ./install_csl_gcc ../../gnu-csl-arm-2005Q1C-arm-none-symbianelf.src.tar.bz2 ~/csl-gcc [If using for EKA2]

If you want to use pre-compiles tools:
a) mkdir csl-gcc
b) cd csl-gcc
c) tar -jxvf ../gnu-csl-arm-2005Q1C-arm-none-symbianelf-i686-pc-linux-gnu.tar.bz2

Step 7: Install remaining tools
a) cd gnupoc-package-1.09/tools
b) ./install_eka1_tools ~/symbian-gcc [If using for EKA2]
b) ./install_eka2_tools ~/csl-gcc [If using for EKA2]

Step 8: To Set Evenvironment variable to point to your SDK and add the toolchain directory.
./install_wrapper ~/gnupoc

What you can't do with this method:
1. you can't build for emulator.
2. you can't run emulator.

Note:
1. I don't mind using any other Ubuntu linux infect i have tried using OpenSuse and RedHat. Will post the steps for OpenSuse Soon.
2. Some of the sort comes like emulator specific can be over come with WINE will post how to use WINE in coming posts.
2. Refer to http://martin.st/symbian/ for more info.
3. Contact me at skumar.mobiledev@gmail.com with Subject [symbian on linux] if you have any problem.

7 comments:

Тоха said...

hi. i have error at step 6. error on running install_gcc_539.

c:348: undefined reference to `tputs'
terminal.o: In function `terminal_end_inverse':
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:332: undefined reference to `tputs'
terminal.o: In function `terminal_begin_inverse':
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:320: undefined reference to `tputs'
terminal.o: In function `terminal_down_line':
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:308: undefined reference to `tputs'
terminal.o: In function `terminal_up_line':
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:296: undefined reference to `tputs'
terminal.o:/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:284: more undefined references to `tputs' follow
terminal.o: In function `terminal_get_screen_size':
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:497: undefined reference to `tgetnum'
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:485: undefined reference to `tgetnum'
terminal.o: In function `terminal_initialize_terminal':
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:544: undefined reference to `tgetent'
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:556: undefined reference to `tgetstr'
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:572: undefined reference to `tgetstr'
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:573: undefined reference to `tgetstr'
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:574: undefined reference to `tgetstr'
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:575: undefined reference to `tgetstr'
terminal.o:/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:578: more undefined references to `tgetstr' follow
terminal.o: In function `terminal_initialize_terminal':
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:610: undefined reference to `tgetflag'
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:610: undefined reference to `tgetflag'
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:623: undefined reference to `tgetstr'
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:624: undefined reference to `tgetstr'
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:625: undefined reference to `tgetstr'
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:626: undefined reference to `tgetstr'
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:628: undefined reference to `tgetstr'
terminal.o:/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:629: more undefined references to `tgetstr' follow
terminal.o: In function `terminal_goto_xy':
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:232: undefined reference to `tgoto'
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:232: undefined reference to `tputs'
terminal.o: In function `terminal_insert_lines':
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:391: undefined reference to `tgoto'
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:391: undefined reference to `tputs'
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:395: undefined reference to `tputs'
terminal.o: In function `terminal_delete_lines':
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:366: undefined reference to `tgoto'
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:366: undefined reference to `tputs'
/home/naprasno/gnupoc/tools/obj/texinfo/info/../../../src/texinfo/info/terminal.c:370: undefined reference to `tputs'
collect2: выполнение ld завершилось с кодом возврата 1
make[3]: *** [ginfo] Ошибка 1
make[3]: Выход из каталога `/home/naprasno/gnupoc/tools/obj/texinfo/info'
make[2]: *** [all-recursive] Ошибка 1
make[2]: Выход из каталога `/home/naprasno/gnupoc/tools/obj/texinfo'
make[1]: *** [all-recursive-am] Ошибка 2
make[1]: Выход из каталога `/home/naprasno/gnupoc/tools/obj/texinfo'
make: *** [all-texinfo] Ошибка 2
Unexcpected error: aborting.

Sunil kumar said...

Which Linux flavor you are using ?

Тоха said...

ubuntu hh 8.04 x86

Cedric Schmeits said...

tputs is part ncurses which isn't installed by installing build-essiental. Installing libncurses5 will probably solve your problem.

sudo apt-get install libncurses5

Kasidit said...

Nice to hear about others using Gnupoc like. I really appreciate the Gnupoc and http://www.martin.st/symbian/ - I'm using it too.

rew said...

Guys... these howto's are meant for people starting with Symbian development.

I tried following this or a different one, and got lost. For example, I had to EMail one of the developers (thanks!) on what is "EKA1"? Why do I /want/ to use EKA1???? Turns out EKA2 is S60R3+ .

I recommend writing such a howto as a linear thing: Do this, do that, then do such.

At the end you mention: in step two you could have downloaded the sources and compiled it yourself using... In step 3, if you need to develop for EKA1 (pre S60R3) you should get .... instead.

iCaption That said...

Nice blog! I loved reading through your blog. wish you good luck for your best efforts...

iCaption That

stats counter