Closed edsiper closed 4 years ago
Ah, CentOS 6 has GCC 4.4 which is super old. MPack is written in C99 and I have no plans to add support for C89 or gnu89. On older compilers that default to C89 you need to explicitly configure it for C99 (or C++), and for GCC that's -std=c99
.
For the second part of the report, it looks like #pragma GCC diagnostic push
isn't supported until GCC 4.6. I removed uses of this on older versions of GCC. This means that warnings that are incompatible with MPack will no longer be disabled automatically within the MPack headers on these old compilers.
You can use the script tools/amalgamate.sh
to generate a new amalgamation package from the latest code in the develop branch.
@ludocode thanks! I've merged latest version in our repo, it looks good now :)
mpack is a great library and we started the first integration here:
https://github.com/fluent/fluent-bit/commit/3886c226c007a8354727fdb0cc791e26c82bc456
However, we got some build problems on a certain compiler version (gcc on centos 6):
this is not a new report, indeed there are previous issues reported on mpack repo:
we can get rid of the problem defining CFLAGS with -std=c99, anyways I see other warnings remain:
what would be the suggested flags to get rid of warnings ? or can you set the variables on top of the functions ?, looks like a small change that will help to build it on old systems.