Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Windows-2022, A app compiled by MinGW g++ fails. #6755

Closed
2 of 10 tasks
kzrnm opened this issue Dec 12, 2022 · 2 comments
Closed
2 of 10 tasks

In Windows-2022, A app compiled by MinGW g++ fails. #6755

kzrnm opened this issue Dec 12, 2022 · 2 comments
Assignees
Labels
bug report investigate Collect additional information, like space on disk, other tool incompatibilities etc. OS: Windows

Comments

@kzrnm
Copy link

kzrnm commented Dec 12, 2022

Description

Related: #5459 #6627

I ran the simple workflow below. the step that run hello fails in cmd.

on:
  workflow_dispatch:

jobs:
  fix:
    runs-on: windows-latest
    steps:
        shell: pwsh
        run: |
          '
          #include <cstdio>
          #include <vector>
          using namespace std;
          int main(int, char* argv[]) {
              vector<int> a(4);
              printf("%d\n", a.size());
              return 0;
          }
          ' > hello.cpp
      - name: Compile
        run: g++ -o hello hello.cpp
      - run: hello
        shell: cmd
        name: Run hello on cmd
        id: hello

It seems C:/Program Files/Git/mingw64/bin/lib*.dll hidden by C:\Strawberry\c\bin\lib*.dll.

Adding C:/Program Files/Git/mingw64/bin/ to beginning of $PATH, it works fine.

      - name: Fix
        shell: bash
        run: |
          mkdir bin
          cp C:/Program\ Files/Git/mingw64/bin/lib*.dll bin/
          echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH

I create a action which add mingw to beginning of $PATH.
https://github.com/kzrnm/fix-mingw

But I hope any solution that works by default because this behavior is not obvious.

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 18.04
  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 11
  • macOS 12
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

Version: 20221204.3 or older

Is it regression?

no

Expected behavior

a executable file hello exit 0.

Actual behavior

a executable file hello exit -1073741511.

Repro steps

I wrote in the description section.

@igorboskovic3
Copy link
Contributor

Hi @kzrnm we will take a look.

@igorboskovic3 igorboskovic3 added OS: Windows investigate Collect additional information, like space on disk, other tool incompatibilities etc. and removed needs triage labels Dec 13, 2022
@igorboskovic3 igorboskovic3 self-assigned this Dec 13, 2022
@igorboskovic3
Copy link
Contributor

Hi @kzrnm, we will change path, but not now, because we have deployment freeze next week and also this changes requires announcement, so I suppose we will do it next quarter. Feel free to reach us again, if you have some questions.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report investigate Collect additional information, like space on disk, other tool incompatibilities etc. OS: Windows
Projects
None yet
Development

No branches or pull requests

2 participants