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

mswin builds started failing due to libclang differences #27

Open
ianks opened this issue Nov 30, 2022 · 5 comments
Open

mswin builds started failing due to libclang differences #27

ianks opened this issue Nov 30, 2022 · 5 comments

Comments

@ianks
Copy link

ianks commented Nov 30, 2022

Problem

Builds that were previously working on rb-sys are now failing. The builds were working as of 2022-11-18, and as of today (11-30-2022) they are failing.

It seems like a libclang resolution issue. The error I get looks like:

Using bindgen with clang args: ["-ID:/ruby-mswin/include/ruby-3.2.0+3", "-ID:/ruby-mswin/include/ruby-3.2.0+3/x64-mswin64_140", "-fms-extensions", "-D_WIN32_WINNT=0x0600"]
  C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\Llvm\x64\lib\clang\15.0.1\include\emmintrin.h:2108:10: error: invalid conversion between vector type '__m128i' (vector of 2 'long long' values) and integer type 'int' of different size

At one point, I had to configure the LIBCLANG_PATH with gcm to make things work. But this code has been disabled for awhile now and things worked properly. Maybe I should try adding this back?

    - name: Set LIBCLANG_PATH
      if: contains('mswin', steps.set-outputs.outputs.ruby-platform)
      shell: pwsh
      working-directory: ${{ inputs.working-directory }}
      run: |
        echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV

I'm wondering if any you know of any recent changes in the mswin Ruby image that may be causing this? Otherwise, this may be a github actions runner thing. Thanks in advance! ❤️

@MSP-Greg
Copy link
Collaborator

MSP-Greg commented Nov 30, 2022

Interesting. The last passing CI was using the Windows-2022 20221027.1 image, the first failing job was using 20221120.1. That info is in the 'Set up job' step, within the 'Runner Image' group. Rust changed from 1.64.0 to 1.65.0, and Visual Studio was also updated.

I don't believe there have been related changes to the repo that creates the vcpkg packages, this repo, or setup-ruby.

I did change the build scripts for mswin in ruby-loco, but I don't think there were any changes that affect the build, it was more to align the three builds (mingw, ucrt, & mswin) and allow them to share test scripts.

Re emmintrin.h, I've seen that filename before. Not sure when/where.

I don't think I've tried to run rb-sys CI locally. I wonder if a 3.1.x Ruby mswin build passes...

@ianks
Copy link
Author

ianks commented Apr 5, 2023

So it seems like msys2 may have updated clang, and now windows builds for rust are breaking. I've managed to downgrade to clang-14, but am stuck because ruby cannot find strings.h. Is there are standard way this access this file in GHA?

oxidize-rb/actions#20

@MSP-Greg
Copy link
Collaborator

MSP-Greg commented Apr 5, 2023

@ianks

Let me check tomorrow. What happens if you install clang-15?

@ianks
Copy link
Author

ianks commented Apr 5, 2023

@ianks

Let me check tomorrow. What happens if you install clang-15?

Same issue. GHA runner has clang 15 installed by default so we shouldn't need it. What surprised me is rubygems CI builds seem to be working... Although I'm not 100% sure.

@MSP-Greg
Copy link
Collaborator

MSP-Greg commented Apr 5, 2023

rubygems CI builds seem to be working... Although I'm not 100% sure.

They bypassed/skipped the Rust extension tests when this happened... I did the same in ruby-loco.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants