This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
new perldelta
[perl5.git] / README.synology
index c02a544..8d6f41a 100644 (file)
@@ -1,3 +1,5 @@
+# vim: syntax=pod
+
 If you read this file _as_is_, just ignore the funny characters you see.
 It is written in the POD format (see pod/perlpod.pod) which is specially
 designed to be readable as is. But if you have been into Perl you
 If you read this file _as_is_, just ignore the funny characters you see.
 It is written in the POD format (see pod/perlpod.pod) which is specially
 designed to be readable as is. But if you have been into Perl you
@@ -18,29 +20,109 @@ 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
 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
-L<Synology FAQ|http://forum.synology.com/wiki/index.php/What_kind_of_CPU_does_my_NAS_have>.
+L<Synology FAQ|https://kb.synology.com/en-global/DSM/tutorial/What_kind_of_CPU_does_my_NAS_have>.
 
 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
 
 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.
+the installed perl ranges from 5.8.6 on DSM-4.3 to 5.28.1 on DSM-7.1.
 
 There is an active user community that provides many software packages
 for the Synology DSM systems; at the time of writing this document
 
 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.
+they provide Perl version 5.28.1.
 
 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
 
 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).
+H.Merijn Brand (DS213: ARMv5tel, RS815: Intel Atom x64, and DS218+:
+Celeron J3355).
 
 =head2 Setting up the build environment
 
 
 =head2 Setting up the build environment
 
+=head3 DSM 7
+
+For a comfortable development environment, Entware is currently the only
+viable solution. Just follow the detailed instructions on
+L<Install Entware on Synology NAS|https://github.com/Entware/Entware/wiki/Install-on-Synology-NAS>.
+supported architectures are armv5, armv7, mipsel, wl500g, x86_32, and x86_64.
+Check L<here|https://pkg.entware.net/binaries/> for supported platforms.
+
+That github link also shows what environments should be supported.
+
+It was tested on DSM-7.1 by H.Merijn Brand on a DS218+ and a DS220+ (both
+Intel x64).
+
+Entware comes with a precompiled 5.26.1 (Jan 2018) that allowes
+building shared XS code. Note that this installation does B<not> use
+a site_perl folder. The available C<cpan> works. If all required
+development packages are installed too, also for XS.
+
+Installing perl from the Community package center:
+
+=over 4
+
+=item *
+
+Using your favourite browser open the DSM management page and start
+the Package Center.
+
+=item *
+
+In Settings, add the following Package Sources:
+
+  Name:     Community
+  Location: https://synopackage.com/repository/spk/All
+
+=item *
+
+Still in Settings, in Channel Update, select Beta Channel.
+
+=back
+
+To complete the development environment, install make and gcc
+
+ ds220# opkg install make gcc
+
+Then, optionally, make sure you use the more recent bash and gawk.
+
+ ds220# opkg install bash gawk
+ ds220# cd /usr/bin
+ ds220# mv bash bash.syno
+ ds220# ln -s /opt/bin/bash .
+
+In order to have Configure find the required libraries
+
+ ds220# cd /opt/lib
+ ds220# ln -s libcrypt.so.?       libcrypt.so
+ ds220# ln -s libdl.so.?          libdl.so
+ ds220# ln -s libgdbm.so.?        libgdbm.so
+ ds220# ln -s libgdbm_compat.so.? libgdbm_compat.so
+ ds220# ln -s libm.so.?           libm.so
+ ds220# ln -s libpthread.so.?     libpthread.so
+ ds220# ln -s libutil.so.?        libutil.so
+
+=head3 DSM 6
+
+Using iPkg has been deprecated on DSM 6, but an alternative is available
+for DSM 6: entware/opkg. For instructions on how to use that, please read
+L<Install Entware-ng on Synology NAS|https://github.com/Entware-ng/Entware-ng/wiki/Install-on-Synology-NAS>
+
+That sadly does not (yet) work on QorIQ. At the moment of writing, the
+supported architectures are armv5, armv7, mipsel, wl500g, x86_32, and x86_64.
+Check L<here|https://pkg.entware.net/binaries/> for supported platforms.
+
+Entware-ng comes with a precompiled 5.24.1 (June 2017) that allowes
+building shared XS code. Note that this installation does B<not> use
+a site_perl folder. The available C<cpan> works. If all required
+development packages are installed too, also for XS.
+
+=head3 DSM 5
+
 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
 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
-L<BusyBox|http://en.wikipedia.org/wiki/BusyBox>.
+L<BusyBox|https://en.wikipedia.org/wiki/BusyBox>.
 
 =over 4
 
 
 =over 4
 
