#1 Port of minidlna to OS X and FreeBSD


In the attachment of this message please find a patch that changes the current (2010-01-09) CVS minidlna sources to compile on OS X and FreeBSD as well. The code should also still work unaffected on linux (I hope).

There are some steps necessary to apply my patch and build the package:

1. Get current (2010-01-09) CVS sources.
2. Remove Makefile and genconfig.sh
3. Apply the patch attached to this posting
4. Unpack my minidlna-autoconf-files.tar.gz in the minidlna directory. I will post this tar.gz file afterwards in the next patch tracker since I can only attach one file here.
5. execute "sh autogen.sh". This requires that you have gnu autotools installed.
6. run "./configure". If you have libraries installed in non-standard locations, use environment variables to tell configure about this. See the provided ENVIRONMENT.* files for details.
7. run "make"

This should compile the package and give you a binary "minidlna". If it does not work, please contact me for support.

I did not port the inotify stuff. This functionality of minidlna is currently not available on other OSes that linux. Due to limitations of the kevent API on OS X and FreeBSD I am currently not sure on how to port this at all.


  • Dominik Epple

    Dominik Epple - 2010-01-09
  • jayp

    jayp - 2010-02-02

    it works great on FreeBSD 7.2-STABLE.

  • rpatil

    rpatil - 2010-03-02

    Hi Dominik,

    I have followed all the steps you listed but having some troubles getting it to work on FreeBSD 8.0:
    I basically see 2 warnings and one error:

    1. When applying the patch, it asks if I want to skip the patch for genconfig.sh. I say 'y' and move on.
    2. When running sh ./autogen.sh, it says could not find required file "config.h.in", but is still able to create a configure file.

    This is a weird one. When I run ./configure, it is failing on finding FLAC. Here is the last couple lines of error:
    "checking for main in -lFLAC... no
    configure: error: Cannot find required library FLAC"

    I have made sure that FLAC is installed. How do I make it find the installed library? I am so close!

    Any help you could provide will be appreciated. Thanks!


  • rpatil

    rpatil - 2010-03-05

    Yeah...I was finally able to compile it. Had to comment out fill_playlist and insert_playlist method calls. Now I need to take the binary to freenas box and see if it works!

    Thanks for your patch!

  • Justin Maggard

    Justin Maggard - 2010-03-28

    I've created a new osx_port branch which contains a combination of your patch and Marshall Smith's patch. Please check it out and report any issues you find. Once it stabilizes, I'll merge it back into HEAD.

  • Justin Maggard

    Justin Maggard - 2010-03-28
    • status: open --> open-accepted
  • Etienne Beaule

    Etienne Beaule - 2010-04-15

    Hello... I just checked out the osx_port branch and attempted to compile. Make failed with the following:

    make all-am
    gcc -g -O2 -L/opt/local/lib -o minidlna minidlna.o upnphttp.o upnpdescgen.o upnpsoap.o upnpreplyparse.o minixml.o getifaddr.o daemonize.o upnpglobalvars.o options.o minissdp.o uuid.o upnpevents.o sql.o utils.o metadata.o scanner.o inotify.o tivo_utils.o tivo_beacon.o tivo_commands.o textutils.o misc.o tagutils.o image_utils.o albumart.o playlist.o log.o -lvorbis -lsqlite3 -logg -ljpeg -lid3tag -lexif -lavformat -lFLAC
    Undefined symbols:
    "_libiconv_open", referenced from:
    _do_iconv in tagutils.o
    "_libiconv", referenced from:
    _do_iconv in tagutils.o
    "_libiconv_close", referenced from:
    _do_iconv in tagutils.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    make[1]: *** [minidlna] Error 1
    make: *** [all] Error 2

    I did set the env for MacPorts and installed all the listed dependencies... Not sure how to resolve this. Help?

  • Justin Maggard

    Justin Maggard - 2010-04-16

    Colddiver, you can try modifying config.h and undefine HAVE_ICONV_H. Strange though, I thought OSX had iconv.

  • Etienne Beaule

    Etienne Beaule - 2010-04-17


    Thanks! That did the trick (actually to uncomment both HAVE_ICONV and HAVE_INOTIFY to get it to compile. Works like a charm on a Samsung PN50C540G3F (Plasma). miniDLNA is the only one OSS tool that I managed to get to work with this TV. Great work!

  • Etienne Beaule

    Etienne Beaule - 2010-04-18

    Hello all... In case this is of interest to you all, miniDLNA also compiled fine under Leopard on a PPC machine using the changes made in my previous post...

  • Justin Maggard

    Justin Maggard - 2011-09-16

    The main branch now includes OSX support. Thanks to everybody that had a hand in helping!

  • Justin Maggard

    Justin Maggard - 2011-09-16
    • assigned_to: nobody --> jmaggard
    • status: open-accepted --> closed-accepted

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks