On 12/3/25 16:43, reza wrote:
(2) guix-env/manifest.scm: Specifying the package, that I want to use for my
project.
~~~~
(specifications->manifest
'("[email protected]"
"ocaml-utop"
"dune"
"bash"
"make"
"ocaml-findlib"
"ocaml-zarith"))
~~~~
You have actually two versions of ocaml now in your setup: 5.3.0 and
4.14 because you included version 5.3.0 explicitely but ocaml-utop is
built with ocaml which is set to version 4.14 in the file ocaml.scm:
(define-public ocaml ocaml-4.14). You have to be careful pinning a
certain version. Normally in guix the convention is per a specific git
commit there is a specific ocaml version (in your case 4.14) from which every
dependency is built from. If you happen to need another version you
need to rebuild all the dependecies with this version.
A quick fix for your problem is to drop the version pinning of ocaml
and just write ocaml instead [email protected] explicitely.
Hello Reza!
When I drop the "@5.3.0" part, and run `make main` again, what happens is the
following:
~~~~
ocamlfind ocamlc -package zarith -linkpkg -o main.byte main.ml
substitute: looking for substitutes on 'https://bordeaux.guix.gnu.org'... 100.0%
11.6 MB will be downloaded
bash-minimal-5.2.37-doc 313KiB 1.4MiB/s 00:00
▕██████████████████▏ 100.0%substitute: looking for substitutes on
'https://bordeaux.guix.gnu.org'... 100.0%
29.4 MB will be downloaded
glibc-2.41-static 1.5MiB 3.9MiB/s 00:00
▕██████████████████▏ 100.0% glibc-2.41-debug 17.8MiB
13.8MiB/s 00:01 ▕██████████████████▏ 100.0%substitute: looking for substitutes
on 'https://bordeaux.guix.gnu.org'... 100.0%
1.1 MB will be downloaded
bash-static-5.2.37-doc 313KiB 1.5MiB/s 00:00
▕██████████████████▏ 100.0%substitute: looking for substitutes on
'https://bordeaux.guix.gnu.org'... 100.0%
0.1 MB will be downloaded
zlib-1.3.1-static 54KiB 808KiB/s 00:00
▕██████████████████▏ 100.0%substitute: looking for substitutes on
'https://bordeaux.guix.gnu.org'... 100.0%
0.7 MB will be downloaded
gmp-6.3.0-debug 83KiB 1.1MiB/s 00:00
▕██████████████████▏ 100.0%guix shell: checking the environment variables
visible from shell '/bin/bash'...
guix shell: All is good! The shell gets correct environment variables.
+ ocamlfind ocamlc -package zarith -linkpkg -o main.byte main.ml
findlib: [WARNING] Package unix has multiple definitions in
/gnu/store/q1jdsy1y8kzk18iy4snb9c85m6awl2jp-profile/lib/ocaml/unix/META,
/gnu/store/q1jdsy1y8kzk18iy4snb9c85m6awl2jp-profile/lib/ocaml/site-lib/unix/META,
/gnu/store/yjik976n23235nhkr0amkrymb6kyfkxs-ocaml-findlib-1.9.5/lib/ocaml/site-lib/unix/META
findlib: [WARNING] Package threads has multiple definitions in
/gnu/store/q1jdsy1y8kzk18iy4snb9c85m6awl2jp-profile/lib/ocaml/threads/META,
/gnu/store/q1jdsy1y8kzk18iy4snb9c85m6awl2jp-profile/lib/ocaml/site-lib/threads/META,
/gnu/store/yjik976n23235nhkr0amkrymb6kyfkxs-ocaml-findlib-1.9.5/lib/ocaml/site-lib/threads/META
File "main.ml", line 1:
Error:
/gnu/store/q1jdsy1y8kzk18iy4snb9c85m6awl2jp-profile/lib/ocaml/site-lib/zarith/z.cmi
is not a compiled interface for this version of OCaml.
It seems to be for an older version of OCaml.
make: *** [Makefile:23: main.byte] Error 2
~~~~
I interpret this to be making a new guix shell with other dependencies, but the
error is still the same.
Perhaps I have to explicitly tell it to use Ocaml 4.x.y?
Best regards,
Zelphir
--
repositories:https://codeberg.org/ZelphirKaltstahl