JSON11 issue Building x265 with HDR10+ on macOS High Sierra

Issue #373 resolved
Former user created an issue

Environment Information:

  • Operating System: MacOS High Sierra 10.13 (build 17A405)
  • yasm (installed with homebrew): 1.3.0_1
  • cmake (installed with homebrew): 3.9.4_1

Installation Information:

  • build script: build/linux/multilib.sh
  • Line 16 of script modified to enable dynamic HDR 10+:
cmake ../../../source -DEXTRA_LIB="x265_main10.a;x265_main12.a" -DEXTRA_LINK_FLAGS=-L. -DLINKED_10BIT=ON -DLINKED_12BIT=ON -DENABLE_HDR10_PLUS=ON

Problem:

Every time I try to run the multilib.sh script to create a build which includes HDR10+, the build fails with the following error:

/x265/source/dynamicHDR10/json11/json11.cpp:163:24: error: invalid operands to binary expression
      ('nullptr_t' and 'nullptr_t')
        return m_value < static_cast<const Value<tag, T> *>(other)->m_value;
               ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/x265/source/dynamicHDR10/json11/json11.cpp:219:5: note: in instantiation of member function
      'json11::Value<json11::Json::Type::NUL, nullptr_t>::less' requested here
    JsonNull() : Value(nullptr) {}
    ^
1 error generated.
make[2]: *** [dynamicHDR10/CMakeFiles/dynamicHDR10.dir/json11/json11.cpp.o] Error 1
make[1]: *** [dynamicHDR10/CMakeFiles/dynamicHDR10.dir/all] Error 2
make: *** [all] Error 2

Doing some research, it seems that json11 broke when clang was upgraded to v4.0.0+ due to changes made in clang with regards to the handling of nullptr_t.

The bug was identified and resolved in the json11 GitHub project here: https://github.com/dropbox/json11

The issue specifically for this bug is here: https://github.com/dropbox/json11/issues/91

The fixes made to resolve this bug can be found here (assuming this link works): https://github.com/dropbox/json11/pull/92/files/07fe48880402214fd66357b09bda33a18d784e76

Proposed Resolution:

I tried changed the json11.cpp code to include the changes made over at the json11 GitHub project. I then tried to build the project once again as usual. This time, everything build properly! I'm not sure on the best way to resolve this issue over here in x265, but maybe just updating the json11 files is sufficient?

NOTE: I have not actually tested the new libraries, but they are now successfully built!

Comments (2)

  1. Log in to comment