I ended up having the following output after compiling a few times in a row:
FAILED: CMakeFiles/wt_objs.dir/src/session/session_dhandle.c.o ccache /opt/mongodbtoolchain/v4/bin/gcc -I/usr/include/python3.6m -Iinclude -Iconfig -I../src/include -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -D_GNU_SOURCE -DHAVE_X86INTRIN_H -fPIC -Og -g3 -ggdb3 -gdwarf-4 -MD -MT CMakeFiles/wt_objs.dir/src/session/session_dhandle.c.o -MF CMakeFiles/wt_objs.dir/src/session/session_dhandle.c.o.d -o CMakeFiles/wt_objs.dir/src/session/session_dhandle.c.o -c ../src/session/session_dhandle.c In file included from ../src/include/wt_internal.h:469, from ../src/session/session_dhandle.c:9: ../src/session/session_dhandle.c: In function '__wt_session_get_btree_ckpt': ../src/session/session_dhandle.c:544:19: warning: implicit declaration of function 'S2B'; did you mean 'S2C'? [-Wimplicit-function-declaration] 544 | S2B(session)->checkpoint_gen, __wt_gen(session, WT_GEN_CHECKPOINT));
This shows our compilation flags are appended. It seems that it comes from our CMake files that use the set function, see an example below:
if(has_x86intrin) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_X86INTRIN_H" CACHE STRING "" FORCE) endif()
The variable CMAKE_C_FLAGS is cached and the flag DHAVE_X86INTRIN_H will be appended to it every time we build.
It seems that we could use add_compile_options instead to avoid duplicates.
- duplicates
-
WT-12510 Excessive and repeated compilation definitions on MacOS
- Closed