Skip to content

Fix local build on linux that was omiting arch argument#7549

Merged
ManickaP merged 1 commit intodotnet:mainfrom
ManickaP:fix-linux
Nov 10, 2025
Merged

Fix local build on linux that was omiting arch argument#7549
ManickaP merged 1 commit intodotnet:mainfrom
ManickaP:fix-linux

Conversation

@ManickaP
Copy link
Member

For comparison see Windows build defaults:

set __BuildArch=x64

Copilot AI review requested due to automatic review settings November 10, 2025 09:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR sets a default architecture for the native build script, addressing an issue where the build architecture variable was previously uninitialized.

  • Sets __build_arch default to x64 instead of leaving it empty

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ericstj
Copy link
Member

ericstj commented Nov 10, 2025

The script you are modifying is the native build script, it's always run by specifying architecture when called by msbuild -- https://github.com/dotnet/machinelearning/blob/0a7a0291fc04e4356dab25c614c43fad524b8e9f/src/Native/Native.proj#L101C60-L101C78

Were you making this change to improve the experience when a user directly tries to build just the native portion?

I'm double-checking that you weren't trying to fix the top-level build script. That one is here -- https://github.com/dotnet/machinelearning/blob/main/build.sh

Copy link
Member

@ericstj ericstj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine to improve the experience around directly building native portion. LMK if you were having an issue with root-build, in which case we might need to see what's going on there.

The root build will need to know the architecture, so that it can consume the native outputs.

@codecov
Copy link

codecov bot commented Nov 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.02%. Comparing base (3abbb17) to head (711919f).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7549   +/-   ##
=======================================
  Coverage   69.01%   69.02%           
=======================================
  Files        1482     1482           
  Lines      274093   274093           
  Branches    28266    28266           
=======================================
+ Hits       189176   189199   +23     
+ Misses      77531    77513   -18     
+ Partials     7386     7381    -5     
Flag Coverage Δ
Debug 69.02% <ø> (+<0.01%) ⬆️
production 63.31% <ø> (+0.01%) ⬆️
test 89.47% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ManickaP
Copy link
Member Author

I see.
I got an error on the native part when building from the root. But because the terminal logger doesn't show much detail, I went to build it directly to debug it. Then, the architecture didn't work, so I fixed that and got an error that libmf submodule is missing. After checking it out, I got it built but I never retried clean re-build from the root.
So my root build issue was missing submodule, but it was hidden in the build output because terminal logger eats up the native build output.

But still, this makes it on-par with Windows, so let's keep it.

@ManickaP
Copy link
Member Author

The errors are: dotnet/dnceng#5015

@ManickaP ManickaP merged commit 70daca6 into dotnet:main Nov 10, 2025
26 of 31 checks passed
@ManickaP ManickaP deleted the fix-linux branch November 10, 2025 12:17
@github-actions github-actions bot locked and limited conversation to collaborators Dec 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants