You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build:#129760 PR:#51063 - [orc] update to 2.3.0 Triggered by: Pull Request — toge on refs/pull/51063/merge @ 89cfe98a Result: ❌ FAILED | Finished: 2026-04-09 17:37:33 UTC
Summary
Triplet
Status
Failing Ports
Category
x64_windows
❌ Failed
orc
Linker Error
x64_windows_release
❌ Failed
orc
Linker Error
x64_windows_static
❌ Failed
orc
Linker Error
x64_windows_static_md
❌ Failed
orc
Linker Error
x86_windows
❌ Failed
orc
Linker Error
arm64_windows
❌ Failed
orc
Linker Error
arm64_windows_static_md
❌ Failed
orc
Linker Error
x64_linux
✅ Passed
—
—
x64_android
✅ Passed
—
—
arm64_linux
✅ Passed
—
—
arm64_android
✅ Passed
—
—
arm_neon_android
✅ Passed
—
—
arm64_osx
✅ Passed
—
—
Total regressions: 1 unique port (orc) Affected triplets: 7 Windows variants (all x64_windows and arm64_windows families) Status: New regression (orc was previously passing)
Root cause: The ORC 2.3.0 release introduced new tools that depend on the GNU getopt API (getopt_long_a, optind, optarg_a). These symbols are not available on Windows by default. The build fails at the link stage when trying to build the tools (orc-metadata, orc-contents, orc-memory, orc-scan, orc-statistics, csv-import).
Error output:
tools\src\orc-metadata.exe : fatal error LNK1120: 3 unresolved externals
FileMetadata.cc.obj : error LNK2019: unresolved external symbol __imp_getopt_long_a referenced in function main
ToolsHelper.cc.obj : error LNK2001: unresolved external symbol __imp_optind
ToolsHelper.cc.obj : error LNK2019: unresolved external symbol __imp_optarg_a
Analysis:
Version update context: PR [orc] update to 2.3.0 #51063 updates ORC from 2.2.x to 2.3.0. The new version includes new command-line tools (tools/src/orc-metadata.cc, ToolsHelper.cc, etc.) that were not present in the previous release.
MSVC incompatibility: These tools use POSIX getopt functions, which are not standard on Windows. The code references __imp_getopt_long_a, __imp_optind, and __imp_optarg_a — these are typically provided by GNU libc or a ported getopt implementation.
Missing dependency: Windows builds need either:
A vcpkg dependency on a getopt port (e.g., gnugetopt, getopt-win32)
A Windows-specific workaround (e.g., conditional tool build only on Unix platforms)
A patch to use Windows-native argument parsing on MSVC builds
Why it passes on Linux/Android: Unix platforms have native POSIX getopt in their standard C library, so the tools build successfully.
Suggested fixes:
Add a vcpkg dependency on getopt-win32 (recommended):
Add getopt-win32 as a dependency in the orc/portfile.cmake
Link the tools against the getopt library
This requires adding find_package(getopt REQUIRED) and linking in CMakeLists.txt or portfile
Disable tools on Windows only:
Modify portfile.cmake to set -DBUILD_TOOLS=OFF for Windows triplets
Less ideal, but avoids the linker error if tools are not critical on Windows
Patch ORC to conditionally use Windows APIs:
Add a patch that uses Windows' main() argument parsing on MSVC instead of POSIX getopt
More involved, but keeps feature parity
Check upstream ORC for Windows support:
The ORC project may have added Windows tool support in 2.3.0 but not tested it fully
Reach out to the Apache ORC project or check their issue tracker for known Windows linker issues with the tools
Recommended next steps:
Determine whether the tools are required for vcpkg's use case (library only? or tools too?)
If tools are optional: add -DBUILD_TOOLS=OFF for Windows triplets in the next attempt
If tools are required: investigate adding getopt-win32 as a dependency or patching the tools to use Windows APIs
Verification: After fix, rebuild on x64_windows to verify the tools link successfully.
ℹ️ Platform Impact
Windows affected: All 7 Windows triplets failed at the same point (linker stage), indicating a systematic platform-wide issue
Linux/Android unaffected: All Linux and Android triplets passed successfully, confirming the issue is Windows-specific
macOS unaffected: arm64_osx passed, as macOS has POSIX APIs like Linux
This is a classic case of a cross-platform library update introducing new platform-specific dependencies that weren't caught during the initial PR validation.
Summary & Recommendation
Issue: ORC 2.3.0 adds new command-line tools that depend on POSIX getopt functions. On Windows, these symbols are not provided by the MSVC C runtime, causing linker errors.
Scope: Affects all 7 Windows triplets; unaffected on Unix-like platforms.
Resolution: The port maintainer should either:
Disable tools on Windows (-DBUILD_TOOLS=OFF)
Add a getopt-win32 dependency and update the ORC CMakeLists.txt to find and link it
Provide a patch to use Windows-native APIs for argument parsing
Status: Blocking PR #51063 from merge. Mark as draft or rebase with a fix before re-running CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
./vcpkg x-add-version --alland committing the result.https://github.com/apache/orc/releases/tag/v2.3.0