Open gspadotto opened 1 year ago
similar here, trying to build for Ubuntu:
xxx@DESKTOP-ES15K2K:~/git/vpnkit$ make opam exec -- dune build --profile release make[1]: Entering directory '/home/xxx/git/vpnkit/_build/default' GEN src/bin/version.ml make[1]: Leaving directory '/home/xxx/git/vpnkit/_build/default' File "src/hostnet/hostnet_dns.ml", line 260, characters 6-46: 260 | Ethernet__Ethernet_wire.set_ethernet_src smac 0 frame; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error: Unbound module Ethernet__Ethernet_wire File "dune", line 14, characters 0-127: 14 | (rule 15 | (target licenses.json) 16 | (deps deps.csv (:gen ./scripts/licenses.exe)) 17 | (action (run %{gen} -out %{target} -in %{deps}))) Fatal error: exception Failure("unknown licenses for uri-sexp.4.4.0, uri.4.4.0, sha.1.15.4, re.1.11.0, ptime.1.1.0, ppx_cstruct.6.2.0, ounit2.2.2.7, ounit.2.2.7, optint.0.3.0, ocaml-system.4.13.1, num.1.5, mirage-kv.6.1.1, metrics.0.4.1, menhirSdk.20231231, menhirLib.20231231, menhirCST.20231231, menhir.20231231, macaddr-sexp.5.5.0, macaddr-cstruct.5.5.0, macaddr.5.5.0, lwt.5.7.0, luv_unix.0.5.1, luv.0.5.12, jsonm.1.0.2, ipaddr-sexp.5.5.0, ipaddr.5.5.0, ethernet.3.2.0, dune-configurator.3.13.0, dune.3.13.0, ctypes.0.21.1, cstruct-sexp.6.2.0, cstruct-lwt.6.2.0, cstruct.6.2.0, csexp.1.5.2, cohttp-lwt.5.3.0, cohttp.5.3.1, bigstringaf.0.9.1, base64.3.5.1, arp.3.1.0, angstrom.0.16.0") make: *** [Makefile:6: vpnkit.exe] Error 1
Looks like this is due to https://github.com/mirage/ethernet/pull/10/commits/61dfc143518fadb5610473e533f75c2a2856b7da
I have managed to pin the dependencies to a state that builds successfully without changing the codebase. Here is the diff I have so far
diff --git a/vpnkit.opam b/vpnkit.opam
index 1c5b6ef2..b9384b0b 100644
--- a/vpnkit.opam
+++ b/vpnkit.opam
@@ -1,3 +1,4 @@
+version: "0.5.0"
opam-version: "2.0"
maintainer: "David Scott <dave.scott@docker.com>"
authors: [
@@ -23,12 +24,12 @@ build: [
depends: [
"ocaml" {>="4.08.0"}
- "dune"
+ "dune" {< "3.1.0"}
"alcotest" {with-test}
"ounit" {with-test}
"tar" {>= "1.0.1"}
"ipaddr" {>= "5.0.1"}
- "lwt" {>= "5.4.0"}
+ "lwt" {>= "5.4.0" & < "5.6.0"}
"luv"
"luv_unix"
"tcpip" {>= "7.0.0"}
@@ -36,15 +37,15 @@ depends: [
"cstruct" {>= "6.0.0"}
"pcap-format" {>= "0.4.0"}
"cmdliner" {< "1.1.0"}
- "charrua" {>= "1.3.0"}
- "charrua-client"
- "charrua-server"
+ "charrua" {>= "1.3.0" }
+ "charrua-client" {>= "1.3.0" }
+ "charrua-server"{>= "1.3.0" }
"hvsock" {>= "2.0.0"}
"fd-send-recv" {>= "2.0.0"}
"logs"
"fmt"
"astring"
- "ethernet" {>= "3.0.0"}
+ "ethernet" {>= "3.0.0" & < "3.1.0"}
"arp" {>= "3.0.0"}
"mirage-entropy" {>= "0.5.0"}
"mirage-kv" {>= "4.0.0"}
@@ -54,7 +55,7 @@ depends: [
"mirage-stack"
"cohttp-lwt" {>= "0.99.0"}
"protocol-9p" {>= "2.0.0"}
- "mirage-vnetif" {>= "0.5.0"}
+ "mirage-vnetif" {>= "0.5.0" & < "0.6.0"}
"io-page-unix"
"uuidm"
"ezjsonm" {>= "0.4.0"}
@@ -66,6 +67,7 @@ depends: [
"mirage-random-stdlib"
"re" {>= "1.9.0"}
"ppx_inline_test"
+ "result"
]
synopsis: "VPN-friendly networking devices for HyperKit"
description: """
@LaurentGoderre pinning the dependencies sounds like a good initial step! Would you have time to create a PR? We could update the code to use the latest versions later (since that will be more invasive)
@djs55 that is what I am working on yes but the e2e tests are failing so I am trying to resolve it
@djs55 I believe we can close this now
I am trying to build the repository from the master branch (as there are no binary distributions) on a Mac, but there are references to data structures that are no more present in "ethernet" {>= "3.0.0"}:
https://github.com/moby/vpnkit/blob/ee2e5c0f7fd3100715957af2d6b497fbf90806db/src/hostnet/hostnet_dns.ml#L256
I also had to comment out these lines: https://github.com/moby/vpnkit/blob/master/dune#L14-L17