@@ -57,9 +139,12 @@ If you want to smoke test Perl, install C<Perl>.
 
 In Settings, add the following Package Sources:
 
 
 In Settings, add the following Package Sources:
 
-  http://www.cphub.net
+  https://www.cphub.net
   http://packages.quadrat4.de
 
   http://packages.quadrat4.de
 
+As these two are both discontinued, it is unlikely you will be able
+to set up a build environment on DSM 5.
+
 =item *
 
 Still in Settings, in Channel Update, select Beta Channel.
 =item *
 
 Still in Settings, in Channel Update, select Beta Channel.
@@ -141,16 +226,18 @@ sources as usual, and add a file Policy.sh as follows:
   # Install Perl in a tree in /opt/perl instead of /opt/bin.
   prefix=/opt/perl
 
   # Install Perl in a tree in /opt/perl instead of /opt/bin.
   prefix=/opt/perl
 
-  # Select the compiler. Note that there is no 'cc' alias or link.
+  # Select the compiler. Note that there is no 'cc' alias or link
+  # on older DSM versions
   cc=gcc
   cc=gcc
+  awk=/opt/bin/gawk
 
 
-  # Build flags.
+  # Build flags. Optional
   ccflags="-DDEBUGGING"
 
   # Library and include paths.
   ccflags="-DDEBUGGING"
 
   # Library and include paths.
-  libpth="/lib"
   locincpth="/opt/include"
   locincpth="/opt/include"
-  loclibpth="/lib"
+  loclibpth="/opt/lib /usr/local/lib /usr/lib"
+  libpth="/opt/lib /usr/local/lib /usr/lib"
 
 You may want to create the destination directory and give it the right
 permissions before installing, thus eliminating the need to build Perl
 
 You may want to create the destination directory and give it the right
 permissions before installing, thus eliminating the need to build Perl
@@ -159,16 +246,19 @@ as a super user.
 In the directory where you unpacked the sources, issue the familiar
 commands:
 
 In the directory where you unpacked the sources, issue the familiar
 commands:
 
-  ./Configure -des
-  make
-  make test
-  make install
+  $ bash ./Configure -Dusedevel -Duseshrplib -Duse64bitall -des
+  $ make -j2
+  $ env TEST_JOBS=2 make test_harness
+  make install
 
 =head2 Known problems
 
 =head3 Configure
 
 
 =head2 Known problems
 
 =head3 Configure
 
-No known problems yet
+The GNU C-compiler might spit out unexpected stuff under -v, which
+causes the analysis of cppsymbols to fail because of unmatched quotes.
+
+You'll note if config.sh fails with a syntax error.
 
 =head3 Build
 
 
 =head3 Build
 
@@ -189,17 +279,17 @@ commit 7a8f1212e5482613c8a5b0402528e3105b26ff24.
 
 =over 4
 
 
 =over 4
 
-=item C<ext/DynaLoader/t/DynaLoader.t>
+=item F<ext/DynaLoader/t/DynaLoader.t>
 
 One subtest fails due to the uncommon structure of the Synology file
 
 One subtest fails due to the uncommon structure of the Synology file
-system. The file C</lib/glibc.so> is missing.
+system. The file F</lib/glibc.so> is missing.
 
 
-B<WARNING:> Do not symlink C</lib/glibc.so.6> to C</lib/glibc.so> or
+B<WARNING:> Do not symlink F</lib/glibc.so.6> to F</lib/glibc.so> or
 some system components will start to fail.
 
 =back
 
 some system components will start to fail.
 
 =back
 
-=head2 Smoke testing Perl 5
+=head2 Smoke testing Perl
 
 If building completes successfully, you can set up smoke testing as
 described in the Test::Smoke documentation.
 
 If building completes successfully, you can set up smoke testing as
 described in the Test::Smoke documentation.
@@ -250,11 +340,11 @@ the programs are run.
 
 =head1 REVISION
 
 
 =head1 REVISION
 
-March 2015, for Synology DSM 5.1.5022.
+July 2022, for DSM 5.1.5022 and DSM 6.1-15101-4, and DSM-7.1-42661-3.
 
 =head1 AUTHOR
 
 Johan Vromans <jvromans@squirrel.nl>
 
 =head1 AUTHOR
 
 Johan Vromans <jvromans@squirrel.nl>
-H. Merijn Brand <h.m.brand@xs4all.nl>
+H. Merijn Brand <cpan@tux.freedom.nl>
 
 =cut
 
 =cut