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

mingw tests fail in CI #2739

Closed
imphil opened this issue Oct 16, 2021 · 2 comments · Fixed by #2834
Closed

mingw tests fail in CI #2739

imphil opened this issue Oct 16, 2021 · 2 comments · Fixed by #2834
Labels
category:ci continuous integration and unit tests

Comments

@imphil
Copy link
Member

imphil commented Oct 16, 2021

Tests running in mingw-env in CI fail now, most likely not due to a change in our code, but due to an environment problem in the CI testing.

Good: https://github.com/cocotb/cocotb/runs/3753710579?check_suite_focus=true (30 Sep 2021 08:32)
Bad: https://github.com/cocotb/cocotb/runs/3898922153?check_suite_focus=true (14 Oct 2021 19:40)

Things I know changed:

  • msys2/setup-msys2@v2 updated from 549e904fc53cb840ec72fec29f3e8fc00f579b5b (v2.4.2) to 6e532aa72709f068e400cc0677a3f49162891b0e (v2.5.0)
  • The Windows base image changed from 20210920.1 to 20211011.0

Error:

Python path configuration:
  PYTHONHOME = 'D:/a/_temp/msys/msys64/mingw64'
  PYTHONPATH = (not set)
  program name = 'D:/a/_temp/msys64/mingw64/bin/python.exe'
  isolated = 0
  environment = 1
  user site = 1
  import site = 1
  sys._base_executable = 'D:/a/_temp/msys64/mingw64/bin/python.exe'
  sys.base_prefix = 'D:/a/_temp/msys/msys64/mingw64'
  sys.base_exec_prefix = 'D:/a/_temp/msys/msys64/mingw64'
  sys.platlibdir = 'lib'
  sys.executable = 'D:/a/_temp/msys64/mingw64/bin/python.exe'
  sys.prefix = 'D:/a/_temp/msys/msys64/mingw64'
  sys.exec_prefix = 'D:/a/_temp/msys/msys64/mingw64'
  sys.path = [
    'D:/a/_temp/msys/msys64/mingw64/lib/python39.zip',
    'D:/a/_temp/msys/msys64/mingw64/lib/python3.9',
    'D:/a/_temp/msys/msys64/mingw64/lib/python3.9/lib-dynload',
    '',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'
@imphil imphil added the category:ci continuous integration and unit tests label Oct 16, 2021
imphil added a commit to imphil/cocotb that referenced this issue Oct 16, 2021
setup-msys2 v2.5.0 broke Python for yet unclear reasons, avoid it until
that's resolved.

See also cocotb#2739
@imphil
Copy link
Member Author

imphil commented Oct 16, 2021

Looks like it's down to the setup-msys2 version: 2.4.2 works, 2.5.0 doesn't. Diff between the log output of the two versions:
diff.txt

I don't have the PYTHONHOME environment variable for a successful run, but the path looks suspicious:

PYTHONHOME = 'D:/a/_temp/msys/msys64/mingw64'
program name = 'D:/a/_temp/msys64/mingw64/bin/python.exe'

Look at the D:/a/_temp/msys/msys64 vs D:/a/_temp/msys64/mingw64 difference.

setup-msys2 v2.5.0 changed some paths in msys2/setup-msys2#163, which would be the most likely cause for this change in behavior.

@imphil
Copy link
Member Author

imphil commented Oct 16, 2021

Upstream bug report: msys2/setup-msys2#167
Workaround: #2740

imphil added a commit that referenced this issue Oct 17, 2021
setup-msys2 v2.5.0 broke Python for yet unclear reasons, avoid it until
that's resolved.

See also #2739
imphil added a commit that referenced this issue Oct 17, 2021
setup-msys2 v2.5.0 broke Python for yet unclear reasons, avoid it until
that's resolved.

See also #2739
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:ci continuous integration and unit tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant