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

Add Userspace RCU recipe. #11595

Merged
merged 14 commits into from
Jul 26, 2022
Merged

Conversation

szmyd
Copy link
Contributor

@szmyd szmyd commented Jul 7, 2022

Specify library name and version: userspace-rcu/0.11.4

Userspace RCU implements a library around the Linux Kernel RCU interface. It is used by benchmarking and metrics gathering libraries at eBay Inc. and a dependency for many of our Open Source projects.


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

@CLAassistant
Copy link

CLAassistant commented Jul 7, 2022

CLA assistant check
All committers have signed the CLA.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

2 similar comments
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

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.

👋 thanks for opening this PR and contributing this recipe

I had two small nits and two questsions, I am not familiar with this project so hopefully you can fill in the gaps

recipes/userspace-rcu/all/conanfile.py Outdated Show resolved Hide resolved
recipes/userspace-rcu/all/conanfile.py Outdated Show resolved Hide resolved
recipes/userspace-rcu/all/test_package/test_package.cpp Outdated Show resolved Hide resolved
self.copy("*{}.so*".format(lib_name), dst="lib", keep_path=False)
self.copy("*{}.dylib".format(lib_name), dst="lib", keep_path=False)
else:
self.copy("*{}.a".format(lib_name), dst="lib", keep_path=False)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there as reason that only on lib at a time is linked again but all of them are copied?

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'm not sure I follow; this is the package() function so while all library variants are built, only the one selected with the model option is copied into the package (and thus added to the cpp_info linker flags). Am I missing something?

Copy link
Contributor

Choose a reason for hiding this comment

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

We try to respect the original projects layout as closely as possible this way existing users of the project can continue what they are doing and new consumers can just follow the upstream docs without Conan getting in the way.

Looking of the project what we'd ideally have is the the projects install and model the pkg_config targets https://github.com/urcu/userspace-rcu/blob/7c40d7f5b2139ec9151daf8410b6b934234220d5/configure.ac#L310-L316

This was, as the original author intended, consumers can pick which libs they link against


My suggestion is

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, I see. Thanks for the clarification!

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

jgsogo
jgsogo previously approved these changes Jul 19, 2022
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 added some suggestions, but they are just suggestions.

recipes/userspace-rcu/all/conanfile.py Outdated Show resolved Hide resolved
recipes/userspace-rcu/all/conanfile.py Outdated Show resolved Hide resolved
recipes/userspace-rcu/all/conanfile.py Outdated Show resolved Hide resolved
@prince-chrismc
Copy link
Contributor

Please do not force push 🙏 GitHub forces us to restart the review which is not fun!

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

All green in build 24 (6b29a540f09469da289c5f79f3676327c686629b):

  • userspace-rcu/0.11.4@:
    All packages built successfully! (All logs)

    🔸 Informative: This recipe is not ready for Conan v2

    We have started the migration process to Conan v2 and exporting recipes successfully will be required in the future.
    This is just an informative note to gain awareness about the process, no need to take any action. The plan is to enforce smaller steps that are easier to fix and, eventually, this conan export step will work.
    See the recipe migration guide to know more about the changes required.

    ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-11595/recipes/userspace-rcu/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-11595/recipes/userspace-rcu/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod_cci_PR-11595/recipes/userspace-rcu/all/conanfile.py", line 3, in <module>
        from conans import ConanFile, AutoToolsBuildEnvironment, tools
    ImportError: cannot import name 'ConanFile' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    

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.

Looks really good!

@@ -0,0 +1,214 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

would be nice to reduce it, calling one function (e.g. rcu_register_thread) is enough to test we can compile and link against the library

@conan-center-bot conan-center-bot merged commit 3ab6a63 into conan-io:master Jul 26, 2022
@szmyd szmyd deleted the userspace-rcu branch July 27, 2022 21:05
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.

None yet

6 participants