-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clang build error with version 8.0: undefined symbol: void ... vformat_to<char>(...)
#2377
Comments
undefined symbol: void ... vformat_to<char>(...)
Looks like the error is due to incompatibility between clang and gcc. I was able to repro it on xenial as follows:
|
Should be fixed in 3e7a29c. Thanks for reporting. |
Just for the record, I got the same linking errors with Clang 14.0.3 while it's working with gcc. I already am using fmtlib v8.1.1, which should have fixed that. After some investigations, I found the cause: I included core.h header file: |
Given the following code:
I get:
Same exact problem with ld and gold, but lld prints the demangled symbol. I know that symbol is defined:
Tested on clang 12 and trunk, using all 3 main linkers (ld, lld, and gold). I'm attempting to link the shared object (not using the header-only version).
GCC 8 and 9 (and presumably 10, 11, and trunk) all seem to handle this fine. clang also works fine with 7.1.3, so it's something new in 8.0.0 that it doesn't like. If it's a clang problem, I'm wondering if there's a workaround? I believe
vformat_to<char>
was already an extern template with an explicit instantiation in 7.1.3, so I'm not sure what else might be causing this.The text was updated successfully, but these errors were encountered: