Skip to content

build failed with libstd-71b07a99.so: undefined symbol: clock_gettime #29956

Closed
@alsam

Description

@alsam

Hello All,
Used to build the nightly smoothly, but today it failed with the messages:

tail make.LOG2
cp x86_64-unknown-linux-gnu/rt/libcompiler-rt.a x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler-rt.a
MATCHES=""; if [ -n "$MATCHES" ] ; then echo "warning: removing previous" \'libcore-*.so\' "libraries:" $MATCHES; rm $MATCHES ; fi
MATCHES=""; if [ -n "$MATCHES" ] ; then echo "warning: removing previous" \'libcore-*.rlib\' "libraries:" $MATCHES; rm $MATCHES ; fi
CFG_LLVM_LINKAGE_FILE=/home/asamoilo/work/github/rust/x86_64-unknown-linux-gnu/rt/llvmdeps.rs LD_LIBRARY_PATH=/home/asamoilo/work/github/rust/x86_64-unknown-linux-gnu/stage1/lib:$LD_LIBRARY_PATH   x86_64-unknown-linux-gnu/stage1/bin/rustc --cfg stage1  -O --cfg rtopt -C prefer-dynamic --target=x86_64-unknown-linux-gnu  -D warnings -L "x86_64-unknown-linux-gnu/rt" -L native="/home/asamoilo/work/github/rust/x86_64-unknown-linux-gnu/llvm/Release/lib"      --out-dir x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib -C extra-filename=-71b07a99 src/libcore/lib.rs
info: now are following matches for libcore-*.so libraries:
info: now are following matches for libcore-*.rlib libraries:
x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-71b07a99.rlib
LD_LIBRARY_PATH=/home/asamoilo/work/github/rust/x86_64-unknown-linux-gnu/stage1/lib:$LD_LIBRARY_PATH   x86_64-unknown-linux-gnu/stage1/bin/rustc --cfg stage1  -O --cfg rtopt -C prefer-dynamic --target=x86_64-unknown-linux-gnu  --emit=obj -o x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/rsbegin.o /home/asamoilo/work/github/rust/src/rtstartup/rsbegin.rs
x86_64-unknown-linux-gnu/stage1/bin/rustc: symbol lookup error: /home/asamoilo/work/github/rust/x86_64-unknown-linux-gnu/stage1/lib/libstd-71b07a99.so: undefined symbol: clock_gettime
make: *** [x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/rsbegin.o] Error 127

running it manually:

D_LIBRARY_PATH=/home/asamoilo/work/github/rust/x86_64-unknown-linux-gnu/stage1/lib:$LD_LIBRARY_PATH   x86_64-unknown-linux-gnu/stage1/bin/rustc --cfg stage1  -O --cfg rtopt -C prefer-dynamic --target=x86_64-unknown-linux-gnu  --emit=obj -o x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/rsbegin.o /home/asamoilo/work/github/rust/src/rtstartup/rsbegin.rs
x86_64-unknown-linux-gnu/stage1/bin/rustc: symbol lookup error: /home/asamoilo/work/github/rust/x86_64-unknown-linux-gnu/stage1/lib/libstd-71b07a99.so: undefined symbol: clock_gettime
ldd /home/asamoilo/work/github/rust/x86_64-unknown-linux-gnu/stage1/lib/libstd-71b07a99.so
        linux-vdso.so.1 =>  (0x00007fff5f5ff000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f68f345e000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f68f3240000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f68f302a000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f68f2c97000)
        /lib64/ld-linux-x86-64.so.2 (0x00000031c6600000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f68f2a12000)

Don't you think adding -lrt to libstd-*.so solve the problem?
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions