1 Open vSwitch support on Windows is a work in progress. This file describes
2 the planned build system to compile Open vSwitch on Windows. Once the work
3 is complete, this file will be replaced by a INSTALL.Windows file.
5 Autoconf, Automake and Visual C++:
6 ---------------------------------
7 Open vSwitch on Linux uses autoconf and automake for generating Makefiles.
8 It will be useful to maintain the same build system while compiling on Windows
9 too. One approach is to compile Open vSwitch in a MinGW environment that
10 contains autoconf and automake utilities and then use Visual C++ as a compiler
13 The following explains the steps in some detail.
14 * Install Mingw on a Windows machine by following the instructions at:
15 http://www.mingw.org/wiki/Getting_Started
17 This should install mingw at C:\Mingw and msys at C:\Mingw\msys.
18 Add "C:\MinGW\bin" and "C:\Mingw\msys\1.0\bin" to PATH environment variable
21 You can either use the MinGW installer or the command line utility 'mingw-get'
22 to install both the base packages and additional packages like automake and
23 autoconf(version 2.68).
25 * Install the latest Python 2.x from python.org and verify that its path is
26 part of Windows' PATH environment variable.
28 * It is important to get the Visual Studio related environment variables and
29 to have the $PATH inside the bash to point to the proper compiler and linker.
30 One easy way to achieve this is to get into the "Developer Command prompt for
31 visual studio" and through it enter into the bash shell available from msys.
33 If after the above step, a 'which link' inside MSYS's bash says,
34 "/bin/link.exe", rename /bin/link.exe to something else so that the
35 Visual studio's linker is used.
37 * Get the Open vSwitch sources from either cloning the repo using git
38 or from a distribution tar ball.
40 * If you pulled the sources directly from an Open vSwitch Git tree,
41 run boot.sh in the top source directory:
45 * In the top source directory, configure the package by running the
46 configure script. You should provide some configure options to choose
47 the right compiler, linker, libraries, Open vSwitch component installation
48 directories, etc. For example,
50 % ./configure CC=./build-aux/cccl LD="`which link`" LIBS="-lws2_32 ..." \
51 --prefix="C:/openvswitch/usr" --localstatedir="C:/openvswitch/var" \
52 --sysconfdir="C:/openvswitch/etc"
54 * Run make for the ported executables in the top source directory, e.g.:
56 % make utilities/ovs-vsctl.exe ovsdb/ovsdb-server.exe
58 OpenSSL, Open vSwitch and Visual C++
59 ------------------------------------
60 To get SSL support for Open vSwitch on Windows, do the following:
62 * Install OpenSSL for Windows as suggested at
63 http://www.openssl.org/related/binaries.html.
64 The link as of this writing suggests to download it from
65 http://slproweb.com/products/Win32OpenSSL.html and the latest version is
66 "Win32 OpenSSL v1.0.1f".
68 Note down the directory where OpenSSL is installed (e.g.: C:/OpenSSL-Win32).
70 * While configuring the package, specify the OpenSSL directory path.
73 % ./configure CC=./build-aux/cccl LD="`which link`" LIBS="-lws2_32 ..." \
74 --prefix="C:/openvswitch/usr" --localstatedir="C:/openvswitch/var" \
75 --sysconfdir="C:/openvswitch/etc" --enable-ssl \
76 --with-openssl="C:/OpenSSL-Win32"
78 * Run make for the ported executables.