You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env)?
CentOS 6
What did you do?
When building on CentOS 6/glibc-2.12 there seems to be a missing "-lrt" when linking these tests.
The same steps and tools work on CentOS 7.
#!/bin/sh
set -e
UTILS_GCC=/home/utils/gcc-12.2.0
UTILS_BINUTILS=/home/utils/binutils-2.37
UTILS_GIT=/home/utils/git-2.35.1
UTILS_GO=/home/utils/go-1.17.2
nproc=$( cat /proc/cpuinfo | grep processor | wc -l )
test -n "$PREFIX"
export PATH=${UTILS_GCC}/bin:$PATH
export PATH=${UTILS_BINUTILS}/bin:$PATH
export PATH=${UTILS_GIT}/bin:$PATH
export GOROOT_BOOTSTRAP=${UTILS_GO}
export GOROOT_FINAL=$PREFIX
if [ -z $USER ]
then
export USER=$( whoami )
fi
cd src
./all.bash
cd -
What did you expect to see?
##### Testing race detector
ok runtime/race 4.128s
ok flag 0.036s
ok net 0.130s
ok os 0.134s
ok os/exec 0.095s
ok encoding/gob 0.063s
ok flag 0.036s
ok os/exec 0.088s
What did you see instead?
##### Testing race detector
# runtime/race.test
/build/tmp/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/home/utils/binutils-2.37/bin/ld: /tmp/go-link-1368899331/000002.o: in function `__sanitizer::MonotonicNanoTime()':
gotsan.cpp:(.text+0x1586d): undefined reference to `clock_gettime'
collect2: error: ld returned 1 exit status
FAIL runtime/race [build failed]
FAIL
2022/09/30 17:01:27 Failed: exit status 2
# os.test
/build/tmp/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/home/utils/binutils-2.37/bin/ld: /tmp/go-link-3372813736/000002.o: in function `__sanitizer::MonotonicNanoTime()':
gotsan.cpp:(.text+0x1586d): undefined reference to `clock_gettime'
collect2: error: ld returned 1 exit status
# flag.test
/build/tmp/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/home/utils/binutils-2.37/bin/ld: /tmp/go-link-3452973005/000020.o: in function `__sanitizer::MonotonicNanoTime()':
gotsan.cpp:(.text+0x1586d): undefined reference to `clock_gettime'
collect2: error: ld returned 1 exit status
FAIL flag [build failed]
# encoding/gob.test
/build/tmp/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/home/utils/binutils-2.37/bin/ld: /tmp/go-link-1645444054/000020.o: in function `__sanitizer::MonotonicNanoTime()':
gotsan.cpp:(.text+0x1586d): undefined reference to `clock_gettime'
collect2: error: ld returned 1 exit status
# net.test
/build/tmp/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/home/utils/binutils-2.37/bin/ld: /tmp/go-link-3320890071/000020.o: in function `__sanitizer::MonotonicNanoTime()':
gotsan.cpp:(.text+0x1586d): undefined reference to `clock_gettime'
collect2: error: ld returned 1 exit status
FAIL net [build failed]
FAIL os [build failed]
# os/exec.test
/build/tmp/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/home/utils/binutils-2.37/bin/ld: /tmp/go-link-161142025/000024.o: in function `__sanitizer::MonotonicNanoTime()':
gotsan.cpp:(.text+0x1586d): undefined reference to `clock_gettime'
collect2: error: ld returned 1 exit status
FAIL os/exec [build failed]
FAIL encoding/gob [build failed]
FAIL
2022/09/30 17:01:33 Failed: exit status 2
# flag.test
/build/tmp/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/home/utils/binutils-2.37/bin/ld: /tmp/go-link-901642791/000020.o: in function `__sanitizer::MonotonicNanoTime()':
gotsan.cpp:(.text+0x1586d): undefined reference to `clock_gettime'
collect2: error: ld returned 1 exit status
FAIL flag [build failed]
# os/exec.test
/build/tmp/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/home/utils/binutils-2.37/bin/ld: /tmp/go-link-2461358603/000024.o: in function `__sanitizer::MonotonicNanoTime()':
gotsan.cpp:(.text+0x1586d): undefined reference to `clock_gettime'
collect2: error: ld returned 1 exit status
FAIL os/exec [build failed]
FAIL
2022/09/30 17:01:33 Failed: exit status 2
go tool dist: FAILED
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?1.19.1
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?CentOS 6
What did you do?
When building on CentOS 6/glibc-2.12 there seems to be a missing "-lrt" when linking these tests.
The same steps and tools work on CentOS 7.
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: