* [PATCH 0/6] Green the msys2 CI make
@ 2020-09-02 17:00 Yonggang Luo
2020-09-02 17:00 ` [PATCH 1/6] configure: fixes dtc not cloned when running msys2 CI Yonggang Luo
` (5 more replies)
0 siblings, 6 replies; 29+ messages in thread
From: Yonggang Luo @ 2020-09-02 17:00 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Yonggang Luo
Also it's fixes two issue about make check
Yonggang Luo (6):
configure: fixes dtc not cloned when running msys2 CI
meson: Convert undefsym.sh to undefsym.py
ci: Install msys2 in a proper way refer to
https://github.com/cirruslabs/cirrus-ci-docs/issues/699 Enable msys2
ci in cirrus
tcg: Fixes dup_const link error
tests: handling signal on win32 properly
configure: Fix include and linkage issue on msys2
.cirrus.yml | 23 ++++++++++++
configure | 44 ++++++++++++++--------
include/tcg/tcg.h | 6 +--
meson.build | 2 +-
scripts/ci/windows/msys2_build.sh | 35 ++++++++++++++++++
scripts/ci/windows/msys2_install.sh | 41 +++++++++++++++++++++
scripts/undefsym.py | 57 +++++++++++++++++++++++++++++
scripts/undefsym.sh | 20 ----------
tcg/tcg-op-gvec.c | 2 +-
tests/test-replication.c | 4 ++
10 files changed, 194 insertions(+), 40 deletions(-)
create mode 100644 scripts/ci/windows/msys2_build.sh
create mode 100644 scripts/ci/windows/msys2_install.sh
create mode 100644 scripts/undefsym.py
delete mode 100755 scripts/undefsym.sh
--
2.27.0.windows.1
^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH 1/6] configure: fixes dtc not cloned when running msys2 CI
2020-09-02 17:00 [PATCH 0/6] Green the msys2 CI make Yonggang Luo
@ 2020-09-02 17:00 ` Yonggang Luo
2020-09-02 17:32 ` Philippe Mathieu-Daudé
2020-09-02 17:00 ` [PATCH 2/6] meson: Convert undefsym.sh to undefsym.py Yonggang Luo
` (4 subsequent siblings)
5 siblings, 1 reply; 29+ messages in thread
From: Yonggang Luo @ 2020-09-02 17:00 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Yonggang Luo
Symlink dtc after git submodule update, because on win32 symlink to non-exist folder are forbidden.
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
configure | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/configure b/configure
index 8a3acef89d..30f8c4db29 100755
--- a/configure
+++ b/configure
@@ -2053,9 +2053,6 @@ fi
if test "$meson" = git; then
git_submodules="${git_submodules} meson"
fi
-if test "$git_update" = yes; then
- (cd "${source_path}" && GIT="$git" "./scripts/git-submodule.sh" update "$git_submodules")
-fi
case "$meson" in
git | internal)
@@ -4261,9 +4258,6 @@ EOF
if test -d "${source_path}/dtc/libfdt" || test -e "${source_path}/.git" ; then
fdt=git
mkdir -p dtc
- if [ "$pwd_is_source_path" != "y" ] ; then
- symlink "$source_path/dtc/Makefile" "dtc/Makefile"
- fi
fdt_cflags="-I${source_path}/dtc/libfdt"
fdt_ldflags="-L$PWD/dtc/libfdt"
fdt_libs="$fdt_libs"
@@ -6593,6 +6587,16 @@ if test "$cpu" = "s390x" ; then
fi
fi
+if test $git_update = 'yes' ; then
+ (cd "${source_path}" && GIT="$git" "./scripts/git-submodule.sh" update "$git_submodules")
+
+ if test "$fdt" = "git" ; then
+ if [ "$pwd_is_source_path" != "y" ] ; then
+ symlink "$source_path/dtc/Makefile" "dtc/Makefile"
+ fi
+ fi
+fi
+
# Check that the C++ compiler exists and works with the C compiler.
# All the QEMU_CXXFLAGS are based on QEMU_CFLAGS. Keep this at the end to don't miss any other that could be added.
if has $cxx; then
--
2.27.0.windows.1
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 2/6] meson: Convert undefsym.sh to undefsym.py
2020-09-02 17:00 [PATCH 0/6] Green the msys2 CI make Yonggang Luo
2020-09-02 17:00 ` [PATCH 1/6] configure: fixes dtc not cloned when running msys2 CI Yonggang Luo
@ 2020-09-02 17:00 ` Yonggang Luo
2020-09-02 17:00 ` [PATCH 3/6] ci: Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 Enable msys2 ci in cirrus Yonggang Luo
` (3 subsequent siblings)
5 siblings, 0 replies; 29+ messages in thread
From: Yonggang Luo @ 2020-09-02 17:00 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Yonggang Luo
undefsym.sh are not msys2 compatible, convert it to python script
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
meson.build | 2 +-
scripts/undefsym.py | 57 +++++++++++++++++++++++++++++++++++++++++++++
scripts/undefsym.sh | 20 ----------------
3 files changed, 58 insertions(+), 21 deletions(-)
create mode 100644 scripts/undefsym.py
delete mode 100755 scripts/undefsym.sh
diff --git a/meson.build b/meson.build
index 55c7d2318c..c9f5d05664 100644
--- a/meson.build
+++ b/meson.build
@@ -863,7 +863,7 @@ foreach d, list : modules
endforeach
nm = find_program('nm')
-undefsym = find_program('scripts/undefsym.sh')
+undefsym = find_program('scripts/undefsym.py')
block_syms = custom_target('block.syms', output: 'block.syms',
input: [libqemuutil, block_mods],
capture: true,
diff --git a/scripts/undefsym.py b/scripts/undefsym.py
new file mode 100644
index 0000000000..c690f88c7a
--- /dev/null
+++ b/scripts/undefsym.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+# Before a shared module's DSO is produced, a static library is built for it
+# and passed to this script. The script generates -Wl,-u options to force
+# the inclusion of symbol from libqemuutil.a if the shared modules need them,
+# This is necessary because the modules may use functions not needed by the
+# executable itself, which would cause the function to not be linked in.
+# Then the DSO loading would fail because of the missing symbol.
+
+
+"""
+Compare the static library with the shared module for compute the symbol duplication
+"""
+
+import sys
+import subprocess
+
+def filter_lines_set(stdout, is_static = True):
+ linesSet = set()
+ for line in stdout.splitlines():
+ tokens = line.split(b' ')
+ if len(tokens) >= 1:
+ if len(tokens) > 1:
+ if is_static and tokens[1] == b'U':
+ continue
+ if not is_static and tokens[1] != b'U':
+ continue
+ new_line = b'-Wl,-u,' + tokens[0]
+ if not new_line in linesSet:
+ linesSet.add(new_line)
+ return linesSet
+
+def main(args):
+ if len(args) <= 3:
+ sys.exit(0)
+
+ nm = args[1]
+ staticlib = args[2]
+ pc = subprocess.run([nm, "-P", "-g", staticlib], stdout=subprocess.PIPE)
+ if pc.returncode != 0:
+ sys.exit(-1)
+ lines_set_left = filter_lines_set(pc.stdout)
+
+ shared_modules = args[3:]
+ pc = subprocess.run([nm, "-P", "-g"] + shared_modules, stdout=subprocess.PIPE)
+ if pc.returncode != 0:
+ sys.exit(-1)
+ lines_set_right = filter_lines_set(pc.stdout, False)
+ lines = []
+ for line in sorted(list(lines_set_right)):
+ if line in lines_set_left:
+ lines.append(line)
+ sys.stdout.write(b'\n'.join(lines).decode())
+
+if __name__ == "__main__":
+ main(sys.argv)
diff --git a/scripts/undefsym.sh b/scripts/undefsym.sh
deleted file mode 100755
index b9ec332e95..0000000000
--- a/scripts/undefsym.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#! /usr/bin/env bash
-
-# Before a shared module's DSO is produced, a static library is built for it
-# and passed to this script. The script generates -Wl,-u options to force
-# the inclusion of symbol from libqemuutil.a if the shared modules need them,
-# This is necessary because the modules may use functions not needed by the
-# executable itself, which would cause the function to not be linked in.
-# Then the DSO loading would fail because of the missing symbol.
-
-if test $# -le 2; then
- exit 0
-fi
-
-NM=$1
-staticlib=$2
-shift 2
-# Find symbols defined in static libraries and undefined in shared modules
-comm -12 \
- <( $NM -P -g $staticlib | awk '$2!="U"{print "-Wl,-u," $1}' | sort -u) \
- <( $NM -P -g "$@" | awk '$2=="U"{print "-Wl,-u," $1}' | sort -u)
--
2.27.0.windows.1
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 3/6] ci: Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 Enable msys2 ci in cirrus
2020-09-02 17:00 [PATCH 0/6] Green the msys2 CI make Yonggang Luo
2020-09-02 17:00 ` [PATCH 1/6] configure: fixes dtc not cloned when running msys2 CI Yonggang Luo
2020-09-02 17:00 ` [PATCH 2/6] meson: Convert undefsym.sh to undefsym.py Yonggang Luo
@ 2020-09-02 17:00 ` Yonggang Luo
2020-09-02 17:30 ` Philippe Mathieu-Daudé
2020-09-02 17:00 ` [PATCH 4/6] tcg: Fixes dup_const link error Yonggang Luo
` (2 subsequent siblings)
5 siblings, 1 reply; 29+ messages in thread
From: Yonggang Luo @ 2020-09-02 17:00 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Yonggang Luo
---
.cirrus.yml | 23 ++++++++++++++++
scripts/ci/windows/msys2_build.sh | 35 ++++++++++++++++++++++++
scripts/ci/windows/msys2_install.sh | 41 +++++++++++++++++++++++++++++
3 files changed, 99 insertions(+)
create mode 100644 scripts/ci/windows/msys2_build.sh
create mode 100644 scripts/ci/windows/msys2_install.sh
diff --git a/.cirrus.yml b/.cirrus.yml
index f287d23c5b..d377c28412 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -40,3 +40,26 @@ macos_xcode_task:
- ../configure --cc=clang || { cat config.log; exit 1; }
- gmake -j$(sysctl -n hw.ncpu)
- gmake check
+
+windows_msys2_task:
+ windows_container:
+ image: cirrusci/windowsservercore:cmake
+ os_version: 2019
+ cpu: 8
+ memory: 8G
+ env:
+ MSYS: winsymlinks:nativestrict
+ MSYSTEM: MINGW64
+ CHERE_INVOKING: 1
+ printenv_script: C:\tools\msys64\usr\bin\bash.exe -lc 'printenv'
+ install_script:
+ - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz"
+ - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig"
+ - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && pacman -U --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz"
+ - C:\tools\msys64\usr\bin\bash.exe -lc "pacman -Sy --noconfirm"
+ - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --needed --noconfirm -S bash pacman pacman-mirrors msys2-runtime"
+ - taskkill /F /IM gpg-agent.exe
+ - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Su"
+ - C:\tools\msys64\usr\bin\bash.exe -lc "sh scripts/ci/windows/msys2_install.sh"
+ script:
+ C:\tools\msys64\usr\bin\bash.exe -lc "sh scripts/ci/windows/msys2_build.sh"
diff --git a/scripts/ci/windows/msys2_build.sh b/scripts/ci/windows/msys2_build.sh
new file mode 100644
index 0000000000..0363ef402a
--- /dev/null
+++ b/scripts/ci/windows/msys2_build.sh
@@ -0,0 +1,35 @@
+export QEMU_DIR=$PWD
+mkdir ../qemu-build
+cd ../qemu-build
+$QEMU_DIR/configure \
+ --python=python3 \
+ --cross-prefix=x86_64-w64-mingw32- \
+ --enable-gtk --enable-sdl \
+ --enable-capstone=git \
+ --enable-stack-protector \
+ --ninja=ninja \
+ --enable-gnutls \
+ --enable-nettle \
+ --enable-vnc \
+ --enable-vnc-sasl \
+ --enable-vnc-jpeg \
+ --enable-vnc-png \
+ --enable-membarrier \
+ --enable-slirp=git \
+ --disable-kvm \
+ --enable-hax \
+ --enable-whpx \
+ --disable-spice \
+ --enable-lzo \
+ --enable-snappy \
+ --enable-bzip2 \
+ --enable-vdi \
+ --enable-qcow1 \
+ --enable-tools \
+ --enable-libusb \
+ --enable-usb-redir \
+ --disable-libnfs \
+ --enable-libssh \
+ --disable-pie
+make -j$NUMBER_OF_PROCESSORS
+# make -j$NUMBER_OF_PROCESSORS check
diff --git a/scripts/ci/windows/msys2_install.sh b/scripts/ci/windows/msys2_install.sh
new file mode 100644
index 0000000000..3a5392cd99
--- /dev/null
+++ b/scripts/ci/windows/msys2_install.sh
@@ -0,0 +1,41 @@
+pacman --noconfirm -S --needed \
+base-devel \
+git \
+mingw-w64-x86_64-python \
+mingw-w64-x86_64-python-setuptools \
+mingw-w64-x86_64-toolchain \
+mingw-w64-x86_64-SDL2 \
+mingw-w64-x86_64-SDL2_image \
+mingw-w64-x86_64-gtk3 \
+mingw-w64-x86_64-ninja \
+mingw-w64-x86_64-make \
+mingw-w64-x86_64-lzo2 \
+mingw-w64-x86_64-libjpeg-turbo \
+mingw-w64-x86_64-pixman \
+mingw-w64-x86_64-libgcrypt \
+mingw-w64-x86_64-capstone \
+mingw-w64-x86_64-libpng \
+mingw-w64-x86_64-libssh \
+mingw-w64-x86_64-libxml2 \
+mingw-w64-x86_64-snappy \
+mingw-w64-x86_64-libusb \
+mingw-w64-x86_64-usbredir \
+mingw-w64-x86_64-libtasn1 \
+mingw-w64-x86_64-libnfs \
+mingw-w64-x86_64-nettle \
+mingw-w64-x86_64-cyrus-sasl \
+mingw-w64-x86_64-curl \
+mingw-w64-x86_64-gnutls \
+mingw-w64-x86_64-zstd \
+mingw-w64-x86_64-glib2
+
+cd /mingw64/bin
+cp x86_64-w64-mingw32-gcc-ar.exe x86_64-w64-mingw32-ar.exe
+cp x86_64-w64-mingw32-gcc-ranlib.exe x86_64-w64-mingw32-ranlib.exe
+cp x86_64-w64-mingw32-gcc-nm.exe x86_64-w64-mingw32-nm.exe
+cp windres.exe x86_64-w64-mingw32-windres.exe
+cp strip.exe x86_64-w64-mingw32-strip.exe
+cp objcopy.exe x86_64-w64-mingw32-objcopy.exe
+cp ld x86_64-w64-mingw32-ld.exe
+cp as x86_64-w64-mingw32-as.exe
+cp sdl2-config x86_64-w64-mingw32-sdl2-config
--
2.27.0.windows.1
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 4/6] tcg: Fixes dup_const link error
2020-09-02 17:00 [PATCH 0/6] Green the msys2 CI make Yonggang Luo
` (2 preceding siblings ...)
2020-09-02 17:00 ` [PATCH 3/6] ci: Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 Enable msys2 ci in cirrus Yonggang Luo
@ 2020-09-02 17:00 ` Yonggang Luo
2020-09-02 17:16 ` Richard Henderson
2020-09-02 17:00 ` [PATCH 5/6] tests: handling signal on win32 properly Yonggang Luo
2020-09-02 17:00 ` [PATCH 6/6] configure: Fix include and linkage issue on msys2 Yonggang Luo
5 siblings, 1 reply; 29+ messages in thread
From: Yonggang Luo @ 2020-09-02 17:00 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Yonggang Luo
Rename function dup_const to dup_const_eval for avoid confliction with macro dup_const
The link error on msys2
Linking target qemu-system-alpha.exe
C:/CI-Tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libqemu-alpha-softmmu.fa.p/tcg_optimize.c.obj: in function `tcg_optimize':
E:\CI-Cor-Ready\xemu\qemu-build/../qemu.org/tcg/optimize.c:1106: undefined reference to `dup_const'
C:/CI-Tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libqemu-alpha-softmmu.fa.p/tcg_tcg-op-vec.c.obj: in function `tcg_gen_dupi_vec':
E:\CI-Cor-Ready\xemu\qemu-build/../qemu.org/tcg/tcg-op-vec.c:283: undefined reference to `dup_const'
collect2.exe: error: ld returned 1 exit status
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
include/tcg/tcg.h | 6 +++---
tcg/tcg-op-gvec.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h
index 53ce94c2c5..7f6fe8454b 100644
--- a/include/tcg/tcg.h
+++ b/include/tcg/tcg.h
@@ -1251,15 +1251,15 @@ static inline int tcg_can_emit_vec_op(TCGOpcode o, TCGType t, unsigned ve)
void tcg_expand_vec_op(TCGOpcode, TCGType, unsigned, TCGArg, ...);
/* Replicate a constant C accoring to the log2 of the element size. */
-uint64_t dup_const(unsigned vece, uint64_t c);
+uint64_t dup_const_eval(unsigned vece, uint64_t c);
#define dup_const(VECE, C) \
(__builtin_constant_p(VECE) \
? ( (VECE) == MO_8 ? 0x0101010101010101ull * (uint8_t)(C) \
: (VECE) == MO_16 ? 0x0001000100010001ull * (uint16_t)(C) \
: (VECE) == MO_32 ? 0x0000000100000001ull * (uint32_t)(C) \
- : dup_const(VECE, C)) \
- : dup_const(VECE, C))
+ : dup_const_eval(VECE, C)) \
+ : dup_const_eval(VECE, C))
/*
diff --git a/tcg/tcg-op-gvec.c b/tcg/tcg-op-gvec.c
index 3707c0effb..cbb6cd04bc 100644
--- a/tcg/tcg-op-gvec.c
+++ b/tcg/tcg-op-gvec.c
@@ -359,7 +359,7 @@ static inline bool check_size_impl(uint32_t oprsz, uint32_t lnsz)
static void expand_clr(uint32_t dofs, uint32_t maxsz);
/* Duplicate C as per VECE. */
-uint64_t (dup_const)(unsigned vece, uint64_t c)
+uint64_t dup_const_eval(unsigned vece, uint64_t c)
{
switch (vece) {
case MO_8:
--
2.27.0.windows.1
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 5/6] tests: handling signal on win32 properly
2020-09-02 17:00 [PATCH 0/6] Green the msys2 CI make Yonggang Luo
` (3 preceding siblings ...)
2020-09-02 17:00 ` [PATCH 4/6] tcg: Fixes dup_const link error Yonggang Luo
@ 2020-09-02 17:00 ` Yonggang Luo
2020-09-02 17:04 ` Paolo Bonzini
2020-09-02 17:00 ` [PATCH 6/6] configure: Fix include and linkage issue on msys2 Yonggang Luo
5 siblings, 1 reply; 29+ messages in thread
From: Yonggang Luo @ 2020-09-02 17:00 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Yonggang Luo
SIGABRT should use signal(SIGABRT, sigabrt_handler) to handle on win32
The error:
E:/CI-Cor-Ready/xemu/qemu.org/tests/test-replication.c:559:33: error: invalid use of undefined type 'struct sigaction'
559 | sigact = (struct sigaction) {
| ^
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
tests/test-replication.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/test-replication.c b/tests/test-replication.c
index e0b03dafc2..9ab3666a90 100644
--- a/tests/test-replication.c
+++ b/tests/test-replication.c
@@ -554,6 +554,9 @@ static void sigabrt_handler(int signo)
static void setup_sigabrt_handler(void)
{
+#ifdef _WIN32
+ signal(SIGABRT, sigabrt_handler);
+#else
struct sigaction sigact;
sigact = (struct sigaction) {
@@ -562,6 +565,7 @@ static void setup_sigabrt_handler(void)
};
sigemptyset(&sigact.sa_mask);
sigaction(SIGABRT, &sigact, NULL);
+#endif
}
int main(int argc, char **argv)
--
2.27.0.windows.1
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 6/6] configure: Fix include and linkage issue on msys2
2020-09-02 17:00 [PATCH 0/6] Green the msys2 CI make Yonggang Luo
` (4 preceding siblings ...)
2020-09-02 17:00 ` [PATCH 5/6] tests: handling signal on win32 properly Yonggang Luo
@ 2020-09-02 17:00 ` Yonggang Luo
2020-09-02 17:05 ` Paolo Bonzini
5 siblings, 1 reply; 29+ messages in thread
From: Yonggang Luo @ 2020-09-02 17:00 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Yonggang Luo
On msys2, the -I/e/path/to/qemu -L/e/path/to/qemu are not recognized by the compiler
Cause $PWD are result posix style path such as /e/path/to/qemu that can not be recognized
by mingw gcc, and `pwd -W` are result Windows style path such as E:/path/to/qemu that can
be recognized by the mingw gcc. So we replace all $PWD with $build_path that can
building qemu under msys2/mingw environment.
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
configure | 28 +++++++++++++++++++---------
1 file changed, 19 insertions(+), 9 deletions(-)
diff --git a/configure b/configure
index 30f8c4db29..5f2bcc4b57 100755
--- a/configure
+++ b/configure
@@ -13,8 +13,13 @@ export CCACHE_RECACHE=yes
# make source path absolute
source_path=$(cd "$(dirname -- "$0")"; pwd)
+build_path=$PWD
+if [ "$MSYSTEM" = "MINGW64" -o "$MSYSTEM" = "MINGW32" ]; then
+source_path=$(cd "$(dirname -- "$0")"; pwd -W)
+build_path=`pwd -W`
+fi
-if test "$PWD" = "$source_path"
+if test "$build_path" = "$source_path"
then
echo "Using './build' as the directory for build output"
@@ -346,7 +351,12 @@ ld_has() {
$ld --help 2>/dev/null | grep ".$1" >/dev/null 2>&1
}
-if printf %s\\n "$source_path" "$PWD" | grep -q "[[:space:]:]";
+check_valid_build_path="[[:space:]:]"
+if [ "$MSYSTEM" = "MINGW64" -o "$MSYSTEM" = "MINGW32" ]; then
+check_valid_build_path="[[:space:]]"
+fi
+
+if printf %s\\n "$source_path" "$build_path" | grep -q "$check_valid_build_path";
then
error_exit "main directory cannot contain spaces nor colons"
fi
@@ -943,7 +953,7 @@ Linux)
linux="yes"
linux_user="yes"
kvm="yes"
- QEMU_INCLUDES="-isystem ${source_path}/linux-headers -I$PWD/linux-headers $QEMU_INCLUDES"
+ QEMU_INCLUDES="-isystem ${source_path}/linux-headers -I${build_path}/linux-headers $QEMU_INCLUDES"
libudev="yes"
;;
esac
@@ -4259,7 +4269,7 @@ EOF
fdt=git
mkdir -p dtc
fdt_cflags="-I${source_path}/dtc/libfdt"
- fdt_ldflags="-L$PWD/dtc/libfdt"
+ fdt_ldflags="-L${build_path}/dtc/libfdt"
fdt_libs="$fdt_libs"
elif test "$fdt" = "yes" ; then
# Not a git build & no libfdt found, prompt for system install
@@ -5244,7 +5254,7 @@ case "$capstone" in
else
LIBCAPSTONE=libcapstone.a
fi
- capstone_libs="-L$PWD/capstone -lcapstone"
+ capstone_libs="-L${build_path}/capstone -lcapstone"
capstone_cflags="-I${source_path}/capstone/include"
;;
@@ -6244,8 +6254,8 @@ case "$slirp" in
git_submodules="${git_submodules} slirp"
fi
mkdir -p slirp
- slirp_cflags="-I${source_path}/slirp/src -I$PWD/slirp/src"
- slirp_libs="-L$PWD/slirp -lslirp"
+ slirp_cflags="-I${source_path}/slirp/src -I${build_path}/slirp/src"
+ slirp_libs="-L${build_path}/slirp -lslirp"
if test "$mingw32" = "yes" ; then
slirp_libs="$slirp_libs -lws2_32 -liphlpapi"
fi
@@ -8190,7 +8200,7 @@ fi
mv $cross config-meson.cross
rm -rf meson-private meson-info meson-logs
-NINJA=${ninja:-$PWD/ninjatool} $meson setup \
+NINJA=${ninja:-${build_path}/ninjatool} $meson setup \
--prefix "${pre_prefix}$prefix" \
--libdir "${pre_prefix}$libdir" \
--libexecdir "${pre_prefix}$libexecdir" \
@@ -8212,7 +8222,7 @@ NINJA=${ninja:-$PWD/ninjatool} $meson setup \
-Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \
-Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f\
$cross_arg \
- "$PWD" "$source_path"
+ "$build_path" "$source_path"
if test "$?" -ne 0 ; then
error_exit "meson setup failed"
--
2.27.0.windows.1
^ permalink raw reply related [flat|nested] 29+ messages in thread
* Re: [PATCH 5/6] tests: handling signal on win32 properly
2020-09-02 17:00 ` [PATCH 5/6] tests: handling signal on win32 properly Yonggang Luo
@ 2020-09-02 17:04 ` Paolo Bonzini
2020-09-02 17:09 ` 罗勇刚(Yonggang Luo)
2020-09-03 5:58 ` Thomas Huth
0 siblings, 2 replies; 29+ messages in thread
From: Paolo Bonzini @ 2020-09-02 17:04 UTC (permalink / raw)
To: Yonggang Luo, qemu-devel
On 02/09/20 19:00, Yonggang Luo wrote:
> SIGABRT should use signal(SIGABRT, sigabrt_handler) to handle on win32
>
> The error:
> E:/CI-Cor-Ready/xemu/qemu.org/tests/test-replication.c:559:33: error: invalid use of undefined type 'struct sigaction'
> 559 | sigact = (struct sigaction) {
> | ^
>
> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> ---
> tests/test-replication.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tests/test-replication.c b/tests/test-replication.c
> index e0b03dafc2..9ab3666a90 100644
> --- a/tests/test-replication.c
> +++ b/tests/test-replication.c
> @@ -554,6 +554,9 @@ static void sigabrt_handler(int signo)
>
> static void setup_sigabrt_handler(void)
> {
> +#ifdef _WIN32
> + signal(SIGABRT, sigabrt_handler);
> +#else
> struct sigaction sigact;
>
> sigact = (struct sigaction) {
> @@ -562,6 +565,7 @@ static void setup_sigabrt_handler(void)
> };
> sigemptyset(&sigact.sa_mask);
> sigaction(SIGABRT, &sigact, NULL);
> +#endif
> }
>
> int main(int argc, char **argv)
>
This is already fixed by a patch from Thomas.
Paolo
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 6/6] configure: Fix include and linkage issue on msys2
2020-09-02 17:00 ` [PATCH 6/6] configure: Fix include and linkage issue on msys2 Yonggang Luo
@ 2020-09-02 17:05 ` Paolo Bonzini
2020-09-02 17:06 ` 罗勇刚(Yonggang Luo)
0 siblings, 1 reply; 29+ messages in thread
From: Paolo Bonzini @ 2020-09-02 17:05 UTC (permalink / raw)
To: Yonggang Luo, qemu-devel
On 02/09/20 19:00, Yonggang Luo wrote:
> On msys2, the -I/e/path/to/qemu -L/e/path/to/qemu are not recognized by the compiler
> Cause $PWD are result posix style path such as /e/path/to/qemu that can not be recognized
> by mingw gcc, and `pwd -W` are result Windows style path such as E:/path/to/qemu that can
> be recognized by the mingw gcc. So we replace all $PWD with $build_path that can
> building qemu under msys2/mingw environment.
>
> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
I'm dropping this patch in favor of relative -L and -I paths.
Paolo
> configure | 28 +++++++++++++++++++---------
> 1 file changed, 19 insertions(+), 9 deletions(-)
>
> diff --git a/configure b/configure
> index 30f8c4db29..5f2bcc4b57 100755
> --- a/configure
> +++ b/configure
> @@ -13,8 +13,13 @@ export CCACHE_RECACHE=yes
>
> # make source path absolute
> source_path=$(cd "$(dirname -- "$0")"; pwd)
> +build_path=$PWD
> +if [ "$MSYSTEM" = "MINGW64" -o "$MSYSTEM" = "MINGW32" ]; then
> +source_path=$(cd "$(dirname -- "$0")"; pwd -W)
> +build_path=`pwd -W`
> +fi
>
> -if test "$PWD" = "$source_path"
> +if test "$build_path" = "$source_path"
> then
> echo "Using './build' as the directory for build output"
>
> @@ -346,7 +351,12 @@ ld_has() {
> $ld --help 2>/dev/null | grep ".$1" >/dev/null 2>&1
> }
>
> -if printf %s\\n "$source_path" "$PWD" | grep -q "[[:space:]:]";
> +check_valid_build_path="[[:space:]:]"
> +if [ "$MSYSTEM" = "MINGW64" -o "$MSYSTEM" = "MINGW32" ]; then
> +check_valid_build_path="[[:space:]]"
> +fi
> +
> +if printf %s\\n "$source_path" "$build_path" | grep -q "$check_valid_build_path";
> then
> error_exit "main directory cannot contain spaces nor colons"
> fi
> @@ -943,7 +953,7 @@ Linux)
> linux="yes"
> linux_user="yes"
> kvm="yes"
> - QEMU_INCLUDES="-isystem ${source_path}/linux-headers -I$PWD/linux-headers $QEMU_INCLUDES"
> + QEMU_INCLUDES="-isystem ${source_path}/linux-headers -I${build_path}/linux-headers $QEMU_INCLUDES"
> libudev="yes"
> ;;
> esac
> @@ -4259,7 +4269,7 @@ EOF
> fdt=git
> mkdir -p dtc
> fdt_cflags="-I${source_path}/dtc/libfdt"
> - fdt_ldflags="-L$PWD/dtc/libfdt"
> + fdt_ldflags="-L${build_path}/dtc/libfdt"
> fdt_libs="$fdt_libs"
> elif test "$fdt" = "yes" ; then
> # Not a git build & no libfdt found, prompt for system install
> @@ -5244,7 +5254,7 @@ case "$capstone" in
> else
> LIBCAPSTONE=libcapstone.a
> fi
> - capstone_libs="-L$PWD/capstone -lcapstone"
> + capstone_libs="-L${build_path}/capstone -lcapstone"
> capstone_cflags="-I${source_path}/capstone/include"
> ;;
>
> @@ -6244,8 +6254,8 @@ case "$slirp" in
> git_submodules="${git_submodules} slirp"
> fi
> mkdir -p slirp
> - slirp_cflags="-I${source_path}/slirp/src -I$PWD/slirp/src"
> - slirp_libs="-L$PWD/slirp -lslirp"
> + slirp_cflags="-I${source_path}/slirp/src -I${build_path}/slirp/src"
> + slirp_libs="-L${build_path}/slirp -lslirp"
> if test "$mingw32" = "yes" ; then
> slirp_libs="$slirp_libs -lws2_32 -liphlpapi"
> fi
> @@ -8190,7 +8200,7 @@ fi
> mv $cross config-meson.cross
>
> rm -rf meson-private meson-info meson-logs
> -NINJA=${ninja:-$PWD/ninjatool} $meson setup \
> +NINJA=${ninja:-${build_path}/ninjatool} $meson setup \
> --prefix "${pre_prefix}$prefix" \
> --libdir "${pre_prefix}$libdir" \
> --libexecdir "${pre_prefix}$libexecdir" \
> @@ -8212,7 +8222,7 @@ NINJA=${ninja:-$PWD/ninjatool} $meson setup \
> -Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \
> -Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f\
> $cross_arg \
> - "$PWD" "$source_path"
> + "$build_path" "$source_path"
>
> if test "$?" -ne 0 ; then
> error_exit "meson setup failed"
>
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 6/6] configure: Fix include and linkage issue on msys2
2020-09-02 17:05 ` Paolo Bonzini
@ 2020-09-02 17:06 ` 罗勇刚(Yonggang Luo)
0 siblings, 0 replies; 29+ messages in thread
From: 罗勇刚(Yonggang Luo) @ 2020-09-02 17:06 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-level
[-- Attachment #1: Type: text/plain, Size: 4489 bytes --]
I am OK with that, I just need to this make the CI green, once your patch
upstream, I'll drop this
On Thu, Sep 3, 2020 at 1:05 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 02/09/20 19:00, Yonggang Luo wrote:
> > On msys2, the -I/e/path/to/qemu -L/e/path/to/qemu are not recognized by
> the compiler
> > Cause $PWD are result posix style path such as /e/path/to/qemu that can
> not be recognized
> > by mingw gcc, and `pwd -W` are result Windows style path such as
> E:/path/to/qemu that can
> > be recognized by the mingw gcc. So we replace all $PWD with $build_path
> that can
> > building qemu under msys2/mingw environment.
> >
> > Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
>
> I'm dropping this patch in favor of relative -L and -I paths.
>
> Paolo
>
> > configure | 28 +++++++++++++++++++---------
> > 1 file changed, 19 insertions(+), 9 deletions(-)
> >
> > diff --git a/configure b/configure
> > index 30f8c4db29..5f2bcc4b57 100755
> > --- a/configure
> > +++ b/configure
> > @@ -13,8 +13,13 @@ export CCACHE_RECACHE=yes
> >
> > # make source path absolute
> > source_path=$(cd "$(dirname -- "$0")"; pwd)
> > +build_path=$PWD
> > +if [ "$MSYSTEM" = "MINGW64" -o "$MSYSTEM" = "MINGW32" ]; then
> > +source_path=$(cd "$(dirname -- "$0")"; pwd -W)
> > +build_path=`pwd -W`
> > +fi
> >
> > -if test "$PWD" = "$source_path"
> > +if test "$build_path" = "$source_path"
> > then
> > echo "Using './build' as the directory for build output"
> >
> > @@ -346,7 +351,12 @@ ld_has() {
> > $ld --help 2>/dev/null | grep ".$1" >/dev/null 2>&1
> > }
> >
> > -if printf %s\\n "$source_path" "$PWD" | grep -q "[[:space:]:]";
> > +check_valid_build_path="[[:space:]:]"
> > +if [ "$MSYSTEM" = "MINGW64" -o "$MSYSTEM" = "MINGW32" ]; then
> > +check_valid_build_path="[[:space:]]"
> > +fi
> > +
> > +if printf %s\\n "$source_path" "$build_path" | grep -q
> "$check_valid_build_path";
> > then
> > error_exit "main directory cannot contain spaces nor colons"
> > fi
> > @@ -943,7 +953,7 @@ Linux)
> > linux="yes"
> > linux_user="yes"
> > kvm="yes"
> > - QEMU_INCLUDES="-isystem ${source_path}/linux-headers
> -I$PWD/linux-headers $QEMU_INCLUDES"
> > + QEMU_INCLUDES="-isystem ${source_path}/linux-headers
> -I${build_path}/linux-headers $QEMU_INCLUDES"
> > libudev="yes"
> > ;;
> > esac
> > @@ -4259,7 +4269,7 @@ EOF
> > fdt=git
> > mkdir -p dtc
> > fdt_cflags="-I${source_path}/dtc/libfdt"
> > - fdt_ldflags="-L$PWD/dtc/libfdt"
> > + fdt_ldflags="-L${build_path}/dtc/libfdt"
> > fdt_libs="$fdt_libs"
> > elif test "$fdt" = "yes" ; then
> > # Not a git build & no libfdt found, prompt for system install
> > @@ -5244,7 +5254,7 @@ case "$capstone" in
> > else
> > LIBCAPSTONE=libcapstone.a
> > fi
> > - capstone_libs="-L$PWD/capstone -lcapstone"
> > + capstone_libs="-L${build_path}/capstone -lcapstone"
> > capstone_cflags="-I${source_path}/capstone/include"
> > ;;
> >
> > @@ -6244,8 +6254,8 @@ case "$slirp" in
> > git_submodules="${git_submodules} slirp"
> > fi
> > mkdir -p slirp
> > - slirp_cflags="-I${source_path}/slirp/src -I$PWD/slirp/src"
> > - slirp_libs="-L$PWD/slirp -lslirp"
> > + slirp_cflags="-I${source_path}/slirp/src -I${build_path}/slirp/src"
> > + slirp_libs="-L${build_path}/slirp -lslirp"
> > if test "$mingw32" = "yes" ; then
> > slirp_libs="$slirp_libs -lws2_32 -liphlpapi"
> > fi
> > @@ -8190,7 +8200,7 @@ fi
> > mv $cross config-meson.cross
> >
> > rm -rf meson-private meson-info meson-logs
> > -NINJA=${ninja:-$PWD/ninjatool} $meson setup \
> > +NINJA=${ninja:-${build_path}/ninjatool} $meson setup \
> > --prefix "${pre_prefix}$prefix" \
> > --libdir "${pre_prefix}$libdir" \
> > --libexecdir "${pre_prefix}$libexecdir" \
> > @@ -8212,7 +8222,7 @@ NINJA=${ninja:-$PWD/ninjatool} $meson setup \
> > -Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg
> -Dvnc_png=$vnc_png \
> > -Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f\
> > $cross_arg \
> > - "$PWD" "$source_path"
> > + "$build_path" "$source_path"
> >
> > if test "$?" -ne 0 ; then
> > error_exit "meson setup failed"
> >
>
>
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
[-- Attachment #2: Type: text/html, Size: 6245 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 5/6] tests: handling signal on win32 properly
2020-09-02 17:04 ` Paolo Bonzini
@ 2020-09-02 17:09 ` 罗勇刚(Yonggang Luo)
2020-09-03 5:58 ` Thomas Huth
1 sibling, 0 replies; 29+ messages in thread
From: 罗勇刚(Yonggang Luo) @ 2020-09-02 17:09 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-level
[-- Attachment #1: Type: text/plain, Size: 1464 bytes --]
OK, waiting for it upstream.
On Thu, Sep 3, 2020 at 1:04 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 02/09/20 19:00, Yonggang Luo wrote:
> > SIGABRT should use signal(SIGABRT, sigabrt_handler) to handle on win32
> >
> > The error:
> > E:/CI-Cor-Ready/xemu/qemu.org/tests/test-replication.c:559:33: error:
> invalid use of undefined type 'struct sigaction'
> > 559 | sigact = (struct sigaction) {
> > | ^
> >
> > Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> > ---
> > tests/test-replication.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/tests/test-replication.c b/tests/test-replication.c
> > index e0b03dafc2..9ab3666a90 100644
> > --- a/tests/test-replication.c
> > +++ b/tests/test-replication.c
> > @@ -554,6 +554,9 @@ static void sigabrt_handler(int signo)
> >
> > static void setup_sigabrt_handler(void)
> > {
> > +#ifdef _WIN32
> > + signal(SIGABRT, sigabrt_handler);
> > +#else
> > struct sigaction sigact;
> >
> > sigact = (struct sigaction) {
> > @@ -562,6 +565,7 @@ static void setup_sigabrt_handler(void)
> > };
> > sigemptyset(&sigact.sa_mask);
> > sigaction(SIGABRT, &sigact, NULL);
> > +#endif
> > }
> >
> > int main(int argc, char **argv)
> >
>
> This is already fixed by a patch from Thomas.
>
> Paolo
>
>
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
[-- Attachment #2: Type: text/html, Size: 2256 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 4/6] tcg: Fixes dup_const link error
2020-09-02 17:00 ` [PATCH 4/6] tcg: Fixes dup_const link error Yonggang Luo
@ 2020-09-02 17:16 ` Richard Henderson
2020-09-02 17:17 ` 罗勇刚(Yonggang Luo)
0 siblings, 1 reply; 29+ messages in thread
From: Richard Henderson @ 2020-09-02 17:16 UTC (permalink / raw)
To: Yonggang Luo, qemu-devel; +Cc: Paolo Bonzini
On 9/2/20 10:00 AM, Yonggang Luo wrote:
> Rename function dup_const to dup_const_eval for avoid confliction with macro dup_const
>
> The link error on msys2
>
> Linking target qemu-system-alpha.exe
> C:/CI-Tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libqemu-alpha-softmmu.fa.p/tcg_optimize.c.obj: in function `tcg_optimize':
> E:\CI-Cor-Ready\xemu\qemu-build/../qemu.org/tcg/optimize.c:1106: undefined reference to `dup_const'
> C:/CI-Tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libqemu-alpha-softmmu.fa.p/tcg_tcg-op-vec.c.obj: in function `tcg_gen_dupi_vec':
> E:\CI-Cor-Ready\xemu\qemu-build/../qemu.org/tcg/tcg-op-vec.c:283: undefined reference to `dup_const'
> collect2.exe: error: ld returned 1 exit status
>
> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> ---
This should not be required. What compiler is this?
r~
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 4/6] tcg: Fixes dup_const link error
2020-09-02 17:16 ` Richard Henderson
@ 2020-09-02 17:17 ` 罗勇刚(Yonggang Luo)
2020-09-02 17:21 ` Richard Henderson
0 siblings, 1 reply; 29+ messages in thread
From: 罗勇刚(Yonggang Luo) @ 2020-09-02 17:17 UTC (permalink / raw)
To: Richard Henderson; +Cc: Paolo Bonzini, qemu-level
[-- Attachment #1: Type: text/plain, Size: 1229 bytes --]
Win32 gcc 10 mingw
On Thu, Sep 3, 2020 at 1:16 AM Richard Henderson <
richard.henderson@linaro.org> wrote:
> On 9/2/20 10:00 AM, Yonggang Luo wrote:
> > Rename function dup_const to dup_const_eval for avoid confliction with
> macro dup_const
> >
> > The link error on msys2
> >
> > Linking target qemu-system-alpha.exe
> >
> C:/CI-Tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
> libqemu-alpha-softmmu.fa.p/tcg_optimize.c.obj: in function `tcg_optimize':
> > E:\CI-Cor-Ready\xemu\qemu-build/../qemu.org/tcg/optimize.c:1106:
> undefined reference to `dup_const'
> >
> C:/CI-Tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
> libqemu-alpha-softmmu.fa.p/tcg_tcg-op-vec.c.obj: in function
> `tcg_gen_dupi_vec':
> > E:\CI-Cor-Ready\xemu\qemu-build/../qemu.org/tcg/tcg-op-vec.c:283:
> undefined reference to `dup_const'
> > collect2.exe: error: ld returned 1 exit status
> >
> > Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> > ---
>
> This should not be required. What compiler is this?
>
>
> r~
>
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
[-- Attachment #2: Type: text/html, Size: 1909 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 4/6] tcg: Fixes dup_const link error
2020-09-02 17:17 ` 罗勇刚(Yonggang Luo)
@ 2020-09-02 17:21 ` Richard Henderson
0 siblings, 0 replies; 29+ messages in thread
From: Richard Henderson @ 2020-09-02 17:21 UTC (permalink / raw)
To: luoyonggang; +Cc: Paolo Bonzini, qemu-level
On 9/2/20 10:17 AM, 罗勇刚(Yonggang Luo) wrote:
>> This should not be required. What compiler is this?
> Win32 gcc 10 mingw
Weird. Ok, what symbols are present in tcg_tcg-op-gvec.c.obj without your
patch? How has "dup_const" been mangled?
r~
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 3/6] ci: Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 Enable msys2 ci in cirrus
2020-09-02 17:00 ` [PATCH 3/6] ci: Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 Enable msys2 ci in cirrus Yonggang Luo
@ 2020-09-02 17:30 ` Philippe Mathieu-Daudé
2020-09-02 17:42 ` 罗勇刚(Yonggang Luo)
` (2 more replies)
0 siblings, 3 replies; 29+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-02 17:30 UTC (permalink / raw)
To: Yonggang Luo, qemu-devel; +Cc: Paolo Bonzini
On 9/2/20 7:00 PM, Yonggang Luo wrote:
> ---
> .cirrus.yml | 23 ++++++++++++++++
> scripts/ci/windows/msys2_build.sh | 35 ++++++++++++++++++++++++
> scripts/ci/windows/msys2_install.sh | 41 +++++++++++++++++++++++++++++
> 3 files changed, 99 insertions(+)
> create mode 100644 scripts/ci/windows/msys2_build.sh
> create mode 100644 scripts/ci/windows/msys2_install.sh
>
> diff --git a/.cirrus.yml b/.cirrus.yml
> index f287d23c5b..d377c28412 100644
> --- a/.cirrus.yml
> +++ b/.cirrus.yml
> @@ -40,3 +40,26 @@ macos_xcode_task:
> - ../configure --cc=clang || { cat config.log; exit 1; }
> - gmake -j$(sysctl -n hw.ncpu)
> - gmake check
> +
> +windows_msys2_task:
> + windows_container:
> + image: cirrusci/windowsservercore:cmake
> + os_version: 2019
> + cpu: 8
> + memory: 8G
> + env:
> + MSYS: winsymlinks:nativestrict
> + MSYSTEM: MINGW64
> + CHERE_INVOKING: 1
> + printenv_script: C:\tools\msys64\usr\bin\bash.exe -lc 'printenv'
> + install_script:
> + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz"
> + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig"
> + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && pacman -U --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz"
> + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman -Sy --noconfirm"
> + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --needed --noconfirm -S bash pacman pacman-mirrors msys2-runtime"
> + - taskkill /F /IM gpg-agent.exe
> + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Su"
> + - C:\tools\msys64\usr\bin\bash.exe -lc "sh scripts/ci/windows/msys2_install.sh"
> + script:
> + C:\tools\msys64\usr\bin\bash.exe -lc "sh scripts/ci/windows/msys2_build.sh"
> diff --git a/scripts/ci/windows/msys2_build.sh b/scripts/ci/windows/msys2_build.sh
> new file mode 100644
> index 0000000000..0363ef402a
> --- /dev/null
> +++ b/scripts/ci/windows/msys2_build.sh
> @@ -0,0 +1,35 @@
> +export QEMU_DIR=$PWD
> +mkdir ../qemu-build
> +cd ../qemu-build
> +$QEMU_DIR/configure \
> + --python=python3 \
> + --cross-prefix=x86_64-w64-mingw32- \
Isn't the prefix 'x86_64-w64-mingw32-gcc-'?
> + --enable-gtk --enable-sdl \
> + --enable-capstone=git \
> + --enable-stack-protector \
> + --ninja=ninja \
> + --enable-gnutls \
> + --enable-nettle \
> + --enable-vnc \
> + --enable-vnc-sasl \
> + --enable-vnc-jpeg \
> + --enable-vnc-png \
> + --enable-membarrier \
> + --enable-slirp=git \
> + --disable-kvm \
> + --enable-hax \
> + --enable-whpx \
> + --disable-spice \
> + --enable-lzo \
> + --enable-snappy \
> + --enable-bzip2 \
> + --enable-vdi \
> + --enable-qcow1 \
> + --enable-tools \
> + --enable-libusb \
> + --enable-usb-redir \
> + --disable-libnfs \
> + --enable-libssh \
> + --disable-pie
> +make -j$NUMBER_OF_PROCESSORS
> +# make -j$NUMBER_OF_PROCESSORS check
> diff --git a/scripts/ci/windows/msys2_install.sh b/scripts/ci/windows/msys2_install.sh
> new file mode 100644
> index 0000000000..3a5392cd99
> --- /dev/null
> +++ b/scripts/ci/windows/msys2_install.sh
> @@ -0,0 +1,41 @@
> +pacman --noconfirm -S --needed \
> +base-devel \
> +git \
> +mingw-w64-x86_64-python \
> +mingw-w64-x86_64-python-setuptools \
> +mingw-w64-x86_64-toolchain \
> +mingw-w64-x86_64-SDL2 \
> +mingw-w64-x86_64-SDL2_image \
> +mingw-w64-x86_64-gtk3 \
> +mingw-w64-x86_64-ninja \
> +mingw-w64-x86_64-make \
> +mingw-w64-x86_64-lzo2 \
> +mingw-w64-x86_64-libjpeg-turbo \
> +mingw-w64-x86_64-pixman \
> +mingw-w64-x86_64-libgcrypt \
> +mingw-w64-x86_64-capstone \
> +mingw-w64-x86_64-libpng \
> +mingw-w64-x86_64-libssh \
> +mingw-w64-x86_64-libxml2 \
> +mingw-w64-x86_64-snappy \
> +mingw-w64-x86_64-libusb \
> +mingw-w64-x86_64-usbredir \
> +mingw-w64-x86_64-libtasn1 \
> +mingw-w64-x86_64-libnfs \
> +mingw-w64-x86_64-nettle \
> +mingw-w64-x86_64-cyrus-sasl \
> +mingw-w64-x86_64-curl \
> +mingw-w64-x86_64-gnutls \
> +mingw-w64-x86_64-zstd \
> +mingw-w64-x86_64-glib2
> +
> +cd /mingw64/bin
> +cp x86_64-w64-mingw32-gcc-ar.exe x86_64-w64-mingw32-ar.exe
> +cp x86_64-w64-mingw32-gcc-ranlib.exe x86_64-w64-mingw32-ranlib.exe
> +cp x86_64-w64-mingw32-gcc-nm.exe x86_64-w64-mingw32-nm.exe
> +cp windres.exe x86_64-w64-mingw32-windres.exe
> +cp strip.exe x86_64-w64-mingw32-strip.exe
> +cp objcopy.exe x86_64-w64-mingw32-objcopy.exe
> +cp ld x86_64-w64-mingw32-ld.exe
> +cp as x86_64-w64-mingw32-as.exe
> +cp sdl2-config x86_64-w64-mingw32-sdl2-config
Why is that needed?
Thanks,
Phil.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 1/6] configure: fixes dtc not cloned when running msys2 CI
2020-09-02 17:00 ` [PATCH 1/6] configure: fixes dtc not cloned when running msys2 CI Yonggang Luo
@ 2020-09-02 17:32 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 29+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-02 17:32 UTC (permalink / raw)
To: Yonggang Luo, qemu-devel; +Cc: Paolo Bonzini
On 9/2/20 7:00 PM, Yonggang Luo wrote:
> Symlink dtc after git submodule update, because on win32 symlink to non-exist folder are forbidden.
>
> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> ---
> configure | 16 ++++++++++------
> 1 file changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/configure b/configure
> index 8a3acef89d..30f8c4db29 100755
> --- a/configure
> +++ b/configure
> @@ -2053,9 +2053,6 @@ fi
> if test "$meson" = git; then
> git_submodules="${git_submodules} meson"
> fi
> -if test "$git_update" = yes; then
> - (cd "${source_path}" && GIT="$git" "./scripts/git-submodule.sh" update "$git_submodules")
> -fi
>
> case "$meson" in
> git | internal)
> @@ -4261,9 +4258,6 @@ EOF
> if test -d "${source_path}/dtc/libfdt" || test -e "${source_path}/.git" ; then
> fdt=git
> mkdir -p dtc
> - if [ "$pwd_is_source_path" != "y" ] ; then
> - symlink "$source_path/dtc/Makefile" "dtc/Makefile"
> - fi
> fdt_cflags="-I${source_path}/dtc/libfdt"
> fdt_ldflags="-L$PWD/dtc/libfdt"
> fdt_libs="$fdt_libs"
> @@ -6593,6 +6587,16 @@ if test "$cpu" = "s390x" ; then
> fi
> fi
>
> +if test $git_update = 'yes' ; then
> + (cd "${source_path}" && GIT="$git" "./scripts/git-submodule.sh" update "$git_submodules")
> +
> + if test "$fdt" = "git" ; then
> + if [ "$pwd_is_source_path" != "y" ] ; then
> + symlink "$source_path/dtc/Makefile" "dtc/Makefile"
> + fi
> + fi
> +fi
> +
> # Check that the C++ compiler exists and works with the C compiler.
> # All the QEMU_CXXFLAGS are based on QEMU_CFLAGS. Keep this at the end to don't miss any other that could be added.
> if has $cxx; then
>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 3/6] ci: Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 Enable msys2 ci in cirrus
2020-09-02 17:30 ` Philippe Mathieu-Daudé
@ 2020-09-02 17:42 ` 罗勇刚(Yonggang Luo)
2020-09-02 19:31 ` Philippe Mathieu-Daudé
2020-09-02 17:50 ` 罗勇刚(Yonggang Luo)
2020-09-02 18:50 ` Mark Cave-Ayland
2 siblings, 1 reply; 29+ messages in thread
From: 罗勇刚(Yonggang Luo) @ 2020-09-02 17:42 UTC (permalink / raw)
To: Philippe Mathieu-Daudé; +Cc: Paolo Bonzini, qemu-level
[-- Attachment #1: Type: text/plain, Size: 8352 bytes --]
On Thu, Sep 3, 2020 at 1:30 AM Philippe Mathieu-Daudé <f4bug@amsat.org>
wrote:
> On 9/2/20 7:00 PM, Yonggang Luo wrote:
> > ---
> > .cirrus.yml | 23 ++++++++++++++++
> > scripts/ci/windows/msys2_build.sh | 35 ++++++++++++++++++++++++
> > scripts/ci/windows/msys2_install.sh | 41 +++++++++++++++++++++++++++++
> > 3 files changed, 99 insertions(+)
> > create mode 100644 scripts/ci/windows/msys2_build.sh
> > create mode 100644 scripts/ci/windows/msys2_install.sh
> >
> > diff --git a/.cirrus.yml b/.cirrus.yml
> > index f287d23c5b..d377c28412 100644
> > --- a/.cirrus.yml
> > +++ b/.cirrus.yml
> > @@ -40,3 +40,26 @@ macos_xcode_task:
> > - ../configure --cc=clang || { cat config.log; exit 1; }
> > - gmake -j$(sysctl -n hw.ncpu)
> > - gmake check
> > +
> > +windows_msys2_task:
> > + windows_container:
> > + image: cirrusci/windowsservercore:cmake
> > + os_version: 2019
> > + cpu: 8
> > + memory: 8G
> > + env:
> > + MSYS: winsymlinks:nativestrict
> > + MSYSTEM: MINGW64
> > + CHERE_INVOKING: 1
> > + printenv_script: C:\tools\msys64\usr\bin\bash.exe -lc 'printenv'
> > + install_script:
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O
> http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz
> "
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O
> http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig
> "
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && pacman -U
> --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz"
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman -Sy --noconfirm"
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --needed --noconfirm
> -S bash pacman pacman-mirrors msys2-runtime"
> > + - taskkill /F /IM gpg-agent.exe
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Su"
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "sh
> scripts/ci/windows/msys2_install.sh"
> > + script:
> > + C:\tools\msys64\usr\bin\bash.exe -lc "sh
> scripts/ci/windows/msys2_build.sh"
> > diff --git a/scripts/ci/windows/msys2_build.sh
> b/scripts/ci/windows/msys2_build.sh
> > new file mode 100644
> > index 0000000000..0363ef402a
> > --- /dev/null
> > +++ b/scripts/ci/windows/msys2_build.sh
> > @@ -0,0 +1,35 @@
> > +export QEMU_DIR=$PWD
> > +mkdir ../qemu-build
> > +cd ../qemu-build
> > +$QEMU_DIR/configure \
> > + --python=python3 \
> > + --cross-prefix=x86_64-w64-mingw32- \
>
> Isn't the prefix 'x86_64-w64-mingw32-gcc-'?
>
No, because of this:
```
C:\CI-Tools\msys64\mingw64\bin>dir x86_64-w64-mingw32*
驱动器 C 中的卷是 系统
卷的序列号是 CAD5-8E95
C:\CI-Tools\msys64\mingw64\bin 的目录
2018/01/17 16:54 36,022 x86_64-w64-mingw32-agrep.exe
2020/09/02 05:06 67,861 x86_64-w64-mingw32-ar.exe
2020/09/02 05:06 2,872,225 x86_64-w64-mingw32-as.exe
2020/07/24 15:41 2,208,014 x86_64-w64-mingw32-c++.exe
2020/02/17 19:50 489,984 x86_64-w64-mingw32-captoinfo.exe
2020/02/17 19:50 348,160 x86_64-w64-mingw32-clear.exe
2020/06/26 17:21 64,176 x86_64-w64-mingw32-deflatehd.exe
2020/07/24 15:41 2,208,014 x86_64-w64-mingw32-g++.exe
2020/07/24 15:41 2,205,454 x86_64-w64-mingw32-gcc-10.2.0.exe
2020/07/24 15:41 67,861 x86_64-w64-mingw32-gcc-ar.exe
2020/07/24 15:41 67,861 x86_64-w64-mingw32-gcc-nm.exe
2020/07/24 15:41 67,861 x86_64-w64-mingw32-gcc-ranlib.exe
2020/07/24 15:41 2,205,454 x86_64-w64-mingw32-gcc.exe
2020/07/24 15:41 2,208,014 x86_64-w64-mingw32-gfortran.exe
2020/06/26 17:21 59,734 x86_64-w64-mingw32-inflatehd.exe
2020/02/17 19:50 462,848 x86_64-w64-mingw32-infocmp.exe
2020/02/17 19:50 489,984 x86_64-w64-mingw32-infotocap.exe
2020/09/02 05:06 2,773,229 x86_64-w64-mingw32-ld.exe
2020/09/02 05:06 67,861 x86_64-w64-mingw32-nm.exe
2020/09/02 05:06 2,367,282 x86_64-w64-mingw32-objcopy.exe
2017/03/22 14:58 669,355 x86_64-w64-mingw32-pkg-config.exe
2020/09/02 05:06 67,861 x86_64-w64-mingw32-ranlib.exe
2020/02/17 19:50 356,352 x86_64-w64-mingw32-reset.exe
2020/09/02 05:06 1,444 x86_64-w64-mingw32-sdl2-config
2020/09/02 05:06 2,367,282 x86_64-w64-mingw32-strip.exe
2020/02/17 19:50 348,160 x86_64-w64-mingw32-tabs.exe
2020/02/17 19:50 489,984 x86_64-w64-mingw32-tic.exe
2020/02/17 19:50 409,600 x86_64-w64-mingw32-toe.exe
2020/02/17 19:50 355,328 x86_64-w64-mingw32-tput.exe
2020/02/17 19:50 356,352 x86_64-w64-mingw32-tset.exe
2020/09/02 05:06 2,344,638 x86_64-w64-mingw32-windres.exe
31 个文件 29,104,255 字节
0 个目录 203,338,362,880 可用字节
```
>
> > + --enable-gtk --enable-sdl \
> > + --enable-capstone=git \
> > + --enable-stack-protector \
> > + --ninja=ninja \
> > + --enable-gnutls \
> > + --enable-nettle \
> > + --enable-vnc \
> > + --enable-vnc-sasl \
> > + --enable-vnc-jpeg \
> > + --enable-vnc-png \
> > + --enable-membarrier \
> > + --enable-slirp=git \
> > + --disable-kvm \
> > + --enable-hax \
> > + --enable-whpx \
> > + --disable-spice \
> > + --enable-lzo \
> > + --enable-snappy \
> > + --enable-bzip2 \
> > + --enable-vdi \
> > + --enable-qcow1 \
> > + --enable-tools \
> > + --enable-libusb \
> > + --enable-usb-redir \
> > + --disable-libnfs \
> > + --enable-libssh \
> > + --disable-pie
> > +make -j$NUMBER_OF_PROCESSORS
> > +# make -j$NUMBER_OF_PROCESSORS check
> > diff --git a/scripts/ci/windows/msys2_install.sh
> b/scripts/ci/windows/msys2_install.sh
> > new file mode 100644
> > index 0000000000..3a5392cd99
> > --- /dev/null
> > +++ b/scripts/ci/windows/msys2_install.sh
> > @@ -0,0 +1,41 @@
> > +pacman --noconfirm -S --needed \
> > +base-devel \
> > +git \
> > +mingw-w64-x86_64-python \
> > +mingw-w64-x86_64-python-setuptools \
> > +mingw-w64-x86_64-toolchain \
> > +mingw-w64-x86_64-SDL2 \
> > +mingw-w64-x86_64-SDL2_image \
> > +mingw-w64-x86_64-gtk3 \
> > +mingw-w64-x86_64-ninja \
> > +mingw-w64-x86_64-make \
> > +mingw-w64-x86_64-lzo2 \
> > +mingw-w64-x86_64-libjpeg-turbo \
> > +mingw-w64-x86_64-pixman \
> > +mingw-w64-x86_64-libgcrypt \
> > +mingw-w64-x86_64-capstone \
> > +mingw-w64-x86_64-libpng \
> > +mingw-w64-x86_64-libssh \
> > +mingw-w64-x86_64-libxml2 \
> > +mingw-w64-x86_64-snappy \
> > +mingw-w64-x86_64-libusb \
> > +mingw-w64-x86_64-usbredir \
> > +mingw-w64-x86_64-libtasn1 \
> > +mingw-w64-x86_64-libnfs \
> > +mingw-w64-x86_64-nettle \
> > +mingw-w64-x86_64-cyrus-sasl \
> > +mingw-w64-x86_64-curl \
> > +mingw-w64-x86_64-gnutls \
> > +mingw-w64-x86_64-zstd \
> > +mingw-w64-x86_64-glib2
> > +
> > +cd /mingw64/bin
> > +cp x86_64-w64-mingw32-gcc-ar.exe x86_64-w64-mingw32-ar.exe
> > +cp x86_64-w64-mingw32-gcc-ranlib.exe x86_64-w64-mingw32-ranlib.exe
> > +cp x86_64-w64-mingw32-gcc-nm.exe x86_64-w64-mingw32-nm.exe
> > +cp windres.exe x86_64-w64-mingw32-windres.exe
> > +cp strip.exe x86_64-w64-mingw32-strip.exe
> > +cp objcopy.exe x86_64-w64-mingw32-objcopy.exe
> > +cp ld x86_64-w64-mingw32-ld.exe
> > +cp as x86_64-w64-mingw32-as.exe
> > +cp sdl2-config x86_64-w64-mingw32-sdl2-config
>
> Why is that needed?
>
> Comes from configure
```
ar="${AR-${cross_prefix}ar}"
as="${AS-${cross_prefix}as}"
ccas="${CCAS-$cc}"
cpp="${CPP-$cc -E}"
objcopy="${OBJCOPY-${cross_prefix}objcopy}"
ld="${LD-${cross_prefix}ld}"
ranlib="${RANLIB-${cross_prefix}ranlib}"
nm="${NM-${cross_prefix}nm}"
strip="${STRIP-${cross_prefix}strip}"
windres="${WINDRES-${cross_prefix}windres}"
pkg_config_exe="${PKG_CONFIG-${cross_prefix}pkg-config}"
query_pkg_config() {
"${pkg_config_exe}" ${QEMU_PKG_CONFIG_FLAGS} "$@"
}
pkg_config=query_pkg_config
sdl2_config="${SDL2_CONFIG-${cross_prefix}sdl2-config}"
# If the user hasn't specified ARFLAGS, default to 'rv', just as make does.
ARFLAGS="${ARFLAGS-rv}"
```
>
> Thanks,
>
> Phil.
>
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
[-- Attachment #2: Type: text/html, Size: 10640 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 3/6] ci: Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 Enable msys2 ci in cirrus
2020-09-02 17:30 ` Philippe Mathieu-Daudé
2020-09-02 17:42 ` 罗勇刚(Yonggang Luo)
@ 2020-09-02 17:50 ` 罗勇刚(Yonggang Luo)
2020-09-02 18:54 ` Mark Cave-Ayland
2020-09-02 18:50 ` Mark Cave-Ayland
2 siblings, 1 reply; 29+ messages in thread
From: 罗勇刚(Yonggang Luo) @ 2020-09-02 17:50 UTC (permalink / raw)
To: Philippe Mathieu-Daudé; +Cc: Paolo Bonzini, qemu-level
[-- Attachment #1: Type: text/plain, Size: 5457 bytes --]
On Thu, Sep 3, 2020 at 1:30 AM Philippe Mathieu-Daudé <f4bug@amsat.org>
wrote:
> On 9/2/20 7:00 PM, Yonggang Luo wrote:
> > ---
> > .cirrus.yml | 23 ++++++++++++++++
> > scripts/ci/windows/msys2_build.sh | 35 ++++++++++++++++++++++++
> > scripts/ci/windows/msys2_install.sh | 41 +++++++++++++++++++++++++++++
> > 3 files changed, 99 insertions(+)
> > create mode 100644 scripts/ci/windows/msys2_build.sh
> > create mode 100644 scripts/ci/windows/msys2_install.sh
> >
> > diff --git a/.cirrus.yml b/.cirrus.yml
> > index f287d23c5b..d377c28412 100644
> > --- a/.cirrus.yml
> > +++ b/.cirrus.yml
> > @@ -40,3 +40,26 @@ macos_xcode_task:
> > - ../configure --cc=clang || { cat config.log; exit 1; }
> > - gmake -j$(sysctl -n hw.ncpu)
> > - gmake check
> > +
> > +windows_msys2_task:
> > + windows_container:
> > + image: cirrusci/windowsservercore:cmake
> > + os_version: 2019
> > + cpu: 8
> > + memory: 8G
> > + env:
> > + MSYS: winsymlinks:nativestrict
> > + MSYSTEM: MINGW64
> > + CHERE_INVOKING: 1
> > + printenv_script: C:\tools\msys64\usr\bin\bash.exe -lc 'printenv'
> > + install_script:
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O
> http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz
> "
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O
> http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig
> "
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && pacman -U
> --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz"
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman -Sy --noconfirm"
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --needed --noconfirm
> -S bash pacman pacman-mirrors msys2-runtime"
> > + - taskkill /F /IM gpg-agent.exe
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Su"
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "sh
> scripts/ci/windows/msys2_install.sh"
> > + script:
> > + C:\tools\msys64\usr\bin\bash.exe -lc "sh
> scripts/ci/windows/msys2_build.sh"
> > diff --git a/scripts/ci/windows/msys2_build.sh
> b/scripts/ci/windows/msys2_build.sh
> > new file mode 100644
> > index 0000000000..0363ef402a
> > --- /dev/null
> > +++ b/scripts/ci/windows/msys2_build.sh
> > @@ -0,0 +1,35 @@
> > +export QEMU_DIR=$PWD
> > +mkdir ../qemu-build
> > +cd ../qemu-build
> > +$QEMU_DIR/configure \
> > + --python=python3 \
> > + --cross-prefix=x86_64-w64-mingw32- \
>
> Isn't the prefix 'x86_64-w64-mingw32-gcc-'?
>
> > + --enable-gtk --enable-sdl \
> > + --enable-capstone=git \
> > + --enable-stack-protector \
> > + --ninja=ninja \
> > + --enable-gnutls \
> > + --enable-nettle \
> > + --enable-vnc \
> > + --enable-vnc-sasl \
> > + --enable-vnc-jpeg \
> > + --enable-vnc-png \
> > + --enable-membarrier \
> > + --enable-slirp=git \
> > + --disable-kvm \
> > + --enable-hax \
> > + --enable-whpx \
> > + --disable-spice \
> > + --enable-lzo \
> > + --enable-snappy \
> > + --enable-bzip2 \
> > + --enable-vdi \
> > + --enable-qcow1 \
> > + --enable-tools \
> > + --enable-libusb \
> > + --enable-usb-redir \
> > + --disable-libnfs \
> > + --enable-libssh \
> > + --disable-pie
> > +make -j$NUMBER_OF_PROCESSORS
> > +# make -j$NUMBER_OF_PROCESSORS check
> > diff --git a/scripts/ci/windows/msys2_install.sh
> b/scripts/ci/windows/msys2_install.sh
> > new file mode 100644
> > index 0000000000..3a5392cd99
> > --- /dev/null
> > +++ b/scripts/ci/windows/msys2_install.sh
> > @@ -0,0 +1,41 @@
> > +pacman --noconfirm -S --needed \
> > +base-devel \
> > +git \
> > +mingw-w64-x86_64-python \
> > +mingw-w64-x86_64-python-setuptools \
> > +mingw-w64-x86_64-toolchain \
> > +mingw-w64-x86_64-SDL2 \
> > +mingw-w64-x86_64-SDL2_image \
> > +mingw-w64-x86_64-gtk3 \
> > +mingw-w64-x86_64-ninja \
> > +mingw-w64-x86_64-make \
> > +mingw-w64-x86_64-lzo2 \
> > +mingw-w64-x86_64-libjpeg-turbo \
> > +mingw-w64-x86_64-pixman \
> > +mingw-w64-x86_64-libgcrypt \
> > +mingw-w64-x86_64-capstone \
> > +mingw-w64-x86_64-libpng \
> > +mingw-w64-x86_64-libssh \
> > +mingw-w64-x86_64-libxml2 \
> > +mingw-w64-x86_64-snappy \
> > +mingw-w64-x86_64-libusb \
> > +mingw-w64-x86_64-usbredir \
> > +mingw-w64-x86_64-libtasn1 \
> > +mingw-w64-x86_64-libnfs \
> > +mingw-w64-x86_64-nettle \
> > +mingw-w64-x86_64-cyrus-sasl \
> > +mingw-w64-x86_64-curl \
> > +mingw-w64-x86_64-gnutls \
> > +mingw-w64-x86_64-zstd \
> > +mingw-w64-x86_64-glib2
> > +
> > +cd /mingw64/bin
> > +cp x86_64-w64-mingw32-gcc-ar.exe x86_64-w64-mingw32-ar.exe
> > +cp x86_64-w64-mingw32-gcc-ranlib.exe x86_64-w64-mingw32-ranlib.exe
> > +cp x86_64-w64-mingw32-gcc-nm.exe x86_64-w64-mingw32-nm.exe
> > +cp windres.exe x86_64-w64-mingw32-windres.exe
> > +cp strip.exe x86_64-w64-mingw32-strip.exe
> > +cp objcopy.exe x86_64-w64-mingw32-objcopy.exe
> > +cp ld x86_64-w64-mingw32-ld.exe
> > +cp as x86_64-w64-mingw32-as.exe
> > +cp sdl2-config x86_64-w64-mingw32-sdl2-config
>
> Why is that needed?
>
> Thanks,
>
> Phil.
>
Hi, I am looking for suggestion for building with msys2, this is comes
from wiki, if you have better idea, then tell me.
https://wiki.qemu.org/Hosts/W32#Native_builds_with_MSYS2
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
[-- Attachment #2: Type: text/html, Size: 7045 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 3/6] ci: Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 Enable msys2 ci in cirrus
2020-09-02 17:30 ` Philippe Mathieu-Daudé
2020-09-02 17:42 ` 罗勇刚(Yonggang Luo)
2020-09-02 17:50 ` 罗勇刚(Yonggang Luo)
@ 2020-09-02 18:50 ` Mark Cave-Ayland
2 siblings, 0 replies; 29+ messages in thread
From: Mark Cave-Ayland @ 2020-09-02 18:50 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Yonggang Luo, qemu-devel; +Cc: Paolo Bonzini
On 02/09/2020 18:30, Philippe Mathieu-Daudé wrote:
> On 9/2/20 7:00 PM, Yonggang Luo wrote:
>> ---
>> .cirrus.yml | 23 ++++++++++++++++
>> scripts/ci/windows/msys2_build.sh | 35 ++++++++++++++++++++++++
>> scripts/ci/windows/msys2_install.sh | 41 +++++++++++++++++++++++++++++
>> 3 files changed, 99 insertions(+)
>> create mode 100644 scripts/ci/windows/msys2_build.sh
>> create mode 100644 scripts/ci/windows/msys2_install.sh
>>
>> diff --git a/.cirrus.yml b/.cirrus.yml
>> index f287d23c5b..d377c28412 100644
>> --- a/.cirrus.yml
>> +++ b/.cirrus.yml
>> @@ -40,3 +40,26 @@ macos_xcode_task:
>> - ../configure --cc=clang || { cat config.log; exit 1; }
>> - gmake -j$(sysctl -n hw.ncpu)
>> - gmake check
>> +
>> +windows_msys2_task:
>> + windows_container:
>> + image: cirrusci/windowsservercore:cmake
>> + os_version: 2019
>> + cpu: 8
>> + memory: 8G
>> + env:
>> + MSYS: winsymlinks:nativestrict
>> + MSYSTEM: MINGW64
>> + CHERE_INVOKING: 1
>> + printenv_script: C:\tools\msys64\usr\bin\bash.exe -lc 'printenv'
>> + install_script:
>> + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz"
>> + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig"
>> + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && pacman -U --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz"
>> + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman -Sy --noconfirm"
>> + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --needed --noconfirm -S bash pacman pacman-mirrors msys2-runtime"
>> + - taskkill /F /IM gpg-agent.exe
>> + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Su"
>> + - C:\tools\msys64\usr\bin\bash.exe -lc "sh scripts/ci/windows/msys2_install.sh"
>> + script:
>> + C:\tools\msys64\usr\bin\bash.exe -lc "sh scripts/ci/windows/msys2_build.sh"
>> diff --git a/scripts/ci/windows/msys2_build.sh b/scripts/ci/windows/msys2_build.sh
>> new file mode 100644
>> index 0000000000..0363ef402a
>> --- /dev/null
>> +++ b/scripts/ci/windows/msys2_build.sh
>> @@ -0,0 +1,35 @@
>> +export QEMU_DIR=$PWD
>> +mkdir ../qemu-build
>> +cd ../qemu-build
>> +$QEMU_DIR/configure \
>> + --python=python3 \
>> + --cross-prefix=x86_64-w64-mingw32- \
>
> Isn't the prefix 'x86_64-w64-mingw32-gcc-'?
>
>> + --enable-gtk --enable-sdl \
>> + --enable-capstone=git \
>> + --enable-stack-protector \
>> + --ninja=ninja \
>> + --enable-gnutls \
>> + --enable-nettle \
>> + --enable-vnc \
>> + --enable-vnc-sasl \
>> + --enable-vnc-jpeg \
>> + --enable-vnc-png \
>> + --enable-membarrier \
>> + --enable-slirp=git \
>> + --disable-kvm \
>> + --enable-hax \
>> + --enable-whpx \
>> + --disable-spice \
>> + --enable-lzo \
>> + --enable-snappy \
>> + --enable-bzip2 \
>> + --enable-vdi \
>> + --enable-qcow1 \
>> + --enable-tools \
>> + --enable-libusb \
>> + --enable-usb-redir \
>> + --disable-libnfs \
>> + --enable-libssh \
>> + --disable-pie
>> +make -j$NUMBER_OF_PROCESSORS
>> +# make -j$NUMBER_OF_PROCESSORS check
>> diff --git a/scripts/ci/windows/msys2_install.sh b/scripts/ci/windows/msys2_install.sh
>> new file mode 100644
>> index 0000000000..3a5392cd99
>> --- /dev/null
>> +++ b/scripts/ci/windows/msys2_install.sh
>> @@ -0,0 +1,41 @@
>> +pacman --noconfirm -S --needed \
>> +base-devel \
>> +git \
>> +mingw-w64-x86_64-python \
>> +mingw-w64-x86_64-python-setuptools \
>> +mingw-w64-x86_64-toolchain \
>> +mingw-w64-x86_64-SDL2 \
>> +mingw-w64-x86_64-SDL2_image \
>> +mingw-w64-x86_64-gtk3 \
>> +mingw-w64-x86_64-ninja \
>> +mingw-w64-x86_64-make \
>> +mingw-w64-x86_64-lzo2 \
>> +mingw-w64-x86_64-libjpeg-turbo \
>> +mingw-w64-x86_64-pixman \
>> +mingw-w64-x86_64-libgcrypt \
>> +mingw-w64-x86_64-capstone \
>> +mingw-w64-x86_64-libpng \
>> +mingw-w64-x86_64-libssh \
>> +mingw-w64-x86_64-libxml2 \
>> +mingw-w64-x86_64-snappy \
>> +mingw-w64-x86_64-libusb \
>> +mingw-w64-x86_64-usbredir \
>> +mingw-w64-x86_64-libtasn1 \
>> +mingw-w64-x86_64-libnfs \
>> +mingw-w64-x86_64-nettle \
>> +mingw-w64-x86_64-cyrus-sasl \
>> +mingw-w64-x86_64-curl \
>> +mingw-w64-x86_64-gnutls \
>> +mingw-w64-x86_64-zstd \
>> +mingw-w64-x86_64-glib2
Great work! Having a CI for msys2/mingw-w64 is fantastic :)
ATB,
Mark.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 3/6] ci: Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 Enable msys2 ci in cirrus
2020-09-02 17:50 ` 罗勇刚(Yonggang Luo)
@ 2020-09-02 18:54 ` Mark Cave-Ayland
2020-09-02 18:56 ` 罗勇刚(Yonggang Luo)
0 siblings, 1 reply; 29+ messages in thread
From: Mark Cave-Ayland @ 2020-09-02 18:54 UTC (permalink / raw)
To: luoyonggang, Philippe Mathieu-Daudé; +Cc: Paolo Bonzini, qemu-level
On 02/09/2020 18:50, 罗勇刚(Yonggang Luo) wrote:
> On Thu, Sep 3, 2020 at 1:30 AM Philippe Mathieu-Daudé <f4bug@amsat.org
> <mailto:f4bug@amsat.org>> wrote:
>
> On 9/2/20 7:00 PM, Yonggang Luo wrote:
> > ---
> > .cirrus.yml | 23 ++++++++++++++++
> > scripts/ci/windows/msys2_build.sh | 35 ++++++++++++++++++++++++
> > scripts/ci/windows/msys2_install.sh | 41 +++++++++++++++++++++++++++++
> > 3 files changed, 99 insertions(+)
> > create mode 100644 scripts/ci/windows/msys2_build.sh
> > create mode 100644 scripts/ci/windows/msys2_install.sh
> >
> > diff --git a/.cirrus.yml b/.cirrus.yml
> > index f287d23c5b..d377c28412 100644
> > --- a/.cirrus.yml
> > +++ b/.cirrus.yml
> > @@ -40,3 +40,26 @@ macos_xcode_task:
> > - ../configure --cc=clang || { cat config.log; exit 1; }
> > - gmake -j$(sysctl -n hw.ncpu)
> > - gmake check
> > +
> > +windows_msys2_task:
> > + windows_container:
> > + image: cirrusci/windowsservercore:cmake
> > + os_version: 2019
> > + cpu: 8
> > + memory: 8G
> > + env:
> > + MSYS: winsymlinks:nativestrict
> > + MSYSTEM: MINGW64
> > + CHERE_INVOKING: 1
> > + printenv_script: C:\tools\msys64\usr\bin\bash.exe -lc 'printenv'
> > + install_script:
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O
> http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz"
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O
> http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig"
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && pacman -U
> --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz"
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman -Sy --noconfirm"
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --needed --noconfirm -S
> bash pacman pacman-mirrors msys2-runtime"
> > + - taskkill /F /IM gpg-agent.exe
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Su"
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "sh
> scripts/ci/windows/msys2_install.sh"
> > + script:
> > + C:\tools\msys64\usr\bin\bash.exe -lc "sh scripts/ci/windows/msys2_build.sh"
> > diff --git a/scripts/ci/windows/msys2_build.sh b/scripts/ci/windows/msys2_build.sh
> > new file mode 100644
> > index 0000000000..0363ef402a
> > --- /dev/null
> > +++ b/scripts/ci/windows/msys2_build.sh
> > @@ -0,0 +1,35 @@
> > +export QEMU_DIR=$PWD
> > +mkdir ../qemu-build
> > +cd ../qemu-build
> > +$QEMU_DIR/configure \
> > + --python=python3 \
> > + --cross-prefix=x86_64-w64-mingw32- \
>
> Isn't the prefix 'x86_64-w64-mingw32-gcc-'?
>
> > + --enable-gtk --enable-sdl \
> > + --enable-capstone=git \
> > + --enable-stack-protector \
> > + --ninja=ninja \
> > + --enable-gnutls \
> > + --enable-nettle \
> > + --enable-vnc \
> > + --enable-vnc-sasl \
> > + --enable-vnc-jpeg \
> > + --enable-vnc-png \
> > + --enable-membarrier \
> > + --enable-slirp=git \
> > + --disable-kvm \
> > + --enable-hax \
> > + --enable-whpx \
> > + --disable-spice \
> > + --enable-lzo \
> > + --enable-snappy \
> > + --enable-bzip2 \
> > + --enable-vdi \
> > + --enable-qcow1 \
> > + --enable-tools \
> > + --enable-libusb \
> > + --enable-usb-redir \
> > + --disable-libnfs \
> > + --enable-libssh \
> > + --disable-pie
> > +make -j$NUMBER_OF_PROCESSORS
> > +# make -j$NUMBER_OF_PROCESSORS check
> > diff --git a/scripts/ci/windows/msys2_install.sh
> b/scripts/ci/windows/msys2_install.sh
> > new file mode 100644
> > index 0000000000..3a5392cd99
> > --- /dev/null
> > +++ b/scripts/ci/windows/msys2_install.sh
> > @@ -0,0 +1,41 @@
> > +pacman --noconfirm -S --needed \
> > +base-devel \
> > +git \
> > +mingw-w64-x86_64-python \
> > +mingw-w64-x86_64-python-setuptools \
> > +mingw-w64-x86_64-toolchain \
> > +mingw-w64-x86_64-SDL2 \
> > +mingw-w64-x86_64-SDL2_image \
> > +mingw-w64-x86_64-gtk3 \
> > +mingw-w64-x86_64-ninja \
> > +mingw-w64-x86_64-make \
> > +mingw-w64-x86_64-lzo2 \
> > +mingw-w64-x86_64-libjpeg-turbo \
> > +mingw-w64-x86_64-pixman \
> > +mingw-w64-x86_64-libgcrypt \
> > +mingw-w64-x86_64-capstone \
> > +mingw-w64-x86_64-libpng \
> > +mingw-w64-x86_64-libssh \
> > +mingw-w64-x86_64-libxml2 \
> > +mingw-w64-x86_64-snappy \
> > +mingw-w64-x86_64-libusb \
> > +mingw-w64-x86_64-usbredir \
> > +mingw-w64-x86_64-libtasn1 \
> > +mingw-w64-x86_64-libnfs \
> > +mingw-w64-x86_64-nettle \
> > +mingw-w64-x86_64-cyrus-sasl \
> > +mingw-w64-x86_64-curl \
> > +mingw-w64-x86_64-gnutls \
> > +mingw-w64-x86_64-zstd \
> > +mingw-w64-x86_64-glib2
> > +
> > +cd /mingw64/bin
> > +cp x86_64-w64-mingw32-gcc-ar.exe x86_64-w64-mingw32-ar.exe
> > +cp x86_64-w64-mingw32-gcc-ranlib.exe x86_64-w64-mingw32-ranlib.exe
> > +cp x86_64-w64-mingw32-gcc-nm.exe x86_64-w64-mingw32-nm.exe
> > +cp windres.exe x86_64-w64-mingw32-windres.exe
> > +cp strip.exe x86_64-w64-mingw32-strip.exe
> > +cp objcopy.exe x86_64-w64-mingw32-objcopy.exe
> > +cp ld x86_64-w64-mingw32-ld.exe
> > +cp as x86_64-w64-mingw32-as.exe
> > +cp sdl2-config x86_64-w64-mingw32-sdl2-config
>
> Why is that needed?
>
> Thanks,
>
> Phil.
>
> Hi, I am looking for suggestion for building with msys2, this is comes from wiki, if
> you have better idea, then tell me.
>
> https://wiki.qemu.org/Hosts/W32#Native_builds_with_MSYS2
FWIW I did a clean install of MSYS2 after the meson changes were merged and it seems
to make things a bit simpler for Windows. Once Paolo's latest PR has been applied you
should be able to do the following (from my notes for PPC builds):
# As per https://www.msys2.org/
pacman -Syu
pacman -Su
# QEMU build environment
pacman -S \
base-devel \
mingw-w64-x86_64-toolchain \
git \
mingw64/mingw-w64-x86_64-python3 \
mingw64/mingw-w64-x86_64-python-setuptools \
mingw64/mingw-w64-x86_64-ninja
# Basic GTK/SDL build
pacman -S \
mingw-w64-x86_64-glib2 \
mingw64/mingw-w64-x86_64-gtk3 \
mingw64/mingw-w64-x86_64-SDL2
# Build
./configure --target-list="ppc-softmmu" --ninja=ninja
make -j6
That should be enough to get a basic working Windows build with GTK/SDL2 UI, although
I see you've added a lot more options.
ATB,
Mark.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 3/6] ci: Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 Enable msys2 ci in cirrus
2020-09-02 18:54 ` Mark Cave-Ayland
@ 2020-09-02 18:56 ` 罗勇刚(Yonggang Luo)
2020-09-02 19:00 ` Mark Cave-Ayland
0 siblings, 1 reply; 29+ messages in thread
From: 罗勇刚(Yonggang Luo) @ 2020-09-02 18:56 UTC (permalink / raw)
To: Mark Cave-Ayland; +Cc: Paolo Bonzini, Philippe Mathieu-Daudé, qemu-level
[-- Attachment #1: Type: text/plain, Size: 7605 bytes --]
On Thu, Sep 3, 2020 at 2:55 AM Mark Cave-Ayland <
mark.cave-ayland@ilande.co.uk> wrote:
> On 02/09/2020 18:50, 罗勇刚(Yonggang Luo) wrote:
>
> > On Thu, Sep 3, 2020 at 1:30 AM Philippe Mathieu-Daudé <f4bug@amsat.org
> > <mailto:f4bug@amsat.org>> wrote:
> >
> > On 9/2/20 7:00 PM, Yonggang Luo wrote:
> > > ---
> > > .cirrus.yml | 23 ++++++++++++++++
> > > scripts/ci/windows/msys2_build.sh | 35 ++++++++++++++++++++++++
> > > scripts/ci/windows/msys2_install.sh | 41
> +++++++++++++++++++++++++++++
> > > 3 files changed, 99 insertions(+)
> > > create mode 100644 scripts/ci/windows/msys2_build.sh
> > > create mode 100644 scripts/ci/windows/msys2_install.sh
> > >
> > > diff --git a/.cirrus.yml b/.cirrus.yml
> > > index f287d23c5b..d377c28412 100644
> > > --- a/.cirrus.yml
> > > +++ b/.cirrus.yml
> > > @@ -40,3 +40,26 @@ macos_xcode_task:
> > > - ../configure --cc=clang || { cat config.log; exit 1; }
> > > - gmake -j$(sysctl -n hw.ncpu)
> > > - gmake check
> > > +
> > > +windows_msys2_task:
> > > + windows_container:
> > > + image: cirrusci/windowsservercore:cmake
> > > + os_version: 2019
> > > + cpu: 8
> > > + memory: 8G
> > > + env:
> > > + MSYS: winsymlinks:nativestrict
> > > + MSYSTEM: MINGW64
> > > + CHERE_INVOKING: 1
> > > + printenv_script: C:\tools\msys64\usr\bin\bash.exe -lc 'printenv'
> > > + install_script:
> > > + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O
> >
> http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz
> "
> > > + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O
> >
> http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig
> "
> > > + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && pacman
> -U
> > --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz"
> > > + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman -Sy
> --noconfirm"
> > > + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --needed
> --noconfirm -S
> > bash pacman pacman-mirrors msys2-runtime"
> > > + - taskkill /F /IM gpg-agent.exe
> > > + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm
> -Su"
> > > + - C:\tools\msys64\usr\bin\bash.exe -lc "sh
> > scripts/ci/windows/msys2_install.sh"
> > > + script:
> > > + C:\tools\msys64\usr\bin\bash.exe -lc "sh
> scripts/ci/windows/msys2_build.sh"
> > > diff --git a/scripts/ci/windows/msys2_build.sh
> b/scripts/ci/windows/msys2_build.sh
> > > new file mode 100644
> > > index 0000000000..0363ef402a
> > > --- /dev/null
> > > +++ b/scripts/ci/windows/msys2_build.sh
> > > @@ -0,0 +1,35 @@
> > > +export QEMU_DIR=$PWD
> > > +mkdir ../qemu-build
> > > +cd ../qemu-build
> > > +$QEMU_DIR/configure \
> > > + --python=python3 \
> > > + --cross-prefix=x86_64-w64-mingw32- \
> >
> > Isn't the prefix 'x86_64-w64-mingw32-gcc-'?
> >
> > > + --enable-gtk --enable-sdl \
> > > + --enable-capstone=git \
> > > + --enable-stack-protector \
> > > + --ninja=ninja \
> > > + --enable-gnutls \
> > > + --enable-nettle \
> > > + --enable-vnc \
> > > + --enable-vnc-sasl \
> > > + --enable-vnc-jpeg \
> > > + --enable-vnc-png \
> > > + --enable-membarrier \
> > > + --enable-slirp=git \
> > > + --disable-kvm \
> > > + --enable-hax \
> > > + --enable-whpx \
> > > + --disable-spice \
> > > + --enable-lzo \
> > > + --enable-snappy \
> > > + --enable-bzip2 \
> > > + --enable-vdi \
> > > + --enable-qcow1 \
> > > + --enable-tools \
> > > + --enable-libusb \
> > > + --enable-usb-redir \
> > > + --disable-libnfs \
> > > + --enable-libssh \
> > > + --disable-pie
> > > +make -j$NUMBER_OF_PROCESSORS
> > > +# make -j$NUMBER_OF_PROCESSORS check
> > > diff --git a/scripts/ci/windows/msys2_install.sh
> > b/scripts/ci/windows/msys2_install.sh
> > > new file mode 100644
> > > index 0000000000..3a5392cd99
> > > --- /dev/null
> > > +++ b/scripts/ci/windows/msys2_install.sh
> > > @@ -0,0 +1,41 @@
> > > +pacman --noconfirm -S --needed \
> > > +base-devel \
> > > +git \
> > > +mingw-w64-x86_64-python \
> > > +mingw-w64-x86_64-python-setuptools \
> > > +mingw-w64-x86_64-toolchain \
> > > +mingw-w64-x86_64-SDL2 \
> > > +mingw-w64-x86_64-SDL2_image \
> > > +mingw-w64-x86_64-gtk3 \
> > > +mingw-w64-x86_64-ninja \
> > > +mingw-w64-x86_64-make \
> > > +mingw-w64-x86_64-lzo2 \
> > > +mingw-w64-x86_64-libjpeg-turbo \
> > > +mingw-w64-x86_64-pixman \
> > > +mingw-w64-x86_64-libgcrypt \
> > > +mingw-w64-x86_64-capstone \
> > > +mingw-w64-x86_64-libpng \
> > > +mingw-w64-x86_64-libssh \
> > > +mingw-w64-x86_64-libxml2 \
> > > +mingw-w64-x86_64-snappy \
> > > +mingw-w64-x86_64-libusb \
> > > +mingw-w64-x86_64-usbredir \
> > > +mingw-w64-x86_64-libtasn1 \
> > > +mingw-w64-x86_64-libnfs \
> > > +mingw-w64-x86_64-nettle \
> > > +mingw-w64-x86_64-cyrus-sasl \
> > > +mingw-w64-x86_64-curl \
> > > +mingw-w64-x86_64-gnutls \
> > > +mingw-w64-x86_64-zstd \
> > > +mingw-w64-x86_64-glib2
> > > +
> > > +cd /mingw64/bin
> > > +cp x86_64-w64-mingw32-gcc-ar.exe x86_64-w64-mingw32-ar.exe
> > > +cp x86_64-w64-mingw32-gcc-ranlib.exe x86_64-w64-mingw32-ranlib.exe
> > > +cp x86_64-w64-mingw32-gcc-nm.exe x86_64-w64-mingw32-nm.exe
> > > +cp windres.exe x86_64-w64-mingw32-windres.exe
> > > +cp strip.exe x86_64-w64-mingw32-strip.exe
> > > +cp objcopy.exe x86_64-w64-mingw32-objcopy.exe
> > > +cp ld x86_64-w64-mingw32-ld.exe
> > > +cp as x86_64-w64-mingw32-as.exe
> > > +cp sdl2-config x86_64-w64-mingw32-sdl2-config
> >
> > Why is that needed?
> >
> > Thanks,
> >
> > Phil.
> >
> > Hi, I am looking for suggestion for building with msys2, this is comes
> from wiki, if
> > you have better idea, then tell me.
> >
> > https://wiki.qemu.org/Hosts/W32#Native_builds_with_MSYS2
>
> FWIW I did a clean install of MSYS2 after the meson changes were merged
> and it seems
> to make things a bit simpler for Windows. Once Paolo's latest PR has been
> applied you
> should be able to do the following (from my notes for PPC builds):
>
> # As per https://www.msys2.org/
> pacman -Syu
> pacman -Su
>
> # QEMU build environment
> pacman -S \
> base-devel \
> mingw-w64-x86_64-toolchain \
> git \
> mingw64/mingw-w64-x86_64-python3 \
> mingw64/mingw-w64-x86_64-python-setuptools \
> mingw64/mingw-w64-x86_64-ninja
>
> # Basic GTK/SDL build
> pacman -S \
> mingw-w64-x86_64-glib2 \
> mingw64/mingw-w64-x86_64-gtk3 \
> mingw64/mingw-w64-x86_64-SDL2
>
> # Build
> ./configure --target-list="ppc-softmmu" --ninja=ninja
> make -j6
>
> That should be enough to get a basic working Windows build with GTK/SDL2
> UI, although
> I see you've added a lot more options.
I am trying to enable all possible feature on the CI for monitoring the
regression, at least from the compiling points of view
>
>
> ATB,
>
> Mark.
>
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
[-- Attachment #2: Type: text/html, Size: 10672 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 3/6] ci: Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 Enable msys2 ci in cirrus
2020-09-02 18:56 ` 罗勇刚(Yonggang Luo)
@ 2020-09-02 19:00 ` Mark Cave-Ayland
2020-09-02 19:01 ` 罗勇刚(Yonggang Luo)
0 siblings, 1 reply; 29+ messages in thread
From: Mark Cave-Ayland @ 2020-09-02 19:00 UTC (permalink / raw)
To: luoyonggang; +Cc: Paolo Bonzini, Philippe Mathieu-Daudé, qemu-level
On 02/09/2020 19:56, 罗勇刚(Yonggang Luo) wrote:
> On Thu, Sep 3, 2020 at 2:55 AM Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk
> <mailto:mark.cave-ayland@ilande.co.uk>> wrote:
>
> On 02/09/2020 18:50, 罗勇刚(Yonggang Luo) wrote:
>
> > On Thu, Sep 3, 2020 at 1:30 AM Philippe Mathieu-Daudé <f4bug@amsat.org
> <mailto:f4bug@amsat.org>
> > <mailto:f4bug@amsat.org <mailto:f4bug@amsat.org>>> wrote:
> >
> > On 9/2/20 7:00 PM, Yonggang Luo wrote:
> > > ---
> > > .cirrus.yml | 23 ++++++++++++++++
> > > scripts/ci/windows/msys2_build.sh | 35 ++++++++++++++++++++++++
> > > scripts/ci/windows/msys2_install.sh | 41 +++++++++++++++++++++++++++++
> > > 3 files changed, 99 insertions(+)
> > > create mode 100644 scripts/ci/windows/msys2_build.sh
> > > create mode 100644 scripts/ci/windows/msys2_install.sh
> > >
> > > diff --git a/.cirrus.yml b/.cirrus.yml
> > > index f287d23c5b..d377c28412 100644
> > > --- a/.cirrus.yml
> > > +++ b/.cirrus.yml
> > > @@ -40,3 +40,26 @@ macos_xcode_task:
> > > - ../configure --cc=clang || { cat config.log; exit 1; }
> > > - gmake -j$(sysctl -n hw.ncpu)
> > > - gmake check
> > > +
> > > +windows_msys2_task:
> > > + windows_container:
> > > + image: cirrusci/windowsservercore:cmake
> > > + os_version: 2019
> > > + cpu: 8
> > > + memory: 8G
> > > + env:
> > > + MSYS: winsymlinks:nativestrict
> > > + MSYSTEM: MINGW64
> > > + CHERE_INVOKING: 1
> > > + printenv_script: C:\tools\msys64\usr\bin\bash.exe -lc 'printenv'
> > > + install_script:
> > > + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O
> > http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz"
> > > + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O
> >
> http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig"
> > > + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && pacman -U
> > --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz"
> > > + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman -Sy --noconfirm"
> > > + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --needed --noconfirm -S
> > bash pacman pacman-mirrors msys2-runtime"
> > > + - taskkill /F /IM gpg-agent.exe
> > > + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Su"
> > > + - C:\tools\msys64\usr\bin\bash.exe -lc "sh
> > scripts/ci/windows/msys2_install.sh"
> > > + script:
> > > + C:\tools\msys64\usr\bin\bash.exe -lc "sh
> scripts/ci/windows/msys2_build.sh"
> > > diff --git a/scripts/ci/windows/msys2_build.sh
> b/scripts/ci/windows/msys2_build.sh
> > > new file mode 100644
> > > index 0000000000..0363ef402a
> > > --- /dev/null
> > > +++ b/scripts/ci/windows/msys2_build.sh
> > > @@ -0,0 +1,35 @@
> > > +export QEMU_DIR=$PWD
> > > +mkdir ../qemu-build
> > > +cd ../qemu-build
> > > +$QEMU_DIR/configure \
> > > + --python=python3 \
> > > + --cross-prefix=x86_64-w64-mingw32- \
> >
> > Isn't the prefix 'x86_64-w64-mingw32-gcc-'?
> >
> > > + --enable-gtk --enable-sdl \
> > > + --enable-capstone=git \
> > > + --enable-stack-protector \
> > > + --ninja=ninja \
> > > + --enable-gnutls \
> > > + --enable-nettle \
> > > + --enable-vnc \
> > > + --enable-vnc-sasl \
> > > + --enable-vnc-jpeg \
> > > + --enable-vnc-png \
> > > + --enable-membarrier \
> > > + --enable-slirp=git \
> > > + --disable-kvm \
> > > + --enable-hax \
> > > + --enable-whpx \
> > > + --disable-spice \
> > > + --enable-lzo \
> > > + --enable-snappy \
> > > + --enable-bzip2 \
> > > + --enable-vdi \
> > > + --enable-qcow1 \
> > > + --enable-tools \
> > > + --enable-libusb \
> > > + --enable-usb-redir \
> > > + --disable-libnfs \
> > > + --enable-libssh \
> > > + --disable-pie
> > > +make -j$NUMBER_OF_PROCESSORS
> > > +# make -j$NUMBER_OF_PROCESSORS check
> > > diff --git a/scripts/ci/windows/msys2_install.sh
> > b/scripts/ci/windows/msys2_install.sh
> > > new file mode 100644
> > > index 0000000000..3a5392cd99
> > > --- /dev/null
> > > +++ b/scripts/ci/windows/msys2_install.sh
> > > @@ -0,0 +1,41 @@
> > > +pacman --noconfirm -S --needed \
> > > +base-devel \
> > > +git \
> > > +mingw-w64-x86_64-python \
> > > +mingw-w64-x86_64-python-setuptools \
> > > +mingw-w64-x86_64-toolchain \
> > > +mingw-w64-x86_64-SDL2 \
> > > +mingw-w64-x86_64-SDL2_image \
> > > +mingw-w64-x86_64-gtk3 \
> > > +mingw-w64-x86_64-ninja \
> > > +mingw-w64-x86_64-make \
> > > +mingw-w64-x86_64-lzo2 \
> > > +mingw-w64-x86_64-libjpeg-turbo \
> > > +mingw-w64-x86_64-pixman \
> > > +mingw-w64-x86_64-libgcrypt \
> > > +mingw-w64-x86_64-capstone \
> > > +mingw-w64-x86_64-libpng \
> > > +mingw-w64-x86_64-libssh \
> > > +mingw-w64-x86_64-libxml2 \
> > > +mingw-w64-x86_64-snappy \
> > > +mingw-w64-x86_64-libusb \
> > > +mingw-w64-x86_64-usbredir \
> > > +mingw-w64-x86_64-libtasn1 \
> > > +mingw-w64-x86_64-libnfs \
> > > +mingw-w64-x86_64-nettle \
> > > +mingw-w64-x86_64-cyrus-sasl \
> > > +mingw-w64-x86_64-curl \
> > > +mingw-w64-x86_64-gnutls \
> > > +mingw-w64-x86_64-zstd \
> > > +mingw-w64-x86_64-glib2
> > > +
> > > +cd /mingw64/bin
> > > +cp x86_64-w64-mingw32-gcc-ar.exe x86_64-w64-mingw32-ar.exe
> > > +cp x86_64-w64-mingw32-gcc-ranlib.exe x86_64-w64-mingw32-ranlib.exe
> > > +cp x86_64-w64-mingw32-gcc-nm.exe x86_64-w64-mingw32-nm.exe
> > > +cp windres.exe x86_64-w64-mingw32-windres.exe
> > > +cp strip.exe x86_64-w64-mingw32-strip.exe
> > > +cp objcopy.exe x86_64-w64-mingw32-objcopy.exe
> > > +cp ld x86_64-w64-mingw32-ld.exe
> > > +cp as x86_64-w64-mingw32-as.exe
> > > +cp sdl2-config x86_64-w64-mingw32-sdl2-config
> >
> > Why is that needed?
> >
> > Thanks,
> >
> > Phil.
> >
> > Hi, I am looking for suggestion for building with msys2, this is comes from
> wiki, if
> > you have better idea, then tell me.
> >
> > https://wiki.qemu.org/Hosts/W32#Native_builds_with_MSYS2
>
> FWIW I did a clean install of MSYS2 after the meson changes were merged and it seems
> to make things a bit simpler for Windows. Once Paolo's latest PR has been applied you
> should be able to do the following (from my notes for PPC builds):
>
> # As per https://www.msys2.org/
> pacman -Syu
> pacman -Su
>
> # QEMU build environment
> pacman -S \
> base-devel \
> mingw-w64-x86_64-toolchain \
> git \
> mingw64/mingw-w64-x86_64-python3 \
> mingw64/mingw-w64-x86_64-python-setuptools \
> mingw64/mingw-w64-x86_64-ninja
>
> # Basic GTK/SDL build
> pacman -S \
> mingw-w64-x86_64-glib2 \
> mingw64/mingw-w64-x86_64-gtk3 \
> mingw64/mingw-w64-x86_64-SDL2
>
> # Build
> ./configure --target-list="ppc-softmmu" --ninja=ninja
> make -j6
>
> That should be enough to get a basic working Windows build with GTK/SDL2 UI, although
> I see you've added a lot more options.
>
> I am trying to enable all possible feature on the CI for monitoring the regression,
> at least from the compiling points of view
Yes indeed, it looks like a very comprehensive build :) Note that with the meson
build I no longer have to copy/rename toolchain exes compared to your .cirrus.yml
file so maybe that issue is now fixed?
ATB,
Mark.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 3/6] ci: Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 Enable msys2 ci in cirrus
2020-09-02 19:00 ` Mark Cave-Ayland
@ 2020-09-02 19:01 ` 罗勇刚(Yonggang Luo)
2020-09-02 19:13 ` Mark Cave-Ayland
0 siblings, 1 reply; 29+ messages in thread
From: 罗勇刚(Yonggang Luo) @ 2020-09-02 19:01 UTC (permalink / raw)
To: Mark Cave-Ayland; +Cc: Paolo Bonzini, Philippe Mathieu-Daudé, qemu-level
[-- Attachment #1: Type: text/plain, Size: 453 bytes --]
>
>
> Yes indeed, it looks like a very comprehensive build :) Note that with
> the meson
> build I no longer have to copy/rename toolchain exes compared to your
> .cirrus.yml
> file so maybe that issue is now fixed?
>
> That's not fixed, I am building a full build, so I will use any possible
toolchain, and you may not use it at all.
>
> ATB,
>
> Mark.
>
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
[-- Attachment #2: Type: text/html, Size: 920 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 3/6] ci: Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 Enable msys2 ci in cirrus
2020-09-02 19:01 ` 罗勇刚(Yonggang Luo)
@ 2020-09-02 19:13 ` Mark Cave-Ayland
2020-09-02 19:15 ` 罗勇刚(Yonggang Luo)
0 siblings, 1 reply; 29+ messages in thread
From: Mark Cave-Ayland @ 2020-09-02 19:13 UTC (permalink / raw)
To: luoyonggang; +Cc: Paolo Bonzini, Philippe Mathieu-Daudé, qemu-level
On 02/09/2020 20:01, 罗勇刚(Yonggang Luo) wrote:
> Yes indeed, it looks like a very comprehensive build :) Note that with the meson
> build I no longer have to copy/rename toolchain exes compared to your .cirrus.yml
> file so maybe that issue is now fixed?
>
> That's not fixed, I am building a full build, so I will use any possible toolchain,
> and you may not use it at all.
Hmmm. I'd expect meson to detect the toolchain once and use it throughout the build,
so perhaps this is still using some Makefile logic? I think Paolo's latest PR should
help improve this.
ATB,
Mark.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 3/6] ci: Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 Enable msys2 ci in cirrus
2020-09-02 19:13 ` Mark Cave-Ayland
@ 2020-09-02 19:15 ` 罗勇刚(Yonggang Luo)
0 siblings, 0 replies; 29+ messages in thread
From: 罗勇刚(Yonggang Luo) @ 2020-09-02 19:15 UTC (permalink / raw)
To: Mark Cave-Ayland; +Cc: Paolo Bonzini, Philippe Mathieu-Daudé, qemu-level
[-- Attachment #1: Type: text/plain, Size: 927 bytes --]
On Thu, Sep 3, 2020 at 3:13 AM Mark Cave-Ayland <
mark.cave-ayland@ilande.co.uk> wrote:
> On 02/09/2020 20:01, 罗勇刚(Yonggang Luo) wrote:
>
> > Yes indeed, it looks like a very comprehensive build :) Note that
> with the meson
> > build I no longer have to copy/rename toolchain exes compared to
> your .cirrus.yml
> > file so maybe that issue is now fixed?
> >
> > That's not fixed, I am building a full build, so I will use any possible
> toolchain,
> > and you may not use it at all.
>
> Hmmm. I'd expect meson to detect the toolchain once and use it throughout
> the build,
> so perhaps this is still using some Makefile logic? I think Paolo's latest
> PR should
> help improve this.
>
> Yeap, improved but not done, I think once configure are gone, then the
tricky are gone
>
> ATB,
>
> Mark.
>
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
[-- Attachment #2: Type: text/html, Size: 1536 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 3/6] ci: Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 Enable msys2 ci in cirrus
2020-09-02 17:42 ` 罗勇刚(Yonggang Luo)
@ 2020-09-02 19:31 ` Philippe Mathieu-Daudé
2020-09-02 19:32 ` 罗勇刚(Yonggang Luo)
0 siblings, 1 reply; 29+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-02 19:31 UTC (permalink / raw)
To: luoyonggang; +Cc: Paolo Bonzini, qemu-level
On 9/2/20 7:42 PM, 罗勇刚(Yonggang Luo) wrote:
>
>
> On Thu, Sep 3, 2020 at 1:30 AM Philippe Mathieu-Daudé <f4bug@amsat.org
> <mailto:f4bug@amsat.org>> wrote:
>
> On 9/2/20 7:00 PM, Yonggang Luo wrote:
> > ---
> > .cirrus.yml | 23 ++++++++++++++++
> > scripts/ci/windows/msys2_build.sh | 35 ++++++++++++++++++++++++
> > scripts/ci/windows/msys2_install.sh | 41
> +++++++++++++++++++++++++++++
> > 3 files changed, 99 insertions(+)
> > create mode 100644 scripts/ci/windows/msys2_build.sh
> > create mode 100644 scripts/ci/windows/msys2_install.sh
> >
> > diff --git a/.cirrus.yml b/.cirrus.yml
> > index f287d23c5b..d377c28412 100644
> > --- a/.cirrus.yml
> > +++ b/.cirrus.yml
> > @@ -40,3 +40,26 @@ macos_xcode_task:
> > - ../configure --cc=clang || { cat config.log; exit 1; }
> > - gmake -j$(sysctl -n hw.ncpu)
> > - gmake check
> > +
> > +windows_msys2_task:
> > + windows_container:
> > + image: cirrusci/windowsservercore:cmake
> > + os_version: 2019
> > + cpu: 8
> > + memory: 8G
> > + env:
> > + MSYS: winsymlinks:nativestrict
> > + MSYSTEM: MINGW64
> > + CHERE_INVOKING: 1
> > + printenv_script: C:\tools\msys64\usr\bin\bash.exe -lc 'printenv'
> > + install_script:
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl
> -O
> http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz"
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl
> -O
> http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig"
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && pacman
> -U --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz"
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman -Sy --noconfirm"
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --needed
> --noconfirm -S bash pacman pacman-mirrors msys2-runtime"
> > + - taskkill /F /IM gpg-agent.exe
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Su"
> > + - C:\tools\msys64\usr\bin\bash.exe -lc "sh
> scripts/ci/windows/msys2_install.sh"
> > + script:
> > + C:\tools\msys64\usr\bin\bash.exe -lc "sh
> scripts/ci/windows/msys2_build.sh"
> > diff --git a/scripts/ci/windows/msys2_build.sh
> b/scripts/ci/windows/msys2_build.sh
> > new file mode 100644
> > index 0000000000..0363ef402a
> > --- /dev/null
> > +++ b/scripts/ci/windows/msys2_build.sh
> > @@ -0,0 +1,35 @@
> > +export QEMU_DIR=$PWD
> > +mkdir ../qemu-build
> > +cd ../qemu-build
> > +$QEMU_DIR/configure \
> > + --python=python3 \
> > + --cross-prefix=x86_64-w64-mingw32- \
>
> Isn't the prefix 'x86_64-w64-mingw32-gcc-'?
>
> No, because of this:
> ```
> C:\CI-Tools\msys64\mingw64\bin>dir x86_64-w64-mingw32*
> 驱动器 C 中的卷是 系统
> 卷的序列号是 CAD5-8E95
>
> C:\CI-Tools\msys64\mingw64\bin 的目录
>
> 2018/01/17 16:54 36,022 x86_64-w64-mingw32-agrep.exe
> 2020/09/02 05:06 67,861 x86_64-w64-mingw32-ar.exe
> 2020/09/02 05:06 2,872,225 x86_64-w64-mingw32-as.exe
> 2020/07/24 15:41 2,208,014 x86_64-w64-mingw32-c++.exe
> 2020/02/17 19:50 489,984 x86_64-w64-mingw32-captoinfo.exe
> 2020/02/17 19:50 348,160 x86_64-w64-mingw32-clear.exe
> 2020/06/26 17:21 64,176 x86_64-w64-mingw32-deflatehd.exe
> 2020/07/24 15:41 2,208,014 x86_64-w64-mingw32-g++.exe
> 2020/07/24 15:41 2,205,454 x86_64-w64-mingw32-gcc-10.2.0.exe
> 2020/07/24 15:41 67,861 x86_64-w64-mingw32-gcc-ar.exe
> 2020/07/24 15:41 67,861 x86_64-w64-mingw32-gcc-nm.exe
> 2020/07/24 15:41 67,861 x86_64-w64-mingw32-gcc-ranlib.exe
> 2020/07/24 15:41 2,205,454 x86_64-w64-mingw32-gcc.exe
> 2020/07/24 15:41 2,208,014 x86_64-w64-mingw32-gfortran.exe
> 2020/06/26 17:21 59,734 x86_64-w64-mingw32-inflatehd.exe
> 2020/02/17 19:50 462,848 x86_64-w64-mingw32-infocmp.exe
> 2020/02/17 19:50 489,984 x86_64-w64-mingw32-infotocap.exe
> 2020/09/02 05:06 2,773,229 x86_64-w64-mingw32-ld.exe
> 2020/09/02 05:06 67,861 x86_64-w64-mingw32-nm.exe
> 2020/09/02 05:06 2,367,282 x86_64-w64-mingw32-objcopy.exe
> 2017/03/22 14:58 669,355 x86_64-w64-mingw32-pkg-config.exe
> 2020/09/02 05:06 67,861 x86_64-w64-mingw32-ranlib.exe
> 2020/02/17 19:50 356,352 x86_64-w64-mingw32-reset.exe
> 2020/09/02 05:06 1,444 x86_64-w64-mingw32-sdl2-config
> 2020/09/02 05:06 2,367,282 x86_64-w64-mingw32-strip.exe
> 2020/02/17 19:50 348,160 x86_64-w64-mingw32-tabs.exe
> 2020/02/17 19:50 489,984 x86_64-w64-mingw32-tic.exe
> 2020/02/17 19:50 409,600 x86_64-w64-mingw32-toe.exe
> 2020/02/17 19:50 355,328 x86_64-w64-mingw32-tput.exe
> 2020/02/17 19:50 356,352 x86_64-w64-mingw32-tset.exe
> 2020/09/02 05:06 2,344,638 x86_64-w64-mingw32-windres.exe
So 'x86_64-w64-mingw32-' it is.
> 31 个文件 29,104,255 字节
> 0 个目录 203,338,362,880 可用字节
> ```
>
>
> > + --enable-gtk --enable-sdl \
> > + --enable-capstone=git \
> > + --enable-stack-protector \
> > + --ninja=ninja \
> > + --enable-gnutls \
> > + --enable-nettle \
> > + --enable-vnc \
> > + --enable-vnc-sasl \
> > + --enable-vnc-jpeg \
> > + --enable-vnc-png \
> > + --enable-membarrier \
> > + --enable-slirp=git \
> > + --disable-kvm \
> > + --enable-hax \
> > + --enable-whpx \
> > + --disable-spice \
> > + --enable-lzo \
> > + --enable-snappy \
> > + --enable-bzip2 \
> > + --enable-vdi \
> > + --enable-qcow1 \
> > + --enable-tools \
> > + --enable-libusb \
> > + --enable-usb-redir \
> > + --disable-libnfs \
> > + --enable-libssh \
> > + --disable-pie
> > +make -j$NUMBER_OF_PROCESSORS
> > +# make -j$NUMBER_OF_PROCESSORS check
> > diff --git a/scripts/ci/windows/msys2_install.sh
> b/scripts/ci/windows/msys2_install.sh
> > new file mode 100644
> > index 0000000000..3a5392cd99
> > --- /dev/null
> > +++ b/scripts/ci/windows/msys2_install.sh
> > @@ -0,0 +1,41 @@
> > +pacman --noconfirm -S --needed \
> > +base-devel \
> > +git \
> > +mingw-w64-x86_64-python \
> > +mingw-w64-x86_64-python-setuptools \
> > +mingw-w64-x86_64-toolchain \
> > +mingw-w64-x86_64-SDL2 \
> > +mingw-w64-x86_64-SDL2_image \
> > +mingw-w64-x86_64-gtk3 \
> > +mingw-w64-x86_64-ninja \
> > +mingw-w64-x86_64-make \
> > +mingw-w64-x86_64-lzo2 \
> > +mingw-w64-x86_64-libjpeg-turbo \
> > +mingw-w64-x86_64-pixman \
> > +mingw-w64-x86_64-libgcrypt \
> > +mingw-w64-x86_64-capstone \
> > +mingw-w64-x86_64-libpng \
> > +mingw-w64-x86_64-libssh \
> > +mingw-w64-x86_64-libxml2 \
> > +mingw-w64-x86_64-snappy \
> > +mingw-w64-x86_64-libusb \
> > +mingw-w64-x86_64-usbredir \
> > +mingw-w64-x86_64-libtasn1 \
> > +mingw-w64-x86_64-libnfs \
> > +mingw-w64-x86_64-nettle \
> > +mingw-w64-x86_64-cyrus-sasl \
> > +mingw-w64-x86_64-curl \
> > +mingw-w64-x86_64-gnutls \
> > +mingw-w64-x86_64-zstd \
> > +mingw-w64-x86_64-glib2
> > +
> > +cd /mingw64/bin
> > +cp x86_64-w64-mingw32-gcc-ar.exe x86_64-w64-mingw32-ar.exe
> > +cp x86_64-w64-mingw32-gcc-ranlib.exe x86_64-w64-mingw32-ranlib.exe
> > +cp x86_64-w64-mingw32-gcc-nm.exe x86_64-w64-mingw32-nm.exe
> > +cp windres.exe x86_64-w64-mingw32-windres.exe
> > +cp strip.exe x86_64-w64-mingw32-strip.exe
> > +cp objcopy.exe x86_64-w64-mingw32-objcopy.exe
> > +cp ld x86_64-w64-mingw32-ld.exe
> > +cp as x86_64-w64-mingw32-as.exe
> > +cp sdl2-config x86_64-w64-mingw32-sdl2-config
>
> Why is that needed?
>
> Comes from configure
I meant why do you need to copy? The toolchain installation path names
seem broken...
> ```
>
> ar="${AR-${cross_prefix}ar}"
> as="${AS-${cross_prefix}as}"
> ccas="${CCAS-$cc}"
> cpp="${CPP-$cc -E}"
> objcopy="${OBJCOPY-${cross_prefix}objcopy}"
> ld="${LD-${cross_prefix}ld}"
> ranlib="${RANLIB-${cross_prefix}ranlib}"
> nm="${NM-${cross_prefix}nm}"
> strip="${STRIP-${cross_prefix}strip}"
> windres="${WINDRES-${cross_prefix}windres}"
> pkg_config_exe="${PKG_CONFIG-${cross_prefix}pkg-config}"
> query_pkg_config() {
> "${pkg_config_exe}" ${QEMU_PKG_CONFIG_FLAGS} "$@"
> }
> pkg_config=query_pkg_config
> sdl2_config="${SDL2_CONFIG-${cross_prefix}sdl2-config}"
>
> # If the user hasn't specified ARFLAGS, default to 'rv', just as make does.
> ARFLAGS="${ARFLAGS-rv}"
> ```
>
> Thanks,
>
> Phil.
>
>
>
> --
> 此致
> 礼
> 罗勇刚
> Yours
> sincerely,
> Yonggang Luo
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 3/6] ci: Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 Enable msys2 ci in cirrus
2020-09-02 19:31 ` Philippe Mathieu-Daudé
@ 2020-09-02 19:32 ` 罗勇刚(Yonggang Luo)
0 siblings, 0 replies; 29+ messages in thread
From: 罗勇刚(Yonggang Luo) @ 2020-09-02 19:32 UTC (permalink / raw)
To: Philippe Mathieu-Daudé; +Cc: Paolo Bonzini, qemu-level
[-- Attachment #1: Type: text/plain, Size: 10065 bytes --]
On Thu, Sep 3, 2020 at 3:31 AM Philippe Mathieu-Daudé <f4bug@amsat.org>
wrote:
> On 9/2/20 7:42 PM, 罗勇刚(Yonggang Luo) wrote:
> >
> >
> > On Thu, Sep 3, 2020 at 1:30 AM Philippe Mathieu-Daudé <f4bug@amsat.org
> > <mailto:f4bug@amsat.org>> wrote:
> >
> > On 9/2/20 7:00 PM, Yonggang Luo wrote:
> > > ---
> > > .cirrus.yml | 23 ++++++++++++++++
> > > scripts/ci/windows/msys2_build.sh | 35 ++++++++++++++++++++++++
> > > scripts/ci/windows/msys2_install.sh | 41
> > +++++++++++++++++++++++++++++
> > > 3 files changed, 99 insertions(+)
> > > create mode 100644 scripts/ci/windows/msys2_build.sh
> > > create mode 100644 scripts/ci/windows/msys2_install.sh
> > >
> > > diff --git a/.cirrus.yml b/.cirrus.yml
> > > index f287d23c5b..d377c28412 100644
> > > --- a/.cirrus.yml
> > > +++ b/.cirrus.yml
> > > @@ -40,3 +40,26 @@ macos_xcode_task:
> > > - ../configure --cc=clang || { cat config.log; exit 1; }
> > > - gmake -j$(sysctl -n hw.ncpu)
> > > - gmake check
> > > +
> > > +windows_msys2_task:
> > > + windows_container:
> > > + image: cirrusci/windowsservercore:cmake
> > > + os_version: 2019
> > > + cpu: 8
> > > + memory: 8G
> > > + env:
> > > + MSYS: winsymlinks:nativestrict
> > > + MSYSTEM: MINGW64
> > > + CHERE_INVOKING: 1
> > > + printenv_script: C:\tools\msys64\usr\bin\bash.exe -lc 'printenv'
> > > + install_script:
> > > + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl
> > -O
> >
> http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz
> "
> > > + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl
> > -O
> >
> http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig
> "
> > > + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && pacman
> > -U --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz"
> > > + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman -Sy
> --noconfirm"
> > > + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --needed
> > --noconfirm -S bash pacman pacman-mirrors msys2-runtime"
> > > + - taskkill /F /IM gpg-agent.exe
> > > + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm
> -Su"
> > > + - C:\tools\msys64\usr\bin\bash.exe -lc "sh
> > scripts/ci/windows/msys2_install.sh"
> > > + script:
> > > + C:\tools\msys64\usr\bin\bash.exe -lc "sh
> > scripts/ci/windows/msys2_build.sh"
> > > diff --git a/scripts/ci/windows/msys2_build.sh
> > b/scripts/ci/windows/msys2_build.sh
> > > new file mode 100644
> > > index 0000000000..0363ef402a
> > > --- /dev/null
> > > +++ b/scripts/ci/windows/msys2_build.sh
> > > @@ -0,0 +1,35 @@
> > > +export QEMU_DIR=$PWD
> > > +mkdir ../qemu-build
> > > +cd ../qemu-build
> > > +$QEMU_DIR/configure \
> > > + --python=python3 \
> > > + --cross-prefix=x86_64-w64-mingw32- \
> >
> > Isn't the prefix 'x86_64-w64-mingw32-gcc-'?
> >
> > No, because of this:
> > ```
> > C:\CI-Tools\msys64\mingw64\bin>dir x86_64-w64-mingw32*
> > 驱动器 C 中的卷是 系统
> > 卷的序列号是 CAD5-8E95
> >
> > C:\CI-Tools\msys64\mingw64\bin 的目录
> >
> > 2018/01/17 16:54 36,022 x86_64-w64-mingw32-agrep.exe
> > 2020/09/02 05:06 67,861 x86_64-w64-mingw32-ar.exe
> > 2020/09/02 05:06 2,872,225 x86_64-w64-mingw32-as.exe
> > 2020/07/24 15:41 2,208,014 x86_64-w64-mingw32-c++.exe
> > 2020/02/17 19:50 489,984 x86_64-w64-mingw32-captoinfo.exe
> > 2020/02/17 19:50 348,160 x86_64-w64-mingw32-clear.exe
> > 2020/06/26 17:21 64,176 x86_64-w64-mingw32-deflatehd.exe
> > 2020/07/24 15:41 2,208,014 x86_64-w64-mingw32-g++.exe
> > 2020/07/24 15:41 2,205,454 x86_64-w64-mingw32-gcc-10.2.0.exe
> > 2020/07/24 15:41 67,861 x86_64-w64-mingw32-gcc-ar.exe
> > 2020/07/24 15:41 67,861 x86_64-w64-mingw32-gcc-nm.exe
> > 2020/07/24 15:41 67,861 x86_64-w64-mingw32-gcc-ranlib.exe
> > 2020/07/24 15:41 2,205,454 x86_64-w64-mingw32-gcc.exe
> > 2020/07/24 15:41 2,208,014 x86_64-w64-mingw32-gfortran.exe
> > 2020/06/26 17:21 59,734 x86_64-w64-mingw32-inflatehd.exe
> > 2020/02/17 19:50 462,848 x86_64-w64-mingw32-infocmp.exe
> > 2020/02/17 19:50 489,984 x86_64-w64-mingw32-infotocap.exe
> > 2020/09/02 05:06 2,773,229 x86_64-w64-mingw32-ld.exe
> > 2020/09/02 05:06 67,861 x86_64-w64-mingw32-nm.exe
> > 2020/09/02 05:06 2,367,282 x86_64-w64-mingw32-objcopy.exe
> > 2017/03/22 14:58 669,355 x86_64-w64-mingw32-pkg-config.exe
> > 2020/09/02 05:06 67,861 x86_64-w64-mingw32-ranlib.exe
> > 2020/02/17 19:50 356,352 x86_64-w64-mingw32-reset.exe
> > 2020/09/02 05:06 1,444 x86_64-w64-mingw32-sdl2-config
> > 2020/09/02 05:06 2,367,282 x86_64-w64-mingw32-strip.exe
> > 2020/02/17 19:50 348,160 x86_64-w64-mingw32-tabs.exe
> > 2020/02/17 19:50 489,984 x86_64-w64-mingw32-tic.exe
> > 2020/02/17 19:50 409,600 x86_64-w64-mingw32-toe.exe
> > 2020/02/17 19:50 355,328 x86_64-w64-mingw32-tput.exe
> > 2020/02/17 19:50 356,352 x86_64-w64-mingw32-tset.exe
> > 2020/09/02 05:06 2,344,638 x86_64-w64-mingw32-windres.exe
>
> So 'x86_64-w64-mingw32-' it is.
>
> > 31 个文件 29,104,255 字节
> > 0 个目录 203,338,362,880 可用字节
> > ```
> >
> >
> > > + --enable-gtk --enable-sdl \
> > > + --enable-capstone=git \
> > > + --enable-stack-protector \
> > > + --ninja=ninja \
> > > + --enable-gnutls \
> > > + --enable-nettle \
> > > + --enable-vnc \
> > > + --enable-vnc-sasl \
> > > + --enable-vnc-jpeg \
> > > + --enable-vnc-png \
> > > + --enable-membarrier \
> > > + --enable-slirp=git \
> > > + --disable-kvm \
> > > + --enable-hax \
> > > + --enable-whpx \
> > > + --disable-spice \
> > > + --enable-lzo \
> > > + --enable-snappy \
> > > + --enable-bzip2 \
> > > + --enable-vdi \
> > > + --enable-qcow1 \
> > > + --enable-tools \
> > > + --enable-libusb \
> > > + --enable-usb-redir \
> > > + --disable-libnfs \
> > > + --enable-libssh \
> > > + --disable-pie
> > > +make -j$NUMBER_OF_PROCESSORS
> > > +# make -j$NUMBER_OF_PROCESSORS check
> > > diff --git a/scripts/ci/windows/msys2_install.sh
> > b/scripts/ci/windows/msys2_install.sh
> > > new file mode 100644
> > > index 0000000000..3a5392cd99
> > > --- /dev/null
> > > +++ b/scripts/ci/windows/msys2_install.sh
> > > @@ -0,0 +1,41 @@
> > > +pacman --noconfirm -S --needed \
> > > +base-devel \
> > > +git \
> > > +mingw-w64-x86_64-python \
> > > +mingw-w64-x86_64-python-setuptools \
> > > +mingw-w64-x86_64-toolchain \
> > > +mingw-w64-x86_64-SDL2 \
> > > +mingw-w64-x86_64-SDL2_image \
> > > +mingw-w64-x86_64-gtk3 \
> > > +mingw-w64-x86_64-ninja \
> > > +mingw-w64-x86_64-make \
> > > +mingw-w64-x86_64-lzo2 \
> > > +mingw-w64-x86_64-libjpeg-turbo \
> > > +mingw-w64-x86_64-pixman \
> > > +mingw-w64-x86_64-libgcrypt \
> > > +mingw-w64-x86_64-capstone \
> > > +mingw-w64-x86_64-libpng \
> > > +mingw-w64-x86_64-libssh \
> > > +mingw-w64-x86_64-libxml2 \
> > > +mingw-w64-x86_64-snappy \
> > > +mingw-w64-x86_64-libusb \
> > > +mingw-w64-x86_64-usbredir \
> > > +mingw-w64-x86_64-libtasn1 \
> > > +mingw-w64-x86_64-libnfs \
> > > +mingw-w64-x86_64-nettle \
> > > +mingw-w64-x86_64-cyrus-sasl \
> > > +mingw-w64-x86_64-curl \
> > > +mingw-w64-x86_64-gnutls \
> > > +mingw-w64-x86_64-zstd \
> > > +mingw-w64-x86_64-glib2
> > > +
> > > +cd /mingw64/bin
> > > +cp x86_64-w64-mingw32-gcc-ar.exe x86_64-w64-mingw32-ar.exe
> > > +cp x86_64-w64-mingw32-gcc-ranlib.exe x86_64-w64-mingw32-ranlib.exe
> > > +cp x86_64-w64-mingw32-gcc-nm.exe x86_64-w64-mingw32-nm.exe
> > > +cp windres.exe x86_64-w64-mingw32-windres.exe
> > > +cp strip.exe x86_64-w64-mingw32-strip.exe
> > > +cp objcopy.exe x86_64-w64-mingw32-objcopy.exe
> > > +cp ld x86_64-w64-mingw32-ld.exe
> > > +cp as x86_64-w64-mingw32-as.exe
> > > +cp sdl2-config x86_64-w64-mingw32-sdl2-config
> >
> > Why is that needed?
> >
> > Comes from configure
>
> I meant why do you need to copy? The toolchain installation path names
> seem broken...
>
> The copy also comes from the Wiki, and I fond more broken things, so I
copied more, maybe there are better way to do that.
> > ```
> >
> > ar="${AR-${cross_prefix}ar}"
> > as="${AS-${cross_prefix}as}"
> > ccas="${CCAS-$cc}"
> > cpp="${CPP-$cc -E}"
> > objcopy="${OBJCOPY-${cross_prefix}objcopy}"
> > ld="${LD-${cross_prefix}ld}"
> > ranlib="${RANLIB-${cross_prefix}ranlib}"
> > nm="${NM-${cross_prefix}nm}"
> > strip="${STRIP-${cross_prefix}strip}"
> > windres="${WINDRES-${cross_prefix}windres}"
> > pkg_config_exe="${PKG_CONFIG-${cross_prefix}pkg-config}"
> > query_pkg_config() {
> > "${pkg_config_exe}" ${QEMU_PKG_CONFIG_FLAGS} "$@"
> > }
> > pkg_config=query_pkg_config
> > sdl2_config="${SDL2_CONFIG-${cross_prefix}sdl2-config}"
> >
> > # If the user hasn't specified ARFLAGS, default to 'rv', just as make
> does.
> > ARFLAGS="${ARFLAGS-rv}"
> > ```
> >
> > Thanks,
> >
> > Phil.
> >
> >
> >
> > --
> > 此致
> > 礼
> > 罗勇刚
> > Yours
> > sincerely,
> > Yonggang Luo
>
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
[-- Attachment #2: Type: text/html, Size: 13563 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 5/6] tests: handling signal on win32 properly
2020-09-02 17:04 ` Paolo Bonzini
2020-09-02 17:09 ` 罗勇刚(Yonggang Luo)
@ 2020-09-03 5:58 ` Thomas Huth
2020-09-03 7:00 ` Paolo Bonzini
1 sibling, 1 reply; 29+ messages in thread
From: Thomas Huth @ 2020-09-03 5:58 UTC (permalink / raw)
To: Paolo Bonzini, Yonggang Luo, qemu-devel
On 02/09/2020 19.04, Paolo Bonzini wrote:
> On 02/09/20 19:00, Yonggang Luo wrote:
>> SIGABRT should use signal(SIGABRT, sigabrt_handler) to handle on win32
>>
>> The error:
>> E:/CI-Cor-Ready/xemu/qemu.org/tests/test-replication.c:559:33: error: invalid use of undefined type 'struct sigaction'
>> 559 | sigact = (struct sigaction) {
>> | ^
>>
>> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
>> ---
>> tests/test-replication.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/tests/test-replication.c b/tests/test-replication.c
>> index e0b03dafc2..9ab3666a90 100644
>> --- a/tests/test-replication.c
>> +++ b/tests/test-replication.c
>> @@ -554,6 +554,9 @@ static void sigabrt_handler(int signo)
>>
>> static void setup_sigabrt_handler(void)
>> {
>> +#ifdef _WIN32
>> + signal(SIGABRT, sigabrt_handler);
>> +#else
>> struct sigaction sigact;
>>
>> sigact = (struct sigaction) {
>> @@ -562,6 +565,7 @@ static void setup_sigabrt_handler(void)
>> };
>> sigemptyset(&sigact.sa_mask);
>> sigaction(SIGABRT, &sigact, NULL);
>> +#endif
>> }
>>
>> int main(int argc, char **argv)
>>
>
> This is already fixed by a patch from Thomas.
Well, my patch was to simply disable test-replication on Windows ... if
it is working with this modification here, that's certainly better than
disabling it.
Thomas
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [PATCH 5/6] tests: handling signal on win32 properly
2020-09-03 5:58 ` Thomas Huth
@ 2020-09-03 7:00 ` Paolo Bonzini
0 siblings, 0 replies; 29+ messages in thread
From: Paolo Bonzini @ 2020-09-03 7:00 UTC (permalink / raw)
To: Thomas Huth; +Cc: Yonggang Luo, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1616 bytes --]
Yes, I guess that's true. I will queue it instead.
Paolo
Il gio 3 set 2020, 07:58 Thomas Huth <thuth@redhat.com> ha scritto:
> On 02/09/2020 19.04, Paolo Bonzini wrote:
> > On 02/09/20 19:00, Yonggang Luo wrote:
> >> SIGABRT should use signal(SIGABRT, sigabrt_handler) to handle on win32
> >>
> >> The error:
> >> E:/CI-Cor-Ready/xemu/qemu.org/tests/test-replication.c:559:33: error:
> invalid use of undefined type 'struct sigaction'
> >> 559 | sigact = (struct sigaction) {
> >> | ^
> >>
> >> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> >> ---
> >> tests/test-replication.c | 4 ++++
> >> 1 file changed, 4 insertions(+)
> >>
> >> diff --git a/tests/test-replication.c b/tests/test-replication.c
> >> index e0b03dafc2..9ab3666a90 100644
> >> --- a/tests/test-replication.c
> >> +++ b/tests/test-replication.c
> >> @@ -554,6 +554,9 @@ static void sigabrt_handler(int signo)
> >>
> >> static void setup_sigabrt_handler(void)
> >> {
> >> +#ifdef _WIN32
> >> + signal(SIGABRT, sigabrt_handler);
> >> +#else
> >> struct sigaction sigact;
> >>
> >> sigact = (struct sigaction) {
> >> @@ -562,6 +565,7 @@ static void setup_sigabrt_handler(void)
> >> };
> >> sigemptyset(&sigact.sa_mask);
> >> sigaction(SIGABRT, &sigact, NULL);
> >> +#endif
> >> }
> >>
> >> int main(int argc, char **argv)
> >>
> >
> > This is already fixed by a patch from Thomas.
>
> Well, my patch was to simply disable test-replication on Windows ... if
> it is working with this modification here, that's certainly better than
> disabling it.
>
> Thomas
>
>
[-- Attachment #2: Type: text/html, Size: 2548 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
end of thread, other threads:[~2020-09-03 7:01 UTC | newest]
Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-02 17:00 [PATCH 0/6] Green the msys2 CI make Yonggang Luo
2020-09-02 17:00 ` [PATCH 1/6] configure: fixes dtc not cloned when running msys2 CI Yonggang Luo
2020-09-02 17:32 ` Philippe Mathieu-Daudé
2020-09-02 17:00 ` [PATCH 2/6] meson: Convert undefsym.sh to undefsym.py Yonggang Luo
2020-09-02 17:00 ` [PATCH 3/6] ci: Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 Enable msys2 ci in cirrus Yonggang Luo
2020-09-02 17:30 ` Philippe Mathieu-Daudé
2020-09-02 17:42 ` 罗勇刚(Yonggang Luo)
2020-09-02 19:31 ` Philippe Mathieu-Daudé
2020-09-02 19:32 ` 罗勇刚(Yonggang Luo)
2020-09-02 17:50 ` 罗勇刚(Yonggang Luo)
2020-09-02 18:54 ` Mark Cave-Ayland
2020-09-02 18:56 ` 罗勇刚(Yonggang Luo)
2020-09-02 19:00 ` Mark Cave-Ayland
2020-09-02 19:01 ` 罗勇刚(Yonggang Luo)
2020-09-02 19:13 ` Mark Cave-Ayland
2020-09-02 19:15 ` 罗勇刚(Yonggang Luo)
2020-09-02 18:50 ` Mark Cave-Ayland
2020-09-02 17:00 ` [PATCH 4/6] tcg: Fixes dup_const link error Yonggang Luo
2020-09-02 17:16 ` Richard Henderson
2020-09-02 17:17 ` 罗勇刚(Yonggang Luo)
2020-09-02 17:21 ` Richard Henderson
2020-09-02 17:00 ` [PATCH 5/6] tests: handling signal on win32 properly Yonggang Luo
2020-09-02 17:04 ` Paolo Bonzini
2020-09-02 17:09 ` 罗勇刚(Yonggang Luo)
2020-09-03 5:58 ` Thomas Huth
2020-09-03 7:00 ` Paolo Bonzini
2020-09-02 17:00 ` [PATCH 6/6] configure: Fix include and linkage issue on msys2 Yonggang Luo
2020-09-02 17:05 ` Paolo Bonzini
2020-09-02 17:06 ` 罗勇刚(Yonggang Luo)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).