Bug 219048 - audio/musicpd: deleted files cause exception with clang
Summary: audio/musicpd: deleted files cause exception with clang
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Thomas Zander
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-03 16:09 UTC by hideo
Modified: 2017-05-30 20:31 UTC (History)
0 users

See Also:
riggs: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hideo 2017-05-03 16:09:29 UTC
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)
Comment 1 Thomas Zander freebsd_committer 2017-05-06 06:52:58 UTC
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.
Comment 2 Thomas Zander freebsd_committer 2017-05-07 12:13:30 UTC
The origin of this problem has been identified, see

https://github.com/MusicPlayerDaemon/MPD/issues/41

Patch is on its way.
Comment 3 commit-hook freebsd_committer 2017-05-07 12:17:45 UTC
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
Comment 4 commit-hook freebsd_committer 2017-05-30 20:31:21 UTC
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