Menu

#3941 Build failure on mac

open
nobody
bug (31)
2023-09-18
2023-09-18
Anonymous
No

Originally created by: nano-o

Someone reported failing to build stellar-core on mac because of redefinition errors caused by multiple conflicting versions of json.h. One version is the one include under lib/json while the other is a system-installed version in /usr/include/local/json/. I don't have much more info and I could not reproduce on my Linux setup (I didn't get any conflict even after installing system-wide libjsoncpp headers).

Anyway, I see that json.h is included in various ways throughout the codebase: there is #include <json/json.h>, #include "lib/json/json.h", #include <lib/json/json.h>, and #include "json/json.h". Should it not all be #include "lib/json/json.h"? Could it be what confused that particular toolchain on mac?

Discussion


Log in to post a comment.