I am experiencing a similar problem with Kodi 16.1 running on a RPi3 (OSMC 4.4.16-1).
My music is stored in single FLAC+CUE format.
I've tried several UPnP servers (e.g. MediaTomb, Logitech Media Server (LMS) with LMS-to-UPnP plugin) but none of them seem to give gapless playback on Kodi.
On foobar2000 (with UPnP plugin) gapless playback of any FLAC+CUE album works flawlessly.
When retrieving the Kodi UPnP renderer capabilities in foobar2000 I get "Capabilities: playback, volume, gapless (maybe)".
After sending an album to Kodi with LMS (LMS-to-UPnP plugin running on port 49154), Kodi attempts to play the next track and my kodi.log shows a warning:
16:08:36 25959.970703 T:1459614704 WARNING: CCurlFile::Open - Disabling multi session due to broken libupnp server
Then, at the end of the track I get the following errors:
16:08:39 25962.761719 T:1459614704 ERROR: CCurlFile::Open failed with code 404 for
http://10.0.0.1:49154/LMS2UPNP/bb-bb-1e-...-idx-1.pcm
16:08:39 25962.761719 T:1459614704 ERROR: Open - failed to open source <http://10.0.0.1:49154/LMS2UPNP/bb-bb-1e-dd-17-6c-idx-1.pcm>
A quick look at Kodi's source code tells me that the libupnp warning is raised in CurlFile.cpp. Multi-session gets disabled when find("Portable SDK for UPnP devices") fails.
I am guessing that the disabled multi-session is the culprit here. I tried compiling libupnp-1.6.20 from source but that made no difference.
Would someone be able to point me to a solution?