From d9e3414f60c1d8d83cecf57add88992223df3608 Mon Sep 17 00:00:00 2001 From: Rodi-Can Bozman Date: Tue, 27 May 2025 09:59:33 +0200 Subject: [PATCH 1/3] Makefile: force ocaml compiler 4.14.1 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5763a9b..82d5828 100644 --- a/Makefile +++ b/Makefile @@ -76,7 +76,7 @@ pandora-server: @ln -vf _build/default/server/bin/main.exe pandora-server _opam: - @opam switch create . -y --no-install + @opam switch create . ocaml-base-compiler.4.14.1 -y --no-install @eval $(opam env) .PHONY: build-server-deps -- GitLab From 25d5f3b7a1c0f67f730396000b02a83a74ac83a0 Mon Sep 17 00:00:00 2001 From: Rodi-Can Bozman Date: Tue, 27 May 2025 10:00:00 +0200 Subject: [PATCH 2/3] Deps: fix versions for compatibility --- pandora-interface.opam | 6 +++--- pandora.opam | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pandora-interface.opam b/pandora-interface.opam index 8e85d29..c3214ed 100644 --- a/pandora-interface.opam +++ b/pandora-interface.opam @@ -13,7 +13,7 @@ depends: [ "httpun-lwt-unix" "digestif" "ezjs_fetch" - "js_of_ocaml-lwt" + "js_of_ocaml-lwt" {= "6.0.1"} "ez_pgocaml" "pgorm" {build} "ppx_deriving_encoding" {build} @@ -39,11 +39,11 @@ build: [ dev-repo: "git://gitlab.com/functori/dev/pandora" pin-depends: [ [ "json-data-encoding.dev" "git+https://gitlab.com/maxtori/data-encoding.git#dev" ] - [ "ez_api.dev" "git+https://github.com/ocamlpro/ez_api.git" ] + [ "ez_api.dev" "git+https://github.com/ocamlpro/ez_api.git#6ce1e989388ac54d9e61d90a529d342d55290273" ] [ "ez_pgocaml.dev" "git+https://github.com/ocamlpro/ez_pgocaml.git" ] [ "ppx_deriving_jsoo.dev" "git+https://gitlab.com/o-labs/ppx_deriving_jsoo.git" ] [ "ppx_deriving_encoding.dev" "git+https://gitlab.com/o-labs/ppx_deriving_encoding.git" ] [ "ppx_deriving_arg.~dev" "git+https://gitlab.com/functori/dev/ppx_deriving_arg.git" ] [ "pgorm.~dev" "git+https://gitlab.com/functori/dev/pgorm.git" ] [ "vue-ppx.dev" "git+https://gitlab.com/functori/dev/vue-ppx.git" ] -] \ No newline at end of file +] diff --git a/pandora.opam b/pandora.opam index 0f9b710..c2186d1 100644 --- a/pandora.opam +++ b/pandora.opam @@ -11,8 +11,8 @@ depends: [ "ocaml" "dune" {>= "3.15"} "odoc" {with-doc} - "js_of_ocaml" {= "5.8.2"} - "js_of_ocaml-lwt" + "js_of_ocaml" {= "6.0.1"} + "js_of_ocaml-lwt" {= "6.0.1"} "lwt" "lwt_ppx" "ez_api" @@ -45,7 +45,7 @@ build: [ ] dev-repo: "git://gitlab.com/functori/dev/pandora" pin-depends: [ - [ "ez_api.dev" "git+https://github.com/ocamlpro/ez_api.git#ac09f85c198e6ea7266739f38b55020065ceb7b6" ] + [ "ez_api.dev" "git+https://github.com/ocamlpro/ez_api.git#6ce1e989388ac54d9e61d90a529d342d55290273" ] [ "ezjs_fetch.dev" "git+https://github.com/OCamlPro/ezjs_fetch.git#441e52b1fa5695a8b29db53ebdd5793e98f4d16e"] [ "ppx_deriving_jsoo.dev" "git+https://gitlab.com/o-labs/ppx_deriving_jsoo.git#4f50016af72381567fd0e2ffbd89471aff522262" ] [ "ppx_deriving_encoding.dev" "git+https://gitlab.com/o-labs/ppx_deriving_encoding.git#a8f7c425baa3cfad53756de91e962fdfc755d675" ] -- GitLab From fbb123b72759a178b2c1b451c761a1c4890b97f1 Mon Sep 17 00:00:00 2001 From: Rodi-Can Bozman Date: Tue, 27 May 2025 10:03:45 +0200 Subject: [PATCH 3/3] README: add a section for interface --- README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/README.md b/README.md index 908f01c..58ff755 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,41 @@ Build the API server make pandora-server ``` +### Interface Compilation + +Build the interface + +```sh +make interface +``` + +When compiling if you get this error: + +``` +File "src/index/dune", line 24, characters 2-13: +24 | (pps pgorm)) + ^^^^^^^^^^^ +Fatal error: exception PGOCaml_generic.Make(Thread).Error("PGOCaml: Could not connect to database") +make: *** [Makefile:19 : build] Erreur 1 +``` + +It means disabling sandbox didn't work out. In `~/.opam/config` comment out those lines: + +``` +# wrap-build-commands: +# ["%{hooks}%/sandbox.sh" "build"] {os = "linux" | os = "macos"} +# wrap-install-commands: +# ["%{hooks}%/sandbox.sh" "install"] {os = "linux" | os = "macos"} +# wrap-remove-commands: +# ["%{hooks}%/sandbox.sh" "remove"] {os = "linux" | os = "macos"} +``` + +Recompile/reinstall PGOCaml: + +``` +opam reinstall pgocaml +``` + ## Running Pandora - Technical documentation See the [infrastructure document](doc/infrastructure.md) for deploying the -- GitLab