I've just installed a new system - Ubuntu 11.10 beta x64 and can't get
dmd/phobos 2.055 to work.
When I try to compile file hello.d with the following content:
import std.stdio;
void main()
{
writeln("Hello World!");
}
I get this error:
/usr/lib/gcc/x86_64-linux-
gnu/4.6.1/../../../../lib/libphobos2.a(datetime_48b_1ec.o): In function
`_D3std8datetime5Clock11currStdTimeFNdNeZl':
std/datetime.d:(.text._D3std8datetime5Clock11currStdTimeFNdNeZl+0x1d):
undefined reference to `clock_gettime'
/usr/lib/gcc/x86_64-linux-
gnu/4.6.1/../../../../lib/libphobos2.a(time_c0_4d1.o): In function
`_D4core4time12TickDuration12_staticCtor7OFNeZv':
src/core/time.d:(.text._D4core4time12TickDuration12_staticCtor7OFNeZv+0x1f):
undefined reference to `clock_getres'
/usr/lib/gcc/x86_64-linux-
gnu/4.6.1/../../../../lib/libphobos2.a(time_c0_4d1.o): In function
`_D4core4time12TickDuration14currSystemTickFNdNeZS4core4time12TickDuration':
src/core/time.d:
(.text._D4core4time12TickDuration14currSystemTickFNdNeZS4core4time12TickDuration+0x1f):
undefined reference to `clock_gettime'
collect2: ld returned 1 exit status
--- errorlevel 1
Nothing else using Phobos compiles either.
I've seen previous related threads. Tried -L-lrt, didn't work.
I tried the .deb package for Ubuntu, the binaries shipped
in the source archive, as well as compiling Phobos myself (removing
DMD/Phobos every time to make sure no files persisted), but nothing helped.
Has anyone encountered this problem? Did anyone get it to work on Ubuntu
(especially 11.10)?