Skip to content

compile fixes#9

Open
justinc1 wants to merge 2 commits intomshinwell:masterfrom
justinc1:master
Open

compile fixes#9
justinc1 wants to merge 2 commits intomshinwell:masterfrom
justinc1:master

Conversation

@justinc1
Copy link

@justinc1 justinc1 commented Mar 8, 2018

I had to apply those small changes to be able to execute opam install -j4 -y libmonda-gdb.

justinc1 added 2 commits March 8, 2018 15:35
Due to hardcoded GDB_ROOT and OCAML_ROOT, $CC was not able to find
headers.

Fixes mshinwell#7

Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
Add to gdb_backend/to_gdb.c
stack.h for iterate_over_block_local_vars()
target/target.h for target_read_memory()

Add to gdb_backedn/from_gdb.c
value.h for value_lval_const(), value_bits_synthetic_pointer()
c-lang.h for c_val_print()

Func c_val_print() was called with 9 parameters, but declaration in
c-lang.h has only 8:
extern void c_val_print (struct type *, const gdb_byte *,
                         int, CORE_ADDR,
                         struct ui_file *, int,
                         const struct value *,
                         const struct value_print_options *);

I guess the last (depth) param is excessive, so it was removed that one.

Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
@justinc1
Copy link
Author

justinc1 commented Mar 8, 2018

When I try to 'opam install mirage' I get errors like:

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
∗  installed base-num.base
∗  installed num.0
∗  installed conf-m4.1
∗  installed ocamlfind.1.7.3-1
∗  installed base-bytes.base
∗  installed ocamlbuild.0.12.0
∗  installed uchar.0.0.2
∗  installed ocamlgraph.1.8.8
∗  installed jbuilder.1.0+beta18
[ERROR] The compilation of ppx_derivers failed at "jbuilder build -p ppx_derivers -j 4".
[ERROR] The compilation of result failed at "jbuilder build -p result -j 4".
[ERROR] The compilation of ppx_traverse_builtins failed at "jbuilder build -p ppx_traverse_builtins -j 4".
[ERROR] The compilation of ocaml-compiler-libs failed at "jbuilder build -p ocaml-compiler-libs -j 4".
[ERROR] The compilation of sexplib failed at "jbuilder build -p sexplib -j 4".

#=== ERROR while installing ocaml-compiler-libs.v0.10.0 =======================#
# opam-version 1.2.2
# os           linux
# command      jbuilder build -p ocaml-compiler-libs -j 4
# path         /home/xlab/.opam/4.05.0+monda/build/ocaml-compiler-libs.v0.10.0
# compiler     4.05.0+monda
# exit-code    1
# env-file     /home/xlab/.opam/4.05.0+monda/build/ocaml-compiler-libs.v0.10.0/ocaml-compiler-libs-1840-8de6af.env
# stdout-file  /home/xlab/.opam/4.05.0+monda/build/ocaml-compiler-libs.v0.10.0/ocaml-compiler-libs-1840-8de6af.out
# stderr-file  /home/xlab/.opam/4.05.0+monda/build/ocaml-compiler-libs.v0.10.0/ocaml-compiler-libs-1840-8de6af.err
### stderr ###
# [...]
# /tmp/camlstartup5fa0cf.s: Assembler messages:
# /tmp/camlstartup5fa0cf.s:113: Error: can't resolve `caml_startup__code_end' {*UND* section} - `caml_startup__code_begin' {*UND* section}
# File "caml_startup", line 1:
# Error: Assembler error, input left in file /tmp/camlstartup5fa0cf.s
#     ocamlopt src/shadow/ocaml_shadow.cmxs (exit 2)
# (cd _build/default && /home/xlab/.opam/4.05.0+monda/bin/ocamlopt.opt -w -40 -safe-string -w -49 -g -shared -linkall -I src/shadow -o src/shadow/ocaml_shadow.cmxs src/shadow/ocaml_shadow.cmxa)
# /tmp/camlstartupa691a3.s: Assembler messages:
# /tmp/camlstartupa691a3.s:113: Error: can't resolve `caml_startup__code_end' {*UND* section} - `caml_startup__code_begin' {*UND* section}
# File "caml_startup", line 1:
# Error: Assembler error, input left in file /tmp/camlstartupa691a3.s


#=== ERROR while installing ppx_derivers.1.0 ==================================#
# opam-version 1.2.2
...
xlab@or-mir-1:~$ ocaml -version
The OCaml toplevel, version 4.05.0+dev0-2016-08-01

I have no idea if this is related to this pull request (I have zero OCaml knowledge). I was able to install, compile and run mirage with 4.05.0 switch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant