-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fails to build on SL6.9 because of old unity version C99 incompatibility #3603
Comments
This works fine in our CI (afaik CentOS 6 has the same base as SL6, same GCC version): https://build.opensuse.org/build/network:messaging:zeromq:git-stable/CentOS_6/x86_64/libzmq/_log Looks like a problem in your build environment or in CMake, can you use autotools instead? |
ah I see the problem - in autoconf we set std=c99, but in cmake we don't. If you want to use cmake, can you send a PR to fix that? |
basically this IF needs an ELSE that sets -std=gnu99: https://github.com/zeromq/libzmq/blob/master/CMakeLists.txt#L68 |
Opened PR #3605 to fix this issue. |
I've tried using autotools, but the version of autoconf is too old. 2.63 instead of required 2.64. When using autoconf from another machine to produce the configure.sh script, autotools build succeeds on SL6.9 without any change required. |
@bl0x thanks for the PR, 2 suggestions:
|
Thank you for these suggestions. |
Please use this template for reporting suspected bugs or requests for help.
Issue description
Build fails with error message because of C99 style variable initialisation in bundled unity framework.
Environment
commit a8d1905
Scientific Linux 6.9
gcc 4.4.7
Minimal test code / Steps to reproduce the issue
What's the actual result? (include assertion message & call stack if applicable)
[ 49%] Building C object tests/CMakeFiles/unity.dir/__/external/unity/unity.c.o
/home/AMS/drasiams/libzmq/external/unity/unity.c: In function ‘UnityParseOptions’:
/home/AMS/drasiams/libzmq/external/unity/unity.c:1408: error: ‘for’ loop initial declarations are only allowed in C99 mode
/home/AMS/drasiams/libzmq/external/unity/unity.c:1408: note: use option -std=c99 or -std=gnu99 to compile your code
What's the expected result?
Compilation should succeed.
The text was updated successfully, but these errors were encountered: