Bug 14959 – Regression in HEAD: linker error on printing SysTime with writeln
Status
RESOLVED
Resolution
INVALID
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Mac OS X
Creation time
2015-08-24T17:07:00Z
Last change time
2015-09-04T14:40:24Z
Assigned to
nobody
Creator
jack
Comments
Comment #0 by jack — 2015-08-24T17:07:19Z
This works in DMD 2.068, but errors in git head of master
import std.stdio : written;
import std.datetime;
void main() {
auto d1 = Clock.currTime;
writeln(d2);
}
--------------------------
$ dmd test.d
Undefined symbols for architecture x86_64:
"_D3std6format64__T14formatIntegralTS3std5array17__T8AppenderTAyaZ8AppenderTmTaZ14formatIntegralFNaNbNfS3std5array17__T8AppenderTAyaZ8AppenderxmKxS3std6format18__T10FormatSpecTaZ10FormatSpeckmZv", referenced from:
_D3std6format61__T11formatValueTS3std5array17__T8AppenderTAyaZ8AppenderThTaZ11formatValueFNaNfS3std5array17__T8AppenderTAyaZ8AppenderhKS3std6format18__T10FormatSpecTaZ10FormatSpecZv in test.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--- errorlevel 1
Comment #1 by jack — 2015-08-24T17:10:20Z
Oops, should have been writeln(d1);
Comment #2 by dlang-bugzilla — 2015-09-01T10:43:38Z
Can't reproduce on Linux or Windows
Comment #3 by dlang-bugzilla — 2015-09-01T10:48:08Z
Can't reproduce on OS X either, either with current master or with master @ 2015-08-24 17:07:19 UTC (time of your bug report).
How do you build D? Try using Digger.
Comment #4 by jack — 2015-09-01T13:40:57Z
(In reply to Vladimir Panteleev from comment #3)
> Can't reproduce on OS X either, either with current master or with master @
> 2015-08-24 17:07:19 UTC (time of your bug report).
>
> How do you build D? Try using Digger.
Hmm, I tried to re-download and rebuild dmd to see if that would help, but now I am getting this error:
$ make -j8 -f posix.mak AUTO_BOOTSTRAP=1 [9:36:54]
/Library/Developer/CommandLineTools/usr/bin/make -C src -f posix.mak
no cpu specified, assuming X86
CC=g++ /tmp/.host_dmd-2.067.1/dmd2/osx/bin/dmd -conf=/tmp/.host_dmd-2.067.1/dmd2/osx/bin/dmd.conf idgen.d
/bin/sh: /tmp/.host_dmd-2.067.1/dmd2/osx/bin/dmd: No such file or directory
make[1]: *** [idgen] Error 127
make: *** [all] Error 2
Comment #5 by dlang-bugzilla — 2015-09-01T13:42:38Z
(In reply to Vladimir Panteleev from comment #5)
> https://issues.dlang.org/show_bug.cgi?id=14983
>
> Try running:
>
> make -f posix.mak AUTO_BOOTSTRAP=1 host-dmd
$ make -f posix.mak AUTO_BOOTSTRAP=1 host-dmd
make: *** No rule to make target `host-dmd'. Stop.
Comment #7 by jack — 2015-09-02T12:33:41Z
(In reply to Vladimir Panteleev from comment #5)
> https://issues.dlang.org/show_bug.cgi?id=14983
>
> Try running:
>
> make -f posix.mak AUTO_BOOTSTRAP=1 host-dmd
After redownloading dmd and druntime and finally being able to build them, this bug still seems to be present.
$ dmd/src/dmd test.d
Undefined symbols for architecture x86_64:
"_D3std6format64__T14formatIntegralTS3std5array17__T8AppenderTAyaZ8AppenderTmTaZ14formatIntegralFNaNbNfS3std5array17__T8AppenderTAyaZ8AppenderxmKxS3std6format18__T10FormatSpecTaZ10FormatSpeckmZv", referenced from:
_D3std6format61__T11formatValueTS3std5array17__T8AppenderTAyaZ8AppenderThTaZ11formatValueFNaNfS3std5array17__T8AppenderTAyaZ8AppenderhKS3std6format18__T10FormatSpecTaZ10FormatSpecZv in test.o
_D3std6format62__T11formatValueTS3std5array17__T8AppenderTAyaZ8AppenderTxhTaZ11formatValueFNaNfS3std5array17__T8AppenderTAyaZ8AppenderxhKS3std6format18__T10FormatSpecTaZ10FormatSpecZv in test.o
_D3std6format62__T11formatValueTS3std5array17__T8AppenderTAyaZ8AppenderTxmTaZ11formatValueFNaNfS3std5array17__T8AppenderTAyaZ8AppenderxmKS3std6format18__T10FormatSpecTaZ10FormatSpecZv in test.o
"_D3std6format64__T14formatUnsignedTS3std5array17__T8AppenderTAyaZ8AppenderTmTaZ14formatUnsignedFNaNbNfS3std5array17__T8AppenderTAyaZ8AppendermKxS3std6format18__T10FormatSpecTaZ10FormatSpeckbZv", referenced from:
_D3std6format64__T14formatIntegralTS3std5array17__T8AppenderTAyaZ8AppenderTlTaZ14formatIntegralFNaNbNfS3std5array17__T8AppenderTAyaZ8AppenderxlKxS3std6format18__T10FormatSpecTaZ10FormatSpeckmZv in test.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--- errorlevel 1
Comment #8 by dlang-bugzilla — 2015-09-03T09:09:21Z
(In reply to Vladimir Panteleev from comment #8)
> Can you try building D with Digger?
>
> https://github.com/CyberShadow/Digger
Unfortunately, every time I try to use digger, the build fails even though github loads just fine in my browser:
Cloning into 'dmd'...
fatal: unable to connect to github.com:
github.com[0: 192.30.252.130]: errno=Operation timed out
Clone of 'git://github.com/D-Programming-Language/dmd' into submodule path 'dmd' failed
digger: Not caching build failure due to temporary/environment error.
Fatal error: Command ["git", "--work-tree=/Users/Jack/dlang_contrib/test_dir/repo", "--git-dir=/Users/Jack/dlang_contrib/test_dir/repo/.git", "submodule", "update", "--init", "dmd"] failed with status 1
Comment #10 by dlang-bugzilla — 2015-09-04T14:08:08Z
(In reply to Jack Stouffer from comment #9)
> Unfortunately, every time I try to use digger, the build fails even though
> github loads just fine in my browser:
>
> Cloning into 'dmd'...
> fatal: unable to connect to github.com:
> github.com[0: 192.30.252.130]: errno=Operation timed out
Unblock TCP port 9418 or run:
git config --global url.https://github.com/.insteadOf git://github.com/
Comment #11 by jack — 2015-09-04T14:20:15Z
(In reply to Vladimir Panteleev from comment #10)
> (In reply to Jack Stouffer from comment #9)
> > Unfortunately, every time I try to use digger, the build fails even though
> > github loads just fine in my browser:
> >
> > Cloning into 'dmd'...
> > fatal: unable to connect to github.com:
> > github.com[0: 192.30.252.130]: errno=Operation timed out
>
> Unblock TCP port 9418 or run:
>
> git config --global url.https://github.com/.insteadOf git://github.com/
Works with digger build. I'm not quite sure what that means. Am I manually building DMD wrong?
Comment #12 by dlang-bugzilla — 2015-09-04T14:22:11Z
(In reply to Jack Stouffer from comment #11)
> Works with digger build. I'm not quite sure what that means. Am I manually
> building DMD wrong?
It means that the way in which Digger builds D and the way you build D result in different outcomes. You could look through Digger's log, see how it builds D and try to find the difference with your method.
It could also be an installation problem (mismatching versions of the compiler and Phobos, or Phobos library and Phobos source code, or an outdated version of one of the above being in front of the just-built version in the search path).
Comment #13 by jack — 2015-09-04T14:30:38Z
(In reply to Vladimir Panteleev from comment #12)
> (In reply to Jack Stouffer from comment #11)
> > Works with digger build. I'm not quite sure what that means. Am I manually
> > building DMD wrong?
>
> It means that the way in which Digger builds D and the way you build D
> result in different outcomes. You could look through Digger's log, see how
> it builds D and try to find the difference with your method.
>
> It could also be an installation problem (mismatching versions of the
> compiler and Phobos, or Phobos library and Phobos source code, or an
> outdated version of one of the above being in front of the just-built
> version in the search path).
Because I am going to assume digger is more correct that my build I will close this. Where can I find said log file?
Comment #14 by dlang-bugzilla — 2015-09-04T14:40:24Z
Terminal output. You can redirect it to a file e.g. with "2>&1 | tee digger.log".