Compiling Software for the Fonz fun_plug

This tutorial is for advanced users only!

Fonz provides many pre-compiled packages for the NAS in his repository, but obviously cannot provide every package which someone out there might need. So to help users compile and link packages themselves, Fonz has created a complete software environment for building packages for the NAS device.

This ffpbuildenv environment consists of a few scripts and a standardized process for building software packages. It runs on the NAS itself, rather than requiring special cross-compilation tools on a PC. This helps guarantee full compatibility with the target system and ensures that the environment is familiar to developers with a Linux background.

The following tutorial builds on Fonz’s work, but also contains procedures and descriptions by Uli. User PeterH did his usual testing and polishing routine on this text.

Contents

Preparations

Setup a fun_plug and install ALL packages available as described in the linked tutorial.

Setup

ffpbuildenv can best be installed on one of the hard disks:

mkdir /mnt/HD_a2/ffpbuildenv
cd /mnt/HD_a2/ffpbuildenv
svn co svn://inreto.de/svn/dns323/funplug/trunk .

These steps create a new directory on drive /mnt/HD_a2/ and copy the required files from Fonz’ repository using the [http://en.wikipedia.org/wiki/Subversion_(software) Subversion] version control system.

General Use

Chrooting to the build environment

To get a well-defined environment, you chroot to this directory using a script appropriately called chroot.sh:

cd /mnt/HD_a2/ffpbuildenv/
sh chroot.sh
cd /mnt/HD_a2/ffpbuildenv/source/

It makes the ffpbuildenv look like the root directory of the file system, at least for the current process. Note that the chroot step creates a new command shell running within your current command shell: if you later exit from the that shell, you end up back in the original shell.

Downloading the distribution file

cd /mnt/HD_a2/ffpbuildenv/source/
./Make.sh -F <PACKAGENAME>

Compiling a package

cd /mnt/HD_a2/ffpbuildenv/source/
./Make.sh <PACKAGENAME>

The compiled and packaged archive is placed in /mnt/HD_a2/ffpbuildenv/packages/ then. Errors are logged to /mnt/HD_a2/ffpbuildenv/build-logs/--.log

Setting up a package

If you take a look into the directory of a package, you will see several files. In the following text, I will describe lighttpd if not stated otherwise.

Required files

PR

Tells the Revision of the compiled package. E.g. if you compiled a package, forgot to include something and want to redo the package, e.g. the third version of php-5.2.6: php-5.2.6-3.tgz

1

PV

This is the version of the source code, e.g. lighttpd-1.4.20.tar.bz2

1.4.20

SRC_URI

Link to the source-file. You can use the following variables:

  • $PV – Packageversion – Value from above
  • $PN – Packagename – Value from above
  • $P – Concated Variable: “Packagename-Packageversion” ($PN-$PV)
http://www.lighttpd.net/download/lighttpd-$PV.tar.bz2

This will result in http://www.lighttpd.net/download/lighttpd-1.4.20.tar.bz2

Optional files

DESC

Describes the package. If present, it is shown during installation.

Lighttpd is a secure, speedy, compliant, and very flexible web-server
which is designed and optimized for for high-performance environments.
With a small memory footprint compared to other web-servers, effective
management of the CPU-load, and advanced feature set (FastCGI, SCGI,
Auth, Output-Compression, URL-Rewriting and many more) lighttpd is the
perfect solution for every server that is suffering load problems.
[pkgsrc]

HOMEPAGE

This is the general homepage of the program.

http://www.lighttpd.net/

doinst.sh

This file gets executed during the installation of a compiled package. Here you can add additional commands, like adding system accounts or printing additional information.

This file is not needed in lighttpd, the code below is from sudo

def()
{
        if [ ! -r "$1" ]; then
                mv $1.new $1
        elif cmp -s $1 $1.new; then
                rm $1.new
        fi
}
 
def ffp/etc/sudoers

configure.sh

This file is used for configuring the source code with other commands than ./configure. If it is not available ./configure with the optional configure_args (see below) will be run in the source directory.

This file is not needed in lighttpd, the code below is from openssl

    ./config \
        --prefix=$CPREFIX \
        --openssldir=$CSYSCONFDIR/ssl \
        zlib shared

configure_args

These arguments are used, if there is no configure.sh available in the directory. Only the part after ./configure is included!

--libdir=$CPREFIX/lib/$P
--program-prefix=""
--with-openssl
--with-pcre
--with-zlib

destdir.sh

Optional

This file is used for “make” on the source code. If it is not available,

make DESTDIR=$D install

will be used in the source directory.

This file is not needed in lighttpd, the code below is from screen

    make DESTDIR=$D install
    mkdir -p $D$CPREFIX/etc
    install -m 0644 etc/etcscreenrc $D$CPREFIX/etc/screenrc

destdir-*.sh

Additional actions like moving or adding files. * can be replaced by etc or whatever, they all are run after compilation.

This is the content of destdir-etc.sh:

mkdir -p $D$CPREFIX/etc/examples
cd $X/etc/examples
install -m 0644 -o root -g root \
        lighttpd.conf lighttpd.conf-with-php \
        $D$CPREFIX/etc/examples

start-*.sh

These files get installed into the directory “/ffp/start/” during the installation. These contain a starter file.

This is the content of start-kickwebs.sh:

#!/ffp/bin/sh
 
# PROVIDE: kickwebs
# REQUIRE: LOGIN
# BEFORE: lighttpd
 
. /ffp/etc/ffp.subr
name="kickwebs"
start_cmd="kickwebs_start"
stop_cmd=:
 
kickwebs_start()
{
        echo "Kicking webs ..."
        killall webs
}
 
run_rc_command "$1"

This is the content of start-lighttpd.sh:

#!/ffp/bin/sh
 
# PROVIDE: lighttpd
# REQUIRE: LOGIN
 
. /ffp/etc/ffp.subr
 
name="lighttpd"
command="/ffp/sbin/lighttpd"
lighttpd_flags="-f /ffp/etc/lighttpd.conf"
required_files="/ffp/etc/lighttpd.conf"
 
run_rc_command "$1"

Walk-through

Install an editor (like nano), you will need one for editing the above files.

This walk-through will show you how to compile nano.

We start by changing to the correct directory:

>cd /mnt/HD_a2/ffpbuildenv/source/

Now we create the directory and change to it:

mkdir nano
cd nano

We open http://www.nano-editor.org/ for the latest stable version, which is 2.0.9. Open the file PV for the package version:
And enter 2.0.9.

Reset PR, we do this process for the first time. Open PR:
And enter 1.

Now we search for the [http://www.nano-editor.org/download.php download-url]. Is there a consistent way of numbering the releases? The example of nano shows us this numbering:

http://www.nano-editor.org/dist/v2.0/nano-2.0.6.tar.gz
http://www.nano-editor.org/dist/v2.0/nano-2.0.7.tar.gz
http://www.nano-editor.org/dist/v2.0/nano-2.0.8.tar.gz
http://www.nano-editor.org/dist/v2.0/nano-2.0.9.tar.gz

Do you see the similarity?
If so, then we can substitute the version by using $PV:

http://www.nano-editor.org/dist/v2.0/nano-$PV.tar.gz

If not, you need to enter the url manually:

http://www.nano-editor.org/dist/v2.0/nano-2.0.9.tar.gz

Pull this URL to SRC_URI.

Now we fulfilled the requirements for compiling, but nano will fail in some sections with these settings due to missing libraries (spellchecker). So we need to add some configure arguments using configure_args:

--enable-nanorc
--enable-color
--enable-multibuffer
--disable-speller

Now everything is set for compiling. Now we chroot to the respective directory:

sh /mnt/HD_a2/ffpbuildenv/chroot.sh
cd /mnt/HD_a2/ffpbuildenv/source/

And run the download:

./Make.sh -F nano

And run the compilation:

./Make.sh nano

This will take a while. If you get you prompt back and the line above states “OK.” everything went fine and you will find the final package in /mnt/HD_a2/ffpbuildenv/packages/. Otherwise, you should check the log:

tail /mnt/HD_a2/ffpbuildenv/build-logs/nano*log

78 thoughts on “Compiling Software for the Fonz fun_plug”

  1. Tried to follow your step-by-step tutorial for creating a compile for the latest version of Aria2c, but got an error on the first Make.sh command:

    root@NAS:/mnt/HD_a2/ffpbuildenv/source# ./Make.sh aria2c
    * aria2c-1.10.9-1
      config.site found
    FATAL: /mnt/HD_a2/ffpbuildenv/distfiles: Required directory not found
    root@NAS:/mnt/HD_a2/ffpbuildenv/source# cd ..
    root@NAS:/mnt/HD_a2/ffpbuildenv# cd distfiles
    /ffp/bin/sh: cd: can't cd to distfiles

    Any pointers on what should be in the distfiles directory?

    1. Hi,

      did you download aria2c in the first place?

      ./Make.sh -F aria2c

      “distfiles” contains the source-files, which are downloaded using “-F”

      Cheers,
      Uli

  2. Hi Uli,

    What a service… almost instant reply. 🙂 Really appreciate your site and effort.

    You were correct in deducting the error. When scrolling through the tutorial I have overseen the first make command with the -F option.

    Went through the steps again and got a long way, but Make crashed somehow:

    sh-3.2# tail aria2-*.log
    DlRetryEx.h:41: internal compiler error: Segmentation fault
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See  for instructions.
    distcc[10008] ERROR: compile DownloadCommand.cc on localhost failed
    make[2]: *** [DownloadCommand.o] Error 1
    make[2]: Leaving directory `/mnt/HD_a2/ffpbuildenv/work/aria2-1.10.9/aria2-1.10.9/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/mnt/HD_a2/ffpbuildenv/work/aria2-1.10.9/aria2-1.10.9'
    make: *** [all] Error 2

    I’ll try to find the clue myself, but if anybody has any useful hints?

    1. Would you please check the file /mnt/HD_a2/ffpbuildenv/source/Conf.d/build-env/distcc.sh and check if it looks like this:

      #export DISTCC_DIR=$CONFDIR/distcc
      #export DISTCC_VERBOSE=1
       
      #export CC="distcc gcc"
      #export CXX="distcc g++"
      export CC="gcc"
      export CXX="g++"
       
      #export MAKEFLAGS="$MAKEFLAGS CC=${CC} CXX=${CXX}"

      If not: Modify it so that it looks like this 🙂 Why is that happening? If “CC=”distcc gcc”” is activated, distcc is trying to compile your source. As nothing is configured for distcc, the compiler is failing.

      Hope that helps,
      Uli

  3. Great! Exactly what was wrong. I added some ‘#’ and additional lines as described by you and the mentioned failure disappeared.

    Make continued and then I ran into more trouble. Seems that some required packages were not installed, so I installed required packages, until I found out that in the Fonz packages and your Additional packages, the c-ares package was not available.

    With your tutorial I managed to compile c-ares 1.7.4 and installed it as required package.

    Guessed that I now have everything in place, but got the following message:
    SocketCore.cc: In member function 'void aria2::SocketCore::bindWithFamily(uint16_t, int, int)':
    SocketCore.cc:260: internal compiler error: Segmentation fault
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See for instructions.
    make[2]: *** [SocketCore.o] Error 1
    make[2]: Leaving directory `/mnt/HD_a2/ffpbuildenv/work/aria2-1.10.9/aria2-1.10.9/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/mnt/HD_a2/ffpbuildenv/work/aria2-1.10.9/aria2-1.10.9'
    make: *** [all] Error 2

    Internal compiler error: segmentation fault What to make of that?

    I guess that I chose a challenging subject for a newbie 🙂

  4. Please add following package also to preparation section:

    /ffp/pkg/additional/dev-util/subversion-1.6.13-1.tgz

    1. rather add all of these

      /ffp/pkg/additional/dev-util/subversion-1.6.13-1.tgz
      /ffp/pkg/additional/dev-libs/apr-util-1.3.9-1.tgz
      /ffp/pkg/additional/dev-libs/apr-1.3.12-1.tgz
      /ffp/pkg/packages/neon-0.25.5-1.tgz

  5. I am trying compile ffmpeg and would need some hints to proceed please

    First I hit and issue where the packaging script fails lke:


    + info ' destdir-checks: check_prefix'
    + cat
    + cd /mnt/HD_a2/ffpbuildenv/work/ffmpeg-0.5.4/pkg
    + . /mnt/HD_a2/ffpbuildenv/source/Conf.d/destdir-checks/check_prefix.sh
    ++ test -d .//ffp
    ++ die '/ffp not found in package directory /mnt/HD_a2/ffpbuildenv/work/ffmpeg-0.5.4/pkg'
    ++ cat
    ++ exit 1

    To over come I did a quick hack by adding following to
    /mnt/HD/HD_a2/ffpbuildenv/source/Conf.d/destdir-start-files.sh

    # a hack to create a ffp directory even if there is no start file
    mkdir -p $D/ffp/
    echo "/ffp created ..."

    I could not figure out which script creates the /ffp directory. But when compiling a different package I noticed that it gets created.

    Now I manage to proceed from this point onwards, but the packaging script now fails at

    + . /mnt/HD_a2/ffpbuildenv/source/Conf.d/destdir-checks/check_prefix.sh
    ++ test -d .//ffp
    +++ ls -a
    ++ for _f in '$(ls -a)'
    ++ test . = . -o . = ..
    ++ continue
    ++ for _f in '$(ls -a)'
    ++ test .. = . -o .. = ..
    ++ continue
    ++ for _f in '$(ls -a)'
    ++ test ffp = . -o ffp = ..
    ++ test ffp = install
    ++ test /ffp '!=' /ffp
    ++ for _f in '$(ls -a)'
    ++ test install = . -o install = ..
    ++ test install = install
    ++ continue
    ++ for _f in '$(ls -a)'
    ++ test usr = . -o usr = ..
    ++ test usr = install
    ++ test /usr '!=' /ffp
    ++ die 'usr: Not allowed in package'
    ++ cat
    ++ exit 1

    The script does not like the /usr directory in /mnt/HD_a2/ffpbuildenv/work/ffmpeg-0.5.4/pkg.

    ffmpeg from source get installed in /usr/local/ so it creates the directory structure under …./pkg but not under …./pkg/ffp

    Can I have some help to force the install path to /ffp/…

    Perhaps some parameter in config stage in package source?

    1. The PREFIX /ffp must be set in the configure-options, you forgot to set this. Then the make creates this. Hacking the Conf.d-Directory is not needed!

      Cheers,
      Uli

  6. I am trying to compile kerberos 5 right now.
    I run into the following error:


    * krb5-1.9-1
    config.site found
    unpack krb5-1.9.tar.gz ...
    updating ./krb5-1.9/src/config/config.guess ...
    updating ./krb5-1.9/src/config/config.sub ...
    destdir-start-files.sh
    destdir-descr.sh
    destdir-doinst.sh
    destdir-checks: check_libs
    destdir-checks: check_prefix
    FATAL: /ffp not found in package directory /mnt/HD_a2/ffpbuildenv/work/krb5-1.9/pkg

    What is going wrong?

    Thank you,

      1. I have set
        --exec-prefix=$CPREFIX
        and get this result.
        I also tried
        --exec-prefix=$CPREFIX/ffp.
        This sub folder is not being created. It looks like the creation of the sub folder is failing. Where do I have to check the location of the creation of the ffp subfolder?

        Thanks.

        1. Then check the configure-Script to determine how to set the PREFIX. Compiling Software is unfortunately no easy 1…2…3 way 🙂

          Cheers,
          Uli

      2. where the PREFIX has to be set? in configure.sh? In configure_args? Or is it to be set as a text file as PV and PR? I succeeded in packaging NcFTP, but I did not set PREFIX anywhere, while trying compiling duplicity I got the same error as Dirk…

        1. you can use either configure.sh to set all configure-arguments yourself or configure_args to add arguments. The prefix is added automatically with the build environment. Sometimes that fails, so you have to set it yourself.

          Cheers,
          Uli

        2. Hi federico,

          just one additional comment: Did you try the buildscript for duplicity from here already? I’m not sure, but i think it works.

          Cheers,
          Uli

  7. hi, i am trying to compile ktorrent. sorry, i am a Linux noob, i am not quite understand the instruction. i am lost at “Downloading the distribution file”. Is this the tutorial to compile any linux software to be used on fun_plug?

    1. This is the tutorial to compile any linux software for the fun_plug, yes. Try transmission for bittorrent?

      Cheers,
      Uli

      1. transmission doesn’t have the feature to select specific files to download in a torrent.
        i set up the “Chrooting to the build environment” and ffpbuildenv, and got lost at “Downloading the distribution file”, not quite sure what it means and how it can download the distribution file from
        “cd /mnt/HD_a2/ffpbuildenv/source/
        ./Make.sh -F “

  8. how can mount second hdd sdb?
    Integrated Sata device found
    scsi0 : Marvell SCSI to SATA adapter
    scsi1 : Marvell SCSI to SATA adapter
    scsi 0:0:0:0: Direct-Access WDC WD20EARS-00MVWB0 51.0 PQ: 0 ANSI: 5
    scsi 1:0:0:0: Direct-Access Seagate ST2000DL001-9VT1 CC96 PQ: 0 ANSI: 5
    scsi 0:0:0:0: Attached scsi generic sg0 type 0
    scsi 1:0:0:0: Attached scsi generic sg1 type 0

    i want to mount ntfs file system on sdb (sg1)

    1. Same answer as here:

      mkdir /mnt/temporarymount/
      mount -t ntfs -ro /dev/sdb1 /mnt/temporarymount/
      cd /mnt/temporarymount/

      Cheers,
      Uli

    1. Hi,

      name me a software that does that and we’ll try to compile it. I’ve nevery worked with iSCSI so i got no idea how that works.

      Cheers,
      Uli

  9. Hi, I’m new in linux in general and I have installed ffp on my nas.
    Now I wish to install some applications.
    Reading several tutorials on installing application on linux, I see there should be some directories or i should be able to inpuy some commands, but I can’t find them or I can execute them in part. For example, I wish to use my printer (a Canon MP830) through my nas.
    As the native firmware of the nas recognize my printer but doesn’t let it works, I found a tutorial here: http://dev.linuxfoundation.org/~till/printing-tutorial/tut.html on how to use the printer. Saddenly lot of commands exit with errors as: modprobe , or connecting to cups via http (cupsd seems to be running on the ffp 0.5. Through the ps -A command I find it…)…so where should I begin? Should I try package cups from source and reinstall it? After this it would support all commands? Or using it (as other applications) on a nas means “to lose” some feautures? Thank you in advance

    1. I’m trying following your tutorial, but…at first line I get an error…

      mkdir /mnt/HD_a2/ffpbuildenv
      mkdir: cannot create directory `/mnt/HD_a2/ffpbuildenv': No such file or directory

      I have searched for mnt directory, but there isn’t on my ffp….

      at third line:

      svn co svn://inreto.de/svn/dns323/funplug/trunk .
      svn: Can't connect to host 'inreto.de': Connection refused

      On teh inreto.de website there is no more a directory namedsvn…

      maybe they are my errors…anyway please help!

      1. For the first command I have discovered my only hard drive is /dev/md0 and I have a mnt directory as subdirectory of /tmp.
        Anyway I found a directory called i-data that is my hard drive as it contains another directory and then the files I copied on my nas hard drive.

        So I execute the command mkdir /i-data/129b5666/admin/ffpbuildenv

        and then cd /i-data/129b5666/admin/ffpbuildenv

        is it correct the same?

        Anyway I have still the problem with the svn command. On the inreto.de directories I found a “source” directory before a svn one, but also pointing there I got a “connection refused” by the host….

    2. almost resolved every problem but on an “easy” step (downloading) I get:

      root@nas:/mnt/HD_a2/ffbuildenv/source# ./Make.sh -F nano
      * nano-2.2.6.tar.gz: Fetch http://www.nano-editor.org/dist/v2.2/nano-2.2.6.tar.gz
      wget: bad address 'www.nano-editor.org'
      FATAL: Could not fetch nano-2.2.6.tar.gz

      The url is correct, if I digit it on a browser I can save it….have I to add a point at the end of the command of url? i.e.

      http://www.nano-editor.org/dist/v2.2/nano-2.2.6.tar.gz .

      ???

      thanks

  10. Hi Uli, i have tried to compile ffmpeg for my sharecenter but im just too n00b to do it =) the ffmpeg needs ./configure and i thought that autoconfig would work but autoconfig requires another program etc. Is there anyway to get ffmpeg as a package?

      1. Hi Uli

        I would like to use e-mail on the DNS-323 and DNS-343. Mutt and msmstp are installed by the firmware. I understand I also need fetchmail, too? (To pull-in incoming mail). fetchmail has to be compiled, right, since there is no ready-made ffp package for it?
        Or is there an equivalent program for fetching mail, which exists among the current ffp packages?

  11. Hi,

    I’m trying to compile 7zip for my NAS, but I get this error:

    * 7zip-9.20-1
    config.site found
    unpack 7z920.tar.bz2 ...
    FATAL: /mnt/HD_a2/ffpbuildenv/work/7zip-9.20/7zip-9.20: Required directory not found

    If I create that directory manually before running Make.sh, it gets deleted. What am I doing wrong?

  12. I’m having issues compiling id3v2 (source available from id3v2.sourceforge.net ). It required id3lib, which is available as fun_plungin package.
    When trying to compile id3v2, I get gazillion of

    “Undefined reference to” (insert function name here). Basically for all calls that refer to id3lib.


    g++ -I/usr/local/include/ -DVERSION="\"0.1.11\"" -c -o convert.o convert.cpp
    g++ -I/usr/local/include/ -DVERSION="\"0.1.11\"" -c -o list.o list.cpp
    g++ -I/usr/local/include/ -DVERSION="\"0.1.11\"" -c -o id3v2.o id3v2.cpp
    g++ -I/usr/local/include/ -DVERSION="\"0.1.11\"" -c -o genre.o genre.cpp
    c++ -Wl,-rpath -Wl,/ffp/lib -L/usr/local/lib/ -pedantic -Wall -lz -lid3 -g -o id3v2 convert.o list.o id3v2.o genre.o

    I tried everything, in the chroot environment I even symlinked /usr/local/lib to /usr/lib and same with /usr/local/include to /usr/include
    That way I was 100% sure that the include and lib paths that were given as parameters were valid and contained the headers and libraries.

    As the lib-files are libid3.a and libid3.ar (instead of libid3.so), I tried even modifying the linker parameters, removing -W parameter and using -static (I read from somewhere that .a is a static library).
    Nevertheless, no success.

    Any ideas what I’m missing?
    I use id3v2 to tag the radioshows I have on my NAS. if file doesn’t contain any id3 ver 2 tag, then the whole file needs to be copied over, thus updating 100meg file, generates some 200megs of network traffic in the first update. I’d rather do that update “locally” on the NAS instead of over the network.

  13. Darn, I should proof read what I write. Just to clarify, libid3 is installed and available when trying to compile id3v2.

  14. Trying this guide to compile minidlna patched for Samsung on my DNS-320.
    I made a clean ffp 0.5 install. Then I installed apr, apr-util, bash, gcc, neon and subversion from your repository, proceeded on svn ffpbuildenv etc.. At last, when I download any package like lighttpd or mediatomb etc to try to compile, compilation tells me “C compiler cannot create executables”… Something wrong?

      1. Thank you 🙂 Now I’m able to compile minidlna.. Still having trouble with my DNS-320 vs minidlna vs inotify, retrying a solution found googling 🙂

          1. you can put your patch in the patches directory /mnt/HD/HD_a2/ffpbuildenv/patches/ and refer to it from a file called
            patch-series in the directory of your application /mnt/HD/HD_a2/ffpbuildenv/source//patch-series. You can look at for example vim or zlib.

          2. Thank you Alain for this precious information; just finished compiling it in 2 versions with relative patches 🙂

  15. Hi,
    I’m trying install aria2 on my NAS.
    While doing “./Make.sh aria2c” I get nothing.
    In log I found:

    ln: creating symbolic link `/bin/bash’: Read-only file system

    Is there any way to solve this problem?

    Robert

    1. 3rd time trying to reply… After you install _ALL_ packages as Jani suggested me, you need to prepare the ffpbuildenv as you read here.
      Then you need the minidlna buildenv, that you can find in plord fun_plug repo and should be good to read also this topic for inotify problems and suggestion: forum_dsmg600_info viewtopic_php?pid=44857

  16. I tried to crosscompile the pthsem-package.
    Everything was going fine – but in the end there was a problem.
    Any help?

    ./Make.sh pthsem-2.0.8
    + rm -rf /i-data/0faecd45/ffpbuildenv/work/pthsem-2.0.8-2.0.8
    + mkdir -p /i-data/0faecd45/ffpbuildenv/work/pthsem-2.0.8-2.0.8
    ++ ls /i-data/0faecd45/ffpbuildenv/source/Conf.d/build-env/bin_bash.sh /i-

    data/0faecd45/ffpbuildenv/source/$
    + for _f in ‘$(ls $CONFDIR/build-env/*.sh 2>/dev/null)’
    + . /i-data/0faecd45/ffpbuildenv/source/Conf.d/build-env/bin_bash.sh
    ++ check_required_files /ffp/bin/bash
    ++ for _f in ‘”$@”‘
    ++ ‘[‘ -r /ffp/bin/bash ‘]’
    ++ ‘[‘ -e /bin/bash ‘]’
    ++ ln -s /ffp/bin/bash /bin/bash
    ++++ readlink -f /bin/sh
    +++ basename /bin/busybox
    ++ ‘[‘ busybox ‘!=’ bash ‘]’
    ++ ‘[‘ -e /bin/sh ‘]’
    ++ mv /bin/sh /bin/sh.orig
    ++ ln -s /ffp/bin/bash /bin/sh
    + for _f in ‘$(ls $CONFDIR/build-env/*.sh 2>/dev/null)’
    + . /i-data/0faecd45/ffpbuildenv/source/Conf.d/build-env/cc.sh
    ++ ‘[‘ -z ” ‘]’
    ++ export CC=gcc
    ++ CC=gcc
    + for _f in ‘$(ls $CONFDIR/build-env/*.sh 2>/dev/null)’
    + . /i-data/0faecd45/ffpbuildenv/source/Conf.d/build-env/distcc.sh
    ++ export DISTCC_DIR=/i-data/0faecd45/ffpbuildenv/source/Conf.d/distcc
    ++ DISTCC_DIR=/i-data/0faecd45/ffpbuildenv/source/Conf.d/distcc
    ++ export ‘CC=distcc gcc’
    ++ CC=’distcc gcc’
    ++ export ‘CXX=distcc g++’
    ++ CXX=’distcc g++’
    + for _f in ‘$(ls $CONFDIR/build-env/*.sh 2>/dev/null)’
    + . /i-data/0faecd45/ffpbuildenv/source/Conf.d/build-env/flags.sh
    ++ export ‘CFLAGS=-O2 -pipe’
    ++ CFLAGS=’-O2 -pipe’
    + for _f in ‘$(ls $CONFDIR/build-env/*.sh 2>/dev/null)’
    + . /i-data/0faecd45/ffpbuildenv/source/Conf.d/build-env/rpath.sh
    ++ RPATH=/ffp/lib
    ++ LDFLAGS_RPATH=’-Wl,-rpath -Wl,/ffp/lib’
    ++ export ‘LDFLAGS= -Wl,-rpath -Wl,/ffp/lib’
    ++ LDFLAGS=’ -Wl,-rpath -Wl,/ffp/lib’
    + for _f in ‘$(ls $CONFDIR/build-env/*.sh 2>/dev/null)’
    + . /i-data/0faecd45/ffpbuildenv/source/Conf.d/build-env/usr_bin_file.sh
    ++ ‘[‘ -e /usr/bin/file ‘]’
    ++ ln -s /ffp/bin/file /usr/bin/file
    ln: failed to create symbolic link `/usr/bin/file’: Read-only file system

    1. I find the error. It was not chrootet. But when I chroot the NAS has the problem that for dev its not possible to mount / bind. My NAS is a MEDION P89630. How can I solve this problem.
      FFP 0.0.7 installed.

  17. Hi all, I’m in need of the latest version of mkvtoolnix, 5.3.0 (that solve a bug about “segmentation fault”), but I removed the ffp build environment from my DNS-320… Any hint on creating a virtual machine (on a Win7 PC, with QEMU, Virtual PC or anything) for ffpbuildenv? Otherwise, can any very very nice guy build it for me? 🙂 Thank you for the precious informations…

  18. After following this tutorial, the last steo fails during installation. I know it’s related to a prefix problem but I’m not sure how to resolve it. I set configure_args to –prefix=$CPREFIX but that did not fix the problem.

    sh-3.2# ./Make.sh cups
    * cups-1.5.2-1
    config.site found
    unpack cups-1.5.2-source.tar.gz …
    configure …
    make …
    destdir …
    destdir-descr.sh
    destdir-start-files.sh
    destdir-doinst.sh
    destdir-checks: check_libs
    destdir-checks: check_prefix
    FATAL: /ffp not found in package directory /mnt/HD_a2/ffpbuildenv/work/cups-1.5.2/pkg

  19. Trying to download the files from the server but the connection keeps getting rejected.
    root@dlink-0A5066:/mnt/HD_a2/ffp/etc# cd /mnt/HD_a2/ffpbuildenv
    root@dlink-0A5066:/mnt/HD_a2/ffpbuildenv# svn co svn://inreto.de/svn/dns323/funplug/trunk .
    svn: Can’t connect to host ‘inreto.de’: Connection refused Any thoughts about why?

  20. Hallo,
    könnte jemand der das zum laufen bekommen hat das Paket curlftps für den NAS kompilieren und mir senden?
    Würde mich riesig freuen.
    Grüße,
    Matze

  21. Hey,
    the svn repo url doesn’t work anymore:

    svn co svn://inreto.de/svn/dns323/funplug/trunk .
    svn: E000111: Unable to connect to a repository at URL 'svn://inreto.de/svn/dns323/funplug/trunk'
    svn: E000111: Can't connect to host 'inreto.de': Connection refused

    Please help! Has someone else a mirror of the repo?

    Cheers
    Gerald

    1. Hi,

      can anybody help me? I’ve tried to contact fonz, but got no reply from him. Is there another possibility to get the environment set up?
      fonz svn service is still not working. Again I get the same error message as before:
      svn: E000111: Can’t connect to host ‘inreto.de’: Connection refused

      Please help me, I’ve got stucked and can not create a new package as I want to.

      Thanks in advance,
      Gerry

        1. Hi Uli,

          good news! I’d appreciate it.

          I don’t want to hurry you, but will you publish the article in the next days? I’m looking forward to read your blog entry!

          Cheers,
          Gerry

        2. Hi, I’m using vblade that I patched to achieve best performance on DLink DNS-325.
          I also failed to make package by this instructions due to “Unable to connect to a repository”.

          One of packages – is libaio 0.3.110 that is neccessary for my changes in vblade and that I just compiled on NAS. I tried to create this package ‘manually’ by combining file tree and using makepkg, that gave me libaio-0.3.110-1-arm-1.txz file that looks pretty like a package I wanted.
          So first question – what to do with it? How can I ‘submit’ it (and another package – my patched vblade)?

  22. Hello, I realize this is a very old post, but I still use the ffp build environment described here regularly (thanks for such a helpful write up). I recently lost my SSH connection to my NAS in the middle of a build. When I reconnected and tried to run the chroot.sh script, I got an error saying “/ffp-chroot exists”. I’m kind of stuck at this point. I looked at the chroot.sh script and it’s not obvious to me what I need to to do clean up the environment and start over. Any advice would be greatly appreciated. Thanks.

    1. I guess the ffp build environment wont work that way for funPlug 0.7

      to install svn you Need the package subvision
      but it wont help. I think this site (svn://inreto.de/svn/dns323/funplug/trunk) exists no more

      I am interestet to get these packages to compile from source for my armV5tel (DNS 320L) but i didn’t found the right ones.
      Can somebody give me a link?

    1. Hi JeyFrog,

      I know this is a couple of years ago now, but how is ffp-compiler.sh used to compile software for funplug 0.7?

      I can’t figure it out!!!

      Thanks for your help.

      AyGee

  23. Hi Uli,

    I know the above is a few years old but I am still interested in compiling software for funplug 0.7 and would like to know how to use your environment at Github.

    I cannot figure out how to use it and would appreciate some help.

    Thanks in advance.

    AyGee

Leave a Reply to Mattias O Cancel reply

Your email address will not be published. Required fields are marked *

Exit mobile version