Description
I have opened this issue under the recommendation of @michaelwoerister who has been helping me track down the linking issues I have been having with dylibs.
As reported in previous issues which I piggybacked, the example provided will build on 1.36.0
but nothing newer: https://github.com/AlexKornitzer/dylib-errors/tree/error/consul
To quote @michaelwoerister, the -Zshare-generics
flag has potentially been identified as the root cause:
OK, with the latest version of the error/consul branch I can reproduce. Interestingly the error goes away when compiling with RUSTFLAGS=-Zshare-generics=no.
The error also isn't present for me when compiling with cargo build --release (which is expected because --release implies -Zshare-generics=no)
Hence when building with --release
the linking issues go away.
This is potentially related to #64319 and was originally being tracked in #64340.