Skip to content

[vcpkg] Add platform support for Solaris and illumos#45524

Merged
BillyONeal merged 4 commits intomicrosoft:masterfrom
trisk:solaris-support
Sep 18, 2025
Merged

[vcpkg] Add platform support for Solaris and illumos#45524
BillyONeal merged 4 commits intomicrosoft:masterfrom
trisk:solaris-support

Conversation

@trisk
Copy link
Copy Markdown
Contributor

@trisk trisk commented May 15, 2025

This add support for Solaris and illumos. Tested building several ports on illumos/amd64 (OmniOS with clang 18 from pkgsrc). Will be submitting fixes for ports that need them as separate PRs.
Depends on: microsoft/vcpkg-tool#1684

@LilyWangLL LilyWangLL added the category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly label May 15, 2025
@trisk trisk changed the title Add platform support for Solaris and illumos [vcpkg scripts] Add platform support for Solaris and illumos May 15, 2025
LilyWangLL
LilyWangLL previously approved these changes May 20, 2025
@LilyWangLL LilyWangLL added the info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. label May 20, 2025
BillyONeal added a commit to BillyONeal/vcpkg that referenced this pull request May 22, 2025
In microsoft#45524 we the vcpkg team observe that z_vcpkg_select_default_vcpkg_chainload_toolchain should never be called after microsoft/vcpkg-tool#350 . We don't want to make a code review comment to leave it 'half broken', so we're submitting this change to make not editing that list consistent.
@vicroms vicroms added the depends:different-pr This PR or Issue depends on a PR which has been filed label May 27, 2025
@trisk trisk force-pushed the solaris-support branch 2 times, most recently from 8f865b3 to fb9af01 Compare June 6, 2025 10:47
@trisk
Copy link
Copy Markdown
Contributor Author

trisk commented Jun 6, 2025

Interestingly, there is a new x64_osx test failure in the newly added tar check, suggesting it does not actually support archives with pax extended headers either. We normally use a prebuilt vcpkg-tool there, but I wonder what happens with the real release tarball.

echo "Warning: -buildTests no longer has any effect; ignored."
elif [ "$var" = "-skipDependencyChecks" ]; then
vcpkgSkipDependencyChecks="OFF"
vcpkgSkipDependencyChecks="ON"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

facepalm

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

#46216 Oh, I see, it "works" because two bugs happen together

@BillyONeal
Copy link
Copy Markdown
Member

Interestingly, there is a new x64_osx test failure in the newly added tar check, suggesting it does not actually support archives with pax extended headers either. We normally use a prebuilt vcpkg-tool there, but I wonder what happens with the real release tarball.

vcpkg@CPPMAC-ARM64-05 test % curl -L -o test.tar.gz https://github.com/microsoft/vcpkg-tool/archive/refs/tags/2025-06-02.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 2833k    0 2833k    0     0  2860k      0 --:--:-- --:--:-- --:--:-- 5392k
vcpkg@CPPMAC-ARM64-05 test % tar xf test.tar.gz
vcpkg@CPPMAC-ARM64-05 test % ls
test.tar.gz             vcpkg-tool-2025-06-02
vcpkg@CPPMAC-ARM64-05 test % tar --version
bsdtar 3.5.3 - libarchive 3.5.3 zlib/1.2.12 liblzma/5.4.3 bz2lib/1.0.8
vcpkg@CPPMAC-ARM64-05 test %

Something about the test doesn't seem to match up with 'reality' of extracting our tool sources?

@BillyONeal BillyONeal removed info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. depends:different-pr This PR or Issue depends on a PR which has been filed labels Jun 10, 2025
@BillyONeal BillyONeal marked this pull request as draft June 10, 2025 00:12
@trisk trisk force-pushed the solaris-support branch from fb9af01 to f5faf80 Compare June 10, 2025 10:06
@trisk
Copy link
Copy Markdown
Contributor Author

trisk commented Jun 10, 2025

Interestingly, there is a new x64_osx test failure in the newly added tar check, suggesting it does not actually support archives with pax extended headers either. We normally use a prebuilt vcpkg-tool there, but I wonder what happens with the real release tarball.

vcpkg@CPPMAC-ARM64-05 test % curl -L -o test.tar.gz https://github.com/microsoft/vcpkg-tool/archive/refs/tags/2025-06-02.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 2833k    0 2833k    0     0  2860k      0 --:--:-- --:--:-- --:--:-- 5392k
vcpkg@CPPMAC-ARM64-05 test % tar xf test.tar.gz
vcpkg@CPPMAC-ARM64-05 test % ls
test.tar.gz             vcpkg-tool-2025-06-02
vcpkg@CPPMAC-ARM64-05 test % tar --version
bsdtar 3.5.3 - libarchive 3.5.3 zlib/1.2.12 liblzma/5.4.3 bz2lib/1.0.8
vcpkg@CPPMAC-ARM64-05 test %

Something about the test doesn't seem to match up with 'reality' of extracting our tool sources?

Updated the test to be libarchive compatible (and also search for bsdtar or star as shipped in pkgsrc), and fixed the error message from bootstrap.sh so it refers to tar instead of the last failed command.

@trisk trisk force-pushed the solaris-support branch from f5faf80 to a5c5107 Compare June 10, 2025 10:10
@trisk trisk marked this pull request as ready for review June 10, 2025 10:31
Copy link
Copy Markdown
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

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

The added binary file makes me nervous but not an over my dead body thing yet.... what does this comment mean?

image

@BillyONeal BillyONeal added info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. requires:vcpkg-team-review This PR or issue requires someone on the vcpkg team to take a further look. labels Jun 11, 2025
@BillyONeal
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@BillyONeal
Copy link
Copy Markdown
Member

@ras0219-msft points out something: we require unzip anyway. Could we use the .zip instead of the .tar.gz to avoid the pax header thing entirely?

Otherwise we would prefer to use the actual sources as the test even if that makes the overall structure more complex so that we don't need to check in a binary file. (The xz situation is fresh in our minds)

@BillyONeal BillyONeal removed info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. requires:vcpkg-team-review This PR or issue requires someone on the vcpkg team to take a further look. labels Jun 12, 2025
@BillyONeal BillyONeal closed this Jun 13, 2025
@trisk
Copy link
Copy Markdown
Contributor Author

trisk commented Jun 16, 2025

The added binary file makes me nervous but not an over my dead body thing yet.... what does this comment mean?

image

This was a chunk of one of my public keys I was using in place of the hex string comments that I assume are git hashes in the original release archives, but I forgot to convert it to hex, should be: 52 comment=526c4a4652534251515578465531524a546b554b

@trisk
Copy link
Copy Markdown
Contributor Author

trisk commented Jun 16, 2025

@ras0219-msft points out something: we require unzip anyway. Could we use the .zip instead of the .tar.gz to avoid the pax header thing entirely?

Otherwise we would prefer to use the actual sources as the test even if that makes the overall structure more complex so that we don't need to check in a binary file. (The xz situation is fresh in our minds)

I think the zip archive should work fine. Another option is removing the first block from the tarball that contains the extra header with tail -c +1025, if we can expect that to be present consistently.

e.g.: tar xzf "$archive" || gunzip -c "$archive" | tail -c +1025 | tar xf -

@BillyONeal
Copy link
Copy Markdown
Member

The build failures were fixed by #46016 so we will merge through them if this change is otherwise OK

@BillyONeal
Copy link
Copy Markdown
Member

I think the zip archive should work fine. Another option is removing the first block from the tarball that contains the extra header with tail -c +1025, if we can expect that to be present consistently.

I think the zip is better because we don't really know how / if that metadata is setup

@BillyONeal BillyONeal marked this pull request as draft June 20, 2025 20:29
@trisk trisk force-pushed the solaris-support branch from a5c5107 to 9ac6e5a Compare June 27, 2025 21:42
@trisk trisk force-pushed the solaris-support branch from 9ac6e5a to 3dbe5c2 Compare July 11, 2025 17:00
@trisk trisk changed the title [vcpkg scripts] Add platform support for Solaris and illumos [vcpkg] Add platform support for Solaris and illumos Sep 4, 2025
@trisk
Copy link
Copy Markdown
Contributor Author

trisk commented Sep 5, 2025

I think this ready for review, with the alteration to use the zip file instead of the tarball.

@trisk trisk marked this pull request as ready for review September 5, 2025 00:38
@trisk
Copy link
Copy Markdown
Contributor Author

trisk commented Sep 9, 2025

@LilyWangLL @BillyONeal any time to look at the current version of this?

# Conflicts:
#	scripts/vcpkg-tool-metadata.txt
Copy link
Copy Markdown
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

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

Thanks!

@BillyONeal BillyONeal enabled auto-merge (squash) September 16, 2025 07:04
@BillyONeal BillyONeal merged commit 4334d8b into microsoft:master Sep 18, 2025
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants