Skip to content

Fixed processing of ARM64 images#100

Merged
rainers merged 2 commits intorainers:masterfrom
michailf:feature/use-separate-debugging-symbols
Jun 14, 2025
Merged

Fixed processing of ARM64 images#100
rainers merged 2 commits intorainers:masterfrom
michailf:feature/use-separate-debugging-symbols

Conversation

@michailf
Copy link
Copy Markdown
Contributor

This PR fixes processing of ARM64 images.
Also added ARM64 as a configuration to the solution so it can be selected for building. The project file already has ARM64 config.

The current code erroneously identifies ARM64 images as 32-bit, causing corruption.

Ignore whitespace changes - some files used mixed tabs/spaces. I just made it all tabs in the files I touched.

@michailf
Copy link
Copy Markdown
Contributor Author

@rainers FYI

@rainers
Copy link
Copy Markdown
Owner

rainers commented Jun 13, 2025

LGTM, but the build check fails. It seems _CountOneBits64 is missing somehow. Can you reproduce and fix this?

@michailf
Copy link
Copy Markdown
Contributor Author

michailf commented Jun 13, 2025

LGTM, but the build check fails. It seems _CountOneBits64 is missing somehow. Can you reproduce and fix this?

Run microsoft/setup-msbuild@v2
  with:
    msbuild-architecture: x86
  env:
    SOLUTION_FILE_PATH: src/cv2pdb.vcxproj    
    BUILD_CONFIGURATION: Release
    BUILD_PLATFORM_TOOLSET: v142

Is this something that you control? The only way I can reproduce it is to use platform toolset v142. It compiles correctly with v143. The project file specifies to use $(DefaultPlatformToolset)

This is not something I introduced with this PR.

Related issue: actions/runner-images#11684

@michailf
Copy link
Copy Markdown
Contributor Author

Try removing /p:PlatformToolset=${{env.BUILD_PLATFORM_TOOLSET}} from .github/workflows/build-and-test.yml
I cannot modify the workflow it seems.

@michailf
Copy link
Copy Markdown
Contributor Author

From what I can see and my own testing, the solution is to either:

  • Use Toolset v143
  • Use an older SDK - 10.0.22621.0

You can add -p:WindowsTargetPlatformVersion=10.0.22621.0 to use the older SDK

Both solutions work to make ARM64 compile.

@rainers
Copy link
Copy Markdown
Owner

rainers commented Jun 14, 2025

Thanks for investigating. Indeed, the master branch failed when rerun, too, probably due to changes to the github setup since the last build. I have changed the toolset to v143 in .github/workflows/build-and-test.yml and master passes now. Please rebase to rerun the build checks.

@rainers
Copy link
Copy Markdown
Owner

rainers commented Jun 14, 2025

Thanks.

@rainers rainers merged commit 6d4a1d3 into rainers:master Jun 14, 2025
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants