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

Boost: Treat empty CXX, AR, RANLIB env as undefined #5593

Merged
merged 1 commit into from
May 26, 2021

Conversation

jakecobb
Copy link
Contributor

@jakecobb jakecobb commented May 21, 2021

Fixes Issue #5569

A bug in cmake-gui would have it sometimes set CXX to
empty instead of leaving it undefined. CXX detection
in the boost recipe would use the blank value and fail
to build. Now we treat empty the same as undefined
and move on to e.g. xcrun detection for these properties.

Specify library name and version: boost/1.76.0 (Really all versions)

This is also a good place to share with all of us why you are submitting this PR (specially if it is a new addition to ConanCenter): is it a dependency of other libraries you want to package? Are you the author of the library? Thanks!

On MacOS, when specifying options other than those used in the prebuilt variants on conan center
and using build=missing boost was failing to build. Conan was invoked from CMake which was
configured from cmake-gui, a common developer workflow in our environment.


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

@@ -1045,23 +1045,23 @@ def _build_cross_flags(self):

@property
def _ar(self):
if "AR" in os.environ:
if os.environ.get("AR"):
Copy link
Contributor

Choose a reason for hiding this comment

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

Use tools.get_env instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looks like tools.get_env (aka conans.util.env_reader.get_env) doesn't really do anything when the default is None or a str as it is in this case, it seems like the purpose is to coerce the type when default is a bool, int, float, or list.

@conan-center-bot

This comment has been minimized.

@SpaceIm
Copy link
Contributor

SpaceIm commented May 21, 2021

    'automake/1.16.3' requires 'autoconf/2.71' while 'libbacktrace/cci.20210118' requires 'autoconf/2.69'.
    To fix this conflict you need to override the package 'autoconf' in your root package.

#5575 will fix this conflict. By the way I don't fully understand why it complains about a build requirement of libbacktrace, build_requirements shouldn't be evaluated since a pre built package is available.

@jakecobb
Copy link
Contributor Author

@SpaceIm Yes, I think that's just the state of master at the time I branched. I'm compiling on MacOS so I tested without backtrace due to the libunwind problem that's still pending a fix. This PR seems small enough to understand in isolation, or should it wait on those to finish so we can get a full CI run?

@jakecobb
Copy link
Contributor Author

For completeness, #5556 is the libunwind problem and #5577 the pending PR to fix it.

Fixes Issue conan-io#5569

A bug in cmake-gui would have it sometimes set CXX to
empty instead of leaving it undefined.  CXX detection
in the boost recipe would use the blank value and fail
to build.  Now we treat empty the same as undefined
and move on to e.g. xcrun detection for these properties.
@jgsogo
Copy link
Contributor

jgsogo commented May 25, 2021

    'automake/1.16.3' requires 'autoconf/2.71' while 'libbacktrace/cci.20210118' requires 'autoconf/2.69'.
    To fix this conflict you need to override the package 'autoconf' in your root package.

#5575 will fix this conflict. By the way I don't fully understand why it complains about a build requirement of libbacktrace, build_requirements shouldn't be evaluated since a pre built package is available.

This is a limitation in Conan when using only one profile: the graph is expanding build-requires in the same context and they can conflict 😞 . Mid-term we will start to use two-profiles in CCI, so these issues should be gone.

@jakecobb
Copy link
Contributor Author

The prior referenced pull requests have all merged, I've rebased this PR to incorporate the updates.

@conan-center-bot
Copy link
Collaborator

All green in build 2 (8a27ce85e86a084454a1eef05481c464b94371b4):

  • boost/1.71.0@:
    All packages built successfully! (All logs)

  • boost/1.69.0@:
    All packages built successfully! (All logs)

  • boost/1.70.0@:
    All packages built successfully! (All logs)

  • boost/1.73.0@:
    All packages built successfully! (All logs)

  • boost/1.76.0@:
    All packages built successfully! (All logs)

  • boost/1.72.0@:
    All packages built successfully! (All logs)

  • boost/1.74.0@:
    All packages built successfully! (All logs)

  • boost/1.75.0@:
    All packages built successfully! (All logs)

Copy link
Contributor

@jgsogo jgsogo left a comment

Choose a reason for hiding this comment

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

I think this is the issue on the CMake side https://gitlab.kitware.com/cmake/cmake/-/issues/21449 (already fixed via https://gitlab.kitware.com/cmake/cmake/-/merge_requests/6151 for 3.21.0).

@SSE4 SSE4 requested a review from uilianries May 26, 2021 07:38
@conan-center-bot conan-center-bot merged commit f67b1d3 into conan-io:master May 26, 2021
@jakecobb jakecobb deleted the boost-mac branch May 26, 2021 14:13
madebr pushed a commit to madebr/conan-center-index that referenced this pull request Jun 21, 2021
Fixes Issue conan-io#5569

A bug in cmake-gui would have it sometimes set CXX to
empty instead of leaving it undefined.  CXX detection
in the boost recipe would use the blank value and fail
to build.  Now we treat empty the same as undefined
and move on to e.g. xcrun detection for these properties.
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.

6 participants