Skip to content

Build is not reproducible wrt build directory path length #67375

@t184256

Description

@t184256

Shared runtime libs like libc++.so have their rpath set to somewhere in the build directory. Then, as one of the very last steps of the installation, these internal references to build directory are erased with RPATH_SET:

Set runtime path of "/...build-dir.../lib/x86_64-unknown-linux-musl/libc++.so.1.0" to ""

This good intention becomes one toe-stubbing brick forming the road to utter confusion.
The problem is, this erasure is not re-linking, and whatever build-dir-path-len-dependent offsets the shared library had because of the varying builddir length are kept intact.
The result looks as if libc++.so/libc++abi.so compiled from same .o files just differ in internal offsets for no good reason.

One (hacky) workaround to that is using a constant-len build-dir. Clearly, there must be a better way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions