Compiling Latest FireFly (mt-daapd) for ASUS WL-500W
Blog | Tech Blog | Secure Coding | Twitter | RSS Feed | Get Email Updates
FireFly is a nice DAAP based media server that allows you to listen to your music collection anywhere using any DAAP based client like iTunes, with other players (like Winamp, Rhythmbox, VLC, etc) using plugins, or it even has its own dedicated php/flash/java based clients that can be fired up on any platform any computer giving you instant nirvana.
Many people, like me, use it on their Routers or NAS boxes to access their music anywhere without having to keep their home PC running or lugging around external drives. However, development on this gem stopped some time ago. The last stable build released (2.4.2) was good but it doesn’t have a lot of features provided by the nightly builds in svn (subversion). And the last nightly build released (svn-1696) had a lot of broken things. It was rebuilding the database everytime, crashed around quite a bit, had a lot of security holes. So, I decided to get the latest version (trunk) of the FireFly code, as it had a lot of fixes for above issues, put in whatever was missing, and try to build it for my use.
After a day’s worth of efforts, here it is. This latest build is the most rich in features as compared to the stable one, and is just as stable as the 2.4.2 release if not better, and also fixes all the issues shown by the svn-1696 build. The downloadable source and complete install package are attached with this post. But I’m also listing down the steps that I took to achieve this so that if anyone wants to recompile it with their own options (e.g. I haven’t included ogg/flac support in my build), they are able to do so. You can find the steps below. Please let me know if you have any queries. Also, if you want to submit any patches, I’ll be happy to incorporate them and recompile. I’m also trying to get this source and package into the unslung/optware repositories for wider distribution.
Note: Although I’ve compiled this for Asus WL-500W, it should work for most devices with a mipsel architecture (which includes all the Asus routers in this family). Also, the compilation process should work for most other architectures barring one or two steps. I’d be happy to help if you want to do so and face any issues.
Changes and Build Steps:
- ipkg install optware-devel
- ipkg install buildroot
- Edit /opt/share/aclocal/audiofile.m4 and change AC_DEFUN(AM_PATH_AUDIOFILE, to AC_DEFUN([AM_PATH_AUDIOFILE],
- ipkg install gettext (for some missing m4 macros, libr_rpath etc)
- Comment out AC_USE_SYSTEM_EXTENSIONS in configure.in (using dnl)
- aclocal -I <path of mt-daapd’s local m4 dir>
- run “autoheader” to generate config.h.in
- touch config.rpath (somehow this file is not provided with gettext for us)
- change configure.in line 95, remove the ; at the end
- remove -g flag and add -O2 in configure.in for optimization purpose
- run “automake –add-missing”
- run “autoconf” – to generate configure
- ipkg install grep (for egrep)
- change /bin/sh to /opt/bin/bash in configure and install-sh
- run “./configure –enable-sqlite3 –prefix=/opt CPFLAGS=”-D_LIBC” ” (You can also use –enable-oggvorbis and/or –enableflac)
- After this step, I had to make numerous changes to the source code to put in the missing functionality for database handling, removing some compilation errors, etc. You can diff the svn 1715 code with mine to see the changes.
- run “make”
- run “make install”
And you are done. The modified source and compiled bianries can be downloaded from below.
| Download: | shantz-mt-daapd.zip |
|---|---|
| Version: | svn-1718 |
| Updated: | July 3, 2009 |
| Size: | 2.8 MB |
| Hits: | 443 |
Let me know if you have any queries or face any issues.
© Shantanu Goel | Compiling Latest FireFly (mt-daapd) for ASUS WL-500W
|
Liked this post? Get FREE Updates Subscribe to RSS feed |







This post has 14 comments
July 12th, 2009
Hello Shantanu
Thanks for sharing your work, I’ve been looking for updates from 1695. FireFly is a great mediaserver, but there still are some issues …
I encounter some problems following your instructions , maybe you can give me a hint. I’m a linux noob and compiling has been a daunting task, but your list helped a lot. I’m compiling for the NSLU2 arm platform (synology 207+) and have been able to complete the steps until the make command
There I encounter an error compiling
–db.c:122: error: syntax error before “db_rwlock”–
some warnings follow about — implicit declaration of function `pthread_rwlock_rdlock’–
All are related to pthread.h
It is the only file that won’t compile. My impression is that the pthread_rwlock_t struct is not “known” at compile time, though the header file seems to be included.
maybe you have a suggestion?
Thanx, Thimp
July 12th, 2009
Hello Shantanu,
I have done some reading through the headerfiles and saw #ifdef __USE_UNIX98 around the decaration of the pthread_rwlock_t struct. I removed that and was able to compile the db.c file.
That gets me one step further, still going! I’ll let you know if I get there in the end
Thimp
July 13th, 2009
Did you use the _LIBC flag as I mentioned for the configure command? That will enable the __USE_UNIX98 macros in the build.
July 14th, 2009
I did use the configure command as you described. I still had to uncomment the __Use_UNIX98 directive. After that it compiled OK, and I got firefly working (YAY!).
Nearly at the end: it crashes often (using the html management tool), and the bonjour service seems to be stopped, though ITunes finds the server. I’ll be looking into that. There might be some conflicts with old installations.
If I got it working smoothlessly, I’ll let it know.
Thanks again, Thimp
July 23rd, 2009
I am trying to compile this version of firefly on an dLink DNS-323 with ffp 0.5 installed.
I had to manually edit /ffp/include/features.h and comment out the #undef __USE_UNIX98 line, and then specify CPPFLAGS=”-D__USE_UNIX98″ on the configure line.
BTW the notes above say CPFLAGS, I think you meant CPPFLAGS.
Anyway, I hope to modify the source to use the file change notification subsystem to add new files into the DB without having to do a scan.
July 23rd, 2009
@Cary Adding to the DB without scanning would be awsome, please keep us posted!
My firefly servers is up and running for a long time now, only the smartplaylist interface brings it to his knees. But I’ve not been able to digg further into that.
Regards Thimp
July 23rd, 2009
I was able to build the mt-daapd, but it did not run correctly – it crashed processing the .m3u files.
July 27th, 2009
@Cary: There seems to be a bug in processing m3u files. I don’t use this option but when I tried yesterday it crashed on me too when scanning on startup. For now, you can probably disable this and try using through web interface..
September 5th, 2009
Firstly, thanks for sharing. I’ve tried several times to compile on OS X (Leopard and Snow Leopard) each time without success.
After running make a get error msgs such as these:
make[4]: Nothing to be done for `all’.
make[4]: Nothing to be done for `all-am’.
make[3]: Nothing to be done for `all-am’.
Making all in contrib
make all-recursive
Making all in init.d
make all-am
make[5]: Nothing to be done for `all-am’.
make[4]: Nothing to be done for `all-am’.
Any insight on your part?
Thanks in advance
October 6th, 2009
I did use the configure command as you described. I still had to uncomment the __Use_UNIX98 directive. After that it compiled OK, and I got firefly working (YAY!).
Nearly at the end: it crashes often (using the html management tool), and the bonjour service seems to be stopped, though ITunes finds the server. I’ll be looking into that. There might be some conflicts with old installations.
If I got it working smoothlessly, I’ll let it know.
Thanks again, Thimp
October 22nd, 2009
Can anyone share the binary for nslu2 with me?
December 26th, 2009
Unfortunately when I run your binary in DD WRT, I get:
mt-daapd: can’t resolve symbol ‘__ctype_b_loc’
Any ideas if this is fixable?
December 27th, 2009
Prashant, I haven’t used DD WRT much (especially for development) so can’t tell you much but maybe the issue is because of some uclibc/glibc issues Can you try to compile it from sources for your system?
March 12th, 2010
Is your version suitable for FreeBSD? I have been running svn-1696 for a very long time on Gentoo Linux. My migration to FreeBSD 8-Stable gives me a headache with firefly.
Thanks