Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error due to "Unbound module Ethernet__Ethernet_wire" #630

Open
gspadotto opened this issue Mar 25, 2023 · 7 comments · May be fixed by #640
Open

Compilation error due to "Unbound module Ethernet__Ethernet_wire" #630

gspadotto opened this issue Mar 25, 2023 · 7 comments · May be fixed by #640

Comments

@gspadotto
Copy link

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"}:

Ethernet__Ethernet_wire.set_ethernet_src smac 0 frame;

I also had to comment out these lines:
https://github.com/moby/vpnkit/blob/master/dune#L14-L17

@valof
Copy link

valof commented Jan 21, 2024

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

@RyanGibb
Copy link

RyanGibb commented Mar 1, 2024

Looks like this is due to mirage/ethernet@61dfc14

@casaroli casaroli linked a pull request Apr 19, 2024 that will close this issue
@LaurentGoderre
Copy link
Contributor

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: """

@djs55
Copy link
Collaborator

djs55 commented Aug 6, 2024

@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)

@LaurentGoderre
Copy link
Contributor

@djs55 that is what I am working on yes but the e2e tests are failing so I am trying to resolve it

@LaurentGoderre
Copy link
Contributor

#641

@LaurentGoderre
Copy link
Contributor

LaurentGoderre commented Aug 26, 2024

@djs55 I believe we can close this now

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 a pull request may close this issue.

5 participants