Open Quuxplusone opened 5 years ago
a simplified reproduction could be helpful
where is this undefined function called from, such that the linker thinks it's needed at all?
If an input object file contains an undefined symbol that no other object file defines, it is usually an error, even though no one is using that symbol. There are some exceptions though.
Can you run lld with -Wl,--reproduce=repro.tar
? That command creates a tar file containing all input files and the command line options, so that I can run the same command locally with the same input. After that, please share the tar file with me.
Attached boost_statechart_missing_symbol.7z
(1016 bytes, application/x-7z-compressed): Small demonstrator
I don't have Boost installed on my Windows machine. Looks like you are using lld/MinGW. lld/MinGW lacks the support of --reproduce, so I'll add that option so that you can use that option. I'll update this bug once my patch to add that option is landed.
I added -reproduce option to lld/MinGW in http://reviews.llvm.org/rL373705. Could you run lld again with the option for me?
I was able to reproduce the issue using boost 0.43 (very old, but I'm locked into it for ABI reasons) and clang/llvm 12.0.1. See attached repo.tar file, I assume someone knows how to read them.
The repo.tar file is too large to attach to a bug report though (even compressed), how can I get this to you. (I'm blocked from dropbox and the other obvious places)
Note that my reproduction above was on ubuntu linux, an ELF system. I'm not sure how to track it down more.
boost_statechart_missing_symbol.7z
(1016 bytes, application/x-7z-compressed)