When built with clang, deleted files in music_directory cause an exception during database updating: exception: Failed to access /path/to/deleted/file.mp3: No such file or directory Updating then stops. Building with gcc appears to fix this (as noted by the dev here - https://forum.musicpd.org/viewtopic.php?f=7&t=4318#p6880)
I am afraid its not as easy as just building it with gcc/libstdc++. If one of the dependencies is built with clang/libc++, both stdlibs are loaded during startup of mpd and basically nothing works. I have to discuss the problem with the upstream developers. Until then, there is a (not beautiful) workaround: Delete mpd's DB, restart and then update the DB.
The origin of this problem has been identified, see https://github.com/MusicPlayerDaemon/MPD/issues/41 Patch is on its way.
A commit references this bug: Author: riggs Date: Sun May 7 12:17:28 UTC 2017 New revision: 440334 URL: https://svnweb.freebsd.org/changeset/ports/440334 Log: Fix library updating Details: Apparently, clang optimises exceptions with __attribute__((pure)) more aggressively than gcc, causing mpd to not notice files removed from the library. This patch causes mpd to be built without the pure attribute. PR: 219048 Reported by: hideo@lastamericanempire.com Changes: head/audio/musicpd/Makefile head/audio/musicpd/files/patch-src_Compiler.h
A commit references this bug: Author: riggs Date: Tue May 30 20:30:50 UTC 2017 New revision: 442119 URL: https://svnweb.freebsd.org/changeset/ports/442119 Log: MFH: r440334 r441969 Fix library updating Details: Apparently, clang optimises exceptions with __attribute__((pure)) more aggressively than gcc, causing mpd to not notice files removed from the library. This patch causes mpd to be built without the pure attribute. PR: 219048 Reported by: hideo@lastamericanempire.com Update to upstream version 0.20.8 Approved by: ports-secteam (feld) Changes: _U branches/2017Q2/ branches/2017Q2/audio/musicpd/Makefile branches/2017Q2/audio/musicpd/distinfo branches/2017Q2/audio/musicpd/files/patch-src_Compiler.h