genie-cloud
genie-cloud copied to clipboard
`npm run install` fails on macOS (`libsystemd` related?)
npm ci
calls npm run install
, which fails on macOS. While the NPM
dependencies appear correctly installed and npm ci
returns success, the error
output can be confusing.
System
property | value |
---|---|
os | macOS 11.4 Big Sur |
node | 12.22.5 (LTS) |
npm | 6.14.14 |
Relevant output of npm ci
:
> [email protected] install /Users/nrser/src/github.com/stanford-oval/almond-cloud
> make install
test -f /usr/local/bin/backend || ( cd go/backend && go build )
make -C sandbox all || echo WARNING: failed to compile the sandbox
make[1]: Entering directory '/Users/nrser/src/github.com/stanford-oval/almond-cloud/sandbox'
Package libsystemd was not found in the pkg-config search path.
Perhaps you should add the directory containing `libsystemd.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libsystemd' found
cc -o sandbox -Wall -Werror -g -O2 -fno-strict-overflow -fstack-protector-strong -D_FORTIFY_SOURCE=2 sandbox.c
sandbox.c:184:9: error: implicit declaration of function 'strchrnul' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
q = strchrnul (p, ':');
^
sandbox.c:184:9: note: did you mean 'strchr'?
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/string.h:76:7: note: 'strchr' declared here
char *strchr(const char *__s, int __c);
^
sandbox.c:184:7: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Werror,-Wint-conversion]
q = strchrnul (p, ':');
^ ~~~~~~~~~~~~~~~~~~
2 errors generated.
make[1]: *** [Makefile:9: sandbox] Error 1
make[1]: Leaving directory '/Users/nrser/src/github.com/stanford-oval/almond-cloud/sandbox'
WARNING: failed to compile the sandbox
This should just be a warning. You cannot compile the sandbox on anything but Linux, because the sandbox uses bwrap, which is a namespace-based sandbox. You need to set THINGENGINE_DISABLE_SANDBOX=1 to run natively on non-Linux POSIX OSes.