GithubHelp home page GithubHelp logo

Comments (4)

fnoriegaz avatar fnoriegaz commented on September 15, 2024 1

Maybe the issue was already solved since it was reported one year ago.
I was also getting the same problem recently and instead of installing the dependency like apt-get install libcereal-dev I came out that it works better by fetching the latest version, source code, of cereal within my dockerfile like:

RUN wget --no-check-certificate https://github.com/USCiLab/cereal/archive/refs/heads/master.zip \
    && unzip master.zip \
    && cd cereal-master \
    && mkdir build \
    && cd build \
    && cmake -Wno-dev .. \
    && make -j12\
    && make install \
    && cd ../../ \
    && rm -rf master.zip

And then of course cloning or running wget to install vrs itself.

from vrs.

georges-berenger avatar georges-berenger commented on September 15, 2024

Thanks for the report.
:( We don't have a 22.04 setup ready to play with, so we need to find time to understand why 22.04 doesn't behave like the same as 20.04 that we're currently using for CI. Since 22.04 is an LTS release, we need to support it.

from vrs.

mborows2 avatar mborows2 commented on September 15, 2024

There are 3 problems needed to fixed:
1.
Ubuntu 22.04 libcereal-dev package include cmake files, 20.04 package version does not. VRS tries to use find_package(cereal QUIET CONFIG) first and in case of 22.04 (it use /usr/share/cmake/cereal/cerealTargets.cmake) set include path incorrectly. You can simply comment out line15 in vrs/cmake/FindCereal.cmake and have similar behavior like in 20.04. This solve that problem, but you will probably have another one related to fb_rapidjson namespace.

To fix it add RAPIDJSON_NAMESPACE=fb_rapidjson line in cereal::cereal interface definition.

The last problem is compile error in template instantiation in jDocumentToJsonStringPretty function, I fixed it by adding missing parameter to type aliasing in /usr/include/rapidjson/prettywriter.h

Rapid json authors define it as typedef Writer<OutputStream, SourceEncoding, TargetEncoding, StackAllocator> Base; but inherit from public Writer<OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags> as template parameter is part of instantiated class defintion complier complains that
"error: type ‘fb_rapidjson::Writer<fb_rapidjson::GenericStringBuffer<fb_rapidjson::UTF8<> > >’ is not a direct base of ‘fb_rapidjson::PrettyWriter<fb_rapidjson::GenericStringBuffer<fb_rapidjson::UTF8<> >, fb_rapidjson::UTF8<>, fb_rapidjson::UTF8<>, fb_rapidjson::CrtAllocator, 2>".

Changing it to typedef Writer<OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags> Base; fix it.

I was able to successfully compile that projects on PopOS 22.04 which is direct Ubuntu derivative, so should work as well.

My proposal for fist 2 726dff3
3rd one was fixed 5y ago mborows2/rapidjson@d88be8e
Well, I am not sure why 22.04 don't have it.

from vrs.

georges-berenger avatar georges-berenger commented on September 15, 2024

We have now removed the dependency on cereal, which was causing this issue.

from vrs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.