Skip to content

[C++][CI] test-debian-12-docs fails to build AWS SDK (Unity build) #46861

Closed as duplicate of#46843
@raulcd

Description

@raulcd

Describe the bug, including details regarding any error messages, version, and platform.

The test-debian-12-docs fails to build AWS SDK with:

 In file included from /build/cpp/_deps/aws-c-common-build/CMakeFiles/aws-c-common.dir/Unity/unity_1_c.c:5:
/build/cpp/_deps/aws-c-common-src/source/codegen.c:10: warning: "AWS_STATIC_IMPL" redefined
   10 | #define AWS_STATIC_IMPL AWS_COMMON_API
      | 
In file included from /build/cpp/_deps/aws-c-common-src/include/aws/common/common.h:10,
                 from /build/cpp/_deps/aws-c-common-src/include/aws/common/array_list.h:8,
                 from /build/cpp/_deps/aws-c-common-src/include/aws/common/byte_buf.h:8,
                 from /build/cpp/_deps/aws-c-common-src/include/aws/common/cbor.h:9,
                 from /build/cpp/_deps/aws-c-common-src/source/cbor.c:2,
                 from /build/cpp/_deps/aws-c-common-build/CMakeFiles/aws-c-common.dir/Unity/unity_1_c.c:3:
/build/cpp/_deps/aws-c-common-src/include/aws/common/exports.h:37: note: this is the location of the previous definition
   37 | #    define AWS_STATIC_IMPL static inline
      | 
[84/417] Building C object _deps/aws-c-common-build/CMakeFiles/aws-c-common.dir/Unity/unity_0_c.c.o
FAILED: _deps/aws-c-common-build/CMakeFiles/aws-c-common.dir/Unity/unity_0_c.c.o 
/usr/bin/ccache /usr/lib/ccache/cc -DARROW_HAVE_RUNTIME_AVX2 -DARROW_HAVE_RUNTIME_AVX512 -DARROW_HAVE_RUNTIME_BMI2 -DARROW_HAVE_RUNTIME_SSE4_2 -DARROW_HAVE_SSE4_2 -DARROW_WITH_TIMING_TESTS -DAWS_AFFINITY_METHOD=AWS_AFFINITY_METHOD_PTHREAD_ATTR -DAWS_PTHREAD_GETNAME_TAKES_3ARGS -DAWS_PTHREAD_SETNAME_TAKES_2ARGS -DCJSON_HIDE_SYMBOLS -DDEBUG_BUILD -DHAVE_SYSCONF -DINTEL_NO_ITTNOTIFY_API -DUSE_SIMD_ENCODING -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=500 -I/build/cpp/_deps/aws-c-common-src/source/external/libcbor -I/build/cpp/_deps/aws-c-common-src/include -I/build/cpp/_deps/aws-c-common-build/generated/include -g -Werror -O0 -ggdb -g1 -Wno-error -fPIC -fvisibility=hidden -Wall -Wstrict-prototypes -fno-omit-frame-pointer -pedantic -Wno-long-long -fPIC -std=gnu99 -MD -MT _deps/aws-c-common-build/CMakeFiles/aws-c-common.dir/Unity/unity_0_c.c.o -MF _deps/aws-c-common-build/CMakeFiles/aws-c-common.dir/Unity/unity_0_c.c.o.d -o _deps/aws-c-common-build/CMakeFiles/aws-c-common.dir/Unity/unity_0_c.c.o -c /build/cpp/_deps/aws-c-common-build/CMakeFiles/aws-c-common.dir/Unity/unity_0_c.c
In file included from /build/cpp/_deps/aws-c-common-build/CMakeFiles/aws-c-common.dir/Unity/unity_0_c.c:5:
/build/cpp/_deps/aws-c-common-src/source/allocator_sba.c:128:13: error: conflicting types for 's_aligned_free'; have 'void(void *)'
  128 | static void s_aligned_free(void *addr) {
      |             ^~~~~~~~~~~~~~
In file included from /build/cpp/_deps/aws-c-common-build/CMakeFiles/aws-c-common.dir/Unity/unity_0_c.c:3:
/build/cpp/_deps/aws-c-common-src/source/allocator.c:65:13: note: previous definition of 's_aligned_free' with type 'void(struct aws_allocator *, void *)'
   65 | static void s_aligned_free(struct aws_allocator *allocator, void *ptr) {
      |             ^~~~~~~~~~~~~~

This seems to be related to unity builds.

Component(s)

C++, Continuous Integration

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions