Comments (5)
There's a genuine clash here -- you should never be linking mirage-net-macosx (which provides a Mac Vmnet version of the Netif driver) with mirage-net-unix (which provides a tuntap Unix version of Netif) at the same time.
What's probably happening is that something is manually linking mirage-net-unix in, or otherwise pulling it in --Mort might be able to debug this in person better than me (i'm abroad atm)
On 15 Jul 2015, at 05:47, alistairfisher [email protected] wrote:
Tried to make main.ml, using a fresh install of Mirage on Ocaml 4.02.01 (fully up to date) on OS X.10. Failed due to inconsistent assumptions, have dumped the terminal output here.
findlib: [WARNING] Interface netif.cmi occurs in several directories: /Users/alistair/.opam/4.02.1/lib/mirage-net-macosx, /Users/alistair/.opam/4.02.1/lib/mirage-net-unix
ocamlfind ocamlc -c -g -annot -bin-annot -principal -thread -strict-sequence -package tcpip.udp -package tcpip.ipv4-unix -package tcpip.ethif-unix -package tcpip.dhcpv4 -package mirage-types.lwt -package mirage-types -package mirage-net-macosx -package mirage-console.unix -package mirage-clock-unix -package lwt -package ipaddr -package io-page -package cstruct.syntax -package cstruct -package bytes -package lwt.syntax -syntax camlp4o -o main.cmo main.ml findlib: [WARNING] Interface netif.cmi occurs in several directories: /Users/alistair/.opam/4.02.1/lib/mirage-net-macosx, /Users/alistair/.opam/4.02.1/lib/mirage-net-unix
ocamlfind ocamlopt -c -g -annot -bin-annot -principal -thread -strict-sequence -package tcpip.udp -package tcpip.ipv4-unix -package tcpip.ethif-unix -package tcpip.dhcpv4 -package mirage-types.lwt -package mirage-types -package mirage-net-macosx -package mirage-console.unix -package mirage-clock-unix -package lwt -package ipaddr -package io-page -package cstruct.syntax -package cstruct -package bytes -package lwt.syntax -syntax camlp4o -o DHCPServer.cmx DHCPServer.ml findlib: [WARNING] Interface netif.cmi occurs in several directories: /Users/alistair/.opam/4.02.1/lib/mirage-net-macosx, /Users/alistair/.opam/4.02.1/lib/mirage-net-unix
ocamlfind ocamlopt -c -g -annot -bin-annot -principal -thread -strict-sequence -package tcpip.udp -package tcpip.ipv4-unix -package tcpip.ethif-unix -package tcpip.dhcpv4 -package mirage-types.lwt -package mirage-types -package mirage-net-macosx -package mirage-console.unix -package mirage-clock-unix -package lwt -package ipaddr -package io-page -package cstruct.syntax -package cstruct -package bytes -package lwt.syntax -syntax camlp4o -o main.cmx main.ml findlib: [WARNING] Interface netif.cmi occurs in several directories: /Users/alistair/.opam/4.02.1/lib/mirage-net-macosx, /Users/alistair/.opam/4.02.1/lib/mirage-net-unix
ocamlfind ocamlopt -g -linkpkg -linkpkg -thread -package tcpip.udp -package tcpip.ipv4-unix -package tcpip.ethif-unix -package tcpip.dhcpv4 -package mirage-types.lwt -package mirage-types -package mirage-net-macosx -package mirage-console.unix -package mirage-clock-unix -package lwt -package ipaddr -package io-page -package cstruct.syntax -package cstruct -package bytes -package lwt.syntax -syntax camlp4o DHCPServer.cmx main.cmx -o main.native findlib: [WARNING] Interface netif.cmi occurs in several directories: /Users/alistair/.opam/4.02.1/lib/mirage-net-macosx, /Users/alistair/.opam/4.02.1/lib/mirage-net-unix File "none", line 1: Error: Files main.cmx and /Users/alistair/.opam/4.02.1/lib/mirage-net-macosx/mirage-net-macosx.cmxa make inconsistent assumptions over interface Netif Command exited with code 2. Compilation unsuccessful after building 7 targets (0 cached) in 00:00:00. make: *** [main.native] Error 10
—
Reply to this email directly or view it on GitHub #5.
from mirage-net-macosx.
Mort's in Nottingham today/tomorrow...
Alistair-- if you can point me to an online copy of the code in question, I
can take a quick look and see if anything obvious. In practice if you "opam
remove mirage-net-unix mirage-net-macosx" perhaps that will let you build
it for now?
On 15 July 2015 at 15:05, Anil Madhavapeddy [email protected]
wrote:
There's a genuine clash here -- you should never be linking
mirage-net-macosx (which provides a Mac Vmnet version of the Netif driver)
with mirage-net-unix (which provides a tuntap Unix version of Netif) at the
same time.What's probably happening is that something is manually linking
mirage-net-unix in, or otherwise pulling it in --Mort might be able to
debug this in person better than me (i'm abroad atm)On 15 Jul 2015, at 05:47, alistairfisher [email protected]
wrote:Tried to make main.ml, using a fresh install of Mirage on Ocaml 4.02.01
(fully up to date) on OS X.10. Failed due to inconsistent assumptions, have
dumped the terminal output here.findlib: [WARNING] Interface netif.cmi occurs in several directories:
/Users/alistair/.opam/4.02.1/lib/mirage-net-macosx,
/Users/alistair/.opam/4.02.1/lib/mirage-net-unixocamlfind ocamlc -c -g -annot -bin-annot -principal -thread
-strict-sequence -package tcpip.udp -package tcpip.ipv4-unix -package
tcpip.ethif-unix -package tcpip.dhcpv4 -package mirage-types.lwt -package
mirage-types -package mirage-net-macosx -package mirage-console.unix
-package mirage-clock-unix -package lwt -package ipaddr -package io-page
-package cstruct.syntax -package cstruct -package bytes -package lwt.syntax
-syntax camlp4o -o main.cmo main.ml findlib: [WARNING] Interface
netif.cmi occurs in several directories:
/Users/alistair/.opam/4.02.1/lib/mirage-net-macosx,
/Users/alistair/.opam/4.02.1/lib/mirage-net-unix
ocamlfind ocamlopt -c -g -annot -bin-annot -principal -thread
-strict-sequence -package tcpip.udp -package tcpip.ipv4-unix -package
tcpip.ethif-unix -package tcpip.dhcpv4 -package mirage-types.lwt -package
mirage-types -package mirage-net-macosx -package mirage-console.unix
-package mirage-clock-unix -package lwt -package ipaddr -package io-page
-package cstruct.syntax -package cstruct -package bytes -package lwt.syntax
-syntax camlp4o -o DHCPServer.cmx DHCPServer.ml findlib: [WARNING]
Interface netif.cmi occurs in several directories:
/Users/alistair/.opam/4.02.1/lib/mirage-net-macosx,
/Users/alistair/.opam/4.02.1/lib/mirage-net-unix
ocamlfind ocamlopt -c -g -annot -bin-annot -principal -thread
-strict-sequence -package tcpip.udp -package tcpip.ipv4-unix -package
tcpip.ethif-unix -package tcpip.dhcpv4 -package mirage-types.lwt -package
mirage-types -package mirage-net-macosx -package mirage-console.unix
-package mirage-clock-unix -package lwt -package ipaddr -package io-page
-package cstruct.syntax -package cstruct -package bytes -package lwt.syntax
-syntax camlp4o -o main.cmx main.ml findlib: [WARNING] Interface
netif.cmi occurs in several directories:
/Users/alistair/.opam/4.02.1/lib/mirage-net-macosx,
/Users/alistair/.opam/4.02.1/lib/mirage-net-unix
ocamlfind ocamlopt -g -linkpkg -linkpkg -thread -package tcpip.udp
-package tcpip.ipv4-unix -package tcpip.ethif-unix -package tcpip.dhcpv4
-package mirage-types.lwt -package mirage-types -package mirage-net-macosx
-package mirage-console.unix -package mirage-clock-unix -package lwt
-package ipaddr -package io-page -package cstruct.syntax -package cstruct
-package bytes -package lwt.syntax -syntax camlp4o DHCPServer.cmx main.cmx
-o main.native findlib: [WARNING] Interface netif.cmi occurs in several
directories: /Users/alistair/.opam/4.02.1/lib/mirage-net-macosx,
/Users/alistair/.opam/4.02.1/lib/mirage-net-unix File "none", line 1:
Error: Files main.cmx and
/Users/alistair/.opam/4.02.1/lib/mirage-net-macosx/mirage-net-macosx.cmxa
make inconsistent assumptions over interface Netif Command exited with code
2. Compilation unsuccessful after building 7 targets (0 cached) in
00:00:00. make: *** [main.native] Error 10
—
Reply to this email directly or view it on GitHub <
https://github.com/mirage/mirage-net-macosx/issues/5>.—
Reply to this email directly or view it on GitHub
#5 (comment)
.
Richard Mortier
[email protected]
from mirage-net-macosx.
Alistair -- or mail [email protected] mailto:[email protected] with the problem, as that'll help the wider developer base as well. This error isn't an obvious one to debug if you havent seen it before.
On 15 Jul 2015, at 07:09, Richard Mortier [email protected] wrote:
Mort's in Nottingham today/tomorrow...
Alistair-- if you can point me to an online copy of the code in question, I
can take a quick look and see if anything obvious. In practice if you "opam
remove mirage-net-unix mirage-net-macosx" perhaps that will let you build
it for now?On 15 July 2015 at 15:05, Anil Madhavapeddy <[email protected] mailto:[email protected]>
wrote:There's a genuine clash here -- you should never be linking
mirage-net-macosx (which provides a Mac Vmnet version of the Netif driver)
with mirage-net-unix (which provides a tuntap Unix version of Netif) at the
same time.What's probably happening is that something is manually linking
mirage-net-unix in, or otherwise pulling it in --Mort might be able to
debug this in person better than me (i'm abroad atm)On 15 Jul 2015, at 05:47, alistairfisher <[email protected] mailto:[email protected]>
wrote:Tried to make main.ml, using a fresh install of Mirage on Ocaml 4.02.01
(fully up to date) on OS X.10. Failed due to inconsistent assumptions, have
dumped the terminal output here.findlib: [WARNING] Interface netif.cmi occurs in several directories:
/Users/alistair/.opam/4.02.1/lib/mirage-net-macosx,
/Users/alistair/.opam/4.02.1/lib/mirage-net-unixocamlfind ocamlc -c -g -annot -bin-annot -principal -thread
-strict-sequence -package tcpip.udp -package tcpip.ipv4-unix -package
tcpip.ethif-unix -package tcpip.dhcpv4 -package mirage-types.lwt -package
mirage-types -package mirage-net-macosx -package mirage-console.unix
-package mirage-clock-unix -package lwt -package ipaddr -package io-page
-package cstruct.syntax -package cstruct -package bytes -package lwt.syntax
-syntax camlp4o -o main.cmo main.ml findlib: [WARNING] Interface
netif.cmi occurs in several directories:
/Users/alistair/.opam/4.02.1/lib/mirage-net-macosx,
/Users/alistair/.opam/4.02.1/lib/mirage-net-unix
ocamlfind ocamlopt -c -g -annot -bin-annot -principal -thread
-strict-sequence -package tcpip.udp -package tcpip.ipv4-unix -package
tcpip.ethif-unix -package tcpip.dhcpv4 -package mirage-types.lwt -package
mirage-types -package mirage-net-macosx -package mirage-console.unix
-package mirage-clock-unix -package lwt -package ipaddr -package io-page
-package cstruct.syntax -package cstruct -package bytes -package lwt.syntax
-syntax camlp4o -o DHCPServer.cmx DHCPServer.ml findlib: [WARNING]
Interface netif.cmi occurs in several directories:
/Users/alistair/.opam/4.02.1/lib/mirage-net-macosx,
/Users/alistair/.opam/4.02.1/lib/mirage-net-unix
ocamlfind ocamlopt -c -g -annot -bin-annot -principal -thread
-strict-sequence -package tcpip.udp -package tcpip.ipv4-unix -package
tcpip.ethif-unix -package tcpip.dhcpv4 -package mirage-types.lwt -package
mirage-types -package mirage-net-macosx -package mirage-console.unix
-package mirage-clock-unix -package lwt -package ipaddr -package io-page
-package cstruct.syntax -package cstruct -package bytes -package lwt.syntax
-syntax camlp4o -o main.cmx main.ml findlib: [WARNING] Interface
netif.cmi occurs in several directories:
/Users/alistair/.opam/4.02.1/lib/mirage-net-macosx,
/Users/alistair/.opam/4.02.1/lib/mirage-net-unix
ocamlfind ocamlopt -g -linkpkg -linkpkg -thread -package tcpip.udp
-package tcpip.ipv4-unix -package tcpip.ethif-unix -package tcpip.dhcpv4
-package mirage-types.lwt -package mirage-types -package mirage-net-macosx
-package mirage-console.unix -package mirage-clock-unix -package lwt
-package ipaddr -package io-page -package cstruct.syntax -package cstruct
-package bytes -package lwt.syntax -syntax camlp4o DHCPServer.cmx main.cmx
-o main.native findlib: [WARNING] Interface netif.cmi occurs in several
directories: /Users/alistair/.opam/4.02.1/lib/mirage-net-macosx,
/Users/alistair/.opam/4.02.1/lib/mirage-net-unix File "none", line 1:
Error: Files main.cmx and
/Users/alistair/.opam/4.02.1/lib/mirage-net-macosx/mirage-net-macosx.cmxa
make inconsistent assumptions over interface Netif Command exited with code
2. Compilation unsuccessful after building 7 targets (0 cached) in
00:00:00. make: *** [main.native] Error 10
—
Reply to this email directly or view it on GitHub <
#5 https://github.com/mirage/mirage-net-macosx/issues/5>.—
Reply to this email directly or view it on GitHub
<#5 (comment) #5 (comment)>
.Richard Mortier
[email protected] mailto:[email protected]
—
Reply to this email directly or view it on GitHub #5 (comment).
from mirage-net-macosx.
I'm fairly sure I've isolated the error in the config file:
open Mirage
let main =
foreign "DHCPServer.Main" (console@->clock@->udpv4@->job)
let udp = direct_udp(default_ipv4(tap0)) <---here
let () =
(add_to_opam_packages, syntax)
add_to_ocamlfind_libraries(["tcpip.udp";"lwt";"tcpip.dhcpv4";"cstruct";"cstruct.syntax";"io-page";"bytes";"mirage-types";"ipaddr"]);
register "network" [
main $ default_console $ default_clock $ udp
]
I didn't realise that OS X didn't provide tap0, I believe it should be fixed if I just acquire my network implementation via netif instead.
from mirage-net-macosx.
That's the one! MacOS X has something called "vmnet" which provides a builtin DHCP server for local services. We built bindings to that instead of tuntap (which requires a kernel module and more messing around)
On 15 Jul 2015, at 07:27, alistairfisher [email protected] wrote:
I'm fairly sure I've isolated the error in the config file:
open Mirage
let main =
foreign "DHCPServer.Main" (console@->clock@->udpv4@->job)let udp = direct_udp(default_ipv4(tap0)) <---here
let () =
(add_to_opam_packages, syntax)
add_to_ocamlfind_libraries(["tcpip.udp";"lwt";"tcpip.dhcpv4";"cstruct";"cstruct.syntax";"io-page";"bytes";"mirage-types";"ipaddr"]);
register "network" [
main $ default_console $ default_clock $ udp
]I didn't realise that OS X didn't provide tap0, I believe it should be fixed if I just acquire my network implementation via netif instead.
—
Reply to this email directly or view it on GitHub #5 (comment).
from mirage-net-macosx.
Related Issues (4)
- doesn't work with static IP address HOT 4
- pls release HOT 3
- Invalid_argument Cstruct.set_len HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mirage-net-macosx.