I require a build environment on my Synology, to be able to compile and link applications. For that purpose, the optware-devel package exists:

/volume1 # ipkg info optware-devel
Package: optware-devel
Version: 6.8-10
Depends: autoconf, automake, bash, bison, bzip2, coreutils, diffutils, file, findutils, flex, gawk, groff, gzip, libstdc++, libtool, make, m4, ncurses, openssl, patch, perl, pkgconfig, python25, rsync, sed, svn, tar, tcl, wget-ssl, binutils, libc-dev, gcc
Status: unknown ok not-installed
Section: util
Architecture: arm
maintainer: NSLU2 Linux <nslu2-linux@yahoogroups.com>
MD5Sum: 3a695d6d523b0626e12bf690b0d79edb
Size: 875
Filename: optware-devel_6.8-10_arm.ipk
Source: /
Description: This is a meta package that bundles all the packages required for optware native development. When fully functional, it should be self-hosting on the target platform.

Successfully terminated.
/volume1 #

So, I installed the optware-devel package:

/volume1 # ipkg install optware-devel
Installing optware-devel (6.8-10) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/optware-devel_6.8-10_arm.ipk
package apr-util suggests installing openldap-libs
package tar suggests installing gzip
package tar suggests installing xz-utils
Installing autoconf (2.68-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/autoconf_2.68-1_arm.ipk
Installing make (3.82-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/make_3.82-1_arm.ipk
Installing m4 (1.4.16-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/m4_1.4.16-1_arm.ipk
Installing automake (1.11.1-2) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/automake_1.11.1-2_arm.ipk
Installing bison (2.4.1-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/bison_2.4.1-1_arm.ipk
Installing file (5.09-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/file_5.09-1_arm.ipk
Installing flex (2.5.35-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/flex_2.5.35-1_arm.ipk
Installing gawk (4.0.0-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/gawk_4.0.0-1_arm.ipk
Installing gzip (1.4-4) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/gzip_1.4-4_arm.ipk
Installing libtool (1.5.26-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/libtool_1.5.26-1_arm.ipk
Installing patch (2.6.1-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/patch_2.6.1-1_arm.ipk
Installing perl (5.10.0-6) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/perl_5.10.0-6_arm.ipk
Installing gdbm (1.8.3-4) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/gdbm_1.8.3-4_arm.ipk
Installing pkgconfig (0.15.0-2) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/pkgconfig_0.15.0-2_arm.ipk
Installing sed (4.2.1-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/sed_4.2.1-1_arm.ipk
Installing svn (1.6.17-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/svn_1.6.17-1_arm.ipk
Installing neon (0.29.3-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/neon_0.29.3-1_arm.ipk
Installing apr (1.4.5-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/apr_1.4.5-1_arm.ipk
Installing apr-util (1.3.12-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/apr-util_1.3.12-1_arm.ipk
Installing expat (2.0.1-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/expat_2.0.1-1_arm.ipk
Installing cyrus-sasl-libs (2.1.23-2) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/cyrus-sasl-libs_2.1.23-2_arm.ipk
Installing openldap-libs (2.3.43-2) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/openldap-libs_2.3.43-2_arm.ipk
Installing tar (1.26-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/tar_1.26-1_arm.ipk
Installing tcl (8.4.19-2) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/tcl_8.4.19-2_arm.ipk
Installing wget-ssl (1.12-2) to root...
Configuring apr
Configuring apr-util
Configuring autoconf
Configuring automake
Configuring bison
Configuring cyrus-sasl-libs
Configuring expat
Configuring file
Configuring flex
Configuring gawk
update-alternatives: Linking //opt/bin/awk to /opt/bin/gawk
Configuring gdbm
Configuring gzip
update-alternatives: Linking //opt/bin/gunzip to /opt/bin/gzip-gunzip
update-alternatives: Linking //opt/bin/gzip to /opt/bin/gzip-gzip
update-alternatives: Linking //opt/bin/zcat to /opt/bin/gzip-zcat
Configuring libtool
Configuring m4
Configuring make
Configuring neon
Configuring openldap-libs
Configuring patch
update-alternatives: Linking //opt/bin/patch to /opt/bin/patch-patch
Configuring perl
Configuring pkgconfig
Configuring sed
update-alternatives: Linking //opt/bin/sed to /opt/bin/gnu-sed
Configuring svn
Configuring tar
update-alternatives: Linking //opt/bin/tar to /opt/bin/gnutar
Configuring tcl
An error ocurred, return value: 1.
Collected errors:
ERROR: The following packages conflict with wget-ssl:
wget
/volume1 #

Note that as soon as wget-ssl was about to get installed, ipkg started to configure all packages. However, it was not ready with downloading and installing all packages for optware-devel, as I will show you later on. If you look very closely, you'll see that the wget-ssl package actually is NOT downloaded at all...

Apparently, wget was already installed. So I quickly removed wget:

/volume1 # ipkg remove wget
Removing package wget from root...
Successfully terminated.
/volume1 #

And retried optware-devel:

/volume1 # ipkg install optware-devel
Installing optware-devel (6.8-10) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/optware-devel_6.8-10_arm.ipk
file_move: ERROR: failed to rename /opt/ipkg-Q93C5A/optware-devel_6.8-10_arm.ipk to /opt/ipkg-Q93C5A/optware-devel_6.8-10_arm.ipk: No such file or directory
Nothing to be done
An error ocurred, return value: -1.
Collected errors:
Failed to download optware-devel. Perhaps you need to run 'ipkg update'?
/volume1 #

What?

/volume1 # ipkg update
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/Packages.gz
ipkg: /opt/ipkg-ygAKJa/Packages.gz: No such file or directory
file_copy: ERROR: failed to copy /opt/ipkg-ygAKJa/Packages.gz to /tmp/ipkg.xQty5H/cross.gz
An error ocurred, return value: 1.
/volume1 #

WTF?!

The problem here is that ipkg depends on wget. ipkg shouldn't have allowed me to remove wget!

To solve this, I had to download both the wget-ssl and libidn packages from (in my case) http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable. I used another machine for that and placed those files in my admin folder:

/volume1 # ipkg install /volume1/homes/admin/wget-ssl_1.12-2_arm.ipk
Installing wget-ssl (1.12-2) to root...
Installing libidn (1.21-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/libidn_1.21-1_arm.ipk
file_move: ERROR: failed to rename /opt/ipkg-ZSflu1/libidn_1.21-1_arm.ipk to /opt/ipkg-ZSflu1/libidn_1.21-1_arm.ipk: No such file or directory
Nothing to be done
An error ocurred, return value: -1.
Collected errors:
Failed to download libidn. Perhaps you need to run 'ipkg update'?
/volume1 #

wget-ssl depends on libidn, but wget isn't working yet, although the wget package did install. Note the slightly different error message:

/volume1 # ipkg install /volume1/homes/admin/wget-ssl_1.12-2_arm.ipk
Installing wget-ssl (1.12-2) to root...
Installing libidn (1.21-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/libidn_1.21-1_arm.ipk
Nothing to be done
An error ocurred, return value: 22.
Collected errors:
ipkg_download: ERROR: Command failed with return value 41: `wget --passive-ftp -q -P /opt/ipkg-OHdmQ3 http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/libidn_1.21-1_arm.ipk'
Failed to download libidn. Perhaps you need to run 'ipkg update'?
/volume1 #

So I installed libidn also by hand:

/volume1 # ipkg install /volume1/homes/admin/libidn_1.21-1_arm.ipk
Installing libidn (1.21-1) to root...
Configuring libidn
Successfully terminated.
/volume1 #

Now everything seems to be in order again:

/volume1 # ipkg install /volume1/homes/admin/wget-ssl_1.12-2_arm.ipk
Installing wget-ssl (1.12-2) to root...
Configuring wget-ssl
Successfully terminated.
/volume1 # ipkg update
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/Packages.gz
Inflating http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/Packages.gz
Updated list of available packages in /opt/lib/ipkg/lists/cross
Successfully terminated.
/volume1 #

Now I continued to install optware-devel, there are still packages left:

/volume1 # ipkg install optware-devel
Installing optware-devel (6.8-10) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/optware-devel_6.8-10_arm.ipk
Installing libc-dev (2.5-5) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/libc-dev_2.5-5_arm.ipk
Installing libnsl (2.5-4) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/libnsl_2.5-4_arm.ipk
Installing gcc (4.2.3-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/gcc_4.2.3-1_arm.ipk
Configuring gcc
Configuring libc-dev
Configuring libnsl
Configuring optware-devel
Successfully terminated.
/volume1 # ipkg install optware-devel
Package optware-devel (6.8-10) installed in root is up to date.
Nothing to be done
Successfully terminated.
/volume1 #

Pfew! :-) Fixed.