Open andrewbenton opened 6 years ago
It obviously works with the official release package. std.datetime was refactored/split up as a package in 2.075 IIRC, so I'm guessing you're not using the correct Phobos version. Are your git submodules up to date?
In particular, there's no std.datetime.Clock
anymore; that's std.datetime.systime.Clock
now. So your libs may be okay, but your -I
imports seem to be of an older version.
They're up to date. My command sequence is as follows:
$ git clone --recursive git@github.com:ldc-developers/ldc
$ cd ldc
$ git checkout v1.5.0
$ git submodule update --init --recursive
$ mkdir build
$ cd build
$ cmake ..
$ make -j4
$ sudo make install
So this is interesting, the install from v1.4.0 -> v1.5.0 didn't overwrite the /usr/include/d/std/datetime.d
and replace it with the directory version. Manually removing /usr/include/d
and re-running the sudo make install
command worked. So the existing datetime.d still existed there post-install, but no error was reported when trying to install the v1.5.0 sources over it. I'll double check that for repeatability.
I had similar issues in the past myself. The files are just copied over, so old obsolete ones are kept (as potential 3rd-party ones too), and apparently the frontend prefers single-file modules over packages. We should probably at least warn about an existing import dir during install.
[The front-end should probably error out in case there are conflicting foo.d
and foo/package.d
.]
I'm using a freshly built and installed ldc v1.5.0 on Fedora 25 linux. The same source builds and runs successfully with dmd 2.076 and ldc v1.4.0
Minimal example:
Attempting to compile as
ldc2 min_time.d
yields: