awslabs / amazon-kinesis-video-streams-producer-sdk-cpp

Amazon Kinesis Video Streams Producer SDK for C++ is for developers to install and customize for their connected camera and other devices to securely stream video, audio, and time-encoded data to Kinesis Video Streams.
Apache License 2.0
379 stars 334 forks source link

[BUG] KVS Fails to build due to Threadpool.c.o issue #1191

Open antmakedev opened 5 months ago

antmakedev commented 5 months ago

Describe the bug When trying to build I keep hitting the same issue outlined below

To Reproduce Steps to reproduce the behavior: Download amazon-kinesis-video-streams-producer-sdk-cpp-3.4.1 Make build directory Execute cmake -DBUILD_GSTREAMER_PLUGIN=TRUE .. Execute make Get error

Expected behavior Expect library to build

[ 17%] Building C object dependency/libkvscproducer/kvscproducer-src/dependency/libkvspic/kvspic-src/CMakeFiles/kvspicUtils.dir/src/utils/src/Threadpool.c.o
/scratch/amazon-kinesis-video-streams-producer-sdk-cpp-3.4.1/dependency/libkvscproducer/kvscproducer-src/dependency/libkvspic/kvspic-src/src/utils/src/Threadpool.c:81:79: error: incompatible pointer to integer conversion passing 'PThreadData' (aka 'struct __ThreadData *') to parameter of type 'UINT64' (aka 'unsigned long long') [-Wint-conversion]
                            if (stackQueueRemoveItem(pThreadpool->threadList, pThreadData) != STATUS_SUCCESS) {
                                                                              ^~~~~~~~~~~
/scratch/amazon-kinesis-video-streams-producer-sdk-cpp-3.4.1/dependency/libkvscproducer/kvscproducer-src/dependency/libkvspic/kvspic-src/src/utils/include/com/amazonaws/kinesis/video/utils/Include.h:591:59: note: passing argument to parameter here
PUBLIC_API STATUS stackQueueRemoveItem(PStackQueue, UINT64);
                                                          ^
/scratch/amazon-kinesis-video-streams-producer-sdk-cpp-3.4.1/dependency/libkvscproducer/kvscproducer-src/dependency/libkvspic/kvspic-src/src/utils/src/Threadpool.c:95:67: error: incompatible pointer to integer conversion passing 'PThreadData' (aka 'struct __ThreadData *') to parameter of type 'UINT64' (aka 'unsigned long long') [-Wint-conversion]
                if (stackQueueRemoveItem(pThreadpool->threadList, pThreadData) != STATUS_SUCCESS) {
                                                                  ^~~~~~~~~~~
/scratch/amazon-kinesis-video-streams-producer-sdk-cpp-3.4.1/dependency/libkvscproducer/kvscproducer-src/dependency/libkvspic/kvspic-src/src/utils/include/com/amazonaws/kinesis/video/utils/Include.h:591:59: note: passing argument to parameter here
PUBLIC_API STATUS stackQueueRemoveItem(PStackQueue, UINT64);
                                                          ^
/scratch/amazon-kinesis-video-streams-producer-sdk-cpp-3.4.1/dependency/libkvscproducer/kvscproducer-src/dependency/libkvspic/kvspic-src/src/utils/src/Threadpool.c:301:61: warning: incompatible pointer types passing 'PThreadData *' (aka 'struct __ThreadData **') to parameter of type 'PUINT64' (aka 'unsigned long long *') [-Wincompatible-pointer-types]
            retStatus = stackQueueIteratorGetItem(iterator, &item);
                                                            ^~~~~
/scratch/amazon-kinesis-video-streams-producer-sdk-cpp-3.4.1/dependency/libkvscproducer/kvscproducer-src/dependency/libkvspic/kvspic-src/src/utils/include/com/amazonaws/kinesis/video/utils/Include.h:636:72: note: passing argument to parameter here
PUBLIC_API STATUS stackQueueIteratorGetItem(StackQueueIterator, PUINT64);
                                                                       ^
/scratch/amazon-kinesis-video-streams-producer-sdk-cpp-3.4.1/dependency/libkvscproducer/kvscproducer-src/dependency/libkvspic/kvspic-src/src/utils/src/Threadpool.c:309:67: error: incompatible pointer to integer conversion passing 'PThreadData' (aka 'struct __ThreadData *') to parameter of type 'UINT64' (aka 'unsigned long long') [-Wint-conversion]
                if (stackQueueRemoveItem(pThreadpool->threadList, item) != STATUS_SUCCESS) {
                                                                  ^~~~
/scratch/amazon-kinesis-video-streams-producer-sdk-cpp-3.4.1/dependency/libkvscproducer/kvscproducer-src/dependency/libkvspic/kvspic-src/src/utils/include/com/amazonaws/kinesis/video/utils/Include.h:591:59: note: passing argument to parameter here
PUBLIC_API STATUS stackQueueRemoveItem(PStackQueue, UINT64);
                                                          ^
1 warning and 3 errors generated.
make[2]: *** [dependency/libkvscproducer/kvscproducer-src/dependency/libkvspic/kvspic-src/CMakeFiles/kvspicUtils.dir/src/utils/src/Threadpool.c.o] Error 1
make[1]: *** [dependency/libkvscproducer/kvscproducer-src/dependency/libkvspic/kvspic-src/CMakeFiles/kvspicUtils.dir/all] Error 2
make: *** [all] Error 2

Platform (please complete the following information):

I get the same issue if I pull master (49fa6cbb905958726fe54d98b837c3edf895025d) as well.

disa6302 commented 5 months ago

@antmakedev ,

Thanks for the report. The issue is fixed but not yet released. As a workaround, could you try passing in -DCMAKE_C_FLAGS="-Wno-int-conversion -Wno-incompatible-pointer-types" with your cmake command?

antmakedev commented 5 months ago

Thanks @disa6302 that worked :D

nbaillie commented 5 months ago

thanks for posting this worked for me also

sirknightj commented 5 months ago

Will keep this open until next release for ease of locating resolution & avoiding duplicates.