Visitar URL original
GH-51614: [C++][FlightRPC] Universal macOS PKG Installer by alinaliBQ · Pull Request #51765 · apache/arrow · GitHub
Skip to content

GH-51614: [C++][FlightRPC] Universal macOS PKG Installer - #51765

Open
alinaliBQ wants to merge 2 commits into
apache:mainfrom
Bit-Quill:gh-51614-universal-pkg
Open

alinaliBQ wants to merge 2 commits into
apache:mainfrom
Bit-Quill:gh-51614-universal-pkg

Conversation

@alinaliBQ

@alinaliBQ alinaliBQ commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Rationale for this change

#51614

What changes are included in this PR?

  • Output universal .pkg installer that work on both ARM and AMD.
  • Add CI step to verify installation by the universal pkg installer.

Are these changes tested?

Tested in CI.
Manually tested the universal .pkg installer on M5 and Intel Mac machines.

Are there any user-facing changes?

No.

Developers can use the universal macOS .pkg installer titled flight-sql-odbc-pkg-installer-universal from the CI.

Was AI used for this PR?

In accordance to the AI generation guidelines, please disclose below whether and how AI was used in this PR.

PR code and description written by:

  • Human
  • AI

Reviewed before submission by:

  • Human
  • AI
  • Not reviewed

* use lipo to merge odbc installer

* Add check for archs to have both builds

* Add macOS installer check
@github-actions github-actions Bot added the awaiting review Awaiting review label Oct 5, 2026
@alinaliBQ alinaliBQ added the CI: Extra: C++ Run extra C++ CI label Oct 5, 2026
@alinaliBQ

Copy link
Copy Markdown
Collaborator Author

Hi @kou @lidavidm @amoeba this PR is ready for review. The ODBC CIs passed in the fork repo so I think a re-run will likely fix the issue.

@amoeba

amoeba commented Oct 7, 2026

Copy link
Copy Markdown
Member

Thanks @alinaliBQ, I'll review this week.

@xborder xborder left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A recent mailing list discussion proposed dropping macos intel support. Does it make sense to create an installer for Intel?

Comment on lines +725 to +726
lipo -create "${dylib_path}" amd64-dylib/libarrow_flight_sql_odbc.dylib \
-output "${dylib_path}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

codex pointed me to an issue here:

lipo replaces the unversioned symlink, leaving the versioned dylib ARM-only. Intel clients linking against its versioned install name then fail with “incompatible architecture.” The verification should check the versioned target too.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes good find. The realpath should be changed instead of symlink. I have pushed the changes for your comment and will comment once I test the produced artifact locally.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@xborder I tested the new installer on my M5 and the ODBC works locally. Now the installed directory looks like:

-rw-r--r--  1 admin  staff   101M Oct  9 14:38:50 2026 libarrow_flight_sql_odbc.2600.0.0.dylib
lrwxr-xr-x  1 admin  staff    39B Oct  9 14:43:22 2026 libarrow_flight_sql_odbc.2600.dylib -> libarrow_flight_sql_odbc.2600.0.0.dylib
lrwxr-xr-x  1 admin  staff    35B Oct  9 14:43:22 2026 libarrow_flight_sql_odbc.dylib -> libarrow_flight_sql_odbc.2600.dylib

@alinaliBQ

Copy link
Copy Markdown
Collaborator Author

A recent mailing list discussion proposed dropping macos intel support. Does it make sense to create an installer for Intel?

Thanks for raising this @xborder, I think if we could make the release for Intel installer before the Intel support is officially dropped, users could at least have 1 version that they can use.
And when Intel support is officially dropped, the workflow that creates Intel installer can be removed.

- Change CI to modify the real path DYLIB file, instead of the symlink
- Check all symlinks and real path for installation correctness
@github-actions github-actions Bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Oct 9, 2026

@amoeba amoeba left a comment

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.

Hey @alinaliBQ thanks for this. I left a few comments, overall this looks great.

needs: odbc-macos
if: needs.check-enabled.outputs.is_enabled == 'true'
name: ODBC universal macOS installer
runs-on: macos-14

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.

Do we have a reason to use such an old macOS runner?

odbc-macos-universal:
needs: odbc-macos
if: needs.check-enabled.outputs.is_enabled == 'true'
name: ODBC universal macOS installer

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.

Suggested change
name: ODBC universal macOS installer
name: Create ODBC universal macOS installer

name: flight-sql-odbc-pkg-installer-${{ matrix.architecture }}
path: build/cpp/ArrowFlightSQLODBC-*.pkg
if-no-files-found: error
- name: Upload Intel ODBC dylib to the job

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.

Just for consistency

Suggested change
- name: Upload Intel ODBC dylib to the job
- name: Upload AMD64 ODBC dylib to the job

- architecture: AMD64
macos-version: "15-intel"
- architecture: ARM64
macos-version: "14"

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.

Why this version not newer?

matrix:
include:
- architecture: AMD64
macos-version: "15-intel"

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.

Why this version not newer?

Comment on lines +735 to +744
for lib in "${lib_dir}"/libarrow_flight_sql_odbc*.dylib; do
dylib_archs="$(lipo -archs "${lib}")"
echo "${lib}: ${dylib_archs}"
for arch in arm64 x86_64; do
if ! grep -qw "${arch}" <<< "${dylib_archs}"; then
echo "${lib} is missing '${arch}' (got: ${dylib_archs})"
exit 1
fi
done
done

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.

Can this be simplified? A comment wouldn't be a bad call either.

Suggested change
for lib in "${lib_dir}"/libarrow_flight_sql_odbc*.dylib; do
dylib_archs="$(lipo -archs "${lib}")"
echo "${lib}: ${dylib_archs}"
for arch in arm64 x86_64; do
if ! grep -qw "${arch}" <<< "${dylib_archs}"; then
echo "${lib} is missing '${arch}' (got: ${dylib_archs})"
exit 1
fi
done
done
for lib in "${lib_dir}"/libarrow_flight_sql_odbc*.dylib; do
echo "Checking ${lib}"
lipo -verify_arch arm64 x86_64 "${lib}"
done

Comment on lines +793 to +800
for lib in /Library/ODBC/arrow-odbc/lib/libarrow_flight_sql_odbc*.dylib; do
archs="$(lipo -archs "${lib}")"
echo "${lib}: ${archs}"
if ! grep -qw "${local_arch}" <<< "${archs}"; then
echo "${lib} does not support local architecture '${local_arch}' (got: ${archs})"
exit 1
fi
done

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.

Testing that the .pkg installs on both platforms is good, the remainder of the check is basically re-asserting what we already asserted in the previous step. At the least we could simplify this similar to my comment above (just check that the dylib supports both arches).


odbc-macos-universal-verify:
needs: odbc-macos-universal
if: needs.check-enabled.outputs.is_enabled == 'true'

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.

Can we remove this? My agent review caught it. Apparently GitHub documents the needs context is only including outputs from jobs in the needs directive but apparently what you've done here works even if it's not documented. I worry maybe it would change at some point.

Can both these jobs just depend on odbc-macos and get us the same effect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting committer review Awaiting committer review CI: Extra: C++ Run extra C++ CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants