moby / moby/vpnkit

fail to build on debian11 (arm64)

Open
#551 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
OCaml
Stars
1.2k
Forks
214
PR merge metrics
No merged PRs in 30d

Description

[...]
- /usr/bin/ld: backtrace.pic.o:/home/pi/.opam/4.07.0/.opam-switch/build/ocaml-base-compiler.4.07.0/byterun/backtrace.c:31: multiple definition of `caml_debug_info'; backtrace_prim.pic.o:/home/pi/.opam/4.07.0/.opam-switch/build/ocaml-base-compiler.4.07.0/byterun/backtrace_prim.c:47: first defined here
- collect2: error: ld returned 1 exit status
- make[1]: *** [Makefile:208: libcamlrun_shared.so] Error 1
- make[1]: Leaving directory '/home/pi/.opam/4.07.0/.opam-switch/build/ocaml-base-compiler.4.07.0/byterun'
- make: *** [Makefile:389: coldstart] Error 2
[ERROR] The compilation of ocaml-base-compiler failed at "/home/pi/.opam/opam-init/hooks/sandbox.sh build make world".

#=== ERROR while compiling ocaml-base-compiler.4.07.0 =========================#
# context     2.0.8 | linux/arm64 |  | file:///home/pi/vpnkit/repo/darwin
# path        ~/.opam/4.07.0/.opam-switch/build/ocaml-base-compiler.4.07.0
# command     ~/.opam/opam-init/hooks/sandbox.sh build make world
# exit-code   2
# env-file    /tmp/opam-pi-14142/ocaml-base-compiler-14142-48c407.env
# output-file /tmp/opam-pi-14142/ocaml-base-compiler-14142-48c407.out
### output ###
# [...]
# gcc -c -O2 -fno-strict-aliasing -fwrapv -Wall  -g -fPIC -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DCAML_NAME_SPACE  -o spacetime.pic.o spacetime.c
# gcc -c -O2 -fno-strict-aliasing -fwrapv -Wall  -g -fPIC -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DCAML_NAME_SPACE  -o afl.pic.o afl.c
# gcc -c -O2 -fno-strict-aliasing -fwrapv -Wall  -g -fPIC -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DCAML_NAME_SPACE  -o unix.pic.o unix.c
# gcc -c -O2 -fno-strict-aliasing -fwrapv -Wall  -g -fPIC -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DCAML_NAME_SPACE  -o bigarray.pic.o bigarray.c
# gcc -c -O2 -fno-strict-aliasing -fwrapv -Wall  -g -fPIC -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DCAML_NAME_SPACE  -o main.pic.o main.c
# rm -f libcamlrun_pic.a && ar rc libcamlrun_pic.a  interp.pic.o misc.pic.o stacks.pic.o fix_code.pic.o startup_aux.pic.o startup.pic.o freelist.pic.o major_gc.pic.o minor_gc.pic.o memory.pic.o alloc.pic.o roots.pic.o globroots.pic.o fail.pic.o signals.pic.o signals_byt.pic.o printexc.pic.o backtrace_prim.pic.o backtrace.pic.o compare.pic.o ints.pic.o floats.pic.o str.pic.o array.pic.o io.pic.o[...]
# gcc -shared -o libcamlrun_shared.so interp.pic.o misc.pic.o stacks.pic.o fix_code.pic.o startup_aux.pic.o startup.pic.o freelist.pic.o major_gc.pic.o minor_gc.pic.o memory.pic.o alloc.pic.o roots.pic.o globroots.pic.o fail.pic.o signals.pic.o signals_byt.pic.o printexc.pic.o backtrace_prim.pic.o backtrace.pic.o compare.pic.o ints.pic.o floats.pic.o str.pic.o array.pic.o io.pic.o extern.pic.o [...]
# /usr/bin/ld: backtrace.pic.o:/home/pi/.opam/4.07.0/.opam-switch/build/ocaml-base-compiler.4.07.0/byterun/backtrace.c:31: multiple definition of `caml_debug_info'; backtrace_prim.pic.o:/home/pi/.opam/4.07.0/.opam-switch/build/ocaml-base-compiler.4.07.0/byterun/backtrace_prim.c:47: first defined here
# collect2: error: ld returned 1 exit status
# make[1]: *** [Makefile:208: libcamlrun_shared.so] Error 1
# make[1]: Leaving directory '/home/pi/.opam/4.07.0/.opam-switch/build/ocaml-base-compiler.4.07.0/byterun'
# make: *** [Makefile:389: coldstart] Error 2



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions were aborted
│ ∗ install ocaml 4.07.0
└─
┌─ The following actions failed
│ λ build ocaml-base-compiler 4.07.0
└─
┌─ The following changes have been performed (the rest was aborted)
│ ∗ install base-bigarray base
│ ∗ install base-threads  base
│ ∗ install base-unix     base
└─
# Run eval $(opam env) to update the current shell environment
Switch initialisation failed: clean up? ('n' will leave the switch partially installed) [Y/n] y
'opam init -v -n --comp=4.07.0 --switch=4.07.0 local repo/darwin' failed.
make: *** [Makefile:27: /home/pi/vpnkit/_build/opam] Error 31

opam version: 2.0.8
installed ocaml version: 4.11.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the ocaml-base-compiler 4.07.0 build on Debian 11 arm64 using the reported opam command. Inspect byterun/backtrace.c, byterun/backtrace_prim.c, and Makefile targets at lines 208 and 389 around the duplicate caml_debug_info definition. Done means the compiler build completes without the linker error.

Written by the indexing model from the issue text.

Assessment

Tech stack
debian, linux, ocaml
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.