Ernst Martin Witte's Homepage

Optware/ipkg (hopefully) right on Synology DS213+ with DSM 4.2

Lego & Povray
Optware/ipkg on DSM4.2
Junges Sinfonieorchester Aachen
Brucknerorchester Coburg

Initial Joy with Optware/ipkg

When setting up my new Synology DS213+, I was quite reluctant to find the ready-made Optware/ipkg packages as documented at

This worked very well for setting up my Canon MP610 not only for printing but also for scanning via saned according to these instructions:
(unfortunately in German, but the command line examples are quite universal ;-) However, this HowTo already indicates that something might not be perfectly ok with the repositories for the DS213+/DSM4.2, as the libusb does not work properly. However, it is recommended to replace the libusb files by links to the Synology system libraries.

Disillusion: Perl is not working!

However, it soon came to the point I need a recent Perl installation, as my goal is a munin server running on the NAS. At this point I experienced the problems many others already reported:
root@nas:/volume1/public/optware.old/optware.svn/platforms# perl -e 'print "x\n"; '
perl: relocation error: /opt/lib/perl5/5.8.8/ppc-linux/CORE/ symbol __eqdf2, version GLIBC_2.3.3 not defined in file with link time reference
The reason for this problem is that the the packages available on are built based on a quite outdated toolchain not matching DSM 4.2 any more.

Back to the roots!

Please note: This is work in progress, I'm not yet sure if this way will succeed in the end.

After realizing this fundamental issue that the ready-made packages are not matching my DSM 4.2 at all, and that recent/matching Optware packages will likely not be available online, I started digging into ways how to setup up own self-compiled Optware repository. I found the basic initial steps at:

For my personal use, I decided to use gitsvn instead of a plain svn:

 git svn clone optware.gitsvn
In my case the cloning was interupted, but could be continued easily by
 cd optware.gitsvn
 git svn fetch
Before now continuing with the instructions from some preparations for the right compilation for the Synology DS213+ with DSM 4.2 are necessary.
  • First we need the right toolchain. You can find all Synology NAS GPL Sources and ready-made tool chains on the Synology DS Sourceforge page: In my case with my DS213+ I'm using the DSM 4.2 Tool Chain for the PowerPC QorIQ Linux 2.6.32. In order to integrate this as new platform in my Optware clone, I created the file

Tool/Library Versions in DSM 4.2 GPL Code

  • gcc: 4.3.2
  • binutils: 2.18.50 (fixme: only 2.18 and 2.18a officially exist)
  • glibc: 2.8
  • Kernel:
  • libusb: 0.1.12


  • openldap: seems that something with the libtool is broken. After compilation, builds/openldap/libraries/libldap/.libs/ (with the "T" at the end) exists which triggers some relink by libtool in case some other package depends on openldap. In my case, removing this file solves the problem.
  • binutils: configure with --disable-werror, needs upgrade to 2.18 to match DSM 4.2 / gcc 4.3.2
  • gcc: add libmpfr, compile with -j1, additional patches (documentation, etc.)
  • openssl: -j1
  • libusb: The Synology GPL Source Code for the 3201 branch (my DSM 4.2 kernel is labeled 3202) indicates libusb version 0.1.12. With this version natively compiled, the saned ist now working properly with the Optware libusb!
  • perl: I had to do the following preparations:
    • download perl source code (e.g. perl-5.16.3)
    • unpack + run configure on my nas
      ./Configure  -Dcc=gcc -Dprefix=/opt -Duseshrplib -Dd_dlopen -de
    • copy from this test directory to source/perl/5.16/, replace lns variable by the general system ln command.
    • ...many further patches, see patch set below

Current State

My current patch set can be found at:


Dedicated Working Packages

  • gcc 4.3.2 / binutils / ...
  • libusb
  • perl 5.16.3
  • sane-backends
  • most recent x11 client libraries
  • most recent libpango, libcairo, fontconfig, freetype, ...
  • most recent rrdtool
Further packages I use work well, but are not listed here since my focus was on perl so far... next steps will consider munin / apache.
Ernst Martin Witte
Letzte Änderung: 31.10.2016 14:27