<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"><meta http-equiv="content-type" content="text/html; charset=utf-8"><div dir="ltr"></div><div dir="ltr">On Oct 2, 2024, at 22:28, Michael Newman wrote:</div><div dir="ltr"><blockquote type="cite"><br></blockquote></div><blockquote type="cite"><div dir="ltr"><span>Sellotape:bin mnewman$ file /opt/local/lib/libavcodec.58.dylib /opt/local/lib/libavcodec.58.134.100.dylib</span><br><span>/opt/local/lib/libavcodec.58.dylib:         data</span><br><span>/opt/local/lib/libavcodec.58.134.100.dylib: data</span><br><span></span><br><span>Unfortunately, I don’t recall if ffmpeg was built from source or via binary. Sorry.</span><br><span></span><br><span>This on a 2019 Intel iMac upgraded to Sequoia (15.0) just two days ago.</span><br><span></span></div></blockquote><br><div>I can confirm this problem in the ffmpeg archive we produced on our macOS 15 x86_64 build machine. </div><div><br></div><div>Large portions of that dylib file, including the beginning that allow the file command to identify what it is, are null bytes. The file has been corrupted. </div><div><br></div><div>As far as I know, this is a bug in the APFS filesystem. The problem goes back to macOS 10.15 at least but we only learned about it more recently. </div><div><br></div><div>Our ticket on this is <a href="https://trac.macports.org/ticket/67336">https://trac.macports.org/ticket/67336</a>. My Apple Feedback report about this is FB12160429. Apple has never acknowledged it or responded to it. Summarizing:</div><div><br></div><div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">What happens is that the filesystem keeps track of which regions in a file are nulls ("holes") and represents the file sparsely so that those holes don't actually take up disk space. When we use tar to create an archive of files installed by a port, tar learns from the filesystem about those holes and also represents them sparsely in the archive, excluding those sections of the file from the archive, since they're supposed to be nulls. The bug is that the filesystem tells tar there are holes when in fact those holes had already been filled with data and should not be excluded, but there's no way for tar to know that the filesystem is lying. </span></div><div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br></span></div><div>We have a workaround we can employ for root MacPorts installations (run /usr/sbin/purge before creating the tar archive to clear the filesystem cache) but we haven't implemented it in MacPorts base because we don't know a solution for non-root MacPorts installations. This fix has only been implemented manually in one port (pari). I had thought to write a PortGroup that could be included in affected ports, but there's no reason why only specific ports should be affected. It could affect any port and any file. </div><div><br></div><div>BSD tar 3.6.0 and later can be told not to represent files sparsely which would work around the bug but even in macOS 15 Apple includes an older version of BSD tar than that. GNU tar can be told whether to represent files sparsely, and doesn't by default, but GNU tar isn't included in any macOS versions that support APFS. </div><div><br></div><div>I could increase the revision of the ffmpeg port to rebuild it and make a new archive but there is no guarantee that the problem would not strike again, on any of the builders using the APFS filesystem.</div><div><br></div><div>For now, you can rebuild ffmpeg from source and hope that the issue does not occur on your machine:</div><div><br></div><div>sudo port -ns upgrade --force ffmpeg</div><div><br></div><div>Apple pays more attention to issues that affect more users, measured by how many duplicates a bug has. If this problem affects you please file a bug report with Apple and reference my 2023 bug number <span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">FB12160429 and the 2019 bug </span>FB7378125 that I believe it's a duplicate of <span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">so that they can mark your bug as a duplicate and hopefully see how big a problem this is and start working on a fix. </span></div><div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br></span></div><div><div style="display: block;" class=""><div style="-webkit-user-select: all; -webkit-user-drag: element; display: inline-block;" class="apple-rich-link" draggable="true" role="link" data-url="https://feedbackassistant.apple.com/"><a style="border-radius:10px;font-family:-apple-system, Helvetica, Arial, sans-serif;display:block;-webkit-user-select:none;width:300px;user-select:none;-webkit-user-modify:read-only;user-modify:read-only;overflow:hidden;text-decoration:none;" class="lp-rich-link" rel="nofollow" href="https://feedbackassistant.apple.com/" dir="ltr" role="button" draggable="false" width="300"><table style="table-layout:fixed;border-collapse:collapse;width:300px;background-color:#E9E9EB;font-family:-apple-system, Helvetica, Arial, sans-serif;" class="lp-rich-link-emailBaseTable" cellpadding="0" cellspacing="0" border="0" width="300"><tbody><tr><td vertical-align="center"><table bgcolor="#E9E9EB" cellpadding="0" cellspacing="0" width="300" style="font-family:-apple-system, Helvetica, Arial, sans-serif;table-layout:fixed;background-color:rgba(233, 233, 235, 1);" class="lp-rich-link-captionBar"><tbody><tr><td style="padding:8px 0px 8px 0px;" class="lp-rich-link-captionBar-textStackItem"><div style="max-width:100%;margin:0px 16px 0px 16px;overflow:hidden;" class="lp-rich-link-captionBar-textStack"><div style="word-wrap:break-word;font-weight:500;font-size:12px;overflow:hidden;text-overflow:ellipsis;text-align:left;" class="lp-rich-link-captionBar-textStack-topCaption-leading"><a rel="nofollow" href="https://feedbackassistant.apple.com/" style="text-decoration: none" draggable="false"><font color="#000000" style="color: rgba(0, 0, 0, 1);">Feedback Assistant</font></a></div><div style="word-wrap:break-word;font-weight:400;font-size:11px;overflow:hidden;text-overflow:ellipsis;text-align:left;" class="lp-rich-link-captionBar-textStack-bottomCaption-leading"><a rel="nofollow" href="https://feedbackassistant.apple.com/" style="text-decoration: none" draggable="false"><font color="#A2A2A9" style="color: rgba(60, 60, 67, 0.6);">feedbackassistant.apple.com</font></a></div></div></td><td style="padding:6px 12px 6px 0px;" class="lp-rich-link-captionBar-rightIconItem" width="36"><a rel="nofollow" href="https://feedbackassistant.apple.com/" draggable="false"><img alt="apple-touch-icon.png" src="cid:10FC013A-2967-4C9F-94BE-00D29CCB23D8"></a></td></tr></tbody></table></td></tr></tbody></table></a></div></div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br></span></div><div><br></div><div><br></div></div></body></html>