Description:
On macOS, If Homebrew rapidjson is installed, then build fails. Note that even -DWITH_RAPIDJSON=bundled does not help, and the only workaround is brew unlink rapidjson.
This is a regression against 8.0.32.
/Users/laurynas/vilniusdb/mysql-8.0.33/sql/json_schema.cc:114:7: error: no matching constructor for initialization of 'rapidjson::SchemaDocument' (aka 'GenericSchemaDocument<GenericValue<UTF8<>>>')
: m_cached_schema(schema_document, /*uri=*/nullptr, /*uriLength=*/0,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/include/rapidjson/schema.h:1341:14: note: candidate constructor not viable: requires at most 3 arguments, but 4 were provided
explicit GenericSchemaDocument(const ValueType& document, IRemoteSchemaDocumentProviderType* remoteProvider = 0, Allocator* allocator = 0) :
^
/opt/homebrew/include/rapidjson/schema.h:1378:5: note: candidate constructor not viable: requires single argument 'rhs', but 4 arguments were provided
GenericSchemaDocument(GenericSchemaDocument&& rhs) RAPIDJSON_NOEXCEPT :
^
/opt/homebrew/include/rapidjson/schema.h:1405:5: note: candidate constructor not viable: requires 1 argument, but 4 were provided
GenericSchemaDocument(const GenericSchemaDocument&);
^
/opt/homebrew/include/rapidjson/schema.h:1913:30: error: no matching constructor for initialization of 'Syntax_check_handler'
static OutputHandler nullHandler;
^
/opt/homebrew/include/rapidjson/schema.h:1794:24: note: in instantiation of member function 'rapidjson::GenericSchemaValidator<rapidjson::GenericSchemaDocument<rapidjson::GenericValue<rapidjson::UTF8<>>>, Syntax_check_handler>::GetNullHandler' requested here
outputHandler_(GetNullHandler()),
^
/opt/homebrew/include/rapidjson/schema.h:1742:81: note: in instantiation of member function 'rapidjson::GenericSchemaValidator<rapidjson::GenericSchemaDocument<rapidjson::GenericValue<rapidjson::UTF8<>>>, Syntax_check_handler>::GenericSchemaValidator' requested here
return new (GetStateAllocator().Malloc(sizeof(GenericSchemaValidator))) GenericSchemaValidator(*schemaDocument_, root,
^
/opt/homebrew/include/rapidjson/schema.h:1597:5: note: in instantiation of member function 'rapidjson::GenericSchemaValidator<rapidjson::GenericSchemaDocument<rapidjson::GenericValue<rapidjson::UTF8<>>>, Syntax_check_handler>::CreateSchemaValidator' requested here
GenericSchemaValidator(
^
/Users/laurynas/vilniusdb/mysql-8.0.33/sql/json_schema.cc:139:7: note: in instantiation of member function 'rapidjson::GenericSchemaValidator<rapidjson::GenericSchemaDocument<rapidjson::GenericValue<rapidjson::UTF8<>>>, Syntax_check_handler>::GenericSchemaValidator' requested here
validator(m_cached_schema, syntaxCheckHandler);
^
/Users/laurynas/vilniusdb/mysql-8.0.33/sql-common/json_syntax_check.h:72:12: note: candidate constructor not viable: requires single argument 'm_depth_handler', but no arguments were provided
explicit Syntax_check_handler(JsonDocumentDepthHandler m_depth_handler);
[ 78%] Building CXX object sql/CMakeFiles/sql_main.dir/locked_tables_list.cc.o
^
/Users/laurynas/vilniusdb/mysql-8.0.33/sql-common/json_syntax_check.h:64:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 0 were provided
class Syntax_check_handler : public rapidjson::BaseReaderHandler<> {
^
/Users/laurynas/vilniusdb/mysql-8.0.33/sql-common/json_syntax_check.h:64:7: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 0 were provided
How to repeat:
brew install rapidjson
cmake with -DWITH_RAPIDJSON=system
cmake with -DWITH_RAPIDJSON=bundled
build both versions