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

not compatible with latest avro library #18

Open
mm3l opened this issue May 21, 2019 · 6 comments
Open

not compatible with latest avro library #18

mm3l opened this issue May 21, 2019 · 6 comments

Comments

@mm3l
Copy link

mm3l commented May 21, 2019

liserdes cannot be compiled because of the following error:

Serdes.cpp:224:71: error: conversion from 'avro::OutputStreamPtr {aka std::unique_ptravro::OutputStream}' to non-scalar type 'std::auto_ptravro::OutputStream' requested
std::auto_ptravro::OutputStream bin_os = avro::memoryOutputStream();

Serdes.cpp:242:5: error: no match for 'operator=' (operand types are 'boost::shared_ptr<std::vector >' and 'std::shared_ptr<std::vector >')
v = avro::snapshot(*bin_os.get());
^
....

It seems in the latest stable avro library (v1.9.0) auto_ptr have been replaced with unique_ptr & std::move.

Commits on Dec 4, 2018
AVRO-1542 replacing auto_ptr by unique_ptr & std::move

apache/avro@0e6df48#diff-7c029b447b91573980d87596d48331be

@edenhill
Copy link
Contributor

That's breaking the semver rules, minor version bumps must be backwards compatible. :(

@mm3l
Copy link
Author

mm3l commented May 21, 2019

how can I get the avro version that works with current libserdes? It would be wise if your readme file has links to the latest compatible avro version and not the latest stable.

@edenhill
Copy link
Contributor

avro-cpp v1.8.0

@mparry
Copy link
Contributor

mparry commented May 29, 2019

I opened #17 a while ago in an attempt to address this. (Of course, you could then argue that requiring C++11 in libserdes also warrants a major version bump...)

@anwesha25
Copy link

will this fix be available any time soon? I am also facing the same issue.

Serdes.cpp:285:30: error: conversion from ‘avro::InputStreamPtr {aka std::unique_ptravro::InputStream}’ to non-scalar type ‘std::auto_ptravro::InputStream’ requested
avro::memoryInputStream((const uint8_t *)payload, size);
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@kumar1ak
Copy link

Solution to Anwesha25 : To resolve above error in Serdes.cpp:285:30, update below :
std::auto_ptravro::InputStream json_is = avro::istreamInputStream(iss);
To
std::unique_ptravro::InputStream json_is = avro::istreamInputStream(iss);

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

No branches or pull requests

5 participants