Skip to contentSkip to conversation

.gitlab-ci.d/windows.yml: Enable native Windows symlink

PATCH In review Bin Meng 5 participants 9 messages Jul 25, 2022 – Jul 27, 2022

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH 1/1 .gitlab-ci.d/windows.yml: Enable native Windows symlink

From: Bin Meng <[email protected]>

The following error message was seen during the configure:

"ln: failed to create symbolic link 'x86_64-softmmu/qemu-system-x86_64.exe': No such file or directory"

By default the MSYS environment variable is not defined, so the runtime behavior of winsymlinks is: if <target> does not exist, 'ln -s' fails. At the configure phase, the qemu-system-x86_64.exe has not been built so creation of the symbolic link fails hence the error message.

Set winsymlinks to 'native' whose behavior is most similar to the behavior of 'ln -s' on *nix, that is:

a) if native symlinks are enabled, and whether <target> exists

     or not, creates <destination> as a native Windows symlink;

b) else if native symlinks are not enabled, and whether <target> exists or not, 'ln -s' creates as a Windows shortcut file.

---

 .gitlab-ci.d/windows.yml | 2 ++
 1 file changed, 2 insertions(+)
.gitlab-ci.d/windows.yml +2 -0
index 1b2ede49e1..0b9572a8a3 100644
@@ -57,6 +57,7 @@ msys2-64bit:
       mingw-w64-x86_64-zstd "
   - $env:CHERE_INVOKING = 'yes'  # Preserve the current working directory
   - $env:MSYSTEM = 'MINGW64'     # Start a 64 bit Mingw environment
+  - $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink
   - .\msys64\usr\bin\bash -lc './configure --target-list=x86_64-softmmu
       --enable-capstone --without-default-devices'
   - .\msys64\usr\bin\bash -lc "sed -i '/^ROMS=/d' build/config-host.mak"
@@ -89,6 +90,7 @@ msys2-32bit:
       mingw-w64-i686-usbredir "
   - $env:CHERE_INVOKING = 'yes'  # Preserve the current working directory
   - $env:MSYSTEM = 'MINGW32'     # Start a 32-bit MinG environment
+  - $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink
   - mkdir output
   - cd output
   - ..\msys64\usr\bin\bash -lc "../configure --target-list=ppc64-softmmu"
Signature · 1 line
2.34.1
#1 lore raw
Quoted 15 lines · Bin Meng

From: Bin Meng <[email protected]>

The following error message was seen during the configure:

"ln: failed to create symbolic link 'x86_64-softmmu/qemu-system-x86_64.exe': No such file or directory"

By default the MSYS environment variable is not defined, so the runtime behavior of winsymlinks is: if <target> does not exist, 'ln -s' fails. At the configure phase, the qemu-system-x86_64.exe has not been built so creation of the symbolic link fails hence the error message.

Set winsymlinks to 'native' whose behavior is most similar to the behavior of 'ln -s' on *nix, that is:

Quoted 6 lines

a) if native symlinks are enabled, and whether <target> exists

     or not, creates <destination> as a native Windows symlink;

b) else if native symlinks are not enabled, and whether <target> exists or not, 'ln -s' creates as a Windows shortcut file.

I'm still seeing Windows build failures such as:

https://gitlab.com/stsquad/qemu/-/jobs/2765579269

and

https://gitlab.com/stsquad/qemu/-/jobs/2765579267

Any idea what's falling over?

Quoted 25 lines

---

 .gitlab-ci.d/windows.yml | 2 ++
 1 file changed, 2 insertions(+)
.gitlab-ci.d/windows.yml +2 -0
index 1b2ede49e1..0b9572a8a3 100644
@@ -57,6 +57,7 @@ msys2-64bit:
       mingw-w64-x86_64-zstd "
   - $env:CHERE_INVOKING = 'yes'  # Preserve the current working directory
   - $env:MSYSTEM = 'MINGW64'     # Start a 64 bit Mingw environment
+  - $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink
   - .\msys64\usr\bin\bash -lc './configure --target-list=x86_64-softmmu
       --enable-capstone --without-default-devices'
   - .\msys64\usr\bin\bash -lc "sed -i '/^ROMS=/d' build/config-host.mak"
@@ -89,6 +90,7 @@ msys2-32bit:
       mingw-w64-i686-usbredir "
   - $env:CHERE_INVOKING = 'yes'  # Preserve the current working directory
   - $env:MSYSTEM = 'MINGW32'     # Start a 32-bit MinG environment
