mit-han-lab / TinyChatEngine

TinyChatEngine: On-Device LLM Inference Library
https://mit-han-lab.github.io/TinyChatEngine/
MIT License
756 stars 73 forks source link

Installing nlohmann-json3-dev is required #75

Closed dt1729 closed 1 year ago

dt1729 commented 1 year ago

Otherwise I see the error:

In file included from src/OPTTokenizer.cc:1: ./include/OPTTokenizer.h:22:10: fatal error: nlohmann/json.hpp: No such file or directory 22 | #include "nlohmann/json.hpp" | ^~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:180: build/transformer/src/OPTTokenizer.o] Error 1 make: *** Waiting for unfinished jobs.... In file included from ./include/Generate.h:26, from src/Generate.cc:8: ./include/OPTTokenizer.h:22:10: fatal error: nlohmann/json.hpp: No such file or directory 22 | #include "nlohmann/json.hpp" | ^~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from ./include/Generate.h:26, from src/nn_modules/non_cuda/LLaMAGenerate.cc:2: ./include/OPTTokenizer.h:22:10: fatal error: nlohmann/json.hpp: No such file or directory 22 | #include "nlohmann/json.hpp" | ^~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:180: build/transformer/src/Generate.o] Error 1 In file included from ./include/Generate.h:26, from src/OPTGenerate.cc:1: ./include/OPTTokenizer.h:22:10: fatal error: nlohmann/json.hpp: No such file or directory 22 | #include "nlohmann/json.hpp" | ^~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:180: build/transformer/src/nn_modules/non_cuda/LLaMAGenerate.o] Error 1 make: *** [Makefile:180: build/transformer/src/OPTGenerate.o] Error 1

Fix:

sudo apt-get install nlohmann-json3-dev