Bug 73332

Summary: "cannot find -lrt" build error on OpenBSD
Product: piglit Reporter: Vinson Lee <vlee>
Component: infrastructureAssignee: Eric Anholt <eric>
Status: RESOLVED FIXED QA Contact: Eric Anholt <eric>
Severity: blocker    
Priority: medium CC: brianp, djkurtz
Version: unspecifiedKeywords: regression
Hardware: x86-64 (AMD64)   
OS: OpenBSD   
Whiteboard:
i915 platform: i915 features:

Description Vinson Lee 2014-01-06 18:44:40 UTC
piglit: 1d2915e2d84920f3182bf479ddcb7b77fdfd7264 (master)

$ make
[...]
Linking C shared library ../../../../lib/libpiglitutil.so
/usr/bin/ld: cannot find -lrt


commit 1d2915e2d84920f3182bf479ddcb7b77fdfd7264
Author: Daniel Kurtz <djkurtz@chromium.org>
Date:   Mon Jan 6 09:02:00 2014 -0700

    tests/util: Link with rt if PIGLIT_HAS_POSIX_CLOCK_MONOTONIC
    
    If PIGLIT_HAS_POSIX_CLOCK_MONOTONIC, piglit-util.c will use clock_gettime,
    so, make sure to link against -lrt, too.
    
    Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
    Tested-by: Brian Paul <brianp@vmware.com>
Comment 1 Vinson Lee 2014-01-18 07:30:52 UTC
commit 95ec2551778f8e6c84eda307c05f5baadea58047
Author: Vinson Lee <vlee@freedesktop.org>
Date:   Tue Jan 7 10:54:06 2014 -0800

    tests/util: Link with rt only if librt exists.
    
    This patch fixes the OpenBSD build.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73332
    Signed-off-by: Vinson Lee <vlee@freedesktop.org>
    Reviewed-by: Brian Paul <brianp@vmware.com>

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.