Bug 19052 – dmd-2.081.0 generates compilation issue: Error: module `stdlib` is in file 'std/c/stdlib.d' which cannot be read

Status
RESOLVED
Resolution
INVALID
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
Linux
Creation time
2018-07-03T22:27:05Z
Last change time
2018-07-04T05:34:28Z
Assigned to
No Owner
Creator
Alex Braunegg

Comments

Comment #0 by alex.braunegg — 2018-07-03T22:27:05Z
When using Travis CI or 'curl -fsS https://dlang.org/install.sh | bash -s dmd' to install DMD as of today, this now installs dmd-2.081.0. Prior to this date, this command installed dmd-2.080.1 When running compilations using dmd-2.081.0 - either locally of via Travis CI, compilations now fail with the following error message: Error: module `stdlib` is in file 'std/c/stdlib.d' which cannot be read import path[0] = /root/dlang/dmd-2.081.0/linux/bin64/../../src/phobos import path[1] = /root/dlang/dmd-2.081.0/linux/bin64/../../src/druntime/import Downgrading to dmd-2.080.1 there is no error & compilation succeeds. Is this a regression between dmd-2.081.0 and dmd-2.080.1 or is there some sort of change required in my code due to changes in stdlib inclusions & needing to add something?
Comment #1 by slavo5150 — 2018-07-03T23:09:51Z
Whatever you're compiling is using the `std.c` package from Phobos. That package has been deprecated for a long time and was finally removed in 2.081. Use the`core.stc` package instead: https://github.com/dlang/phobos/pull/6515 https://dlang.org/changelog/2.081.0.html#remove_std_c
Comment #2 by alex.braunegg — 2018-07-04T01:18:56Z
Thanks I have looked at the code and found the offending entry, however based on the changelog: "Use the core.stdc package instead." I now get the following: Error: module `stdc` is in file 'core/stdc.d' which cannot be read import path[0] = /root/dlang/dmd-2.081.0/linux/bin64/../../src/phobos import path[1] = /root/dlang/dmd-2.081.0/linux/bin64/../../src/druntime/import
Comment #3 by alex.braunegg — 2018-07-04T01:25:03Z
need to use core.stdc.stdlib rather than core.stdc as per release notes.
Comment #4 by slavo5150 — 2018-07-04T05:34:28Z
`std.c` is a package. `std.c.stdlib` is a module within that package. Analogously, `core.stdc` is a package and `core.stdc.stdlib` is a module within that package. If your code used to use `std.c.stdlib` then you need to replace it with `core.stdc.stdlib`, not `core.stdc`.