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 libavrocpp/1.10.1 #4393

Merged
merged 15 commits into from
Feb 9, 2021
Merged

Add libavrocpp/1.10.1 #4393

merged 15 commits into from
Feb 9, 2021

Conversation

plopp
Copy link
Contributor

@plopp plopp commented Jan 27, 2021

Specify library name and version: libavrocpp/1.10.1

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

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

Thank you for this contribution

One think which would be appreciated would be to follow this order
https://github.com/conan-io/conan-center-index/blob/master/docs/reviewing.md#order-of-methods-and-attributes

There's quite a few changes required so hopefully its reasonable request

If you need any help feel free to ask!

I

recipes/libavrocpp/1.10.1/conanfile.py Outdated Show resolved Hide resolved
recipes/libavrocpp/1.10.1/conanfile.py Outdated Show resolved Hide resolved
recipes/libavrocpp/1.10.1/conanfile.py Outdated Show resolved Hide resolved
recipes/libavrocpp/1.10.1/conanfile.py Outdated Show resolved Hide resolved
recipes/libavrocpp/config.yml Outdated Show resolved Hide resolved
recipes/libavrocpp/1.10.1/conanfile.py Outdated Show resolved Hide resolved
recipes/libavrocpp/1.10.1/conanfile.py Outdated Show resolved Hide resolved
recipes/libavrocpp/1.10.1/conanfile.py Outdated Show resolved Hide resolved
@plopp
Copy link
Contributor Author

plopp commented Jan 28, 2021

Thanks @prince-chrismc! There are two PR:s up, one for 1.10.1 and one for 1.8.2. Both of them were in one PR from the beginning. I split them up and reworked the 1.8.2 first, to deal with this one later. I will apply your comments to the other one as well: #4391

@prince-chrismc
Copy link
Contributor

Why are you adding two versions? unless there's a specific need for the older I'd strongly suggest you only keep this one

@prince-chrismc
Copy link
Contributor

You are probable not correct;y following the CMake exported definitions, https://github.com/apache/avro/blob/7d1e63b219e6d0778bc57195152477adee97fcab/lang/c%2B%2B/api/Config.hh#L31
Seems like it think it's supposed to be shared

make sure AVRO_DYN_LINK is not defined

@plopp
Copy link
Contributor Author

plopp commented Jan 29, 2021

Thanks! There was a specific need for the old one because of another dependency. I will revisit that. The 1.8.2 is old enough to warrant an upgrade across the board on my end. Thank you for the review so far!

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

recipes/libavrocpp/all/conanfile.py Outdated Show resolved Hide resolved
recipes/libavrocpp/all/conanfile.py Outdated Show resolved Hide resolved
@plopp
Copy link
Contributor Author

plopp commented Jan 31, 2021

Thanks for the frequent reviews @prince-chrismc!

@conan-center-bot

This comment has been minimized.

Comment on lines 49 to 54
if self.options.with_snappy:
tools.replace_in_file(
os.path.join(self._source_subfolder, "CMakeLists.txt"),
"find_package(Snappy)",
"",
)
Copy link
Contributor

Choose a reason for hiding this comment

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

So I looked into.. and yes it's an option

To compile requires boost headers, and the boost regex library. Optionally, it requires Snappy compression library. If Snappy is available, it builds support for Snappy compression and skips it otherwise.

https://github.com/apache/avro/blob/351f589913b9691322966fb77fe72269a0a2ec82/lang/c%2B%2B/CMakeLists.txt#L75-L79


My suggestion is to conditionally define the variable

https://github.com/apache/avro/blob/351f589913b9691322966fb77fe72269a0a2ec82/lang/c%2B%2B/FindSnappy.cmake#L28

If it's not required and found... well 🤯

This patch should not be required 🤞

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 tried setting the variable to an empty string in _configure_cmake() when not using snappy:

if not self.options.with_snappy:
    self._cmake.definitions["SNAPPY_ROOT_DIR"] = ""

But that failed:

-- Could NOT find Snappy (missing: SNAPPY_LIBRARIES SNAPPY_INCLUDE_DIR)
Disabled snappy codec. libsnappy not found.
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/home/user/.conan/data/libavrocpp/1.10.1/_/_/build/a285fc00ea829acfc7280102b9b32a8043fbd51c/source_subfolder/lang/c++/SNAPPY_INCLUDE_DIR
   used as include directory in directory /home/user/.conan/data/libavrocpp/1.10.1/_/_/build/a285fc00ea829acfc7280102b9b32a8043fbd51c/source_subfolder/lang/c++
   used as include directory in directory /home/user/.conan/data/libavrocpp/1.10.1/_/_/build/a285fc00ea829acfc7280102b9b32a8043fbd51c/source_subfolder/lang/c++

