Changeset: 7ee4a68e3514 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7ee4a68e3514 Modified Files: monetdb5/mal/mal_linker.c Branch: Jun2020 Log Message:
Check for missing installations of embedded R and C/C++ as well diffs (39 lines): diff --git a/monetdb5/mal/mal_linker.c b/monetdb5/mal/mal_linker.c --- a/monetdb5/mal/mal_linker.c +++ b/monetdb5/mal/mal_linker.c @@ -447,17 +447,32 @@ malLibraryEnabled(str name) return val && (strcmp(val, "3") == 0 || strcasecmp(val, "true") == 0 || strcasecmp(val, "yes") == 0); + } else if (strcmp(name, "rapi") == 0) { + const char *val = GDKgetenv("embedded_r"); + return val && (strcasecmp(val, "true") == 0 || + strcasecmp(val, "yes") == 0); + } else if (strcmp(name, "capi") == 0) { + const char *val = GDKgetenv("embedded_c"); + return val && (strcasecmp(val, "true") == 0 || + strcasecmp(val, "yes") == 0); } return true; } +#define HOW_TO_ENABLE_ERROR(LANGUAGE, OPTION) \ + if (malLibraryEnabled(name)) \ + return "Embedded " LANGUAGE " has not been installed. Please install it first, then start server with --set " OPTION; \ + return "Embedded " LANGUAGE " has not been enabled. Start server with --set " OPTION; + char * malLibraryHowToEnable(str name) { if (strcmp(name, "pyapi3") == 0) { - if (malLibraryEnabled(name)) - return "Embedded Python 3 has not been installed. Please install it first, then start server with --set embedded_py=3"; - return "Embedded Python 3 has not been enabled. Start server with --set embedded_py=3"; + HOW_TO_ENABLE_ERROR("Python 3", "embedded_py=3") + } else if (strcmp(name, "rapi") == 0) { + HOW_TO_ENABLE_ERROR("R", "embedded_r=true") + } else if (strcmp(name, "capi") == 0) { + HOW_TO_ENABLE_ERROR("C/C++", "embedded_c=true") } return ""; } _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list