Skip to content

Build error where memcpy is not declared in scope #985

@idarb-oss

Description

@idarb-oss

Describe your environment
Devcontainer with ubuntu 21.04, cmake 3.21.2 , GCC 9.3.0 and with CPM as dependency manager.

Steps to reproduce
Building application with BaggagePropagator cause opentelemetry build error where memcpy is not declared in scope.

In file included from /workspaces/<project_name>/build/_deps/opentelemetry-cpp-src/api/include/opentelemetry/baggage/baggage.h:8,

from /workspaces/<project_name>/build/_deps/opentelemetry-cpp-src/api/include/opentelemetry/baggage/propagation/baggage_propagator.h:6,

from /workspaces/<project_name>/standalone/source/main.cpp:3:
/workspaces/<project_name>/build/_deps/opentelemetry-cpp-src/api/include/opentelemetry/common/kv_properties.h: In member function 'opentelemetry::v1::nostd::unique_ptr<const char []> opentelemetry::v1::common::KeyValueProperties::Entry::CopyStringToPointer(opentelemetry::v1::nostd::string_view)':
/workspaces/<project_name>/build/_deps/opentelemetry-cpp-src/api/include/opentelemetry/common/kv_properties.h:191:7: error: 'memcpy' was not declared in this scope

What is the expected behavior?
Able to build the project :)

What is the actual behavior?
Error

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions