Fix the build when using gcc v10 or later#58
Closed
natoscott wants to merge 4 commits intoRedisLabs:masterfrom
Closed
Fix the build when using gcc v10 or later#58natoscott wants to merge 4 commits intoRedisLabs:masterfrom
natoscott wants to merge 4 commits intoRedisLabs:masterfrom
Conversation
Annotate module API functions in redismodule.h for use with -fno-common. Relates to redis/redis#6900
Turn the existing __attribute__((unused)) and __attribute((__common__)) annotations into conditional macros for any compilers not accepting this syntax. These macros only expand to API annotations under gcc now. Add use of __attribute__(format) to the RedisModule_CreateStringPrintf API to provide type checking under gcc for modules using this interface.
config.c: In function ‘ConfigParseArgs’:
config.c:501:49: warning: format not a string literal and no format arguments [-Wformat-security]
RedisModule_Log(ctx, REDIS_WARNING, errbuf);
Collaborator
|
Pulled latest |
sjpotter
pushed a commit
to sjpotter/redisraft
that referenced
this pull request
Oct 7, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Annotate module API functions in redismodule.h for use with -fno-common.
Relates to redis/redis#6900
gcc -shared -Wl,-Bsymbolic-functions -o redisraft.so redisraft.o common.o node.o util.o config.o raft.o snapshot.o log.o proxy.o serialization.o /source/redisraft/.build/lib/libraft.a /source/redisraft/.build/lib/libhiredis.a /source/redisraft/.build/lib/libuv.a -lpthread
/usr/bin/ld: common.o:/source/redisraft/redismodule.h:442: multiple definition of
RedisModule_Alloc'; redisraft.o:/source/redisraft/redismodule.h:442: first defined here /usr/bin/ld: common.o:/source/redisraft/redismodule.h:443: multiple definition ofRedisModule_Realloc'; redisraft.o:/source/redisraft/redismodule.h:443: first defined here/usr/bin/ld: common.o:/source/redisraft/redismodule.h:444: multiple definition of
RedisModule_Free'; redisraft.o:/source/redisraft/redismodule.h:444: first defined here /usr/bin/ld: common.o:/source/redisraft/redismodule.h:445: multiple definition ofRedisModule_Calloc'; redisraft.o:/source/redisraft/redismodule.h:445: first defined here/usr/bin/ld: common.o:/source/redisraft/redismodule.h:446: multiple definition of
RedisModule_Strdup'; redisraft.o:/source/redisraft/redismodule.h:446: first defined here /usr/bin/ld: common.o:/source/redisraft/redismodule.h:447: multiple definition ofRedisModule_GetApi'; redisraft.o:/source/redisraft/redismodule.h:447: first defined here/usr/bin/ld: common.o:/source/redisraft/redismodule.h:448: multiple definition of
RedisModule_CreateCommand'; redisraft.o:/source/redisraft/redismodule.h:448: first defined here /usr/bin/ld: common.o:/source/redisraft/redismodule.h:449: multiple definition ofRedisModule_SetModuleAttribs'; redisraft.o:/source/redisraft/redismodule.h:449: first defined here[...snip many more unresolved symbols...]