-
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
[libcurl] update usage of tools.apple_deployment_target_flag #4457
[libcurl] update usage of tools.apple_deployment_target_flag #4457
Conversation
Signed-off-by: SSE4 <[email protected]>
Automatically created by bincrafters-conventions 0.30.2
I detected other pull requests that are modifying libcurl/all recipe: This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
doesn't this change also mean you need a minimum conan version for being able to build that package? |
This comment has been minimized.
This comment has been minimized.
@@ -170,7 +170,7 @@ def build_requirements(self): | |||
tools.os_info.detect_windows_subsystem() != "msys2": | |||
self.build_requires("msys2/20200517") | |||
elif self._is_win_x_android: | |||
self.build_requires("ninja/1.10.1") | |||
self.build_requires("ninja/1.10.2") |
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.
auto-added by conventions
… sysroot, arch and min version Signed-off-by: SSE4 <[email protected]>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@@ -259,7 +259,7 @@ def _get_configure_command_args(self): | |||
params.append("--without-nghttp2") | |||
|
|||
if self.options.with_zlib: | |||
params.append("--with-zlib={}".format(tools.unix_path(self.deps_cpp_info["zlib"].lib_paths[0]))) | |||
params.append("--with-zlib={}".format(tools.unix_path(self.deps_cpp_info["zlib"].rootpath))) |
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.
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 guess it's too much, it has to be tested first, and it's not the goal of the PR, so maybe for another one
@@ -249,7 +249,7 @@ def _get_configure_command_args(self): | |||
params.append("--without-wolfssl") | |||
|
|||
if self.options.with_libssh2: | |||
params.append("--with-libssh2={}".format(tools.unix_path(self.deps_cpp_info["libssh2"].lib_paths[0]))) | |||
params.append("--with-libssh2={}".format(tools.unix_path(self.deps_cpp_info["libssh2"].rootpath))) |
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.
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.
not everything has to be done in this PR, SSE4 did an awesome job with this improvement, adding more load on him is maybe not fair and nice. And there can also be space for future improvements :-)
recipes/libcurl/all/conanfile.py
Outdated
@@ -347,7 +347,7 @@ def _patch_mingw_files(self): | |||
def _build_with_autotools(self): | |||
with tools.chdir(self._source_subfolder): | |||
# autoreconf | |||
self.run("./buildconf", win_bash=tools.os_info.is_windows, run_environment=True) | |||
self.run("autoreconf -fiv", win_bash=tools.os_info.is_windows, run_environment=True) |
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.run("autoreconf -fiv", win_bash=tools.os_info.is_windows, run_environment=True) | |
self.run("{} -fiv".format(tools.get_env("AUTORECONF")), win_bash=tools.os_info.is_windows, run_environment=True) |
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.
this will raise if AUTORECONF not in the env
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.
Might need to require libtool for mingw also in build_requirement.
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.
AUTORECONF is in env since we have autoconf in build requirement (through libtool)
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.
build_requirement also needs to be updated, to not break MinGW:
def build_requirements(self):
if not self._is_using_cmake_build:
self.build_requires("libtool/2.4.6")
self.build_requires("pkgconf/1.7.3")
if tools.os_info.is_windows and not tools.get_env("CONAN_BASH_PATH"):
self.build_requires("msys2/20200517")
elif self._is_win_x_android:
self.build_requires("ninja/1.10.2")
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.
it's fine for me (keep buildconf, and replace this logic in another PR).
Just one comment, and @madebr may confirm: msys2 recipe does not guarantee to provide autoreconf of pkg-config. This is why we slowly try to build require pkgconf or autoconf/automake/libtool etc for mingw if required during build, even if msys2 is required (msys2 is just used for the shell).
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.
@a4z I probably will revert back to buildconf
for now, as it seems to be problematic to avoid breakage for MinGW. we may try one more time in another PR :)
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.
See https://github.com/curl/curl/blob/ec5d9b44a2e837fc7b82d1c60d5fae3f851620dc/buildconf#L3
I don't see the point in using buildconf
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.
as I understand, buildconf
script is more or less equivalent to:
self.run("{} -fiv".format(tools.get_env("AUTORECONF") or "autoreconf"), win_bash=tools.os_info.is_windows, run_environment=True)
so, this change should be okay
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.
What do you need autoreconf for here anyway? Wouldn't configure be enough?
Co-authored-by: SpaceIm <[email protected]>
@@ -170,7 +170,7 @@ def build_requirements(self): | |||
tools.os_info.detect_windows_subsystem() != "msys2": | |||
self.build_requires("msys2/20200517") |
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 would say that is too lax mingw detection. This leads to msys2 being installed as build requirements even though the library is compiled for android for example. #4277
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.
probably, needs also settings.os == "Windows"
? and probably, is_mingw
property needs to check settings.compiler == "gcc"
as well?
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.
also don't forget this comment: #4457 (comment)
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.
@SSE4 I guess so.
return self.settings.os == "Windows" and self.settings.compiler != "Visual Studio" |
return self.settings.os == "Windows" and self.settings.compiler == "gcc"
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.
@SpaceIm _is_using_cmake_build is always true when cross compile for Android on Windows
if not self._is_using_cmake_build:
....
elif self._is_win_x_android:
conan-center-index/recipes/libcurl/all/conanfile.py
Lines 84 to 85 in 4cfe106
def _is_using_cmake_build(self): | |
return self.settings.compiler == "Visual Studio" or self._is_win_x_android |
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.
there is a couple of another weirdness in the recipe:
- CMake build is used only for some platforms (e.g. Android)
- Android build enforces ninja (shouldn't it work with any generator?)
anyway, I am not going to address this right now. let's just merge what we have already, otherwise, it will never end :) future PR may address these problems.
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 problem, building for Android on Windows is just my hobby project. :-) However what I have never understood why the autoconfig build is still used when the CMake build is available.
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. |
All green in build 9 (
|
All green in build 10 (
|
okay, let's finalize, no more improvements, please :) as every new change has to be tested with MinGW and iOS (which are not covered by CCI), which is not very convenient for me (it requires a reboot to bootcamp and back to mac). what is not included (and won't be) in this PR:
|
Awesome work! |
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.
Merge!
conan-io/conan#8263 adds
os.sdk
sub-setting, conan-io/conan#8264 addsos.subsystem
sub-setting, they need to be passed to the tools.apple_deployment_target_flagP.S. the code to handle iOS in this recipe is HUGE mess... e.g. it sets a lot of things manually, which should have been done automatically by the
AutoToolsBuildEnvironment
helper. this has to be cleaned up, but that's for another PR (needs to be checked carefully).Specify library name and version: libcurl/all
conan-center hook activated.