You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This additional dependency has not been reflected in package_info method of the current poco recipe.
The problem occurs when poco is built as a static library with the poco_net component enabled (enable_net=True) using MinGW, but does not manifest itself until poco_net is linked to by a consuming recipe.
My suggestion is to add the following to conanfile.py:
@property
def _is_mingw(self):
return self.settings.os == "Windows" and self.settings.compiler == "gcc"
def package_info(self):
...
if self.options.enable_net:
if not self.options.shared and self._is_mingw and Version(self.version) >= "1.13.0":
self.cpp_info.components["poco_net"].system_libs.extend(["mswsock"])
...
Not sure about the long if statement or if it is better to split it.
I can provide a pull request, but I would like to know if this is the correct approach.
Thank you for reporting your case! Your description is very clear, and you also included a repository to reproduce your steps, which is really helpful! Thank you for all those details!
I just cloned your repository and I'm capable of reproducing your case too.
I can provide a pull request, but I would like to know if this is the correct approach.
Your PR will be welcome! We only need to check the result by posting a full build log in the PR too, as we do not run MinGW or Cygwin in the CI, so we can not prove it directly.
Your approach is looking fine, it follow the common pattern used in CCI. In case needing to adjust something, we still can review in the PR.
Not sure about the long if statement or if it is better to split it.
Do not worry, the single-line condition is looking fine, and is readable.
Description
In version 1.13.0, poco added a dependency on mswsock.lib to the poco_net component (pocoproject/poco@214b544) when building with MinGW.
The dependency was added to Net/CMakeLists.txt line 34.
This additional dependency has not been reflected in package_info method of the current poco recipe.
The problem occurs when poco is built as a static library with the poco_net component enabled (enable_net=True) using MinGW, but does not manifest itself until poco_net is linked to by a consuming recipe.
My suggestion is to add the following to conanfile.py:
Not sure about the long if statement or if it is better to split it.
I can provide a pull request, but I would like to know if this is the correct approach.
Package and Environment Details
Conan profile
mingw_host:
[settings]
os=Windows
arch=x86_64
build_type=Release
compiler=gcc
compiler.version=14
compiler.libcxx=libstdc++11
compiler.threads=posix
compiler.exception=seh
[tool_requires]
mingw-builds/14.2.0
mingw_build:
[settings]
os=Windows
arch=x86_64
build_type=Release
Steps to reproduce
git clone https://github.com/lbakman/poco-net-spike.git
conan build poco-net-spike -pr:h=mingw_host -pr:b=mingw_build --build=missing
Logs
Click to expand log
The text was updated successfully, but these errors were encountered: