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

FTBFS: Multiple rules generated for _build/default/_doc/hostnet/index.html #240

Closed
gerboland opened this issue Jun 12, 2017 · 5 comments
Closed

Comments

@gerboland
Copy link

Hey,
I've checked out today's vpnkit (e203f93), following the README installed the opam dependencies ok, but when trying to build I hit this barrier:

$ make
[ERROR] No package named hostnet found.
opam config subst src/bin/depends.ml || true
cp src/bin/depends.ml src/bin/depends.tmp
sed -e 's/££VERSION££/e203f930f850bef3e4514a19abe441f466630c8c/g' src/bin/depends.tmp > src/bin/depends.ml
cp src/bin/depends.ml src/bin/depends.tmp
sed -e 's/££HOSTNET_PINNED££//g' src/bin/depends.tmp > src/bin/depends.ml
cp src/bin/depends.ml src/bin/depends.tmp
sed -e 's/££HVSOCK_PINNED££//g' src/bin/depends.tmp > src/bin/depends.ml
jbuilder build src/bin/main.exe
Multiple rules generated for _build/default/_doc/hostnet/index.html
make: *** [vpnkit.exe] Error 1

I'm trying to understand jbuilder, but if someone can see what I'm missing, I'd appreciate a hint.

Here's my opam config report: https://pastebin.com/4mktVd6x
and installed deps: https://pastebin.com/zxip0JqT

Thanks
-G

@gerboland
Copy link
Author

Well this helps: https://pastebin.com/FLkRURxy but I don't know enough to understand why.

With that patch, and ensuring cstruct is at version 2.4.1 (version 3 is out), it all compiles ok.

@samoht
Copy link
Member

samoht commented Jun 13, 2017

Unfortunately, there are few more steps to do before running make, as described In the README, as vpnkit vendors its dependencies in the repo/ directory. It would be nice if the repo were buildable with upstream components, but we are not there yet.

The error you see is because jbuilder is scanning that repo directory -- the right way to avoid this is to add a jbuild-ignore file at the root of the repository, containing:

repo

Let me know if you manage to go further -- it would be nice if vpnkit was indeed easier to build.

@gerboland
Copy link
Author

(Balated) Thanks for the feedback. Agreed building not super easy, I'll see if I can help at all on that

@yuce
Copy link

yuce commented Jul 22, 2017

Thanks to the comments in this thread, I was able to compile vpnkit on MacOS. Here is what worked for me for anyone else struggling to compile it on MacOS. I assume brew is installed and up-to-date.

Install opam:

brew install opam

Update pkg-config. I had 0.28 which didn't work, 0.29.2 works:

brew upgrade pkg-config

Latest Ocaml 4.05 is not supported, so switch to an older version:

opam switch 4.04.2

Update the environment for the switched OCaml:

eval `opam config`

Clone vpnkit repo and cd to it:

https://github.com/moby/vpnkit.git
cd vpnkit

Get the dependencies:

opam remote add vpnkit ./repo/darwin
opam install --deps-only slirp
opam install cstruct=2.4.1
opam install uwt

Ignore the repo dir:

printf "repo\n" > ./repo/jbuild-ignore

You are now ready to compile:

make

@samoht
Copy link
Member

samoht commented Aug 2, 2017

The build instructions specified in the README should now work properly:

cd [path to vpnkit source]
opam remote add vpnkit ./repo/darwin
opam install --deps-only vpnkit
make

Please re-open if that's not the case.

@samoht samoht closed this as completed Aug 2, 2017
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

No branches or pull requests

3 participants