-
Notifications
You must be signed in to change notification settings - Fork 568
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
Fails to build as shared library on osx (via vcpkg) #4141
Comments
I'm not familiar with the CMake support so I'm not sure about your fix. I think it works but doesn't seem quite right - the relevant bit of the template code is
Since every usage is either a conditional or guarded by the conditional I don't see why it would be unbound at any point. @reneme any ideas? Are we only testing CMake support on Windows possibly? Also I think the import lib is really just a Windows notion and isn't sensible to speak of for Linux/mac/etc. Regarding compiler versions - unfortunately we require at least XCode 15. While for GCC/Clang/MSVC, we fixed a minimum supported compiler version with the release of 3.0.0, and seek to maintain that through the lifetime of Botan 3, we did not do so for XCode largely because at the time of 3.0.0, XCode was quite behind what is supported even in GCC 11, so the minimum supported version of XCode is left floating. At this point I don't think XCode (at 15.2) is holding us back, so we can probably consider freezing on that as our minimum going forward. Also unfortunately, until (the upcoming/currently unreleased) Botan 3.5.0, the build system didn't distinguish LLVM Clang and XCode Clang. Since we support LLVM Clang 14 just fine, the |
BTW if you're not relying on/using the CMake support, you can use |
This comes from vcpkg which is heavily built around cmake, having a proper cmake config exported is a plus in this scenario. |
Makes sense. Oddly I can't replicate this with either 3.3.0 or master on a Linux machine (which likewise doesn't have the notion of an import library) I wonder if VCpkg is shipping with some patch... |
Oh goody VCpkg is shipping with all kinds of patches https://github.com/microsoft/vcpkg/tree/master/ports/botan including https://github.com/microsoft/vcpkg/blob/master/ports/botan/fix-cmake-usage.patch which seems to be at fault here. @reneme can you see what if anything from @m-kuhn this seems to be a VCpkg specific issue, you'll have to take it up with them. We generally aim to make it so that distributors do not need to patch us (because it usually goes poorly, as here) potentially we can get this addressed in the next release so that they don't feel the need to do this anymore. |
@randombit thank you for going down that rabbit hole. I actually had a look at the patches myself and somehow that escaped my attention. I'll leave this open for the question about adapting (parts of) |
FTR vcpkg creates combined release+debug installations (aka multi-config). That's one driver for patches, and in this is also the case for cmake config files from Botan. |
From what I understand, the That said: perhaps we could provide a multi-config debug/release build mode in |
Splitting CMake config in two files (general and per build-type; following the CMake pattern) would be a small change which could be developed/tested in vcpkg and upstreamed. This might still be somewhat specific to vcpkg but could be adapted more easily by others (conan?) |
This sounds like a good idea. Do you happen to have a pointer to some CMake documentation that explains this pattern? Regarding Conan: to the best of my understanding, conan prefers to generate those config files themselves (via their |
I interpreted this statement as 'we'd like to do it but aren't sure how right now but don't object to the way it's done in the vcpkg patch', so I merged @m-kuhn 's patch there. Thanks! |
Closing as I think there is nothing more that is immediately actionable here |
Tentative patch:
I couldn't verify because I'm running into Apple Clang 14 limitations in a subsequent build step which I don't think is a botan issue but more a build chain / Apple issue.
https://stackoverflow.com/questions/74679839/stdrangesany-of-fails-when-compiling-with-apple-clang-14-0
The text was updated successfully, but these errors were encountered: