Repositories / jai.git
jai.git
Clone (read-only): git clone http://git.guha-anderson.com/git/jai.git
@@ -9,6 +9,13 @@ To build and use jai, you will need the following: - libacl (possible distro package names: acl, libacl1-dev) +In Ubuntu, you may need the following to get a modern compiler: + + sudo add-apt-repository ppa:ubuntu-toolchain-r/test + sudo apt update + sudo apt install g++-15 libmount-dev libacl1-dev pkg-config + export CXX=g++-15 + To build from building from a release tarball, run: ./configure
@@ -12,9 +12,16 @@ AC_PROG_CXX # Require C++23 CXXFLAGS="$CXXFLAGS $CXXLANG" AC_LANG_PUSH([C++]) +AC_MSG_CHECKING(for working C++23 features) AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([], [])], - [], + [AC_LANG_PROGRAM([ +#include <functional> +#include <print> + ], [ +std::move_only_function<void()> f = []{}; +f(); + ])], + [AC_MSG_RESULT(yes)], [AC_MSG_ERROR([a C++23 compiler is required])]) AC_LANG_POP([C++])
@@ -1235,6 +1235,9 @@ The default is CMD.conf if it exists, otherwise default.conf)", opts->parse_argv(argc, argv); restore.reset(); + if (geteuid() && !getenv("JAI_TRY_NONROOT")) + err("{} requires root. Please run it with sudo or make it setuid root", + prog.filename().string()); if (cmd.empty()) { const char *shell = conf.shell_.empty() ? "/bin/sh" : conf.shell_.c_str();