It is important to use correct distro version as a build platform if you are planning to build software using standard GCC tools. See here how to choose a distribution with matching GLIBC version supported by your device so built software works correctly on older Linux systems.
ubuntu:20.04 (focal) is used for an example below.
$ lxc image list ubuntu:focal type=virtual-machine architecture=x86_64 --columns=Lfpdatsu
$ lxc launch ubuntu:20.04 synobuild-focal --profile=synobuild --vm
$ lxc exec synobuild-focal -- /bin/bash
root@synobuild-focal:~$ passwd ubuntu
root@synobuild-focal:~$ exitLXC container is an alternative way of setting up a lightweight build enviroment compared to a fully-fledged Virtual Machine setup.
$ TODO$ lxc exec synobuild-focal --force-interactive --user 1000 -- /bin/bash
$ git clone https://github.com/igorpupkinable/synobuild.git --depth=1 --branch=master --recurse-submodules ~/toolkitSkip this section if you need an enviroment for Synology DSM only. The following steps can be used to deploy build environment for other Synology networking devices. RT2600ac's ipq806x platform ID must be replaced by relevant platform ID in such case. Available toolkit platforms are listed at Synology Archive Download Site.
$ cd ~/toolkit/toolkit_tarballs/
$ wget https://global.synologydownload.com/download/ToolChain/toolkit/7.2/base/base_env-7.2.txz
$ wget --output-document=ds.ipq806x-1.3.env.txz https://global.synologydownload.com/download/ToolChain/toolkit/1.3/ipq806x/ds.ipq806x-1.3.env.tgz
$ wget --output-document=ds.ipq806x-1.3.dev.txz https://global.synologydownload.com/download/ToolChain/toolkit/1.3/ipq806x/ds.ipq806x-1.3.dev.tgz
$ ln -s base_env-7.2.txz base_env-1.3.txzThe following steps can be used to deploy build environment for other Synology storage devices. armada38x platform ID must be replaced by relevant platform ID in such case. Available toolkit platforms are listed at Synology Archive Download Site.
$ cd ~/toolkit/toolkit_tarballs/
$ wget https://global.synologydownload.com/download/ToolChain/toolkit/7.2/base/base_env-7.2.txz
$ wget https://global.synologydownload.com/download/ToolChain/toolkit/7.2/armada38x/ds.armada38x-7.2.env.txz
$ wget https://global.synologydownload.com/download/ToolChain/toolkit/7.2/armada38x/ds.armada38x-7.2.dev.txzbase_env-7.2.txz is common for all setups. No need to download it twice.
Proceed to the deployment of the downloaded Chroot environments decribed here
- SSH to an embeded device to run the following
$ strings /lib/libc.so.6 | grep GLIBC- Check the list for the latest version, e.g.
GLIBC_2.32
GLIBC_2.4
GLIBC_2.5
...
GLIBC_2.30
GLIBC_2.32
$- Browse to https://distrowatch.com/table.php?distribution=ubuntu
- Find glibc row in the Package table
- Find a column with required GLIBC version, i.e. 2.32
- Pick LTS Ubuntu version with matching GLIBC version or older, i.e.
GLIBC_2.23> 16.04 LTS (xenial)GLIBC_2.24> 16.04 LTS (xenial)GLIBC_2.25> 16.04 LTS (xenial)GLIBC_2.26> 16.04 LTS (xenial)GLIBC_2.27> 18.04 LTS (bionic)GLIBC_2.28> 18.04 LTS (bionic)GLIBC_2.29> 18.04 LTS (bionic)GLIBC_2.30> 18.04 LTS (bionic)GLIBC_2.31> 20.04 LTS (focal)GLIBC_2.32> 20.04 LTS (focal)GLIBC_2.33> 20.04 LTS (focal)GLIBC_2.34> 20.04 LTS (focal)GLIBC_2.35> 22.04 LTS (jammy)GLIBC_2.36> 22.04 LTS (jammy)GLIBC_2.37> 22.04 LTS (jammy)GLIBC_2.38> 22.04 LTS (jammy)GLIBC_2.39> 24.04 LTS (noble)
- We choose focal for GLIBC version 2.32 as the closest older LTS release.