#3 .
Which Ubuntu 12.10 ? I.e. "12.10" comes in more the one architecture.
REPEAT : What's the output from this command : $ uname -m
Build example, Ubuntu 12.10 - 32bits (i386 / i686) :
A) sudo apt-get install \
g++ g++-4.4 patch autoconf automake libtool libxmu-dev xgraph
B)
1) $ tar xvf ns-allinone-2.34.tar.gz
2) $ cd ns-allinone-2.34/
3) $ patch -p0 < otcl_ns234_gcc-4.4.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing
4) $ tar xvf leach+pegasis-ns234-files-2.tar.gz
5) $ export CC=gcc-4.4 CXX=g++-4.4 && ./install
6) $ cd ns-2.34/
7) $ sudo make install
-