D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 22823 - dmd.root.file: File.read fails to read any file on PPC
Summary: dmd.root.file: File.read fails to read any file on PPC
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: PowerPC Linux
: P1 blocker
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2022-02-25 09:20 UTC by Iain Buclaw
Modified: 2022-02-26 12:52 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Iain Buclaw 2022-02-25 09:20:57 UTC
Because of issue 22822, the dmd.root.file module is broken on PPC.  The `st_size` field it reads is actually at the offset of padding, so it thinks that every file has a size of 0, meaning nothing gets read into the parser, and nothing written out by the compiler.

We can fix druntime, but all previous releases are still broken, so we need to "workaround" this issue in the compiler front-end itself by providing a stub implementation of stat_t to use on linux/PPC only.
Comment 1 Dlang Bot 2022-02-25 13:43:18 UTC
@ibuclaw created dlang/dmd pull request #13719 "fix Issue 22823 - dmd.root.file: File.read fails to read any file on PPC" fixing this issue:

- fix Issue 22823 - dmd.root.file: File.read fails to read any file on PPC

https://github.com/dlang/dmd/pull/13719
Comment 2 Dlang Bot 2022-02-26 12:52:31 UTC
dlang/dmd pull request #13719 "fix Issue 22823 - dmd.root.file: File.read fails to read any file on PPC" was merged into master:

- 8d7b3963082e0f99cab256f79e9ed96efeb90e8e by Iain Buclaw:
  fix Issue 22823 - dmd.root.file: File.read fails to read any file on PPC

https://github.com/dlang/dmd/pull/13719