+  - $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink
   - mkdir output
   - cd output
   - ..\msys64\usr\bin\bash -lc "../configure --target-list=ppc64-softmmu"
Signature · 1 line
Alex Bennée
#2 lore raw
Quoted 27 lines · Alex Bennée
Quoted 15 lines · Bin Meng

From: Bin Meng <[email protected]>

The following error message was seen during the configure:

"ln: failed to create symbolic link 'x86_64-softmmu/qemu-system-x86_64.exe': No such file or directory"

By default the MSYS environment variable is not defined, so the runtime behavior of winsymlinks is: if <target> does not exist, 'ln -s' fails. At the configure phase, the qemu-system-x86_64.exe has not been built so creation of the symbolic link fails hence the error message.

Set winsymlinks to 'native' whose behavior is most similar to the behavior of 'ln -s' on *nix, that is:

Quoted 6 lines

a) if native symlinks are enabled, and whether <target> exists

      or not, creates <destination> as a native Windows symlink;

b) else if native symlinks are not enabled, and whether <target> exists or not, 'ln -s' creates as a Windows shortcut file.

I'm still seeing Windows build failures such as:

Quoted 7 lines
   https://gitlab.com/stsquad/qemu/-/jobs/2765579269

and

   https://gitlab.com/stsquad/qemu/-/jobs/2765579267

Any idea what's falling over?

No clue, but FWIW, I had the same problem in a run from last Friday here (without this symlink patch):

https://gitlab.com/thuth/qemu/-/jobs/2758244223#L2817

I've never seen this failure before - so I guess it's rather something new?

Thomas

author
#3 lore raw
In reply to Alex Bennée
Quoted 24 lines · Alex Bennée
Quoted 20 lines · Bin Meng

From: Bin Meng <[email protected]>

The following error message was seen during the configure:

"ln: failed to create symbolic link 'x86_64-softmmu/qemu-system-x86_64.exe': No such file or directory"

By default the MSYS environment variable is not defined, so the runtime behavior of winsymlinks is: if <target> does not exist, 'ln -s' fails. At the configure phase, the qemu-system-x86_64.exe has not been built so creation of the symbolic link fails hence the error message.

Set winsymlinks to 'native' whose behavior is most similar to the behavior of 'ln -s' on *nix, that is:

a) if native symlinks are enabled, and whether <target> exists

     or not, creates <destination> as a native Windows symlink;

b) else if native symlinks are not enabled, and whether <target> exists or not, 'ln -s' creates as a Windows shortcut file.

Quoted 5 lines
Quoted 1 line

I'm still seeing Windows build failures such as:

https://gitlab.com/stsquad/qemu/-/jobs/2765579269

I've seen this one before. Looks like this one can be easily reproduced.

Quoted 4 lines

and

https://gitlab.com/stsquad/qemu/-/jobs/2765579267

This one seems to be a random failure?

Quoted 3 lines

Any idea what's falling over?

Regards,
Bin

author
#4 lore raw
Quoted 32 lines · Bin Meng
Quoted 24 lines · Alex Bennée
Quoted 20 lines · Bin Meng

From: Bin Meng <[email protected]>

The following error message was seen during the configure:

"ln: failed to create symbolic link 'x86_64-softmmu/qemu-system-x86_64.exe': No such file or directory"

By default the MSYS environment variable is not defined, so the runtime behavior of winsymlinks is: if <target> does not exist, 'ln -s' fails. At the configure phase, the qemu-system-x86_64.exe has not been built so creation of the symbolic link fails hence the error message.

Set winsymlinks to 'native' whose behavior is most similar to the behavior of 'ln -s' on *nix, that is:

a) if native symlinks are enabled, and whether <target> exists

     or not, creates <destination> as a native Windows symlink;

b) else if native symlinks are not enabled, and whether <target> exists or not, 'ln -s' creates as a Windows shortcut file.

Quoted 5 lines
Quoted 1 line

I'm still seeing Windows build failures such as:

https://gitlab.com/stsquad/qemu/-/jobs/2765579269

Quoted 9 lines

I've seen this one before. Looks like this one can be easily reproduced.

Quoted 4 lines

and

https://gitlab.com/stsquad/qemu/-/jobs/2765579267

This one seems to be a random failure?

Saw another random failure today in the msys2-32bit build in CI.

