G++ 4.8.2
I'm not 100% sure that I'm doing things correctly--nevertheless, the first error I get when running make is:
g++ -std=c++11 -Wall -Wextra -pedantic -Weffc++ -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wmissing-declarations -Wmissing-include-dirs -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-overflow=5 -Wswitch -Wundef -Wno-unused -Wnon-virtual-dtor -Wreorder -Wdeprecated -Wfloat-equal -I src -I test test/unit.cpp -o json_unit
test/unit.cpp:9675:32: error: unterminated raw string
CHECK_NOTHROW(json(R"(
I'll check this. If I remember correctly, this error occurs in the following constellation:
If you cannot compile the unit tests, the library will still work. I'll check if there is anything I can do to fix this.
this is a gcc bug Preprocessor macros with C++11 raw string literals fail to compile
no error using gcc 4.9 with c++11
I close this issue, because it does not affect the code as such. I also added a note to the README file that the unit tests cannot be compiled using GCC 4.8.
@nlohmann What is the way to bypass the unit test compilation ?
You can pass -DJSON_BuildTests=OFF to CMake.
Thanks.
?Can I try this in bazel build
I do not know what you mean.
I am running build like below
export TF_NEED_GCP=\"0\"
TF_NEED_HDFS=\"0\"
GCC_HOST_COMPILER_PATH=\"/usr/bin/gcc\"
TF_NEED_OPENCL=\"0\"
CUDA_TOOLKIT_PATH=\"/usr/local/cuda-9.0\"
TF_CUDA_COMPUTE_CAPABILITIES=\"3.0,3.5,5.2,7.0\"
CUDNN_INSTALL_PATH=\"/usr/local/cuda-9.0\"
TF_NEED_CUDA=\"1\" TF_ENABLE_XLA=\"0\"
PYTHON_BIN_PATH=\"/home/ec2-user/anaconda3/envs/tensorflow_p27/bin/python\" TF_CUDNN_VERSION=\"7\"
TF_NEED_JEMALLOC=\"0\"
TF_CUDA_VERSION=\"9.0\"
TF_UNOFFICIAL_SETTING=\"1\"
bazel build -c opt --copt=-msse4.1 --copt=-msse4.2 --copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-O3 --verbose_failures tensorflow_serving/...
Sorry, I am not familiar with bazel. But the library is a single header, so you just need to include it in your code - there is no need to compile the unit tests at all.