KhronosGroup / KhronosGroup/SPIRV-LLVM-Translator

Travis job fails because of missing -rpath-link path argument in ld command

Open
#1,546 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
LLVM
Stars
625
Forks
279
Avg merge
3d 5h
Merged PRs (30d)
34

Description

Example of failing job: https://app.travis-ci.com/github/KhronosGroup/SPIRV-LLVM-Translator/jobs/576246713

When CXX shared library libLLVMSPIRVLib.so is linking, ld gets -rpath-link with empty path and therefore the next argument is treaded as the path.

In debug build the next argument is "-z defs":
`"/usr/bin/ld" (...) -rpath-link -z defs -z nodelete -soname libLLVMSPIRVLib.so.11 (...)`
and it causes the error:
`/usr/bin/ld: cannot find defs: No such file or directory`

In release build the next argument is "-O3":
`"/usr/bin/ld" (...) -rpath-link -O3 --gc-sections -z defs -z nodelete -soname libLLVMSPIRVLib.so.11 (...)`
and the error does not occur and the build is successful.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Travis job linked in the issue and compare the debug and release linker commands for libLLVMSPIRVLib.so. Trace where the empty -rpath-link argument is generated, then verify that both build modes produce a valid linker command without treating the following option as a path.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.