Repository navigation
Conversation
* use lipo to merge odbc installer * Add check for archs to have both builds * Add macOS installer check
|
Thanks @alinaliBQ, I'll review this week. |
There was a problem hiding this comment.
A recent mailing list discussion proposed dropping macos intel support. Does it make sense to create an installer for Intel?
| lipo -create "${dylib_path}" amd64-dylib/libarrow_flight_sql_odbc.dylib \ | ||
| -output "${dylib_path}" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
@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
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. |
- Change CI to modify the real path DYLIB file, instead of the symlink - Check all symlinks and real path for installation correctness
amoeba
left a comment
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
| 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 |
There was a problem hiding this comment.
Just for consistency
| - 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" |
| matrix: | ||
| include: | ||
| - architecture: AMD64 | ||
| macos-version: "15-intel" |
| 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 |
There was a problem hiding this comment.
Can this be simplified? A comment wouldn't be a bad call either.
| 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 |
| 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 |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
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?
Rationale for this change
#51614
What changes are included in this PR?
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-universalfrom 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:
Reviewed before submission by: