I think this is the relevant discussion about the same issue FreeBSD had: https://github.com/MusicPlayerDaemon/MPD/issues/41
This is the FreeBSD commit to fix it: https://svnweb.freebsd.org/ports/head/audio/musicpd/files/patch-src_Compiler.h?revision=440334&view=markup "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." I am testing with this diff (from FreeBSD) now and at a first glance it seems to fix the database update problem: Index: patches/patch-src_Compiler_h =================================================================== RCS file: patches/patch-src_Compiler_h diff -N patches/patch-src_Compiler_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_Compiler_h 23 May 2017 17:00:24 -0000 @@ -0,0 +1,14 @@ +$OpenBSD$ + +Index: src/Compiler.h +--- src/Compiler.h.orig ++++ src/Compiler.h +@@ -86,7 +86,7 @@ + #define gcc_noreturn __attribute__((noreturn)) + #define gcc_packed __attribute__((packed)) + #define gcc_printf(a,b) __attribute__((format(printf, a, b))) +-#define gcc_pure __attribute__((pure)) ++#define gcc_pure + #define gcc_sentinel __attribute__((sentinel)) + #define gcc_unused __attribute__((unused)) + #define gcc_warn_unused_result __attribute__((warn_unused_result))
