Skip to content

Commit 01d4339

Browse files
authored
Try fix macOS build with picojson (mlc-ai#1206)
The error message below ``` /usr/share/miniconda/envs/mlc-llm-build/conda-bld/mlc-chat-cli-nightly-package_1699286394016/work/3rdparty/tvm/3rdparty/picojson/picojson.h: In member function 'std::string picojson::value::to_str() const': /usr/share/miniconda/envs/mlc-llm-build/conda-bld/mlc-chat-cli-nightly-package_1699286394016/work/3rdparty/tvm/3rdparty/picojson/picojson.h:494:37: error: expected ')' before 'PRId64' 494 | SNPRINTF(buf, sizeof(buf), "%" PRId64, u_.int64_); | ~ ^~~~~~~ | ) /usr/share/miniconda/envs/mlc-llm-build/conda-bld/mlc-chat-cli-nightly-package_1699286394016/work/3rdparty/tvm/3rdparty/picojson/picojson.h:81:1: note: 'PRId64' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'? 80 | #include <errno.h> +++ |+#include <cinttypes> 81 | #include <inttypes.h> ``` indicates that the `__STDC_FORMAT_MACROS` flag is not turned on for some reason.
1 parent 65478c8 commit 01d4339

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

cpp/json_parser.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
#define MLC_LLM_CPP_JSON_PARSER_H_
33

44
#define PICOJSON_USE_INT64
5-
#ifndef __STDC_FORMAT_MACROS
65
#define __STDC_FORMAT_MACROS
7-
#endif
86

97
#include <picojson.h>
108
#include <tvm/runtime/container/shape_tuple.h>

0 commit comments

Comments
 (0)