Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vishal-kvn opened this issue Sep 30, 2022 · 0 comments

Comments

@vishal-kvn
Copy link

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 - : awslabs/aws-c-common#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 vishal-kvn changed the title Running ./bootstrap.sh for compiling native code Error: old-style function definition is not preceded by a prototype [-Werror,-Wstrict-prototypes] when compiling native code Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant