-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Adding Botan 3.0.0 recipe and make it compatible with Conan 2.x #18079
Adding Botan 3.0.0 recipe and make it compatible with Conan 2.x #18079
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hooks produced the following warnings for commit 9aaf6bbbotan/2.17.0
botan/2.16.0
botan/2.14.0
botan/2.17.2
botan/2.18.2
botan/2.18.1
botan/2.19.2
botan/2.19.3
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hooks produced the following warnings for commit a3426d9botan/2.19.1
botan/2.19.2
botan/2.18.2
botan/2.19.3
|
This comment has been minimized.
This comment has been minimized.
Hooks produced the following warnings for commit 3cdcbacbotan/2.17.3
botan/2.19.3
botan/2.19.1
botan/2.18.2
|
@lieser quick note, I just faced a problem where the |
@trns1997 Note that |
@memsharded Currently the CI fails with Does that mean it will not be possible to add Botan 3.0.0 until the CI gets updated, or Botan is somehow made compatible with at least one compiler? There is a potential chance to make GCC 11.1 compatible, as GCC 11 has C++ 20 support. But unsure if it will be worth the effort to try working around the bugs in GCC 11.1 that affect Botan. Another question is regarding the new How should a library like Botan with a custom build system that has a hard coded C++ language setting behave?
|
hey @lieser, I just figured out why it no works for us. Basically we used to pass the |
41ecbfe
to
3060781
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@uilianries I think, I addressed your recent comments and the pipeline is green. I'd appreciate another look. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some notes:
- Tested locally with the docker image conanio/gcc11-ubuntu16.04 and it does not work because we have 11.1 installed
- Tested locally with the docker image conanio/gcc12-ubuntu16.04 and it does not work because it requires glibc >= 2.25 because it uses
getentropy
- Tested locally with the docker image conanio/gcc12-ubuntu18.04 with Conan 2.0.17 and worked for static library build.
recipes/botan/all/conanfile.py
Outdated
miss_boost_required_comp = any(getattr(self.options['boost'], 'without_{}'.format(boost_comp), True) for boost_comp in self._required_boost_components) | ||
if self.options['boost'].header_only or self.options['boost'].shared or self.options['boost'].magic_autolink or miss_boost_required_comp: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to build locally and it does not work when boost is required:
$ conan create all --version=3.2.0 -s compiler.cppstd=20 --build=missing -pr gcc12.profile
======== Exporting recipe to the cache ========
botan/3.2.0: Exporting package recipe: /home/conan/project/all/conanfile.py
botan/3.2.0: exports: File 'conandata.yml' found. Exporting it...
botan/3.2.0: Calling export_sources()
botan/3.2.0: Copied 1 '.yml' file: conandata.yml
botan/3.2.0: Copied 1 '.py' file: conanfile.py
botan/3.2.0: Exported to cache folder: /home/conan/.conan2/p/botan759963310d11c/e
botan/3.2.0: Exported: botan/3.2.0#9b62638872488502e0160f97996e959f (2024-01-15 15:43:57 UTC)
======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=20
compiler.libcxx=libstdc++11
compiler.version=12
os=Linux
[options]
botan/3.2.0:with_boost=True
botan/3.2.0:with_bzip2=True
botan/3.2.0:with_sqlite3=True
botan/3.2.0:with_zlib=True
Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu17
compiler.libcxx=libstdc++11
compiler.version=12
os=Linux
======== Computing dependency graph ========
bzip2/1.0.8: Not found in local cache, looking in remotes...
bzip2/1.0.8: Checking remote: conancenter
bzip2/1.0.8: Downloaded recipe revision 457c272f7da34cb9c67456dd217d36c4
zlib/1.3: Not found in local cache, looking in remotes...
zlib/1.3: Checking remote: conancenter
zlib/1.3: Downloaded recipe revision 06023034579559bb64357db3a53f88a4
sqlite3/3.38.5: Not found in local cache, looking in remotes...
sqlite3/3.38.5: Checking remote: conancenter
sqlite3/3.38.5: Downloaded recipe revision 4b875d4249cdfb4c1235e6b3ea6c18e7
boost/1.83.0: Not found in local cache, looking in remotes...
boost/1.83.0: Checking remote: conancenter
boost/1.83.0: Downloaded recipe revision 658a6b1d7aa62a019cbba3f4ae363cb7
libbacktrace/cci.20210118: Not found in local cache, looking in remotes...
libbacktrace/cci.20210118: Checking remote: conancenter
libbacktrace/cci.20210118: Downloaded recipe revision ec1aa63bbc10145c6a299e68e711670c
b2/4.10.1: Not found in local cache, looking in remotes...
b2/4.10.1: Checking remote: conancenter
b2/4.10.1: Downloaded recipe revision 1b290403d8648c79f468f5a6496f829a
Graph root
cli
Requirements
boost/1.83.0#658a6b1d7aa62a019cbba3f4ae363cb7 - Downloaded (conancenter)
botan/3.2.0#9b62638872488502e0160f97996e959f - Cache
bzip2/1.0.8#457c272f7da34cb9c67456dd217d36c4 - Downloaded (conancenter)
libbacktrace/cci.20210118#ec1aa63bbc10145c6a299e68e711670c - Downloaded (conancenter)
sqlite3/3.38.5#4b875d4249cdfb4c1235e6b3ea6c18e7 - Downloaded (conancenter)
zlib/1.3#06023034579559bb64357db3a53f88a4 - Downloaded (conancenter)
Build requirements
b2/4.10.1#1b290403d8648c79f468f5a6496f829a - Downloaded (conancenter)
Resolved version ranges
zlib/[>=1.2.11 <2]: zlib/1.3
======== Computing necessary packages ========
boost/1.83.0: Checking 9 compatible configurations
boost/1.83.0: Compatible configurations not found in cache, checking servers
boost/1.83.0: '1f4d8d9bfb906fd36e9471d4ce2424cf0278c2ce': compiler.cppstd=11
boost/1.83.0: 'f331bab124723d370f6d6c8b733ba3ff9df40985': compiler.cppstd=gnu11
boost/1.83.0: '0444dbb02c7c03e0924add655328614c4069992c': compiler.cppstd=14
boost/1.83.0: '53fadd80e75df07d899e7a29532a2fc59cd7ab23': compiler.cppstd=gnu14
boost/1.83.0: '21c1ffdf955757b3eaf1428692e72e91c15d8446': compiler.cppstd=17
boost/1.83.0: 'ab3b66987b0ff007c45a5b90708ec0b68208653b': compiler.cppstd=gnu17
boost/1.83.0: 'b7691adcb83380a1f2a05c4982136fd2dcb71ab7': compiler.cppstd=gnu20
boost/1.83.0: 'b4575a8b8adc07f0f83596aa71fc38363b522735': compiler.cppstd=23
boost/1.83.0: '1d726159589d984732e608f539092dd02c6b8583': compiler.cppstd=gnu23
ERROR: botan/3.2.0: Error in validate() method, line 181
miss_boost_required_comp = any(getattr(self.options['boost'], 'without_{}'.format(boost_comp), True) for boost_comp in self._required_boost_components)
while calling '<genexpr>', line 181
miss_boost_required_comp = any(getattr(self.options['boost'], 'without_{}'.format(boost_comp), True) for boost_comp in self._required_boost_components)
ConanException: option 'without_coroutine' doesn't exist
Possible options are []
So, doing a quick check, in Conan 2.x you should use self.dependencies["boost"].options
instead. Could you please update and check it?
Thanks, @uilianries for spotting this issue. I was able to reproduce and fix it with your suggestion. 👍 Regarding the build on There are many more switches in Botan's |
This comment has been minimized.
This comment has been minimized.
@reneme Thank you for checking. It's a shame we still can not run a newer docker image with a newer compiler to solve this problem. I would prefer not building a package, but distributing only the recipe in case not possible right now in CCI. I see some problems like, Botan is going forward with new features, and we are trying to backport things, which makes even harder to maintain this recipe. About the option, you have a good observation about using the option, but I'm no inclined to accept a so generic feature, because it would result in a fragility not tested by us. Like, users start to use a configuration that does not work and report us as an issue, but in the end, it's a bug in the upstream. Maybe, using the conan configuration My current suggestion is checking glibc version (it could be |
Alternatively, we could disable certain features via Botan's Though, that would mean that consumers of the binaries compiled in your CI won't benefit from those features, either. Right, @uilianries? But, given that you are planning to update the build images soon, we could remove this workaround again soon. |
This can (and should) be removed once CCI's CI images are updated with a newer glibc.
As discussed yesterday, I added a workaround that allows compiling Botan 3.x with a glibc older than 2.25. This disables certain OS features that the library just takes for granted starting in 3.x. If the workaround is triggered, it prints a |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, only few comments. I'll build locally with Boost to check how is working.
It's working on Mac: https://gist.github.com/uilianries/399359d2327602bcfe8ea5ed4183f0ab 🟢 |
Co-authored-by: Uilian Ries <uilianries@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Conan v1 pipeline ✔️All green in build 29 (
Conan v2 pipeline ✔️
All green in build 31 (
|
@RubenRBS @jcar87 Could we get your review on this, please? 😃 |
🥳Thank you all for the effort that went into this! |
Specify library name and version: botan/3.0.0
-fPIC
flag warning in MSVC build. Fixes [package] botan/2.19.3 Unknown -fPIC flag #15133.tools.build:sysroot
config option.Replaces inactive PR #17364.