Skip to content

error: unterminated raw string #109

Closed

Description

@brianbreitsch

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"(

Activity

  1. nlohmann commented on Aug 11, 2015

    @nlohmann
    Owner

    I'll check this. If I remember correctly, this error occurs in the following constellation:

    • g++-4.8
    • Catch (the unit test framework) we use
    • C++11 raw strings

    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.

  2. self-assigned this
    on Aug 11, 2015
  3. benloong commented on Oct 21, 2015

    @benloong

    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

  4. added a commit that references this issue on Dec 7, 2015
  5. nlohmann commented on Dec 7, 2015

    @nlohmann
    Owner

    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.

  6. goswamig commented on Jul 18, 2018

    @goswamig

    @nlohmann What is the way to bypass the unit test compilation ?

  7. nlohmann commented on Jul 18, 2018

    @nlohmann
    Owner

    You can pass -DJSON_BuildTests=OFF to CMake.

  8. goswamig commented on Jul 18, 2018

    @goswamig

    Thanks.

  9. goswamig commented on Jul 18, 2018

    @goswamig

    ?Can I try this in bazel build

  10. nlohmann commented on Jul 18, 2018

    @nlohmann
    Owner

    I do not know what you mean.

  11. goswamig commented on Jul 18, 2018

    @goswamig

    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/...

  12. nlohmann commented on Jul 19, 2018

    @nlohmann
    Owner

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions