Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

Manual Reference Pages  -  PERLSYNOLOGY (1)

.ds Aq ’


perlsynology - Perl 5 on Synology DSM systems



Synology manufactures a vast number of Network Attached Storage (NAS) devices that are very popular in large organisations as well as small businesses and homes.

The NAS systems are equipped with Synology Disk Storage Manager (DSM), which is a trimmed-down Linux system enhanced with several tools for managing the NAS. There are several flavours of hardware: Marvell Armada (ARMv5tel, ARMv7l), Intel Atom (i686, x86_64), Freescale QorIQ (PPC), and more. For a full list see the Synology FAQ <>.

Since it is based on Linux, the NAS can run many popular Linux software packages, including Perl. In fact, Synology provides a ready-to-install package for Perl, depending on the version of DSM the installed perl ranges from 5.8.6 on DSM-4.3 to 5.18.4 on DSM-5.1.

There is an active user community that provides many software packages for the Synology DSM systems; at the time of writing this document they provide Perl version 5.18.4.

This document describes various features of Synology DSM operating system that will affect how Perl 5 (hereafter just Perl) is configured, compiled and/or runs. It has been compiled and verified by Johan Vromans for the Synology DS413 (QorIQ), with feedback from H.Merijn Brand (DS213, ARMv5tel).

    Setting up the build environment

As DSM is a trimmed-down Linux system, it lacks many of the tools and libraries commonly found on Linux. The basic tools like sh, cp, rm, etc. are implemented using BusyBox <>.
o Using your favourite browser open the DSM management page and start the Package Center.
o If you want to smoke test Perl, install Perl.
o In Settings, add the following Package Sources:

o Still in Settings, in Channel Update, select Beta Channel.
o Press Refresh. In the left panel the item Community will appear. Click it. Select Bootstrap Installer Beta and install it.
o Likewise, install iPKGui Beta.

The application window should now show an icon for iPKGui.

o Start iPKGui. Install the packages make, gcc and coreutils.

If you want to smoke test Perl, install patch.

The next step is to add some symlinks to system libraries. For example, the development software expect a library that normally is a symlink to Synology only provides the latter and not the symlink.

Here the actual architecture of the Synology system matters. You have to find out where the gcc libraries have been installed. Look in /opt for a directory similar to arm-none-linux-gnueab or powerpc-linux-gnuspe. In the instructions below I’ll use powerpc-linux-gnuspe as an example.
o On the DSM management page start the Control Panel.
o Click Terminal, and enable SSH service.
o Close Terminal and the Control Panel.
o Open a shell on the Synology using ssh and become root.
o Execute the following commands:

  cd /lib
  ln -s
  ln -s
  ln -s
  cd /opt/powerpc-linux-gnuspe/lib  (or
  ln -s /lib/

<B>WARNING:B> When you perform a system software upgrade, these links will disappear and need to be re-established.

    Compiling Perl 5

When the build environment has been set up, building and testing Perl is straightforward. The only thing you need to do is download the sources as usual, and add a file as follows:

  # Administrivia.

  # Install Perl in a tree in /opt/perl instead of /opt/bin.

  # Select the compiler. Note that there is no cc alias or link.

  # Build flags.

  # Library and include paths.

You may want to create the destination directory and give it the right permissions before installing, thus eliminating the need to build Perl as a super user.

In the directory where you unpacked the sources, issue the familiar commands:

  ./Configure -des
  make test
  make install

    Known problems


No known problems yet

Error message ‘‘No error definitions found’’. This error is generated when it is not possible to find the local definitions for error codes, due to the uncommon structure of the Synology file system.

This error was fixed in the Perl development git for version 5.19, commit 7a8f1212e5482613c8a5b0402528e3105b26ff24.

Failing tests
ext/DynaLoader/t/DynaLoader.t One subtest fails due to the uncommon structure of the Synology file system. The file /lib/ is missing.

<B>WARNING:B> Do not symlink /lib/ to /lib/ or some system components will start to fail.

    Smoke testing Perl 5

If building completes successfully, you can set up smoke testing as described in the Test::Smoke documentation.

For smoke testing you need a running Perl. You can either install the Synology supplied package for Perl 5.8.6, or build and install your own, much more recent version.

Note that I could not run successful smokes when initiated by the Synology Task Scheduler. I resorted to initiating the smokes via a cron job run on another system, using ssh:

  ssh nas1 wrk/Test-Smoke/smoke/

Local patches

When local patches are applied with smoke testing, the test driver will automatically request regeneration of certain tables after the patches are applied. The Synology supplied Perl 5.8.6 (at least on the DS413) <B>is NOT capableB> of generating these tables. It will generate opcodes with bogus values, causing the build to fail.

You can prevent regeneration by adding the setting

  flags => 0,

to the smoke config, or by adding another patch that inserts

  exit 0 if $] == 5.008006;

in the beginning of the program.

    Adding libraries

The above procedure describes a basic environment and hence results in a basic Perl. If you want to add additional libraries to Perl, you may need some extra settings.

For example, the basic Perl does not have any of the DB libraries (db, dbm, ndbm, gdsm). You can add these using iPKGui, however, you need to set environment variable LD_LIBRARY_PATH to the appropriate value:


This setting needs to be in effect while Perl is built, but also when the programs are run.


March 2015, for Synology DSM 5.1.5022.


Johan Vromans <> H. Merijn Brand <>
Search for    or go to Top of page |  Section 1 |  Main Index

perl v5.22.1 PERLSYNOLOGY (1) 2015-10-17

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.