Skip to content

Conversation

uilianries
Copy link
Member

Specify library name and version: libprotobuf-mutator/1.1

Ported libprotobuf-mutator to work with Conan 2.x, including:

  • Dropped custom version support cci.xxx
  • Added support for version 1.1 (Sep 2023)
  • Added separated components for libprotobuf-mutator and libprotobuf-mutator-fuzzer
  • Added fPIC and shared options
  • Updated Protobuf to 3.21 as requirement
  • Dropped support for legacy CMake generators cmake_find_package
  • Simplified test package to not use protoc

NOTES:

  • Versions 1.2 and 1.3 (latest) requires newer Protobuf versions (PR protobuf new versions #24154) and Abseil.
  • We can add new versions in a separated PR, so this one will be simple.
  • Tested locally on Linux.

Signed-off-by: Uilian Ries <uilianries@gmail.com>
@conan-center-bot
Copy link
Contributor

Conan v1 pipeline ❌

Failure in build 1 (579813843018833374ff03f73bef143791254985):

  • libprotobuf-mutator/1.1:
    CI failed to create some packages (All logs)

    Logs for packageID 417991c9e95624063065230b8ff002ec729cdb1f:
    [settings]
    arch=armv8
    build_type=Debug
    compiler=apple-clang
    compiler.libcxx=libc++
    compiler.version=13.0
    os=Macos
    [options]
    libprotobuf-mutator:shared=True
    
    [...]
          ...
      "google::protobuf::Reflection::GetDouble(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*) const", referenced from:
          protobuf_mutator::ConstFieldInstance::Load(double*) const in mutator.cc.o
      "google::protobuf::Reflection::GetString(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*) const", referenced from:
          protobuf_mutator::ConstFieldInstance::Load(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*) const in mutator.cc.o
      "google::protobuf::Reflection::GetUInt32(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*) const", referenced from:
          protobuf_mutator::ConstFieldInstance::Load(unsigned int*) const in mutator.cc.o
      "google::protobuf::Reflection::GetUInt64(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*) const", referenced from:
          protobuf_mutator::ConstFieldInstance::Load(unsigned long long*) const in mutator.cc.o
      "google::protobuf::Reflection::SetDouble(google::protobuf::Message*, google::protobuf::FieldDescriptor const*, double) const", referenced from:
          protobuf_mutator::FieldInstance::Store(double) const in mutator.cc.o
      "google::protobuf::Reflection::SetString(google::protobuf::Message*, google::protobuf::FieldDescriptor const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>) const", referenced from:
          protobuf_mutator::FieldInstance::Store(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) const in mutator.cc.o
      "google::protobuf::Reflection::SetUInt32(google::protobuf::Message*, google::protobuf::FieldDescriptor const*, unsigned int) const", referenced from:
          protobuf_mutator::FieldInstance::Store(unsigned int) const in mutator.cc.o
      "google::protobuf::Reflection::SetUInt64(google::protobuf::Message*, google::protobuf::FieldDescriptor const*, unsigned long long) const", referenced from:
          protobuf_mutator::FieldInstance::Store(unsigned long long) const in mutator.cc.o
      "google::protobuf::MessageLite::SerializePartialToString(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*) const", referenced from:
          protobuf_mutator::SaveMessageAsBinary(google::protobuf::Message const&) in binary_format.cc.o
          protobuf_mutator::(anonymous namespace)::PostProcessing::Run(google::protobuf::Message*, int) in mutator.cc.o
      "google::protobuf::DescriptorPool::FindMessageTypeByName(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) const", referenced from:
          protobuf_mutator::(anonymous namespace)::GetAnyTypeDescriptor(google::protobuf::Any const&) in mutator.cc.o
      "google::protobuf::FieldDescriptor::message_type() const", referenced from:
          protobuf_mutator::(anonymous namespace)::DataSourceSampler::SampleImpl(google::protobuf::Message const&) in mutator.cc.o
          protobuf_mutator::ConstFieldInstance::message_type() const in mutator.cc.o
          protobuf_mutator::ConstFieldInstance::GetDefault(std::__1::unique_ptr<google::protobuf::Message, std::__1::default_delete<google::protobuf::Message>>*) const in mutator.cc.o
      "google::protobuf::FieldDescriptor::default_value_enum() const", referenced from:
          protobuf_mutator::ConstFieldInstance::GetDefault(protobuf_mutator::ConstFieldInstance::Enum*) const in mutator.cc.o
      "google::protobuf::FieldDescriptor::enum_type() const", referenced from:
          protobuf_mutator::(anonymous namespace)::DataSourceSampler::SampleImpl(google::protobuf::Message const&) in mutator.cc.o
          protobuf_mutator::ConstFieldInstance::enum_type() const in mutator.cc.o
          protobuf_mutator::FieldInstance::Store(protobuf_mutator::ConstFieldInstance::Enum const&) const in mutator.cc.o
          protobuf_mutator::FieldInstance::PushBackRepeated(protobuf_mutator::ConstFieldInstance::Enum const&) const in mutator.cc.o
      "google::protobuf::Any::GetMetadata() const", referenced from:
          google::protobuf::Any::GetDescriptor() in mutator.cc.o
          google::protobuf::Any::GetReflection() in mutator.cc.o
      "google::protobuf::Message::DebugString() const", referenced from:
          protobuf_mutator::Mutator::IsInitialized(google::protobuf::Message const&) const in mutator.cc.o
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [src/libprotobuf-mutator.0.dylib] Error 1
    make[1]: *** [src/CMakeFiles/protobuf-mutator.dir/all] Error 2
    make: *** [all] Error 2
    WARN: *** Conan 1 is legacy and on a deprecation path ***
    WARN: *** Please upgrade to Conan 2 ***
    libprotobuf-mutator/1.1: ERROR: Package '417991c9e95624063065230b8ff002ec729cdb1f' build failed
    libprotobuf-mutator/1.1: WARN: Build folder /Users/jenkins/workspace/prod-v1/bsr/51066/cebcc/.conan/data/libprotobuf-mutator/1.1/_/_/build/417991c9e95624063065230b8ff002ec729cdb1f/build/Debug
    ERROR: libprotobuf-mutator/1.1: Error in build() method, line 83
    	cmake.build()
    	ConanException: Error 2 while executing cmake --build "/Users/jenkins/workspace/prod-v1/bsr/51066/cebcc/.conan/data/libprotobuf-mutator/1.1/_/_/build/417991c9e95624063065230b8ff002ec729cdb1f/build/Debug" '--' '-j8'
    

Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.


Conan v2 pipeline ❌

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping @conan-io/barbarians on the PR and we will help you.

See details:

Failure in build 1 (579813843018833374ff03f73bef143791254985):

  • libprotobuf-mutator/1.1:
    CI failed to create some packages (All logs)

    Logs for packageID eadb0dd065021a7715fd2c9f5b7140de50a70d14:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=apple-clang
    compiler.cppstd=17
    compiler.libcxx=libc++
    compiler.version=13
    os=Macos
    [options]
    */*:shared=True
    
    [...]
          protobuf_mutator::Mutator::MutateImpl(std::__1::vector<google::protobuf::Message const*, std::__1::allocator<google::protobuf::Message const*>> const&, std::__1::vector<google::protobuf::Message*, std::__1::allocator<google::protobuf::Message*>> const&, bool, int) in mutator.cc.o
          void protobuf_mutator::FieldFunction<protobuf_mutator::(anonymous namespace)::CreateDefaultField, void>::operator()<protobuf_mutator::FieldInstance>(protobuf_mutator::FieldInstance const&) const in mutator.cc.o
          void protobuf_mutator::FieldFunction<protobuf_mutator::(anonymous namespace)::CopyField, void>::operator()<protobuf_mutator::ConstFieldInstance, protobuf_mutator::FieldInstance>(protobuf_mutator::ConstFieldInstance const&, protobuf_mutator::FieldInstance const&) const in mutator.cc.o
      "google::protobuf::Reflection::SetString(google::protobuf::Message*, google::protobuf::FieldDescriptor const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>) const", referenced from:
          protobuf_mutator::FieldInstance::Store(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) const in mutator.cc.o
      "google::protobuf::Reflection::SetUInt32(google::protobuf::Message*, google::protobuf::FieldDescriptor const*, unsigned int) const", referenced from:
          protobuf_mutator::Mutator::MutateImpl(std::__1::vector<google::protobuf::Message const*, std::__1::allocator<google::protobuf::Message const*>> const&, std::__1::vector<google::protobuf::Message*, std::__1::allocator<google::protobuf::Message*>> const&, bool, int) in mutator.cc.o
          void protobuf_mutator::FieldFunction<protobuf_mutator::(anonymous namespace)::CreateDefaultField, void>::operator()<protobuf_mutator::FieldInstance>(protobuf_mutator::FieldInstance const&) const in mutator.cc.o
          void protobuf_mutator::FieldFunction<protobuf_mutator::(anonymous namespace)::CopyField, void>::operator()<protobuf_mutator::ConstFieldInstance, protobuf_mutator::FieldInstance>(protobuf_mutator::ConstFieldInstance const&, protobuf_mutator::FieldInstance const&) const in mutator.cc.o
      "google::protobuf::Reflection::SetUInt64(google::protobuf::Message*, google::protobuf::FieldDescriptor const*, unsigned long long) const", referenced from:
          protobuf_mutator::Mutator::MutateImpl(std::__1::vector<google::protobuf::Message const*, std::__1::allocator<google::protobuf::Message const*>> const&, std::__1::vector<google::protobuf::Message*, std::__1::allocator<google::protobuf::Message*>> const&, bool, int) in mutator.cc.o
          void protobuf_mutator::FieldFunction<protobuf_mutator::(anonymous namespace)::CreateDefaultField, void>::operator()<protobuf_mutator::FieldInstance>(protobuf_mutator::FieldInstance const&) const in mutator.cc.o
          void protobuf_mutator::FieldFunction<protobuf_mutator::(anonymous namespace)::CopyField, void>::operator()<protobuf_mutator::ConstFieldInstance, protobuf_mutator::FieldInstance>(protobuf_mutator::ConstFieldInstance const&, protobuf_mutator::FieldInstance const&) const in mutator.cc.o
      "google::protobuf::MessageLite::SerializePartialToString(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*) const", referenced from:
          protobuf_mutator::SaveMessageAsBinary(google::protobuf::Message const&, unsigned char*, unsigned long) in binary_format.cc.o
          protobuf_mutator::SaveMessageAsBinary(google::protobuf::Message const&) in binary_format.cc.o
          protobuf_mutator::(anonymous namespace)::PostProcessing::Run(google::protobuf::Message*, int) in mutator.cc.o
      "google::protobuf::DescriptorPool::FindMessageTypeByName(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) const", referenced from:
          protobuf_mutator::(anonymous namespace)::UnpackAny(google::protobuf::Message const&, std::__1::unordered_map<google::protobuf::Message const*, std::__1::unique_ptr<google::protobuf::Message, std::__1::default_delete<google::protobuf::Message>>, std::__1::hash<google::protobuf::Message const*>, std::__1::equal_to<google::protobuf::Message const*>, std::__1::allocator<std::__1::pair<google::protobuf::Message const* const, std::__1::unique_ptr<google::protobuf::Message, std::__1::default_delete<google::protobuf::Message>>>>>*) in mutator.cc.o
      "google::protobuf::FieldDescriptor::message_type() const", referenced from:
          void protobuf_mutator::FieldFunction<protobuf_mutator::(anonymous namespace)::CreateDefaultField, void>::operator()<protobuf_mutator::FieldInstance>(protobuf_mutator::FieldInstance const&) const in mutator.cc.o
          protobuf_mutator::(anonymous namespace)::DataSourceSampler::SampleImpl(google::protobuf::Message const&) in mutator.cc.o
          void protobuf_mutator::(anonymous namespace)::CreateField::ForType<std::__1::unique_ptr<google::protobuf::Message, std::__1::default_delete<google::protobuf::Message>>>(protobuf_mutator::FieldInstance const&, int, std::__1::vector<google::protobuf::Message const*, std::__1::allocator<google::protobuf::Message const*>> const&, protobuf_mutator::Mutator*) const in mutator.cc.o
      "google::protobuf::FieldDescriptor::default_value_enum() const", referenced from:
          protobuf_mutator::Mutator::MutateImpl(std::__1::vector<google::protobuf::Message const*, std::__1::allocator<google::protobuf::Message const*>> const&, std::__1::vector<google::protobuf::Message*, std::__1::allocator<google::protobuf::Message*>> const&, bool, int) in mutator.cc.o
          void protobuf_mutator::FieldFunction<protobuf_mutator::(anonymous namespace)::CreateDefaultField, void>::operator()<protobuf_mutator::FieldInstance>(protobuf_mutator::FieldInstance const&) const in mutator.cc.o
          protobuf_mutator::ConstFieldInstance::Load(protobuf_mutator::ConstFieldInstance::Enum*) const in mutator.cc.o
      "google::protobuf::FieldDescriptor::enum_type() const", referenced from:
          protobuf_mutator::Mutator::MutateImpl(std::__1::vector<google::protobuf::Message const*, std::__1::allocator<google::protobuf::Message const*>> const&, std::__1::vector<google::protobuf::Message*, std::__1::allocator<google::protobuf::Message*>> const&, bool, int) in mutator.cc.o
          void protobuf_mutator::FieldFunction<protobuf_mutator::(anonymous namespace)::CopyField, void>::operator()<protobuf_mutator::ConstFieldInstance, protobuf_mutator::FieldInstance>(protobuf_mutator::ConstFieldInstance const&, protobuf_mutator::FieldInstance const&) const in mutator.cc.o
          protobuf_mutator::(anonymous namespace)::DataSourceSampler::SampleImpl(google::protobuf::Message const&) in mutator.cc.o
          void protobuf_mutator::FieldInstance::Create<protobuf_mutator::ConstFieldInstance::Enum>(protobuf_mutator::ConstFieldInstance::Enum const&) const in mutator.cc.o
          void protobuf_mutator::FieldInstance::InsertRepeated<protobuf_mutator::ConstFieldInstance::Enum>(protobuf_mutator::ConstFieldInstance::Enum const&) const in mutator.cc.o
      "google::protobuf::Any::GetMetadata() const", referenced from:
          protobuf_mutator::(anonymous namespace)::UnpackAny(google::protobuf::Message const&, std::__1::unordered_map<google::protobuf::Message const*, std::__1::unique_ptr<google::protobuf::Message, std::__1::default_delete<google::protobuf::Message>>, std::__1::hash<google::protobuf::Message const*>, std::__1::equal_to<google::protobuf::Message const*>, std::__1::allocator<std::__1::pair<google::protobuf::Message const* const, std::__1::unique_ptr<google::protobuf::Message, std::__1::default_delete<google::protobuf::Message>>>>>*) in mutator.cc.o
          protobuf_mutator::(anonymous namespace)::PostProcessing::Run(google::protobuf::Message*, int) in mutator.cc.o
      "google::protobuf::Message::DebugString() const", referenced from:
          protobuf_mutator::Mutator::IsInitialized(google::protobuf::Message const&) const in mutator.cc.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [src/libprotobuf-mutator.0.dylib] Error 1
    make[1]: *** [src/CMakeFiles/protobuf-mutator.dir/all] Error 2
    make: *** [all] Error 2
    
    libprotobuf-mutator/1.1: ERROR: 
    Package 'eadb0dd065021a7715fd2c9f5b7140de50a70d14' build failed
    libprotobuf-mutator/1.1: WARN: Build folder /Users/jenkins/workspace/prod-v2/bsr/45282/efabc/p/b/libpr5b0a1c61de6cb/b/build/Release
    ERROR: libprotobuf-mutator/1.1: Error in build() method, line 83
    	cmake.build()
    	ConanException: Error 2 while executing
    

Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

@uilianries uilianries removed request for jcar87 and AbrilRBS May 29, 2024 17:24
@uilianries uilianries marked this pull request as draft May 29, 2024 17:24
@uilianries
Copy link
Member Author

I'm going to update to the latest version instead in a new PR. The PR #24154 has been merged, which opens a window to update this recipe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants