Ubuntu 10.04 x64 and installing Appcelerator Titanium Desktop mobile device development environment – a how to

Sorry for the exceptionally long title…

************************FAILED INSTALLATION, after approximately 3 hours of trying I give up**********************

**********update********

going to give it a shot on a 32-bit install tonight and see how that goes…

********end update********
Had a bit of an issue getting this to work, so I decided to put up a post, seeing as how some of the new fandangled Android phones launching this year will get some people interested in developing their own apps (and apple products too, this SDE is good for iPhone and Android currently…)  For this example, I am doing it as I type it, so hopefully I will come back and clean it up a bit later… I am creating a directory under ~/Downloads to both DL and save all the files used in this process.

*********************I had an error in this process, so I have documented it here.  make sure you read through to the end before trying, as I will re-post a working step-by-step guide at the end so you can avoid these errors…******************

step by step how I got this working (hopefully it will be working  when I finish!!)

  1. mkdir ~/Downloads/android/environment (makes the app directory, you can put it where ever you want, it will make a subdirectory when you do the download)
  2. sudo apt-get install build-essential ruby rubygems libzip-ruby scons libxml2-dev libgtk2.0-dev python-dev ruby-dev libdbus-glib-1-dev libnotify-dev libgstreamer0.10-dev libxss-dev libcurl4-openssl-dev git-core (this downloads all the dependencies you need)
  3. git clone git://github.com/appcelerator/titanium_desktop (this actually pulls down the application)
  4. cd titanium_desktop
  5. git submodule update –init (initiates an update I believe…)
  6. cd kroll
  7. git checkout master (really know nothing about git, I’ll have to look this one up…)
  8. cd ..
  9. scons debug=1 sdkinstaller run=1 (this actually builds the app and makes a binary for you to run)

after step 9 I got this error

/usr/bin/ld: cannot find -lPocoFoundation

collect2: ld returned 1 exit status

scons: *** [build/linux/runtime/libkhost.so] Error 1

scons: building terminated because of errors.

a little hunting found me this:

sudo apt-get install libPocoFoundation*

Reading package lists… Done

Building dependency tree

Reading state information… Done

Note, selecting libpocofoundation9-dbg for regex ‘libPocoFoundation*’

Note, selecting libpocofoundation9 for regex ‘libPocoFoundation*’

The following extra packages will be installed:

libpocofoundation9 libpocofoundation9-dbg

The following NEW packages will be installed:

libpocofoundation9 libpocofoundation9-dbg

0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.

Need to get 2,924kB of archives.

After this operation, 10.6MB of additional disk space will be used.

Do you want to continue [Y/n]? y

Get:1 http://us.archive.ubuntu.com/ubuntu/ lucid/universe libpocofoundation9 1.3.6p1-1 [525kB]

Get:2 http://us.archive.ubuntu.com/ubuntu/ lucid/universe libpocofoundation9-dbg 1.3.6p1-1 [2,399kB]

after which it proceeded to install those 2 packages…

collect2: ld returned 1 exit status
scons: *** [build/linux/runtime/libkhost.so] Error 1
scons: building terminated because of errors.

so I re-ran the install script to see what it might do…

same error… new tactic…

sudo ln -s /usr/lib/libPocoFoundation.so.9 /usr/lib/libPocoFoundation

ran it again…

same error… new tactic…

ls ./build/linux/runtime/

libcrypto.so.0.9.8          libgpg-error.so.0.3.0       libPocoCrypto.so.9      libproxy.so.0.0.0

libcurl.so.4.1.1            libgthread-2.0.so.0.2200.3  libPocoData.so.9        libsoup-2.4.so.1.3.0

libgailutil.so.18.0.1       libicudata.so.38.1          libPocoFoundation.so.9  libsoup-gnome-2.4.so.1.3.0

libgcrypt.so.11.4.4         libicui18n.so.38.1          libPocoNet.so.9         libssl.so.0.9.8

libgeoclue.so.0.0.0         libicuio.so.38.1            libPocoNetSSL.so.9      libwebkittitanium-1.0.so.2.15.1

libgio-2.0.so.0.2200.3      libicule.so.38.1            libPocoSQLite.so.9      libxcb-render.so.0.0.0

libglib-2.0.so.0.2200.3     libiculx.so.38.1            libPocoUtil.so.9        libxcb-render-util.so.0.0.0

libgnutls.so.26.4.6         libicutu.so.38.1            libPocoXML.so.9         webinspector

libgobject-2.0.so.0.2200.3  libicuuc.so.38.1            libPocoZip.so.9

so according to this the file might already be there? just with the wrong name…
next fix attempt…
sudo cp build/linux/runtime/libPocoFoundation.so.9 build/linux/runtime/libPocoFoundation.so
(also tried putting a .1 .2 .3 .4 .5 .6 .7 .8 at the end of it still no luck)
next thing I tried…
echo PATH=$PATH:/usr/lib
no good
but I did happen to find this…
/home/android-sdk/.titanium/runtime/linux/1.0.0/libPocoFoundation.so
which I added to /etc/environment and restarted the VM.
  1. sudo vi /etc/environment
  2. /PATH
  3. $
  4. i
  5. :/home/android-sdk/.titanium/runtime/linux/1.0.0/
  6. [esc]
  7. :wq!
just in case…
echo $PATH
showed what I wanted, so I re-ran the build…
same error.
:~/Downloads/android/environment/titanium_desktop/installer/linux$ cat SConscript
#!/usr/bin/env python
import os.path as path
just the first couple lines, but show that it is indeed using the system path, and I have 2 locations with the lib it is looking for in my path…
right new method… looking at the error it says
scons: *** [build/linux/runtime/libkhost.so] Error 1
well, that file does not exist in that location, so I am going to try and put it there…
sudo cp /home/android-sdk/.titanium/runtime/linux/1.0.0/libkhost.so .
no change, still same error.
starting to look like I will have to build my Android apps from windows…
well after 3 hours of trying to figure it out, I have had an idea…
~/Downloads/android/environment/titanium_desktop$ sudo scons debug=1 sdkinstaller run=1
exact same problem…
going to bed, I’ll probably post this now and make anew post later if I try again… 3+ hours to install 1 application is more than my patients will normally allow for a round 2…

To get updates…

  1. cd ~/Downloads/android/environment/titanium_desktop
  2. git pull
  3. cd krull
  4. git pull

**********reference link for this information, I just made it more specific and actually tried to do it using these instructions…

and the following other useful blog posts and such…

http://ubuntuforums.org/showthread.php?t=932162

http://www.linuxquestions.org/questions/linux-software-2/make-error-usr-bin-ld-cannot-find-lxext-365646/

http://ubuntuforums.org/showthread.php?t=204908

don’t forget to get the Android SDK!!!

About

4 thoughts on “Ubuntu 10.04 x64 and installing Appcelerator Titanium Desktop mobile device development environment – a how to