From 25a892d6aefca695e07bbf110cce5c1c39056bb4 Mon Sep 17 00:00:00 2001 From: Justine Tunney Date: Mon, 13 Nov 2023 02:26:34 -0800 Subject: [PATCH] Add some platform notes to the README file --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 5da3e0eec..f74b1513a 100644 --- a/README.md +++ b/README.md @@ -196,6 +196,29 @@ You normally run the `.com.dbg` file under gdb. If you need to debug the gdb foo.com -ex 'add-symbol-file foo.com.dbg 0x401000' ``` +## Platform Notes + +### Linux + +Linux systems with WINE installed might have issues running APE programs +if WINE is registered with `binnfmt_misc`. To work around this, you need +to remove WINE from `binfmt_misc`. You could also disable `binfmt_misc` +entirely. + +``` +sudo sh -c 'echo 0 > /proc/sys/fs/binfmt_misc/status' +``` + +### WSL + +It's normally unsafe to use APE in a WSL environment, because it tries +to run them as WIN32 binaries within the WSL environment. In order to +make it safe to use Cosmopolitan software on WSL, you have to run: + +```sh +sh -c "echo -1 > /proc/sys/fs/binfmt_misc/WSLInterop" +``` + ## Discord Chatroom The Cosmopolitan development team collaborates on the Redbean Discord