[LLVMbugs] [Bug 9399] New: libc++.so: undefined reference to `clock_gettime'

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Mar 3 22:00:05 PST 2011


           Summary: libc++.so: undefined reference to `clock_gettime'
           Product: libc++
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
        AssignedTo: hhinnant at apple.com
        ReportedBy: oroppas at gmail.com
                CC: llvmbugs at cs.uiuc.edu


When I tried to compile a piece of c++ code

  clang++ -std=c++0x -I/usr/include/c++/v1/ ./variadic_print.cpp  -lc++

the linker was unable to resolve the symbol clock_gettime.
Of course, it's in librt.so, so simply appending -lrt fixes the problem.

Does libc++ itself depend on librt?
I built libc++ by CMake using clang compiler instead of gcc.



Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list