From ef7f6cd0df4d2209e8564a44498badc663796250 Mon Sep 17 00:00:00 2001 From: Yiqun Liu Date: Tue, 2 Apr 2024 14:13:22 +0200 Subject: [PATCH 1/2] MacOS Campatibility: * read the executing file from the standard library * add the name of GNU GMP library on MacOS to README --- README.md | 5 +++-- frontend/config.ml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 632b3df..1750da7 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,9 @@ It is recommended to install the dependencies of Islaris via opam (version 2.0.0 or newer) into a new switch. This can be done via the following commands. You also need to make sure that you have the GNU GMP library on your system (`libgmp-dev` package on Debian), -aarch64-linux-gnu-as (`binutils-aarch64-linux-gnu` package on Debian) and -riscv64-linux-gnu-as (`binutils-riscv64-linux-gnu` package on Debian). +aarch64-linux-gnu-as (`binutils-aarch64-linux-gnu` package on Debian, +`aarch64-elf-binutils` package on MacOS) and +riscv64-linux-gnu-as (`binutils-riscv64-linux-gnu` package on Debian, `riscv64-elf-binutils` on MacOS). ``` opam switch create . ocaml-variants.4.14.0+options ocaml-option-flambda --no-install diff --git a/frontend/config.ml b/frontend/config.ml index 286fd7c..fd1f2da 100644 --- a/frontend/config.ml +++ b/frontend/config.ml @@ -62,7 +62,7 @@ let pkgname : string = "islaris" let prefix : Filename.dirpath = (* Obtain a normalised path to the executable. *) let exe = - try Filename.realpath "/proc/self/exe" with Invalid_argument(_) -> + try Sys.executable_name with Invalid_argument(_) -> panic "Unable to find an absolute path to the current executable." in (* Is it in the development repo? Find the ["_build"] directory. *) From dd72a98fd0c36f4750b65c401023b6efb5fbbfec Mon Sep 17 00:00:00 2001 From: MackieLoeffel Date: Thu, 18 Apr 2024 09:34:25 +0200 Subject: [PATCH 2/2] Update frontend/config.ml --- frontend/config.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/config.ml b/frontend/config.ml index fd1f2da..fa8a7b3 100644 --- a/frontend/config.ml +++ b/frontend/config.ml @@ -62,7 +62,7 @@ let pkgname : string = "islaris" let prefix : Filename.dirpath = (* Obtain a normalised path to the executable. *) let exe = - try Sys.executable_name with Invalid_argument(_) -> + try Filename.realpath Sys.executable_name with Invalid_argument(_) -> panic "Unable to find an absolute path to the current executable." in (* Is it in the development repo? Find the ["_build"] directory. *)