Skip to content
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

Merged

Conversation

SSE4
Copy link
Contributor

@SSE4 SSE4 commented Feb 2, 2021

conan-io/conan#8263 adds os.sdk sub-setting, conan-io/conan#8264 adds os.subsystem sub-setting, they need to be passed to the tools.apple_deployment_target_flag

P.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

  • I've read the guidelines for contributing.
  • I've followed the PEP8 style guides for Python code in the recipes.
  • I've used the latest Conan client version.
  • I've tried at least one configuration locally with the
    conan-center hook activated.

SSE4 and others added 2 commits February 2, 2021 13:32
Automatically created by bincrafters-conventions 0.30.2
@ghost
Copy link

ghost commented Feb 2, 2021

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.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@SSE4 SSE4 closed this Feb 3, 2021
@SSE4 SSE4 reopened this Feb 3, 2021
@a4z
Copy link
Contributor

a4z commented Feb 3, 2021

doesn't this change also mean you need a minimum conan version for being able to build that package?

@conan-center-bot

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")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto-added by conventions

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

prince-chrismc
prince-chrismc previously approved these changes Feb 8, 2021
@@ -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)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

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 :-)

@@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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)

Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Contributor

@SpaceIm SpaceIm Feb 9, 2021

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)

Copy link
Contributor

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")

Copy link
Contributor

@SpaceIm SpaceIm Feb 9, 2021

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).

Copy link
Contributor Author

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 :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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

Copy link
Contributor

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?

@SSE4 SSE4 dismissed stale reviews from prince-chrismc and a4z via 00b1918 February 9, 2021 11:43
a4z
a4z previously approved these changes Feb 9, 2021
@@ -170,7 +170,7 @@ def build_requirements(self):
tools.os_info.detect_windows_subsystem() != "msys2":
self.build_requires("msys2/20200517")
Copy link
Contributor

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

Copy link
Contributor Author

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?

Copy link
Contributor

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)

Copy link
Contributor

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"

Copy link
Contributor

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:

def _is_using_cmake_build(self):
return self.settings.compiler == "Visual Studio" or self._is_win_x_android

Copy link
Contributor Author

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.

Copy link
Contributor

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.

@conan-center-bot
Copy link
Collaborator

Failure in build 8 (00b1918caa8bb5de1634f588d7a0019df6853e25):

  • libcurl/7.74.0@:
    All packages built successfully! (All logs)

  • libcurl/7.72.0@:
    All packages built successfully! (All logs)

  • libcurl/7.73.0@:
    All packages built successfully! (All logs)

  • libcurl/7.66.0@:
    All packages built successfully! (All logs)

  • libcurl/7.70.0@:
    All packages built successfully! (All logs)

  • libcurl/7.71.0@:
    All packages built successfully! (All logs)

  • libcurl/7.67.0@:
    All packages built successfully! (All logs)

  • libcurl/7.64.1@:
    All packages built successfully! (All logs)

  • libcurl/7.71.1@:
    All packages built successfully! (All logs)

  • libcurl/7.68.0@:
    An unexpected error happened and has been reported

  • libcurl/7.69.1@:
    All packages built successfully! (All logs)


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.

@conan-center-bot
Copy link
Collaborator

All green in build 9 (00b1918caa8bb5de1634f588d7a0019df6853e25):

  • libcurl/7.74.0@:
    All packages built successfully! (All logs)

  • libcurl/7.71.1@:
    All packages built successfully! (All logs)

  • libcurl/7.73.0@:
    All packages built successfully! (All logs)

  • libcurl/7.72.0@:
    All packages built successfully! (All logs)

  • libcurl/7.71.0@:
    All packages built successfully! (All logs)

  • libcurl/7.70.0@:
    All packages built successfully! (All logs)

  • libcurl/7.69.1@:
    All packages built successfully! (All logs)

  • libcurl/7.64.1@:
    All packages built successfully! (All logs)

  • libcurl/7.68.0@:
    All packages built successfully! (All logs)

  • libcurl/7.67.0@:
    All packages built successfully! (All logs)

  • libcurl/7.66.0@:
    All packages built successfully! (All logs)

recipes/libcurl/all/conanfile.py Outdated Show resolved Hide resolved
@conan-center-bot
Copy link
Collaborator

All green in build 10 (9442753c9fe1cf24c64319eeb1274f5b608ca255):

  • libcurl/7.73.0@:
    All packages built successfully! (All logs)

  • libcurl/7.74.0@:
    All packages built successfully! (All logs)

  • libcurl/7.72.0@:
    All packages built successfully! (All logs)

  • libcurl/7.66.0@:
    All packages built successfully! (All logs)

  • libcurl/7.70.0@:
    All packages built successfully! (All logs)

  • libcurl/7.68.0@:
    All packages built successfully! (All logs)

  • libcurl/7.67.0@:
    All packages built successfully! (All logs)

  • libcurl/7.69.1@:
    All packages built successfully! (All logs)

  • libcurl/7.64.1@:
    All packages built successfully! (All logs)

  • libcurl/7.71.1@:
    All packages built successfully! (All logs)

  • libcurl/7.71.0@:
    All packages built successfully! (All logs)

@SSE4
Copy link
Contributor Author

SSE4 commented Feb 10, 2021

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:

  • switching zlib and other deps to pkg-config
  • using conan's autoconf for MinGW (appears to be broken)
  • not using MSYS for Android

@a4z
Copy link
Contributor

a4z commented Feb 10, 2021

Awesome work!
and I totally agree that the rest has to be part of future iterations.

Copy link
Contributor

@prince-chrismc prince-chrismc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge!

@conan-center-bot conan-center-bot merged commit 0239862 into conan-io:master Feb 12, 2021
@CroydonBot CroydonBot deleted the libcurl_apple_subsettings branch February 12, 2021 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants