01/28/2008

Self compiling - ncftp

I tried today to build ncftp on Angstrom Zaurus, so called self-compiling. I've already cross-built it with Code Sourcery's toolchain. This is another experiment to see how Angstrom toolchain works.

Following packages are required to build ncftp.
# ipkg update
# ipkg install task-sdk-bare
# ipkg install gcc
# ipkg install gcc-symlinks
# ipkg install binutils-dev
# ipkg install make
Let's see how Zaurus compiles ncftp by itself.
# wget ftp://ftp.ncftp.com/ncftp/ncftp-3.2.1-src.tar.bz2
# tar jxvf ncftp-3.2.1-src.tar.bz2
# cd ncftp-3.2.1/

# time ./configure
real 2m 51.54s
user 1m 51.79s
sys 0m 56.83s

# time make
ERROR: busybox ar [-o] ....
It seems archiver's version difference. I found ar in my Zaurus is just a symbolic link to busybox, so I changed it to Angstrom toolchain.
# ls -l /usr/bin/ar
ar -> busybox

# cd /usr/bin
# rm ar
# ln -s arm-angstrom-gnueabi-ar ar
Try again.
# make clean
# time make
make[1]: strip: Command not found
It was not exactly an error but it's easy to fix.
# cd /usr/bin
# rm ar
# ln -s arm-angstrom-gnueabi-strip strip
Last try.
# make clean
# time make
real 9m 1.36s
user 8m 18.01s
sys 0m 38.55s
With my cross compile environment on my Ubuntu PC, same thing could be done way faster.
$ time ./configure --host=arm-none-linux-gnueabi --prefix=/opt/arm-cc
real 0m24.485s
user 0m7.580s
sys 0m3.092s

$ patch -p0 < ncftp-3.2.1-arm-linux.patch

$ time make
real 0m33.728s
user 0m22.741s
sys 0m2.908s
But. Question is how easily we can make a patch. If there's already some patches available, cross compiling is good and fast. If not, self compiling environment would be a nice backup.
posted by 安藤恐竜 at 17:48 | Comment(0) | TrackBack(0) | 日記
Comments for this entry
Leave your comment
Name: [Must]

EMail: [Must]

URL: [Must]

Comment: [Must]

Confirmation Code: [Must]


Type in alphabets what you see in this image.
Trackback URI:  http://blog.seesaa.jp/tb/81094499
Trackback entries must contain URL of this entry.

Trackbacks to this entry
×

この広告は1年以上新しい記事の投稿がないブログに表示されております。