Azure / azure-uamqp-python

AMQP 1.0 client library for Python
MIT License
56 stars 48 forks source link

Build fails with GCC 11 #265

Closed bluca closed 2 years ago

bluca commented 3 years ago
# gcc --version
gcc (Debian 11.2.0-2) 11.2.1 20210815
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[ 16%] Building C object deps/azure-c-shared-utility/CMakeFiles/aziotsharedutil.dir/src/hmac.c.o
cd /tmp/azure-uamqp-python-1.4.0/build/temp.linux-x86_64-3.9/cmake/deps/azure-c-shared-utility && /usr/bin/cc -DARCHITECTURE_x86_64=1 -I/tmp/azure-uamqp-python-1.4.0/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc -I/tmp/azure-uamqp-python-1.4.0/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/linux -I/tmp/azure-uamqp-python-1.4.0/src/vendor/azure-uamqp-c/deps/umock-c/inc -I/tmp/azure-uamqp-python-1.4.0/src/vendor/azure-uamqp-c/deps/azure-macro-utils-c/inc -D_POSIX_C_SOURCE=200112L -g -O2 -ffile-prefix-map=/tmp/azure-uamqp-python-1.4.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Werror -Werror -Wall -Wextra -Wformat=2 -Wformat-security -DUSE_OPENSSL -Wno-unused-variable -Wno-missing-braces -Wno-missing-field-initializers -Wno-format-nonliteral -O3 -DNDEBUG -fPIC -std=gnu99 -o CMakeFiles/aziotsharedutil.dir/src/hmac.c.o -c /tmp/azure-uamqp-python-1.4.0/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/hmac.c
/tmp/azure-uamqp-python-1.4.0/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/hmac.c:211:43: error: argument 2 of type 'uint8_t *' {aka 'unsigned char *'} declared as a pointer [-Werror=array-parameter=]
  211 | int hmacResult(HMACContext *ctx, uint8_t *digest)
      |                                  ~~~~~~~~~^~~~~~
In file included from /tmp/azure-uamqp-python-1.4.0/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/hmac.c:13:
/tmp/azure-uamqp-python-1.4.0/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility/sha.h:252:42: note: previously declared as an array 'uint8_t[64]' {aka 'unsigned char[64]'}
  252 | int hmacResult(HMACContext *ctx, uint8_t digest[USHAMaxHashSize]);

This is https://github.com/Azure/azure-c-shared-utility/issues/535 which was fixed in the vendored dependency by https://github.com/Azure/azure-c-shared-utility/pull/537

yunhaoling commented 2 years ago

thanks @bluca for the reference! we will catch up with the underlying c lib when we have cycles.

(we are aware that we're behind the c lib, already having an tracking issue: https://github.com/Azure/azure-sdk-for-python/issues/19576)

bluca commented 2 years ago

@yunhaoling thanks. Please note that GCC 11 was released months ago and it's starting to become the default compiler in many distributions, like Ubuntu 21.10, so it would be good if a fix could be expedited. Perhaps it would be a good idea to stop bundling that library, so that it can be updated independently.

yunhaoling commented 2 years ago

hey @bluca , we have updated the c lib dependency in Jan, please test out the latest code. thanks for your patience!

I'm closing the issue now, but feel free to reopen if the issue persists.