Closed barracuda156 closed 1 month ago
It seems like your OCaml installation is broken. This is clearly not a problem at Abella's end since our CI builds and tests Abella on every commit. Can you check if you can independently run ocamllex
and menhir
?
@chaudhuri I will try once on a desktop, but I think they work, since I build multiple OCaml ports, including stanc3
compiler, which does use at least menhir
.
To be clear, it is supposed to work with bytecode compilation, right? 2.0.7 did not, but a fix for it was rather minimal: https://github.com/macports/macports-ports/commit/682b78e9d8be9ffeef37fc8c85086f84fe31cd6e (see the patching there).
I can't think of why byte compilation would fail. Abella is currently 100% ocaml. I'll look into adding powerpc to our CI and see if any errors are reported. I don't personally have a powerpc (or even a Mac) to do any direct testing though.
I can't think of why byte compilation would fail. Abella is currently 100% ocaml. I'll look into adding powerpc to our CI and see if any errors are reported. I don't personally have a powerpc (or even a Mac) to do any direct testing though.
Another thing I could think of, which makes our PowerPC setup a bit specific, is this setting in Dune: https://github.com/macports/macports-ports/blob/4e35e8abb053882dc163a85cafcdef38465c0562/ocaml/ocaml-dune/Portfile#L35 (there is a link to a discussion with upstream too).
I will try a few things tomorrow: Update Dune to 3.12.1 and see if nothing changes. Try rebuilding all OCaml dependencies of Abella from scratch (if Opam is in the chain somewhere, that could be a complication, there is some bug in it, but hopefully fixable). Try building 2.0.8 on aarch64 to make sure the problem is specific to either PowerPC or 32-bit and not to our set-up of the build as such.
Unfortunately I can't find a public CI runner that matches your configuration (arch=ppc32,os=macos
). If you know of one, or even some place where I can do some testing on my own, please let me know.
Unrelatedly, I've verified that a byte-compiled version of Abella builds and runs without issues on arch=x86_64,os={linux,windows}
and arch=arm64,os=macos
. These are the only systems I have access to either through my own computers or through the CI runner.
@chaudhuri I do not think that macOS ppc will be available via GH actions or alike; while it is feasible to emulate (install 10.6.8 Server in VM, run ppc code via Rosetta; or install 10.5.8 ppc in Qemu), it is likely to be a pain, especially given that everything will have to be built from scratch there. Realistically, Linux ppc32 may be the closest to test on (ABI is not identical, but bitness, arch and endianness are).
@chaudhuri I have rebuilt OCaml and updated dune
to 3.12.1, same error. Just to be clear, abella
2.0.8 has been tested with OCaml 4.14.1?
I use 4.14.1 to develop Abella.
Unfortunately, I can't think of any reason why this is failing. Can you get the sources from the release and run ocamllex on src/lexer.mll
and menhir on src/parser.mly
? Let me know what errors you get.
36-184% /opt/local/bin/ocamllex /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_abella/abella/work/abella-2.0.8/src/lexer.mll
67 states, 773 transitions, table size 3494 bytes
1797 additional bytes used for bindings
36-184% /opt/local/bin/menhir /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_abella/abella/work/abella-2.0.8/src/parser.mly
Warning: one state has shift/reduce conflicts.
Warning: one shift/reduce conflict was arbitrarily resolved.
Error: the code back-end requires the type of every nonterminal symbol to be
known. Please specify the type of every symbol via %type declarations, or
enable type inference (look up --infer in the manual).
Type inference is automatically enabled when Menhir is used via Dune,
provided the dune-project file says (using menhir 2.0) or later.
The types of the following nonterminal symbols are unknown:
aid
any_command
apply_arg
aty
binder
binding_list
binding_one
binding_vars
boption(STAR)
boption(__anonymous_6)
clause
clause_body
clause_head
clause_name
clause_sel
clearable
cmdline_flag
command
common_command
context
contexted_term
def
depth_spec_one
ewitness
exists_binds
exp
exp_list
focused_term
hyp
id
id_tys
knd
list(__anonymous_0)
list(__anonymous_1)
list(located(sig_decl))
list(mod_clause)
list(sig_decl)
loc_id
loption(__anonymous_13)
loption(__anonymous_14)
loption(__anonymous_16)
loption(__anonymous_2)
loption(__anonymous_3)
loption(__anonymous_4)
loption(__anonymous_5)
loption(exp_list)
loption(hyp_list)
loption(separated_nonempty_list(COMMA,cmdline_flag))
maybe_depth
nonempty_list(NUM)
nonempty_list(__anonymous_10)
nonempty_list(__anonymous_11)
nonempty_list(__anonymous_8)
nonempty_list(__anonymous_9)
nonempty_list(apply_arg)
nonempty_list(binding_one)
nonempty_list(hyp)
nonempty_list(id)
objseq
option(NUM)
option(SEMICOLON)
option(hyp)
paid
pty
pure_command
pure_top_command
restriction
separated_nonempty_list(COMMA,__anonymous_12)
separated_nonempty_list(COMMA,__anonymous_15)
separated_nonempty_list(COMMA,__anonymous_7)
separated_nonempty_list(COMMA,aty)
separated_nonempty_list(COMMA,cmdline_flag)
separated_nonempty_list(COMMA,ewitness)
separated_nonempty_list(COMMA,loc_id)
separated_nonempty_list(COMMA,search_witness)
separated_nonempty_list(COMMA,uty)
separated_nonempty_list(SEMICOLON,def)
separated_nonempty_list(SEMICOLON,depth_spec_one)
sol_sel
theorem_typarams
top_command
ty
uty
Looks like both ocamllex and menhir worked fine. (The menhir error can be suppressed with --infer
.)
Hmm...
Maybe Dune's _build
directory is broken on ppc32
somehow? What do you get when you run the exact command in the initial message:
$ cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_abella/abella/work/abella-2.0.8/
$ dune build src/abella.exe # which may fail, but that's OK because:
$ (cd _build/default && /opt/local/bin/ocamllex -q -o src/lexer.ml src/lexer.mll)
By the way, one weird thing is that you are trying to build a .exe
target, which normally invokes ocamlopt
(the native compiler). If you want to byte-compile, then you have to change the extensions to .bc
in the Makefile
, and also add (modes byte exe)
to the executables
section in src/dune
. If you want, I can give you a patch against the v2.0.8
tag that will change to build Abella in byte compiled mode.
@chaudhuri
If you want, I can give you a patch against the v2.0.8 tag that will change to build Abella in byte compiled mode.
Yes, please, that would be great. For 2.0.7 I had to fix bytecode target for it to work. But it is much better to have a proper fix from you rather than making a guesswork on our end.
Native compiler is broken for ppc
, and given that OCaml upstream dropped 32-bit support in native compiler in OCaml 5, I gave up on a work to fix it. (One thing was to fix ABI for macOS, when Linux was supported, but restoring support for 32-bit will be too much.) So most likely we are stuck with bytecode.
(ppc64
on macOS too, since assembler and ABI will need changes, and there is little sense to do that for the sake of ppc64
alone.)
By the way, could you say if the following error looks related? https://trac.macports.org/ticket/68586#comment:1
Maybe there is some problem with dune
which affects select ports (since most of dependents build fine, but opam
now fails).
This is running directly after unpacking the source:
36-184% cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_abella/abella/work/abella-2.0.8
36-184% sudo dune build src/abella.exe
File "src/lexer.mll", line 1, character 0: syntax error.
File "src/parser.mly", line 1, characters 0-0:
Error: syntax error inside a declaration.
Did you perhaps forget the %% that separates declarations and rules?
36-184% cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_abella/abella/work/abella-2.0.8/_build/default
36-184% sudo /opt/local/bin/ocamllex -q -o src/lexer.ml src/lexer.mll
File "src/lexer.mll", line 1, character 0: syntax error.
Right, so what's the file in _build/default/src/lexer.mll
? It should be identical to src/lexer.mll
.
Check out a10b8e7435eacf44f44db92230daeee09533f072 (tag v2.0.8+bc
) for a byte-compiled version of the Abella distribution. Very lightly tested with just make test
on my system (x86_64-linux-debian
), but at least it successfully checks the standard examples shipped with Abella.
Unfortunately, I still get the same failure with syntax when building from a10b8e7435eacf44f44db92230daeee09533f072 commit:
---> Building abella
Executing: cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_abella/abella/work/abella-a10b8e7435eacf44f44db92230daeee09533f072" && /usr/bin/make -j6 -w all
make: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_abella/abella/work/abella-a10b8e7435eacf44f44db92230daeee09533f072'
dune build src/abella.bc src/abella_doc.bc src/abella_dep.bc
File "src/lexer.mll", line 1, character 0: syntax error.
File "src/parser.mly", line 1, characters 0-0:
Error: syntax error inside a declaration.
Did you perhaps forget the %% that separates declarations and rules?
make: *** [all] Error 1
make: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_abella/abella/work/abella-a10b8e7435eacf44f44db92230daeee09533f072'
Command failed: cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_abella/abella/work/abella-a10b8e7435eacf44f44db92230daeee09533f072" && /usr/bin/make -j6 -w all
Exit code: 2
What is the file in _build/default/src/lexer.mll
please?
@chaudhuri If I understood correctly what to run, _build/default/src/lexer.mll
file is empty and shows as 0 bytes.
Here is what I did after unpacking. No Macports involvement here besides fetching from git and extracting:
36-141% cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_abella/abella/work/abella-a10b8e7435eacf44f44db92230daeee09533f072
36-141% sudo dune build src/abella.bc
Password:
File "src/lexer.mll", line 1, character 0: syntax error.
File "src/parser.mly", line 1, characters 0-0:
Error: syntax error inside a declaration.
Did you perhaps forget the %% that separates declarations and rules?
36-141% cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_abella/abella/work/abella-a10b8e7435eacf44f44db92230daeee09533f072/_build/default/
36-141% sudo /opt/local/bin/ocamllex -q -o src/lexer.ml src/lexer.mll
File "src/lexer.mll", line 1, character 0: syntax error.
If I did something silly, please tell me what commands to run manually to get a needed output.
OK, this is then not an Abella issue at all. It appears that Dune is not making the _build
directory correctly. Please file an issue with https://github.com/ocaml/dune/issues.
@chaudhuri Your hint about _build
dir helped me to figure out what was going wrong. Since abella
uses makefile and not dune
directly, DUNE_CONFIG__COPY_FILE=portable
did not get passed in the environment, and I forgot about that being needed. I added it now manually, and the build can start.
Where does it put the binary now though? It certainly did quite a bit, but I do not see abella
binary:
# dune build src/abella.bc src/abella_doc.bc src/abella_dep.bc
# OCAMLPARAM: unset
# Shared cache: disabled
# Shared cache location:
# /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_abella/abella/work/.home/.cache/dune/db
# Workspace root:
# /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_abella/abella/work/abella-a10b8e7435eacf44f44db92230daeee09533f072
# Auto-detected concurrency: 4
# Dune context:
# { name = "default"
# ; kind = "default"
# ; profile = Dev
# ; merlin = true
# ; fdo_target_exe = None
# ; build_dir = In_build_dir "default"
# ; installed_env =
# map
# { "INSIDE_DUNE" :
# "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_abella/abella/work/abella-a10b8e7435eacf44f44db92230daeee09533f072/_build/default"
# }
# ; instrument_with = []
# }
$ /opt/local/bin/ocamlc -config > /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_abella/abella/work/.tmp/dune_51d661_output
$ (cd _build/default && /opt/local/bin/ocamldep -modules -impl src/version.ml) > _build/default/src/.abella_lib.objs/version.impl.d
$ (cd _build/default && /opt/local/bin/ocamllex -q -o src/lexer.ml src/lexer.mll)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -no-alias-deps -opaque -o src/.abella_lib.objs/byte/version.cmo -c -impl src/version.ml)
$ (cd _build/default && /opt/local/bin/ocamldep -modules -impl src/abella_doc_dist.ml) > _build/default/src/.abella_lib.objs/abella_doc_dist.impl.d
$ (cd _build/default && /opt/local/bin/ocamldep -modules -impl src/abella_types.ml) > _build/default/src/.abella_lib.objs/abella_types.impl.d
$ (cd _build/default && /opt/local/bin/ocamldep -modules -impl src/accumulate.ml) > _build/default/src/.abella_lib.objs/accumulate.impl.d
$ (cd _build/default && /opt/local/bin/ocamldep -modules -impl src/checks.ml) > _build/default/src/.abella_lib.objs/checks.impl.d
$ (cd _build/default && /opt/local/bin/ocamldep -modules -impl src/context.ml) > _build/default/src/.abella_lib.objs/context.impl.d
$ (cd _build/default && /opt/local/bin/ocamldep -modules -impl src/depend.ml) > _build/default/src/.abella_lib.objs/depend.impl.d
$ (cd _build/default && /opt/local/bin/ocamldep -modules -impl src/filepath.ml) > _build/default/src/.abella_lib.objs/filepath.impl.d
$ (cd _build/default && /opt/local/bin/ocamldep -modules -impl src/graph.ml) > _build/default/src/.abella_lib.objs/graph.impl.d
$ (cd _build/default && /opt/local/bin/ocamldep -modules -impl src/extensions.ml) > _build/default/src/.abella_lib.objs/extensions.impl.d
$ (cd _build/default && /opt/local/bin/ocamldep -modules -impl src/output.ml) > _build/default/src/.abella_lib.objs/output.impl.d
$ (cd _build/default && /opt/local/bin/ocamldep -modules -impl src/pretty.ml) > _build/default/src/.abella_lib.objs/pretty.impl.d
$ (cd _build/default && /opt/local/bin/ocamldep -modules -impl src/state.ml) > _build/default/src/.abella_lib.objs/state.impl.d
$ (cd _build/default && /opt/local/bin/ocamldep -modules -impl src/subordination.ml) > _build/default/src/.abella_lib.objs/subordination.impl.d
$ (cd _build/default && /opt/local/bin/ocamldep -modules -impl src/metaterm.ml) > _build/default/src/.abella_lib.objs/metaterm.impl.d
$ (cd _build/default && /opt/local/bin/ocamldep -modules -impl src/prover.ml) > _build/default/src/.abella_lib.objs/prover.impl.d
$ (cd _build/default && /opt/local/bin/ocamldep -modules -impl src/typing.ml) > _build/default/src/.abella_lib.objs/typing.impl.d
$ (cd _build/default && /opt/local/bin/ocamldep -modules -impl src/term.ml) > _build/default/src/.abella_lib.objs/term.impl.d
$ (cd _build/default && /opt/local/bin/ocamldep -modules -impl src/unify.ml) > _build/default/src/.abella_lib.objs/unify.impl.d
$ (cd _build/default && /opt/local/bin/ocamldep -modules -impl src/unifyty.ml) > _build/default/src/.abella_lib.objs/unifyty.impl.d
$ (cd _build/default && /opt/local/bin/ocamldep -modules -impl src/tactics.ml) > _build/default/src/.abella_lib.objs/tactics.impl.d
$ (cd _build/default && /opt/local/bin/ocamldep -modules -intf src/graph.mli) > _build/default/src/.abella_lib.objs/graph.intf.d
$ (cd _build/default && /opt/local/bin/ocamldep -modules -intf src/pretty.mli) > _build/default/src/.abella_lib.objs/pretty.intf.d
$ (cd _build/default && /opt/local/bin/ocamldep -modules -intf src/state.mli) > _build/default/src/.abella_lib.objs/state.intf.d
$ (cd _build/default && /opt/local/bin/ocamldep -modules -intf src/subordination.mli) > _build/default/src/.abella_lib.objs/subordination.intf.d
$ (cd _build/default && /opt/local/bin/ocamldep -modules -intf src/term.mli) > _build/default/src/.abella_lib.objs/term.intf.d
$ (cd _build/default && /opt/local/bin/ocamldep -modules -intf src/unify.mli) > _build/default/src/.abella_lib.objs/unify.intf.d
$ (cd _build/.sandbox/a267c9c056edfedf8682cb97714be6b2/default && /opt/local/bin/menhir --explain src/parser.mly --base src/parser --infer-write-query src/parser__mock.ml.mock)
$ (cd _build/default && /opt/local/bin/ocamldep -modules -impl src/lexer.ml) > _build/default/src/.abella_lib.objs/lexer.impl.d
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -no-alias-deps -opaque -o src/.abella_lib.objs/byte/abella_doc_dist.cmo -c -impl src/abella_doc_dist.ml)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -no-alias-deps -opaque -o src/.abella_lib.objs/byte/state.cmi -c -intf src/state.mli)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -no-alias-deps -opaque -o src/.abella_lib.objs/byte/pretty.cmi -c -intf src/pretty.mli)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -no-alias-deps -opaque -o src/.abella_lib.objs/byte/term.cmi -c -intf src/term.mli)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -intf-suffix .ml -no-alias-deps -opaque -o src/.abella_lib.objs/byte/pretty.cmo -c -impl src/pretty.ml)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -no-alias-deps -opaque -o src/.abella_lib.objs/byte/graph.cmi -c -intf src/graph.mli)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -no-alias-deps -opaque -o src/.abella_lib.objs/byte/subordination.cmi -c -intf src/subordination.mli)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -no-alias-deps -opaque -o src/.abella_lib.objs/byte/unifyty.cmo -c -impl src/unifyty.ml)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -no-alias-deps -opaque -o src/.abella_lib.objs/byte/unify.cmi -c -intf src/unify.mli)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -no-alias-deps -opaque -o src/.abella_lib.objs/byte/extensions.cmo -c -impl src/extensions.ml)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -no-alias-deps -opaque -o src/.abella_lib.objs/byte/filepath.cmo -c -impl src/filepath.ml)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -intf-suffix .ml -no-alias-deps -opaque -o src/.abella_lib.objs/byte/state.cmo -c -impl src/state.ml)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -no-alias-deps -opaque -o src/.abella_lib.objs/byte/output.cmo -c -impl src/output.ml)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -intf-suffix .ml -no-alias-deps -opaque -o src/.abella_lib.objs/byte/graph.cmo -c -impl src/graph.ml)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -intf-suffix .ml -no-alias-deps -opaque -o src/.abella_lib.objs/byte/subordination.cmo -c -impl src/subordination.ml)
$ (cd _build/default && /opt/local/bin/ocamldep -modules -impl src/parser__mock.ml.mock) > _build/default/src/.abella_lib.objs/parser__mock.impl.d
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -no-alias-deps -opaque -o src/.abella_lib.objs/byte/context.cmo -c -impl src/context.ml)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -intf-suffix .ml -no-alias-deps -opaque -o src/.abella_lib.objs/byte/term.cmo -c -impl src/term.ml)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -intf-suffix .ml -no-alias-deps -opaque -o src/.abella_lib.objs/byte/unify.cmo -c -impl src/unify.ml)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -no-alias-deps -opaque -o src/.abella_lib.objs/byte/metaterm.cmo -c -impl src/metaterm.ml)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -no-alias-deps -opaque -o src/.abella_lib.objs/byte/typing.cmo -c -impl src/typing.ml)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -no-alias-deps -opaque -o src/.abella_lib.objs/byte/abella_types.cmo -c -impl src/abella_types.ml)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -no-alias-deps -opaque -o src/.abella_lib.objs/byte/checks.cmo -c -impl src/checks.ml)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -no-alias-deps -opaque -o src/.abella_lib.objs/byte/tactics.cmo -c -impl src/tactics.ml)
$ (cd _build/.sandbox/7bcfc159da2d83edcf8b17ac11240a10/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -short-paths -i -impl src/parser__mock.ml.mock) > _build/.sandbox/7bcfc159da2d83edcf8b17ac11240a10/default/src/parser__mock.mli.inferred
$ (cd _build/.sandbox/cb5d3ad1817f5e827e1a726ddc64e7bc/default && /opt/local/bin/menhir --explain src/parser.mly --base src/parser --infer-read-reply src/parser__mock.mli.inferred)
> Warning: one state has shift/reduce conflicts.
> Warning: one shift/reduce conflict was arbitrarily resolved.
$ (cd _build/default && /opt/local/bin/ocamldep -modules -intf src/parser.mli) > _build/default/src/.abella_lib.objs/parser.intf.d
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -no-alias-deps -opaque -o src/.abella_lib.objs/byte/parser.cmi -c -intf src/parser.mli)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -no-alias-deps -opaque -o src/.abella_lib.objs/byte/lexer.cmo -c -impl src/lexer.ml)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -no-alias-deps -opaque -o src/.abella_lib.objs/byte/accumulate.cmo -c -impl src/accumulate.ml)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -no-alias-deps -opaque -o src/.abella_lib.objs/byte/depend.cmo -c -impl src/depend.ml)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -no-alias-deps -opaque -o src/.abella_lib.objs/byte/prover.cmo -c -impl src/prover.ml)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella.eobjs/byte -I /opt/local/lib/ocaml/site-lib/cmdliner -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -I src/.abella_lib.objs/byte -no-alias-deps -opaque -o src/.abella.eobjs/byte/dune__exe__Abella.cmi -c -intf src/abella.mli)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_doc.eobjs/byte -I /opt/local/lib/ocaml/site-lib/cmdliner -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -I src/.abella_lib.objs/byte -no-alias-deps -opaque -o src/.abella_doc.eobjs/byte/dune__exe__Abella_doc.cmi -c -intf src/abella_doc.mli)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_dep.eobjs/byte -I /opt/local/lib/ocaml/site-lib/cmdliner -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -I src/.abella_lib.objs/byte -no-alias-deps -opaque -o src/.abella_dep.eobjs/byte/dune__exe__Abella_dep.cmi -c -intf src/abella_dep.mli)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_dep.eobjs/byte -I /opt/local/lib/ocaml/site-lib/cmdliner -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -I src/.abella_lib.objs/byte -intf-suffix .ml -no-alias-deps -opaque -o src/.abella_dep.eobjs/byte/dune__exe__Abella_dep.cmo -c -impl src/abella_dep.ml)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_doc.eobjs/byte -I /opt/local/lib/ocaml/site-lib/cmdliner -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -I src/.abella_lib.objs/byte -intf-suffix .ml -no-alias-deps -opaque -o src/.abella_doc.eobjs/byte/dune__exe__Abella_doc.cmo -c -impl src/abella_doc.ml)
$ (cd _build/default && /opt/local/bin/ocamldep -modules -impl src/parser.ml) > _build/default/src/.abella_lib.objs/parser.impl.d
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella.eobjs/byte -I /opt/local/lib/ocaml/site-lib/cmdliner -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -I src/.abella_lib.objs/byte -intf-suffix .ml -no-alias-deps -opaque -o src/.abella.eobjs/byte/dune__exe__Abella.cmo -c -impl src/abella.ml)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I src/.abella_lib.objs/byte -I /opt/local/lib/ocaml/site-lib/seq -I /opt/local/lib/ocaml/site-lib/yojson -intf-suffix .ml -no-alias-deps -opaque -o src/.abella_lib.objs/byte/parser.cmo -c -impl src/parser.ml)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -a -o src/abella_lib.cma src/.abella_lib.objs/byte/version.cmo src/.abella_lib.objs/byte/pretty.cmo src/.abella_lib.objs/byte/extensions.cmo src/.abella_lib.objs/byte/state.cmo src/.abella_lib.objs/byte/term.cmo src/.abella_lib.objs/byte/unifyty.cmo src/.abella_lib.objs/byte/graph.cmo src/.abella_lib.objs/byte/subordination.cmo src/.abella_lib.objs/byte/unify.cmo src/.abella_lib.objs/byte/context.cmo src/.abella_lib.objs/byte/metaterm.cmo src/.abella_lib.objs/byte/typing.cmo src/.abella_lib.objs/byte/abella_types.cmo src/.abella_lib.objs/byte/tactics.cmo src/.abella_lib.objs/byte/output.cmo src/.abella_lib.objs/byte/checks.cmo src/.abella_lib.objs/byte/parser.cmo src/.abella_lib.objs/byte/lexer.cmo src/.abella_lib.objs/byte/prover.cmo src/.abella_lib.objs/byte/filepath.cmo src/.abella_lib.objs/byte/accumulate.cmo src/.abella_lib.objs/byte/depend.cmo src/.abella_lib.objs/byte/abella_doc_dist.cmo)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -o src/abella_dep.bc /opt/local/lib/ocaml/site-lib/seq/seq.cma /opt/local/lib/ocaml/site-lib/yojson/yojson.cma src/abella_lib.cma /opt/local/lib/ocaml/unix.cma /opt/local/lib/ocaml/site-lib/cmdliner/cmdliner.cma src/.abella_dep.eobjs/byte/dune__exe__Abella_dep.cmo)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -o src/abella.bc /opt/local/lib/ocaml/site-lib/seq/seq.cma /opt/local/lib/ocaml/site-lib/yojson/yojson.cma src/abella_lib.cma /opt/local/lib/ocaml/unix.cma /opt/local/lib/ocaml/site-lib/cmdliner/cmdliner.cma src/.abella.eobjs/byte/dune__exe__Abella.cmo)
$ (cd _build/default && /opt/local/bin/ocamlc -w @1..3@5..28@30..39@43@46..47@49..57@61..62@67@69-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -o src/abella_doc.bc /opt/local/lib/ocaml/site-lib/seq/seq.cma /opt/local/lib/ocaml/site-lib/yojson/yojson.cma src/abella_lib.cma /opt/local/lib/ocaml/unix.cma /opt/local/lib/ocaml/site-lib/cmdliner/cmdliner.cma src/.abella_doc.eobjs/byte/dune__exe__Abella_doc.cmo)
P. S. If we could have bytecode target in the master branch (not as a default one, of course, but just available to be chosen), it would be great.
If you run make all-release abella.install
, it will create a file called abella.install
that has instructions for all the files that need to be installed. The format of the file should be fairly obvious.
P. S. If we could have bytecode target in the master branch (not as a default one, of course, but just available to be chosen), it would be great.
I agree, but unfortunately I am leaving for winter break in a few hours until the end of the year. It will have to happen in the 2.0.9 bugfix release, probably out in early February.
@chaudhuri Got it. Until then I can make a local patch for Macports.
Thank you very much for your help here. (And sorry that it took so long – I should have remembered that this variable is needed in the environment, not just in Dune itself.)
@chaudhuri When you get time to fix bytecode builds, please do.
Thanks for the reminder. Will get to it as soon as I can.
Thanks for the reminder. Will get to it as soon as I can.
Thank you!
Sorry for the delays. Can you check if the 2.0.8.2 release compiles for you out of the box? The DUNE
variable in the Makefile
can be tweaked as needed for your own version of Dune, but otherwise OPAM should automatically switch to bytecode for arch=ppc32|ppc64
. If you're not using OPAM to build, you would have to also set the BYTECODE
environment variable to some non-empty string such as true
.
The following might possibly work for your case:
$ make BYTECODE=true DUNE="DUNE_CONFIG__COPY_FILE=portable dune" all-release abella.install
@chaudhuri Thank you very much! I will test it soon.
Sorry, I got overwhelmed by other stuff. Will deal with this one now.
@chaudhuri I am a bit lost. abella
seems to need new dependencies now, ocaml-[o]curl
and ocaml-base64
. I have made portfiles for them and installed both ports, however abella
build does not find one of the components:
---> Building abella
Executing: cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_abella/abella/work/abella-2.0.8.2" && /usr/bin/make -w all-release
make: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_abella/abella/work/abella-2.0.8.2'
dune build --release src/abella.bc src/abella_doc.bc src/abella_dep.bc
(cd _build/.sandbox/0d362756bbcea03397ba3c0024bb9af3/default && /opt/local/bin/menhir --explain src/parser.mly --base src/parser --infer-read-reply src/parser__mock.mli.inferred)
Warning: one state has shift/reduce conflicts.
Warning: one shift/reduce conflict was arbitrarily resolved.
(cd _build/default && /opt/local/bin/ocamlc -w -40 -g -o src/abella_doc.bc /opt/local/lib/ocaml/unix.cma /opt/local/lib/ocaml/site-lib/seq/seq.cma /opt/local/lib/ocaml/site-lib/re/re.cma /opt/local/lib/ocaml/site-lib/yojson/yojson.cma /opt/local/lib/ocaml/site-lib/base64/base64.cma /opt/local/lib/ocaml/site-lib/curl/curl.cma src/abella_lib.cma /opt/local/lib/ocaml/site-lib/cmdliner/cmdliner.cma src/.abella_doc.eobjs/byte/dune__exe.cmo src/.abella_doc.eobjs/byte/dune__exe__Abella_doc_dist.cmo src/.abella_doc.eobjs/byte/dune__exe__Abella_doc.cmo)
File "_none_", line 1:
Error: I/O error: dllcurl-helper.so: No such file or directory
(cd _build/default && /opt/local/bin/ocamlc -w -40 -g -o src/abella.bc /opt/local/lib/ocaml/unix.cma /opt/local/lib/ocaml/site-lib/seq/seq.cma /opt/local/lib/ocaml/site-lib/re/re.cma /opt/local/lib/ocaml/site-lib/yojson/yojson.cma /opt/local/lib/ocaml/site-lib/base64/base64.cma /opt/local/lib/ocaml/site-lib/curl/curl.cma src/abella_lib.cma /opt/local/lib/ocaml/site-lib/cmdliner/cmdliner.cma src/.abella.eobjs/byte/dune__exe__Abella.cmo)
File "_none_", line 1:
Error: I/O error: dllcurl-helper.so: No such file or directory
(cd _build/default && /opt/local/bin/ocamlc -w -40 -g -o src/abella_dep.bc /opt/local/lib/ocaml/unix.cma /opt/local/lib/ocaml/site-lib/seq/seq.cma /opt/local/lib/ocaml/site-lib/re/re.cma /opt/local/lib/ocaml/site-lib/yojson/yojson.cma /opt/local/lib/ocaml/site-lib/base64/base64.cma /opt/local/lib/ocaml/site-lib/curl/curl.cma src/abella_lib.cma /opt/local/lib/ocaml/site-lib/cmdliner/cmdliner.cma src/.abella_dep.eobjs/byte/dune__exe__Abella_dep.cmo)
File "_none_", line 1:
Error: I/O error: dllcurl-helper.so: No such file or directory
make: *** [all-release] Error 1
It is installed in fact though:
./opt/local/lib/ocaml/site-lib/curl/curl.cma
./opt/local/lib/ocaml/site-lib/curl/curl.cmi
./opt/local/lib/ocaml/site-lib/curl/curl.cmt
./opt/local/lib/ocaml/site-lib/curl/curl.cmti
./opt/local/lib/ocaml/site-lib/curl/curl.mli
./opt/local/lib/ocaml/site-lib/curl/curl_lwt.cmi
./opt/local/lib/ocaml/site-lib/curl/curl_lwt.cmo
./opt/local/lib/ocaml/site-lib/curl/curl_lwt.cmt
./opt/local/lib/ocaml/site-lib/curl/curl_lwt.cmti
./opt/local/lib/ocaml/site-lib/curl/curl_lwt.mli
./opt/local/lib/ocaml/site-lib/curl/libcurl-helper.a
./opt/local/lib/ocaml/site-lib/curl/META
./opt/local/lib/ocaml/site-lib/stublibs/dllcurl-helper.so
./opt/local/lib/ocaml/site-lib/stublibs/dllcurl-helper.so.owner
What could I try to make it work?
I can remove the libcurl dependency for the 2.0.8 branch, but please be advised that it's going to be a hard dependency from 2.1.0 onwards. I am honestly surprised that libcurl is not working on this platform, but maybe the issue is on the OCaml side.
@chaudhuri curl
itself works, of course. It could be either an issue with its OCaml wrapper (which does seem to have issues with its install target) or otherwise I am doing something wrong, which is also possible. The needed file gets installed in /opt/local/lib/ocaml/site-lib/stublibs/dllcurl-helper.so
, maybe it requires an explicit path to be passed?
@chaudhuri If it is not a burden for you, it will be helpful to have it dropped from 2.0.8 branch, since then it can be updated for us, and by the time of 2.1.0 we can hopefully figure out what goes wrong with ocaml-ocurl
(the issue is likely with that library or our set-up, unrelated to abella
).
Sorry for the delay with this. I'll make a new branch without a libcurl dependency this week-end. Kind of a busy week for us here and I can't get to it before then.
@chaudhuri Thank you!
I've published a 2.0.8.3 release without a libcurl dependency.
@chaudhuri I think this worked, thank you very much.
36-25% /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_abella/abella/work/abella-2.0.8.3/_build/default/src/abella.bc --version
2.0.8.3
Perhaps abella.install
should be modified to reflect bytecode option as well?
Ah, perhaps I need to pass BYTECODE=true
to destroot env as well, not only to the build.
I cannot figure out how to make install target work, abella.install
does not seem to do install but only generates the specification, but we can move binaries manually.
Yes, Abella does not do the install itself, since OPAM uses the .install
file to do the installation. Without OPAM, you'll have to do some manual
moving/installing of binaries, I'm afraid. If there's anything confusing in
the .install
file, I can try to explain.
Message ID: @.***>
I think I can handle installation via portfile code, no issues. Thank you.
Closing the issue as fixed.
Cool! Thanks for maintaining Abella on a platform that I wouldn't be able to do myself.
While 2.0.7 built fine (after fixing bytecode target), 2.0.8 fails now:
The log has:
What is going wrong?