-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
zmqpp library recipe #4487
zmqpp library recipe #4487
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.
How to disable old C++ ABI in Conan and allow only libstdc++11 API for Linux? |
This comment has been minimized.
This comment has been minimized.
As I understand, new C++ ABI couldn't be forced from recipe, could it? |
This comment has been minimized.
This comment has been minimized.
in general, settings shouldn't be forced by the individual recipes. it would be surprising for consumers who requested one libcxx to get binaries actually compiled with another libcxx. |
Failure in build 6 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. |
Failure in build 7 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. |
Failure in build 8 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. |
Failure in build 9 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. |
Failure in build 24 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. |
Without second patch it builds for Linux, but not for macOS. Also specifying |
I am very grateful for you taking the time to look into the comments We can very much continue |
Ok, thanks! Should I revert branch to last green revision to proceed? |
Please! |
This reverts commit e948a77.
All green in build 25 (
|
So, I reverted to last green commit which works for both supported platforms. Do you have any other suggestions? |
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! There's one minor comment but not worth triggering a new build
recipes/zmqpp/all/conanfile.py
Outdated
del self.options.fPIC | ||
|
||
def requirements(self): | ||
self.requires("libsodium/1.0.18") |
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.
Why this lib is in requirements? Doesn't seem to be a direct dependency.
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 think there was some issues with macOS build some time ago, but I'll try without it.
if self.settings.compiler == "Visual Studio": | ||
raise ConanInvalidConfiguration("Visual Studio compiler is not supported") |
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.
Are you sure? zmqpp explicitly doesn't support Visual Studio, or the build is just broken for some triplets?
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.
The build is broken for MSVS. After some hacks applied to build configuration, it starts compilation step, but compilation errors appear. So I disabled MSVS support for now.
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 think that zmqpp 4.2.0 may support some (old?) versions of MSVS, but it would still require some tweaks/patches in Conan recipe to support that.
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.
Pretty sure that conan create -kb
is broken without this modification.
Moreover, cmake.verbose shouldn't be True
recipes/zmqpp/all/conanfile.py
Outdated
def build(self): | ||
self._patch_sources() | ||
self.cmake = CMake(self) | ||
self.cmake.verbose = True | ||
self.cmake.definitions["ZMQPP_BUILD_SHARED"] = self.options.shared | ||
self.cmake.definitions["ZMQPP_BUILD_STATIC"] = not self.options.shared | ||
self.cmake.definitions["ZMQPP_BUILD_EXAMPLES"] = False | ||
self.cmake.definitions["ZMQPP_BUILD_CLIENT"] = False | ||
self.cmake.definitions["ZMQPP_BUILD_TESTS"] = False | ||
self.cmake.configure(build_folder=self._build_subfolder) | ||
self.cmake.build() | ||
|
||
def package(self): | ||
self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) | ||
self.cmake.configure() | ||
self.cmake.install() |
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.
def build(self): | |
self._patch_sources() | |
self.cmake = CMake(self) | |
self.cmake.verbose = True | |
self.cmake.definitions["ZMQPP_BUILD_SHARED"] = self.options.shared | |
self.cmake.definitions["ZMQPP_BUILD_STATIC"] = not self.options.shared | |
self.cmake.definitions["ZMQPP_BUILD_EXAMPLES"] = False | |
self.cmake.definitions["ZMQPP_BUILD_CLIENT"] = False | |
self.cmake.definitions["ZMQPP_BUILD_TESTS"] = False | |
self.cmake.configure(build_folder=self._build_subfolder) | |
self.cmake.build() | |
def package(self): | |
self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) | |
self.cmake.configure() | |
self.cmake.install() | |
def _configure_cmake(self): | |
if self._cmake: | |
return self._cmake | |
self._cmake = CMake(self) | |
self._cmake.definitions["ZMQPP_BUILD_SHARED"] = self.options.shared | |
self._cmake.definitions["ZMQPP_BUILD_STATIC"] = not self.options.shared | |
self._cmake.definitions["ZMQPP_BUILD_EXAMPLES"] = False | |
self._cmake.definitions["ZMQPP_BUILD_CLIENT"] = False | |
self._cmake.definitions["ZMQPP_BUILD_TESTS"] = False | |
self._cmake.configure(build_folder=self._build_subfolder) | |
return self._cmake | |
def build(self): | |
self._patch_sources() | |
cmake = self._configure_cmake() | |
cmake.build() | |
def package(self): | |
self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) | |
cmake = self._configure_cmake() | |
cmake.install() |
options = {"shared": [True, False], "fPIC": [True, False]} | ||
default_options = {"shared": False, "fPIC": True} | ||
exports_sources = "CMakeLists.txt", "patches/**" | ||
generators = ["cmake", "cmake_find_package"] |
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.
generators = ["cmake", "cmake_find_package"] | |
generators = ["cmake", "cmake_find_package"] | |
_cmake = None |
recipes/zmqpp/all/conanfile.py
Outdated
self.cpp_info.names["cmake_find_package"] = "zmqpp" | ||
self.cpp_info.names["cmake_find_package_multi"] = "zmqpp" | ||
self.cpp_info.names["pkg_config"] = "libzmqpp" | ||
libzmq_target = "libzmqpp" if self.options.shared else "libzmqpp-static" | ||
self.cpp_info.components[libzmq_target].names["cmake_find_package"] = libzmq_target | ||
self.cpp_info.components[libzmq_target].names["cmake_find_package_multi"] = libzmq_target | ||
self.cpp_info.components[libzmq_target].libs = tools.collect_libs(self) | ||
self.cpp_info.components[libzmq_target].requires = ["libsodium::libsodium", "zeromq::zeromq"] |
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.
self.cpp_info.names["cmake_find_package"] = "zmqpp" | |
self.cpp_info.names["cmake_find_package_multi"] = "zmqpp" | |
self.cpp_info.names["pkg_config"] = "libzmqpp" | |
libzmq_target = "libzmqpp" if self.options.shared else "libzmqpp-static" | |
self.cpp_info.components[libzmq_target].names["cmake_find_package"] = libzmq_target | |
self.cpp_info.components[libzmq_target].names["cmake_find_package_multi"] = libzmq_target | |
self.cpp_info.components[libzmq_target].libs = tools.collect_libs(self) | |
self.cpp_info.components[libzmq_target].requires = ["libsodium::libsodium", "zeromq::zeromq"] | |
self.cpp_info.names["pkg_config"] = "libzmqpp" | |
self.cpp_info.libs = tools.collect_libs(self) |
This lib doesn't provide an official CMake config file, or I missed something. Please don't suggest that it does.
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.
😕 https://github.com/zeromq/zmqpp/blob/85ae96020f2376c53d2176e04e88e8e51021b748/CMakeLists.txt#L237
There's targets installed, does that not count?
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.
no, it's completly unrelated
All green in build 26 (
|
Specify library name and version: zmqpp /4.2.0
conan-center hook activated.