[ovs-dev] [PATCH] Add build of ovsext.sln using MSBuild

Gurucharan Shetty shettyg at nicira.com
Tue Aug 19 14:37:14 UTC 2014


On Mon, Aug 18, 2014 at 5:41 PM, Alin Serdean
<aserdean at cloudbasesolutions.com> wrote:
> Hi Guru,
>
> I tested the same thing with /FS (http://msdn.microsoft.com/en-us/library/dn502518.aspx ) earlier today but it
> was still hanging. I will retry on a fresh environment tomorrow.
Couple of things that you may want to keep in mind.
You will need to use mingw32-make instead of make. You will also need
to pick and choose targets instead of 'all' (This is needed because
mingw32-make expects to run on Windows shell and not on MSYS shell).
>
> $ uname -r
> 1.0.18(0.48/3/2)
>
> Thanks,
> Alin.
>
> -----Mesaj original-----
> De la: Gurucharan Shetty [mailto:shettyg at nicira.com]
> Trimis: Tuesday, August 19, 2014 12:12 AM
> Către: Alin Serdean
> Cc: dev at openvswitch.org
> Subiect: Re: [ovs-dev] [PATCH] Add build of ovsext.sln using MSBuild
>
> On Fri, Aug 15, 2014 at 9:58 AM, Alin Serdean <aserdean at cloudbasesolutions.com> wrote:
>> Hey Guru,
>>
>> I can add a follow up on the after the version 2 to propose a solution on how to make the compilation faster :).
> It looks like the "hangs" that I was seeing was because of this bug:
> http://sourceforge.net/p/mingw/bugs/1950/?limit=10&page=1#6994
>
> We should get the fix when MSYS 1.0.19 is released.
>
> We will also need the following patch (this one is related to MSVC) which I will send formally for review:
> diff --git a/build-aux/cccl b/build-aux/cccl index d6915aa..148a371 100644
> --- a/build-aux/cccl
> +++ b/build-aux/cccl
> @@ -45,7 +45,7 @@ esac
>  # We'll assume cl to start out
>  prog=cl
>  # opts specifies the command line to pass to the MSVC program -clopt="${slash}nologo"
> +clopt="${slash}nologo ${slash}FS"
>  linkopt="${slash}nologo"
>  # gotparam is 0 if we didn't ever see a param, in which case we show usage()  gotparam=
>
> As a workaround, I can do parallel builds currently with this (after applying the above patch)
>
> mingw32-make lib/vswitch-idl.h lib/vtep-idl.h ofproto/ipfix-entities.def include/odp-netlink.h mingw32-make -j 4  ovsdb/ovsdb-server.exe ovsdb/ovsdb-tool.exe ovsdb/ovsdb-client.exe \
>          utilities/ovs-vsctl.exe utilities/ovs-ofctl.exe \
>          utilities/ovs-dpctl.exe vswitchd/ovs-vswitchd.exe \
>          utilities/ovs-appctl.exe
>
>
>>
>> I can add the switch for the kernel driver on windows no problem.
>>
>> Thanks for your thoughts as well,
>> Alin.
>>
>> -----Mesaj original-----
>> De la: Gurucharan Shetty [mailto:shettyg at nicira.com]
>> Trimis: Friday, August 15, 2014 7:52 PM
>> Către: Alin Serdean
>> Cc: dev at openvswitch.org
>> Subiect: Re: [ovs-dev] [PATCH] Add build of ovsext.sln using MSBuild
>>
>> On Wed, Aug 13, 2014 at 8:13 AM, Alin Serdean <aserdean at cloudbasesolutions.com> wrote:
>>> This commit adds to the automake build system the full build required
>>> by the forwarding extension solution.
>>>
>>> It will help a lot in the future CI to check the full build of the project.
>>>
>>> Also the documentation was updated.
>>>
>>> Signed-off-by: Alin Gabriel Serdean <aserdean at cloudbasesolutions.com>
>> This is nice!
>>
>> Nithin already mentioned this, I just want to add some details. When I compile on Linux, building the linux kernel module is optional.
>> i.e without the "--with-linux=/lib/modules/`uname -r`/build", one does not need to build the kernel module.
>> It would be nice to have the same for Windows. Currently the usespace compilation is painfully slow (I have been scouring over the internet to figure out how to efficiently do a parallel build, without any luck), let us not make it more slower.
>>
>>> ---
>>>  INSTALL.Windows | 34 ++++++++++++++++------------------
>>>  Makefile.am     | 10 ++++++++++
>>>  2 files changed, 26 insertions(+), 18 deletions(-)
>>>
>>> diff --git a/INSTALL.Windows b/INSTALL.Windows index abe665d..8c30c1c
>>> 100644
>>> --- a/INSTALL.Windows
>>> +++ b/INSTALL.Windows
>>> @@ -1,4 +1,4 @@
>>> -        How to Build the Kernel module & userspace daemons for Windows
>>> +     How to Build the forwarding extension & userspace binaries for
>>> + Windows
>>>
>>> ==============================================================
>>>
>>>  Autoconf, Automake and Visual C++:
>>> @@ -29,8 +29,8 @@ the following entry in /etc/fstab - 'C:/MinGW /mingw'.
>>>  part of Windows' PATH environment variable.
>>>
>>>  * You will need at least Visual Studio 2013 to compile userspace
>>> binaries. In -addition to that, if you want to compile the kernel
>>> module you will also need to -install Windows Driver Kit (WDK) 8.1 Update.
>>> +addition to that, if you want to compile the forwarding extension
>>> +you will also need to install Windows Driver Kit (WDK) 8.1 Update.
>>>
>>>  It is important to get the Visual Studio related environment
>>> variables and to  have the $PATH inside the bash to point to the
>>> proper compiler and linker. One @@ -63,7 +63,8 @@ or from a distribution tar ball.
>>>      --prefix="C:/openvswitch/usr" --localstatedir="C:/openvswitch/var" \
>>>      --sysconfdir="C:/openvswitch/etc" --with-pthread="C:/pthread"
>>>
>>> -* Run make for the ported executables in the top source directory, e.g.:
>>> +* Run make for the ported executables  and the forwarding extension
>>> +in the top source directory, e.g.:
>>>
>>>    % make
>>>
>>> @@ -91,32 +92,29 @@ For example,
>>>    --sysconfdir="C:/openvswitch/etc" --with-pthread="C:/pthread" --enable-ssl \
>>>    --with-openssl="C:/OpenSSL-Win32"
>>>
>>> -* Run make for the ported executables.
>>> +* Run make for the ported executables  and the forwarding extension
>>> +in the top source directory, e.g.:
>>>
>>> -Building the Kernel module
>>> ---------------------------
>>> -We directly use the Visual Studio 2013 IDE to compile the kernel
>>> module. You can -open the extensions.sln file in the IDE and build the solution.
>>> +  % make
>>>
>>> -Installing the Kernel module
>>> +Installing the forwarding extension
>>>  ----------------------------
>>> -Once you have built the solution, you can copy the following files
>>> to the -target Hyper-V machines:
>>> +You can copy the following files to the target Hyper-V machines:
>>>
>>> -    ./datapath-windows/x64/Win8.1Debug/package/ovsext.inf
>>> -    ./datapath-windows/x64/Win8.1Debug/package/OVSExt.sys
>>> -    ./datapath-windows/x64/Win8.1Debug/package/ovsext.cat
>>> +    ./datapath-windows/x64/Win8Debug/package/ovsext.inf
>>> +    ./datapath-windows/x64/Win8Debug/package/OVSExt.sys
>>> +    ./datapath-windows/x64/Win8Debug/package/ovsext.cat
>>>      ./datapath-windows/misc/install.cmd
>>>      ./datapath-windows/misc/uninstall.cmd
>>>
>>> -Steps to install the module
>>> +Steps to install the forwarding extension
>>>  ---------------------------
>>>
>>>  01> Run ./uninstall.cmd to remove the old extension.
>>>  02> Run ./install.cmd to insert the new one. For this to work you
>>> will have to  turn on TESTSIGNING boot option or 'Disable Driver Signature Enforcement'
>>>  during boot.
>>> -03> In the Virtual Switch Manager configuration you should now see
>>> -03> "VMWare OVS
>>> +03> In the Virtual Switch Manager configuration you should now see
>>> +03> "Open vSwitch
>>>  Extension" under 'Virtual Switch Extensions'. Click the check box to
>>> enable the  extension.
>>>
>>> @@ -255,5 +253,5 @@ be brought in.
>>>
>>>  * Investigate the working of sFlow on Windows and re-enable the unit tests.
>>>
>>> -* Sign the driver & create an MSI for installing the different
>>> OpenvSwitch
>>> +* Sign the driver & create an MSI for installing the different Open
>>> +vSwitch
>>>  components on windows.
>>> diff --git a/Makefile.am b/Makefile.am index eb58101..339882a 100644
>>> --- a/Makefile.am
>>> +++ b/Makefile.am
>>> @@ -276,6 +276,16 @@ manpage-check: $(man_MANS) $(dist_man_MANS)
>>> $(noinst_man_MANS)  CLEANFILES += manpage-check  endif
>>>
>>> +if WIN32
>>> +ALL_LOCAL += ovsext_make
>>> +ovsext_make: datapath-windows/ovsext.sln
>>> +       MSBuild.exe datapath-windows/ovsext.sln /target:Build
>>> +
>>> +CLEAN_LOCAL += ovsext_clean
>>> +ovsext_clean: datapath-windows/ovsext.sln
>>> +       MSBuild.exe datapath-windows/ovsext.sln /target:Clean endif
>>> +
>>>  include $(srcdir)/manpages.mk
>>>  $(srcdir)/manpages.mk: $(MAN_ROOTS) build-aux/sodepends.pl
>>>         @$(PERL) $(srcdir)/build-aux/sodepends.pl -I. -I$(srcdir)
>>> $(MAN_ROOTS) >$(@F).tmp
>>> --
>>> 1.9.0.msysgit.0
>>>
>>> _______________________________________________
>>> dev mailing list
>>> dev at openvswitch.org
>>> http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list