[313/1788] Generating texture-blit-vert.h with a custom command (wrapped by meson to capture output)
FAILED: ui/shader/texture-blit-vert.h "C:/GitLab-Runner/builds/lbmeng/qemu/msys64/mingw32/bin/python3.exe" "C:/GitLab-Runner/builds/lbmeng/qemu/meson/meson.py" "--internal" "exe" "--capture" "ui/shader/texture-blit-vert.h" "--" "perl" "C:/GitLab-Runner/builds/lbmeng/qemu/scripts/shaderinclude.pl" "../ui/shader/texture-blit.vert"
[314/1788] Generating texture-blit-flip-vert.h with a custom command (wrapped by meson to capture output)
ninja: build stopped: subcommand failed.
make: *** [Makefile:162: run-ninja] Error 1

Regards,
Bin

#5 lore raw
Quoted 45 lines · Bin Meng
Quoted 32 lines · Bin Meng
Quoted 24 lines · Alex Bennée
Quoted 20 lines · Bin Meng

From: Bin Meng <[email protected]>

The following error message was seen during the configure:

"ln: failed to create symbolic link 'x86_64-softmmu/qemu-system-x86_64.exe': No such file or directory"

By default the MSYS environment variable is not defined, so the runtime behavior of winsymlinks is: if <target> does not exist, 'ln -s' fails. At the configure phase, the qemu-system-x86_64.exe has not been built so creation of the symbolic link fails hence the error message.

Set winsymlinks to 'native' whose behavior is most similar to the behavior of 'ln -s' on *nix, that is:

a) if native symlinks are enabled, and whether <target> exists

     or not, creates <destination> as a native Windows symlink;

b) else if native symlinks are not enabled, and whether <target> exists or not, 'ln -s' creates as a Windows shortcut file.

Quoted 5 lines
Quoted 1 line

I'm still seeing Windows build failures such as:

https://gitlab.com/stsquad/qemu/-/jobs/2765579269

Quoted 9 lines

I've seen this one before. Looks like this one can be easily reproduced.

Quoted 4 lines

and

https://gitlab.com/stsquad/qemu/-/jobs/2765579267

This one seems to be a random failure?

Saw another random failure today in the msys2-32bit build in CI.

Quoted 12 lines

[313/1788] Generating texture-blit-vert.h with a custom command (wrapped by meson to capture output)
FAILED: ui/shader/texture-blit-vert.h "C:/GitLab-Runner/builds/lbmeng/qemu/msys64/mingw32/bin/python3.exe" "C:/GitLab-Runner/builds/lbmeng/qemu/meson/meson.py" "--internal" "exe" "--capture" "ui/shader/texture-blit-vert.h" "--" "perl" "C:/GitLab-Runner/builds/lbmeng/qemu/scripts/shaderinclude.pl" "../ui/shader/texture-blit.vert"
[314/1788] Generating texture-blit-flip-vert.h with a custom command (wrapped by meson to capture output)
ninja: build stopped: subcommand failed.
make: *** [Makefile:162: run-ninja] Error 1

IMHO we need to just drop the msys jobs from GitLab. They are too unreliable and causing frequent failed pipelines.

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#6 lore raw
Quoted 59 lines · Daniel P. Berrangé
Quoted 45 lines · Bin Meng
Quoted 32 lines · Bin Meng
Quoted 24 lines · Alex Bennée
Quoted 20 lines · Bin Meng

From: Bin Meng <[email protected]>

The following error message was seen during the configure:

"ln: failed to create symbolic link 'x86_64-softmmu/qemu-system-x86_64.exe': No such file or directory"

By default the MSYS environment variable is not defined, so the runtime behavior of winsymlinks is: if <target> does not exist, 'ln -s' fails. At the configure phase, the qemu-system-x86_64.exe has not been built so creation of the symbolic link fails hence the error message.

Set winsymlinks to 'native' whose behavior is most similar to the behavior of 'ln -s' on *nix, that is:

a) if native symlinks are enabled, and whether <target> exists

      or not, creates <destination> as a native Windows symlink;

b) else if native symlinks are not enabled, and whether <target> exists or not, 'ln -s' creates as a Windows shortcut file.

Quoted 5 lines
Quoted 1 line

I'm still seeing Windows build failures such as:

   https://gitlab.com/stsquad/qemu/-/jobs/2765579269
Quoted 9 lines

I've seen this one before. Looks like this one can be easily reproduced.

Quoted 4 lines

and

   https://gitlab.com/stsquad/qemu/-/jobs/2765579267

This one seems to be a random failure?

Saw another random failure today in the msys2-32bit build in CI.

Quoted 12 lines

