boostorg / boostorg/build

undefined-sanitizer, xenial on Travis CI

Open
#451 1 comment 0 reactions 0 assignees View on GitHub
transition
Dominant language
C++
Stars
251
Forks
63
PR merge metrics
No merged PRs in 30d

Description

On Travis CI using the xenial image, when compiling boostorg/uuid with `undefined-sanitizer=norecover` I get a link error:

https://travis-ci.org/boostorg/uuid/jobs/543694135
```
b2 toolset=gcc-8 cxxstd=03,11,14 undefined-sanitizer=norecover define=BOOST_NO_STRESS_TEST=1 variant=debug -j3
...
gcc.link ../../bin.v2/libs/uuid/test/test_include1.test/gcc-8/debug/cxxstd-03-iso/link-static/threading-multi/undefined-sanitizer-norecover/visibility-hidden/test_include1
/usr/bin/ld: unrecognized option '--push-state--no-as-needed'
/usr/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
"g++-8" -o "../../bin.v2/libs/uuid/test/test_include1.test/gcc-8/debug/cxxstd-03-iso/link-static/threading-multi/undefined-sanitizer-norecover/visibility-hidden/test_include1" -Wl,--start-group "../../bin.v2/libs/uuid/test/test_include1.test/gcc-8/debug/cxxstd-03-iso/link-static/threading-multi/undefined-sanitizer-norecover/visibility-hidden/test_include1.o" "../../bin.v2/libs/uuid/test/test_include1.test/gcc-8/debug/cxxstd-03-iso/link-static/threading-multi/undefined-sanitizer-norecover/visibility-hidden/test_include2.o" -Wl,-Bstatic -Wl,-Bdynamic -lrt -Wl,--end-group -m64 -pthread -std=c++03 -g -fvisibility=hidden -fvisibility-inlines-hidden -fsanitize=undefined -fno-sanitize-recover=undefined
...failed gcc.link ../../bin.v2/libs/uuid/test/test_include1.test/gcc-8/debug/cxxstd-03-iso/link-static/threading-multi/undefined-sanitizer-norecover/visibility-hidden/test_include1...
```

A workaround to this is to force the use of the gold linker:

https://travis-ci.org/boostorg/uuid/jobs/543759905
```
b2 toolset=gcc-8 cxxstd=03,11,14 undefined-sanitizer=norecover define=BOOST_NO_STRESS_TEST=1 linkflags=-fuse-ld=gold variant=debug -j3
```

It looks like a linker option is being used that the standard `ld` linker does not understand?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.