I will leave the removal of the builtin call to find_package(snappy) in there meanwhile, and see if I can find a better way later.

recipes/libavrocpp/all/conanfile.py Outdated Show resolved Hide resolved
recipes/libavrocpp/all/conanfile.py Show resolved Hide resolved
recipes/libavrocpp/all/conanfile.py Show resolved Hide resolved
recipes/libavrocpp/all/CMakeLists.txt Outdated Show resolved Hide resolved
@plopp
Copy link
Contributor Author

plopp commented Jan 31, 2021

So the VS builds are a real headache. Summary of errors for each CCI-config:

  • VS16 Debug Static MTd:
error LNK2019: unresolved external symbol "__declspec(dllimport) public: class boost::program_options::options_description_easy_init & __cdecl boost::program_options::options_description_easy_init::operator()(char const *,char const *)"
  • VS14 Debug Static MDd: error C3861: 'back_inserter': identifier not found
  • VS14 Debug Static MTd: error C3861: 'back_inserter': identifier not found
  • VS14 Release Static MT: error C3861: 'back_inserter': identifier not found
  • VS14 Release Static MD: error C3861: 'back_inserter': identifier not found
  • VS15 Release Static MT, VS15 Release Static MTd, VS15 Release Static MD:
avrogencpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl boost::program_options::value_semantic_codecvt_helper<char>::~value_semantic_codecvt_helper<char>(void)" (__imp_??1?$value_semantic_codecvt_helper@D@program_options@boost@@UEAA@XZ)

I still have a TODO to verify that AVRO_DYN_LINK is properly set for shared but remains unset for static builds. Apart from that I'm not sure how to proceed. I will have to do a deeper investigation. @prince-chrismc

@plopp
Copy link
Contributor Author

plopp commented Jan 31, 2021

I just noticed your new comments just after hitting send on my last message there. Will have a look at those as well.

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

Thanks for the frequent reviews @prince-chrismc!

❤️ Thank you for the contribution 🏆

I just noticed your new comments just after hitting send on my last message there. Will have a look at those as well.

I think we have the same routine 🤣

@prince-chrismc
Copy link
Contributor

The missing symbols are all for the static runtimes (which are probably not support) the missing names might be this erengy/anitomy#2 (comment)

@conan-center-bot

This comment has been minimized.

@prince-chrismc
Copy link
Contributor

😡 https://c3i.jfrog.io/c3i/misc/logs/pr/4393/13/libavrocpp/1.10.1/b58a5b725d6f9d8c0c16afcad85e4b077fef00e1/create_stderr.txt

It's listed online https://conan.io/center/zlib?os=Windows&tab=configuration

ERROR: Missing binary: zlib/1.2.11:b2b69efcc79a149e0bc765fb12ba0278d52fc260
zlib/1.2.11: WARN: Can't find a 'zlib/1.2.11' package for the specified settings, options and dependencies:
- Settings: arch=x86_64, build_type=Debug, compiler=Visual Studio, compiler.runtime=MTd, compiler.version=16, os=Windows
- Options: minizip=False, shared=False
- Dependencies: 
- Requirements: 
- Package ID: b2b69efcc79a149e0bc765fb12ba0278d52fc260

ERROR: Missing prebuilt package for 'zlib/1.2.11'
Try to build from sources with '--build=zlib'
Use 'conan search <reference> --table table.html'
Or read 'http://docs.conan.io/en/latest/faq/troubleshooting.html#error-missing-prebuilt-package'

@prince-chrismc
Copy link
Contributor

@ericLemanissier can you please add this too #4221?

@plopp
Copy link
Contributor Author

plopp commented Feb 3, 2021

Nevermind the comment I deleted, I overlooked something.

@plopp plopp closed this Feb 3, 2021
@plopp plopp reopened this Feb 3, 2021
@plopp
Copy link
Contributor Author

plopp commented Feb 3, 2021

I restarted CCI based on this comment from #4221:

EDIT: removing this one, because the binaries were probably being regerated for a408727 at this moment: #4393 (comment): missing zlib binary (also on #4412 (comment) and #4472 (comment))

@conan-center-bot

This comment has been minimized.

prince-chrismc
prince-chrismc previously approved these changes Feb 4, 2021
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.

LGTM 🚀

@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

All green in build 16 (c8889b7a6206ff9e54565b87733db39e0d3a0294):

  • libavrocpp/1.10.1@:
    All packages built successfully! (All logs)

@plopp plopp requested a review from uilianries February 6, 2021 12:59
@prince-chrismc
Copy link
Contributor

@plopp please close the other PR #4391 🙏 if you really need that version you can add it to this recipe 👍 after it's merged

Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

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

LGTM

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.

5 participants