Running as root without --no-sandbox is not supported

Recompiling SuperCollider for a new machine and I ran into an error I haven’t had before for a system-wide install. [EDIT: forgot to add I’m building from the develop branch, 3.11]

$ sudo make install
[  2%] Built target boost_filesystem_lib
[  2%] Built target boost_system_lib
[  2%] Built target tlsf
[  7%] Built target libscsynth
[  8%] Built target boost_thread_lib
[ 11%] Built target boost_regex_lib
[ 12%] Built target yaml
[ 12%] Built target hidapi
[ 12%] Built target hidapi_parser
[ 42%] Built target libsclang
[ 43%] Built target sclang
compiling class library...
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Attribute Qt::AA_ShareOpenGLContexts must be set before QCoreApplication is created.
[13588:13588:0319/191644.765238:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
terminate called without an active exception
Aborted (core dumped)
make[2]: *** [CMakeFiles/doc.dir/build.make:57: CMakeFiles/doc] Error 134
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/doc.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

Resolution was to install for my user (not ideal but whatever). Did a build on a different system (Lubunti 19.04) with 3.10.4 and had no issues.

Other PC info:

$ uname -a
Linux jacob-linux 5.3.0-42-generic #34-Ubuntu SMP Fri Feb 28 05:49:40 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 19.10
Release:        19.10
Codename:       eoan

I’m not sure how to deal with it. I found references to the error for other programs but am hesitant to try their solutions without input from this community.

The procedure I have always followed is to compile as a regular user, but install as root.

$ cd build
$ make
$ sudo make install

In the last step, binaries get placed into /usr/local/bin/ which AFAIK qualifies as a system-wide installation.

Is there a particular reason why you must build as root?

hjh

why is sclang being run during the install step? are you trying to build/install documentation with the SC_DOC_RENDER CMake option? that’s not necessary, as it will be generated anyway later.

OP is running the install step as root, not compiling as root.

@VIRTUALDOG Whoops, I was just copying my old build commands. In previous versions (3.9, 3.10) bringing up help would crash sclang on my machine so I used the docs locally on my browser. That way I could just go straight to the docs without any additional commands.

Yes, I was running the final step as root for a system-wide install but not building as root. It worked when installing for a user instead. Not sure if this is an SC bug or something else entirely.

OK, great.

not an SC bug. find out what directory you are installing to (grep CMAKE_INSTALL_PREFIX CMakeCache.txt) and check the permissions on it. could also be that building the install target didn’t do anything that required sudo permissions because a previous install succeeded under sudo.

It tells me my local folder in my user (/home/jacob/usr/local) since I installed it in my own user. But before it was /usr/local/ installing the executables in bin/. Permissions for the directories for a system-wide install:

drwxr-xr-x  2 root root 4.0K Mar 21 20:52 bin

And the parent dir:

drwxr-xr-x  10 root root 4.0K Apr 16  2019 local

I thought it might be a permissions issue but I compiled and installed Pd from source with no issues. I figured it was an error at ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported..

I also saved this output before I installed as a user, just in case so I don’t think it was a problem with sudo permissions since there was no previous build. Tried again for kicks after uninstalling the user install but got the same thing again.

After doing some digging really quick, it’s probably related to this: https://github.com/supercollider/supercollider/issues/4301 and the fact that I am building the docs in the install as sudo. Then that means sclang is run as sudo and BAM! Error.

I’ll try building again without rendering the docs in the build and see. But I’m betting it will go away…