frenetic-lang / netcore-1.0

Compiler from NetCore to OpenFlow and associated tools.
BSD 3-Clause "New" or "Revised" License
14 stars 3 forks source link

Can't make #60

Open jnule1a opened 11 years ago

jnule1a commented 11 years ago

I had difficulties to install netcore. Could you tell me what is wrong ? Thank you in advance. Here is what happened:

I also tried unsuccessfully to use the stable version:

cschlesi commented 11 years ago

Thanks for the report! There are really three issues here:

  1. The wiki instructions were missing a step.
  2. We use Cabal, not make, as a build system---the Makefile in the netcore directory is something of a red herring.
  3. demo.py is broken.

1

Some NetCore dependences rely on the Happy Haskell parser generator. This needs to be installed before you can build NetCore:

cabal install happy

NB: This should be pre-installed as part of the VM image, but it's not. Hopefully it will be in the future.

2

At this point, we rely on the Cabal build system rather than make (the Makefile was added at some point as a convenience, but it's not supported or recommended and should probably be removed). From the netcore directory, the command to build NetCore is:

cabal install --enable-tests

or:

cabal-dev install --enable-tests

to install in a sandbox in the current directory.

However, you may also want to build a controller instead of just the library. To build the example controller, navigate to netcore/examples directory and run the command:

cabal-dev install . ..

This will build a single controller binary that includes most of the examples. The executable will be located in netcore/examples/cabal-dev/bin/frenetic-example-suite. Running

frenetic-example-suite --repeater

will start a controller with a policy as stated in netcore/examples/Repeater.hs. You can run

frenetic-example-suite --help

for a list of all the available flags, and the file netcore/examples/Main.hs shows which module each flag invokes.

3

As for demo.py, it seems to have broken. I'll add a new report on that.

Cheers, Cole