[313/1788] Generating texture-blit-vert.h with a custom command (wrapped by meson to capture output)
FAILED: ui/shader/texture-blit-vert.h "C:/GitLab-Runner/builds/lbmeng/qemu/msys64/mingw32/bin/python3.exe" "C:/GitLab-Runner/builds/lbmeng/qemu/meson/meson.py" "--internal" "exe" "--capture" "ui/shader/texture-blit-vert.h" "--" "perl" "C:/GitLab-Runner/builds/lbmeng/qemu/scripts/shaderinclude.pl" "../ui/shader/texture-blit.vert"
[314/1788] Generating texture-blit-flip-vert.h with a custom command (wrapped by meson to capture output)
ninja: build stopped: subcommand failed.
make: *** [Makefile:162: run-ninja] Error 1

Quoted 2 lines

IMHO we need to just drop the msys jobs from GitLab. They are too unreliable and causing frequent failed pipelines.

IIRC they were working way more reliable 'till two or three months ago? Maybe this was introduced by the bump to the newest level of MSYS2 in commit 5c570ef2f154 ? Maybe we should upgrade or downgrade the MSYS2 version again?

Thomas

#7 lore raw

I've seen the cirrus ci always succeed, maybe using cirrus instead?

Quoted 6 lines · Thomas Huth
Quoted 4 lines · Daniel P. Berrangé
Quoted 3 lines · Bin Meng
Quoted 2 lines · Bin Meng

On Mon, Jul 25, 2022 at 9:48 PM Alex Bennée <[email protected]>

Quoted 10 lines · wrote:
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 6 lines · Bin Meng

From: Bin Meng <[email protected]>

The following error message was seen during the configure:

"ln: failed to create symbolic link 'x86_64-softmmu/qemu-system-x86_64.exe': No such file or

directory"

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

By default the MSYS environment variable is not defined, so the

runtime

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

behavior of winsymlinks is: if <target> does not exist, 'ln -s'

fails.

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

At the configure phase, the qemu-system-x86_64.exe has not been

built

Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines

so creation of the symbolic link fails hence the error message.

Set winsymlinks to 'native' whose behavior is most similar to the behavior of 'ln -s' on *nix, that is:

a) if native symlinks are enabled, and whether <target> exists

      or not, creates <destination> as a native Windows symlink;

b) else if native symlinks are not enabled, and whether <target> exists or not, 'ln -s' creates as a Windows shortcut file.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
Quoted 1 line

I'm still seeing Windows build failures such as:

   https://gitlab.com/stsquad/qemu/-/jobs/2765579269

I've seen this one before. Looks like this one can be easily

reproduced.

Quoted 24 lines
Quoted 24 lines
Quoted 23 lines
Quoted 8 lines
Quoted 5 lines

and

   https://gitlab.com/stsquad/qemu/-/jobs/2765579267

This one seems to be a random failure?

Saw another random failure today in the msys2-32bit build in CI.

[313/1788] Generating texture-blit-vert.h with a custom command (wrapped by meson to capture output)
FAILED: ui/shader/texture-blit-vert.h "C:/GitLab-Runner/builds/lbmeng/qemu/msys64/mingw32/bin/python3.exe" "C:/GitLab-Runner/builds/lbmeng/qemu/meson/meson.py" "--internal" "exe" "--capture" "ui/shader/texture-blit-vert.h" "--" "perl" "C:/GitLab-Runner/builds/lbmeng/qemu/scripts/shaderinclude.pl" "../ui/shader/texture-blit.vert"
[314/1788] Generating texture-blit-flip-vert.h with a custom command (wrapped by meson to capture output)
ninja: build stopped: subcommand failed.
make: *** [Makefile:162: run-ninja] Error 1

Quoted 5 lines
Quoted 2 lines

IMHO we need to just drop the msys jobs from GitLab. They are too unreliable and causing frequent failed pipelines.

IIRC they were working way more reliable 'till two or three months ago? Maybe this was introduced by the bump to the newest level of MSYS2 in

commit

Quoted 1 line

5c570ef2f154 ? Maybe we should upgrade or downgrade the MSYS2 version

again?

Quoted 3 lines

Thomas

--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo

#8 lore raw
Quoted 1 line · 罗勇刚(Yonggang Luo)

I've seen the cirrus ci always succeed, maybe using cirrus instead?

IIRC the free tier of Cirrus only allows two jobs in parallel, and we're using that for FreeBSD and macOS already - we could maybe add another manual job like we do it for NetBSD and OpenBSD already, but that means that the MSYS2 build won't run by default anymore.

Thomas