On Thursday 27 January 2011 22:03:03 Andrei Alexandrescu wrote: > I just installed Ubuntu 11 on my old laptop (works great) and pulled > everything from git. Everything's fresh - compiler, druntime, phobos. > Trying to make unittest for phobos I get: > > Testing generated/linux/debug/32/unittest/crc32 > Testing generated/linux/debug/32/unittest/std/algorithm > generated/linux/debug/32/libphobos2.a(datetime_478_1ec.o): In function > `_D3std8datetime5Clock11currStdTimeFNdNeZl': > /home/andrei/code/phobos/crc32.d:78: undefined reference to `clock_gettime' > generated/linux/debug/32/libphobos2.a(time_114_4d1.o): In function > `_D4core4time12TickDuration12_staticCtor7OFNeZv': > src/core/time.d:(.text._D4core4time12TickDuration12_staticCtor7OFNeZv+0x1b) > : undefined reference to `clock_getres' > generated/linux/debug/32/libphobos2.a(time_114_4d1.o): In function > `_D4core4time12TickDuration14currSystemTickFNdNeZS4core4time12TickDuration' > : > src/core/time.d:(.text._D4core4time12TickDuration14currSystemTickFNdNeZS4c > ore4time12TickDuration+0x1c): undefined reference to `clock_gettime' > collect2: ld returned 1 exit status > --- errorlevel 1 > make[1]: *** [generated/linux/debug/32/unittest/std/algorithm] Error 1 > make: *** [unittest] Error 2 > > Is the trunk broken?
It looks like it's not linking with librt. dmd.conf needs to have -L-lrt in it. If it doesn't have it, then the default dmd.conf needs to be updated. I've just been using dmd 2.051, so I don't know what the state of dmd.conf in trunk is though. But it looks like it needs to be updated. - Jonathan M Davis _______________________________________________ phobos mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/phobos
