I've wrote a small tutorial on how to compile programs (from source), I've got little experience in compiling stuff but with the help of my
friend gooooogle and the synology "NAS Server 3rd-Party Apps Integration Guide" I've succesfully compiled some small programs:
antiword
pdftohtml
ppttohtml
xlhtml
I needed these programs for my knowledgebase to index doc, xls, ppt, and pdf files.
I hope it's usefull for them who want to compile some programs for there synology, Keep in mind that I use a DS109 with a marvell 88F6281 ARM
processor, I think this tutorial can also be usefull for people with other synology products but the need to do some modification (different toolchain,etc)
This (small) tutorial exists of a Cross_compile tutorial on Ubuntu and a tutorial How to compile on the synology box itself.
good luck.
Grtz
Sigma
Synology Ds109 Cross Compile package on ubuntu:
(need a ./configure file in the source package)
.) Install compiler tools in ubuntu: sudo aptitude install build-essential
.) Download toolchain from: http://downloads.sourceforge.net/projec ... 281.tar.gz
.) Extract: tar zxpf gcc343_glibc232_88f5281.tar.gz –C /usr/local/
.) Extract source files (from the program you want to compile) to: /usr/local/arm-none-linux-gnueabi/bin/ ; Just to make it easier to find the program
.) open terminal as [root] (sudo su) and enter: export PATH="${PATH}:/usr/local/arm-none-linux-gnueabi/bin:/usr/bin:/bin"
.) go the directory where the source files are: cd /usr/local/arm-none-linux-gnueabi/bin
.) run configure as follow: ./configure --host=arm-none-linux-gnueabi --target=arm-none-linux-gnueabi --build=i686-pc-linux --prefix=/usr/local
.) run make as follow: make CC=arm-none-linux-gnueabi-gcc ARCH=arm
Compile on synology box (need Optware installed):
.) ipkg install gcc
.) ipkg install make automake autoconf libtool binutils
.) ipkg install crosstool-native optware-devel (ignore the following error:
Configuring zlib
An error ocurred, return value: 1.
Collected errors:
Cannot find package crosstool-native.
Check the spelling or perhaps run 'ipkg update'
ERROR: The following packages conflict with wget-ssl:
.) Download source files of the package to FS_root (file system root)
.) "cd" to the directory where the package is installed
.) if you got a configure file just type: .configure
.) if you haven't got a configure file run: make ARCH=arm
.) try if you can start the compiled program with <program name> or ./<program name> if it works copy it to where you need it (example: /usr/bin)
If you have problems compiling on the synology box then use cross_compile on Ubuntu
I haven't figured out how to Cross_compile on Ubuntu without a configure file I've tried:
make CC=/usr/local/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc
but is doesn't seems to work (program is still i686 based)
EDIT: modified the 1 version of this post and checked the compile on box tutorial


