amazon-kinesis-producer icon indicating copy to clipboard operation
amazon-kinesis-producer copied to clipboard

Error: old-style function definition is not preceded by a prototype [-Werror,-Wstrict-prototypes] when compiling native code

Open vishal-kvn opened this issue 2 years ago • 0 comments

Hi I am trying to compile the native code for KPL but I get the following error.

cd ~/amazon-kinesis-producer
git clone https://github.com/awslabs/amazon-kinesis-producer.git
./bootstrap.sh

The ./boostrap.sh script fails at the build step of aws-sdk-cpp and returns the following error.

/Volumes/workplace/amazon-kinesis-producer/third_party/aws-sdk-cpp-build/.deps/build/src/AwsCCommon/source/posix/system_info.c:136:34: error: this old-style function definition is not preceded by a prototype [-Werror,-Wstrict-prototypes]
const char *s_get_executable_path() {
                 ^
1 error generated.
make[5]: *** [CMakeFiles/aws-c-common.dir/source/posix/system_info.c.o] Error 1
make[4]: *** [CMakeFiles/aws-c-common.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [build/src/AwsCCommon-stamp/AwsCCommon-build] Error 2
make[1]: *** [CMakeFiles/AwsCCommon.dir/all] Error 2
make: *** [all] Error 2
CMake Error at CMakeLists.txt:224 (message):
 Failed to build third-party libraries.

Clang versions

clang —version
Apple clang version 14.0.0 (clang-1400.0.29.102)
Target: x86_64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
clang++ —version
Apple clang version 14.0.0 (clang-1400.0.29.102)
Target: x86_64-apple-darwin21.6.0
Thread model: posix

The proposed fix is in aws-c-common library as listed here - : https://github.com/awslabs/aws-c-common/issues/729. I have tried a few different versions(1.7.365, 1.9.356, 1.9.0) of the aws-sdk-cpp package but that did not help. Any pointers for fix will be highly appreciated.

Thanks in Advance.

vishal-kvn avatar Sep 30 '22 05:09 vishal-kvn