mirror of
https://github.com/openvswitch/ovs
synced 2025-08-30 05:47:55 +00:00
windows: Update build with latest pthread project
pthreads-win32 has moved too PThreads4W. This patch updates the build steps, CI (appveyor) and documentation. Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org> Acked-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
parent
fd8e707f38
commit
8596b131c3
@ -98,13 +98,13 @@ The following explains the steps in some detail.
|
|||||||
Visual studio's linker is used. You should also see a 'which sort' report
|
Visual studio's linker is used. You should also see a 'which sort' report
|
||||||
``/bin/sort.exe``.
|
``/bin/sort.exe``.
|
||||||
|
|
||||||
- pthreads-win32
|
- PThreads4W
|
||||||
|
|
||||||
For pthread support, install the library, dll and includes of pthreads-win32
|
For pthread support, install the library, dll and includes of PThreads4W
|
||||||
project from `sourceware
|
project from `sourceware
|
||||||
<ftp://sourceware.org/pub/pthreads-win32/prebuilt-dll-2-9-1-release>`__ to a
|
<https://sourceforge.net/projects/pthreads4w/>`__ to a directory
|
||||||
directory (e.g.: ``C:/pthread``). You should add the pthread-win32's dll path
|
(e.g.: ``C:/pthread``). You should add the PThreads4W's dll path
|
||||||
(e.g.: ``C:\pthread\dll\x86``) to the Windows' PATH environment variable.
|
(e.g.: ``C:\pthread\bin``) to the Windows' PATH environment variable.
|
||||||
|
|
||||||
- OpenSSL
|
- OpenSSL
|
||||||
|
|
||||||
|
18
appveyor.yml
18
appveyor.yml
@ -1,4 +1,5 @@
|
|||||||
version: 1.0.{build}
|
version: 1.0.{build}
|
||||||
|
image: Visual Studio 2019
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
@ -7,16 +8,8 @@ init:
|
|||||||
- ps: $env:PATH ="C:\Python37;"+$env:PATH
|
- ps: $env:PATH ="C:\Python37;"+$env:PATH
|
||||||
- ps: New-Item -Type HardLink -Path "C:\Python37\python3.exe" -Value "C:\Python37\python.exe"
|
- ps: New-Item -Type HardLink -Path "C:\Python37\python3.exe" -Value "C:\Python37\python.exe"
|
||||||
- ps: >-
|
- ps: >-
|
||||||
mkdir C:\pthreads-win32
|
|
||||||
|
|
||||||
mkdir C:\ovs-build-downloads
|
mkdir C:\ovs-build-downloads
|
||||||
|
|
||||||
$source = "ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.zip"
|
|
||||||
|
|
||||||
$destination = "C:\pthreads-win32\pthreads-win32.zip"
|
|
||||||
|
|
||||||
Invoke-WebRequest $source -OutFile $destination
|
|
||||||
|
|
||||||
$source = "https://slproweb.com/download/Win32OpenSSL-1_0_2t.exe"
|
$source = "https://slproweb.com/download/Win32OpenSSL-1_0_2t.exe"
|
||||||
|
|
||||||
$destination = "C:\ovs-build-downloads\Win32OpenSSL-1_0_2t.exe"
|
$destination = "C:\ovs-build-downloads\Win32OpenSSL-1_0_2t.exe"
|
||||||
@ -35,14 +28,17 @@ init:
|
|||||||
|
|
||||||
cd C:\openvswitch
|
cd C:\openvswitch
|
||||||
|
|
||||||
|
git clone https://git.code.sf.net/p/pthreads4w/code c:\pthreads4w-code
|
||||||
|
|
||||||
python3 -m pip install pypiwin32 --disable-pip-version-check
|
python3 -m pip install pypiwin32 --disable-pip-version-check
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd"'
|
- '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"'
|
||||||
- C:\MinGW\msys\1.0\bin\bash -lc "echo \"C:/MinGW /mingw\" > /etc/fstab"
|
- C:\MinGW\msys\1.0\bin\bash -lc "echo \"C:/MinGW /mingw\" > /etc/fstab"
|
||||||
- C:\MinGW\msys\1.0\bin\bash -lc "cp /c/pthreads-win32/Pre-built.2/dll/x86/*.dll /c/openvswitch/."
|
|
||||||
- C:\MinGW\msys\1.0\bin\bash -lc "mv /bin/link.exe /bin/link_copy.exe"
|
- C:\MinGW\msys\1.0\bin\bash -lc "mv /bin/link.exe /bin/link_copy.exe"
|
||||||
|
# Build pthreads
|
||||||
|
- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/pthreads4w-code && nmake all install"
|
||||||
- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch && ./boot.sh"
|
- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch && ./boot.sh"
|
||||||
- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch && ./configure CC=build-aux/cccl LD=\"`which link`\" LIBS=\"-lws2_32 -lShlwapi -liphlpapi -lwbemuuid -lole32 -loleaut32\" --with-pthread=C:/pthreads-win32/Pre-built.2 --with-openssl=C:/OpenSSL-Win32 --with-vstudiotarget=\"Debug\"
|
- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch && ./configure CC=build-aux/cccl LD=\"`which link`\" LIBS=\"-lws2_32 -lShlwapi -liphlpapi -lwbemuuid -lole32 -loleaut32\" --with-pthread=c:/PTHREADS-BUILT/ --with-openssl=C:/OpenSSL-Win32 --with-vstudiotarget=\"Debug\"
|
||||||
- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch && make"
|
- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch && make"
|
||||||
- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch && make datapath_windows_analyze"
|
- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch && make datapath_windows_analyze"
|
||||||
|
@ -95,23 +95,12 @@ AC_DEFUN([OVS_CHECK_WIN32],
|
|||||||
AC_MSG_ERROR([Invalid --with-pthread value])
|
AC_MSG_ERROR([Invalid --with-pthread value])
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if (cl) 2>&1 | grep 'x64' >/dev/null 2>&1; then
|
PTHREAD_WIN32_DIR=$withval/lib
|
||||||
cl_cv_x64=yes
|
PTHREAD_WIN32_DIR_DLL=/$(echo ${withval} | ${SED} -e 's/://')/bin
|
||||||
else
|
PTHREAD_WIN32_DIR_DLL_WIN_FORM=$withval/bin
|
||||||
cl_cv_x64=no
|
|
||||||
fi
|
|
||||||
if test "$cl_cv_x64" = yes; then
|
|
||||||
PTHREAD_WIN32_DIR=$withval/lib/x64
|
|
||||||
PTHREAD_WIN32_DIR_DLL=/$(echo ${withval} | ${SED} -e 's/://')/dll/x64
|
|
||||||
PTHREAD_WIN32_DIR_DLL_WIN_FORM=$withval/dll/x64
|
|
||||||
else
|
|
||||||
PTHREAD_WIN32_DIR=$withval/lib/x86
|
|
||||||
PTHREAD_WIN32_DIR_DLL=/$(echo ${withval} | ${SED} -e 's/://')/dll/x86
|
|
||||||
PTHREAD_WIN32_DIR_DLL_WIN_FORM=$withval/dll/x86
|
|
||||||
fi
|
|
||||||
PTHREAD_INCLUDES=-I$withval/include
|
PTHREAD_INCLUDES=-I$withval/include
|
||||||
PTHREAD_LDFLAGS=-L$PTHREAD_WIN32_DIR
|
PTHREAD_LDFLAGS=-L$PTHREAD_WIN32_DIR
|
||||||
PTHREAD_LIBS="-lpthreadVC2"
|
PTHREAD_LIBS="-lpthreadVC3"
|
||||||
AC_SUBST([PTHREAD_WIN32_DIR_DLL_WIN_FORM])
|
AC_SUBST([PTHREAD_WIN32_DIR_DLL_WIN_FORM])
|
||||||
AC_SUBST([PTHREAD_WIN32_DIR_DLL])
|
AC_SUBST([PTHREAD_WIN32_DIR_DLL])
|
||||||
AC_SUBST([PTHREAD_INCLUDES])
|
AC_SUBST([PTHREAD_INCLUDES])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user