#33 minidlna port on Windows w/Cygwin

4 days ago

This is a port minidlna on Windows using Cygwin.

detail is described in "How to port minidlna to Windows.txt"



<< < 1 2 (Page 2 of 2)
  • I have compiled from source, but the inotify event does not seem to be working on soft links. I first tried to compile in Cygwin x64 which was missing dependencies. I then compiled using 32 bit with the old dependencies with static libraries and minidlna works fine except for the database does not remove files when they are deleted or added. I recompiled from clean source and will be testing tonight.

    Last edit: Patrick Cartwright 2014-03-12
  • HMA

    CCLD minidlnad.exe
    /usr/lib/gcc/i686-pc-cygwin/4.8.2/../../../../i686-pc-cygwin/bin/ld: cannot find -lFLAC
    /usr/lib/gcc/i686-pc-cygwin/4.8.2/../../../../i686-pc-cygwin/bin/ld: cannot find -lvorbis
    /usr/lib/gcc/i686-pc-cygwin/4.8.2/../../../../i686-pc-cygwin/bin/ld: cannot find -logg
    collect2: Fehler: ld gab 1 als Ende-Status zurück
    Makefile:480: recipe for target 'minidlnad.exe' failed
    make[2]: [minidlnad.exe] Error 1
    make[2]: Leaving directory '/home/mischoener/minidlna-1.1.1'
    Makefile:586: recipe for target 'all-recursive' failed
    [all-recursive] Error 1
    make[1]: Leaving directory '/home/mischoener/minidlna-1.1.1'
    Makefile:383: recipe for target 'all' failed
    make: *** [all] Error 2

    ... allways get this error ... can anybody explain what is wrong?

    • hiero

      Try to install older version of libogg, libFLAC and libvorbis as folows:

      libogg 1.3.1-1
      libFLAC 1.3.0-1
      libvorbis 1.3.3-1

      Latest version of above libraries do not include static libraries.

  • HI,

    I'm trying to compile minidlan 1.1.1 on cygwin (1.7.29 64bits on Win 7 64).
    It compiles fine.
    But when run, all the socket() calls return -1 with an errno of 17 : File exists ...
    Any idea ?

    • hiero

      It seems that linking and using "IP Helper API" of windows makes problem on Cygwin64.

      "IP Helper API" is used only for "Don't require a configured network interface to start up, and add network interface monitoring support" functionality.

      Workaround is as follows.

      1. Not to link "IP Helper API":
        comment out LIBS="$LIBS -lws2_32 -liphlpapi" in configure.ac.

      2. Not to use "IP Helper API":
        replace "#elif defined(CYGWIN)" with "#elif defined(CYGWIN) && !defined(__x86_64)" in getifaddr.c.

      There are two above lines.

      Anyway I think it is easier to use 32 bit version of Cygwin.

  • Jenks Crayton
    Jenks Crayton

    After the latest Cygwin update I had to back off three libraries to these versions:

    sqlite3 3.7.17-4
    flac 1.2.1-2
    libvorbis 1.3.3-1

    Last edit: Jenks Crayton 2014-06-12
  • hiero

    minidlna(1.1.3) port on Windows w/Cygwin

    add "--disable-static" option to configure
    add workaround for cygwin64 ("Don't require a configured network interface to start up, and add network interface monitoring support" is not supported)

    building missing static libraries is described in "How to build on Cygwin -1.1.3.txt"


  • nymous

    First of all, thanks for your great work, I had no problems compiling and running the port.

    But it has a bug serving external subtitles to Samsung and LG players.
    The problem is withing the following block in upnphttp.c, near line 1926.

        if( h->reqflags & FLAG_CAPTION )
            if( sql_get_int_field(db, "SELECT ID from CAPTIONS where ID = '%lld'", id) > 0 )
                strcatf(&str, "CaptionInfo.sec: http://%s:%d/Captions/%lld.srt\r\n",
                              lan_addr[h->iface].str, runtime_vars.port, id);

    This code is running after process fork and seems to unable to connect to database to run: it writes to logs "SQL logic error or missing database". So, code won't send correct headers and TV won't see any external subtitles. Not sure if it works in vanila minidlna on linux.
    This can be easily fixed by checking database before forking.

    Last edit: nymous 2014-08-10
    • hiero

      It seems inherited database handle does not work in child process.
      This might be bug or restriction of cygwin, because this issue does not occur on other OSs.

      Following workaround works.

      if( h->reqflags & FLAG_CAPTION )
              char path[PATH_MAX];
              snprintf(path, sizeof(path), "%s/files.db", db_path);
              if (sqlite3_open_v2(path, &db, SQLITE_OPEN_READONLY, NULL) != SQLITE_OK)
                  DPRINTF(E_DEBUG, L_HTTP, "Failed to open sqlite database!\n");
              if( sql_get_int_field(db, "SELECT ID from CAPTIONS where ID = '%lld'", (long long)id) > 0 )
                  strcatf(&str, "CaptionInfo.sec: http://%s:%d/Captions/%lld.srt\r\n",
                                lan_addr[h->iface].str, runtime_vars.port, (long long)id);
  • nymous

    I've fixed it without reopening database. Just run the query before fork and save it's returning value for later check.

  • hiero

    minidlna(1.1.4) port on Windows w/Cygwin


  • Here is the build guys 1.1.4. Enjoy!

<< < 1 2 (Page 2 of 2)