Skip to content

MacOS: lost symbols strike back

Steps to reproduce:

cargo test --doc --package picodata -- instance::grade::has_grades --nocapture

We have faced a new reincarnation of the linker that stripes unused symbols on linkage (previous episode is #229). This time the problem happens if we run cargo test --doc (log):

  = note: clang: warning: argument unused during compilation: '-no-pie' [-Wunused-command-line-argument]
          Undefined symbols for architecture x86_64:
            "_decNumberFromInt64", referenced from:
                _decimal_from_int64 in libcore.a(decimal.c.o)
            "_decNumberFromUInt64", referenced from:
                _decimal_from_uint64 in libcore.a(decimal.c.o)
          ld: symbol(s) not found for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

An interesting part of the story is that even if we add RUSTFLAGS="-C link-dead-code=yes" to the repro, the problem remains.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information