Skip to content

[C++][FlightRPC][ODBC] Change Windows ODBC to Static Linkage #49538

Closed

Description

@alinaliBQ

Describe the enhancement requested

Currently ODBC has dynamic linkage on Windows. To reduce amount of DLLs that need to be signed, ODBC needs to be changed to have static linkage on Windows.

Reference: #49404 (comment)

Component(s)

FlightRPC, C++

Activity

  1. alinaliBQ commented on Mar 17, 2026

    @alinaliBQ
    CollaboratorAuthor

    Does Arrow Flight SQL (ARROW_FLIGHT_SQL=ON) support building with ARROW_DEPENDENCY_SOURCE=BUNDLED and ARROW_DEPENDENCY_USE_SHARED=OFF on Windows MSVC? Asking because Arrow Flight SQL ODBC has a dependency on Arrow Flight SQL component.

    I have started the experimentation for static ODBC linkage on Windows MSVC. I found one blocker with error Cannot open include file: 'x86intrin.h' when building bundled dependencies absl, and another blocker for building tests where SQLite3 cannot be found. Will continue to investigate.

    cc @amoeba @kou @lidavidm

  2. amoeba commented on Mar 19, 2026

    @amoeba
    Member

    Hi @alinaliBQ, I don't think there are any known blockers but getting it to work may involve some patches. Let me know if you want me to take a look.

  3. alinaliBQ commented on Mar 19, 2026

    @alinaliBQ
    CollaboratorAuthor

    @amoeba Yes please, that would be awesome. Would you be able to take a look at patches needed for building ARROW_FLIGHT_SQL statically on Windows MSVC?

    # Under arrow/cpp/build folder
    cmake .. -G "Visual Studio 17 2022" `
        -A x64 `
        -DARROW_FLIGHT_SQL=ON `
        -DARROW_DEPENDENCY_SOURCE=BUNDLED `
        -DARROW_DEPENDENCY_USE_SHARED=OFF `
        -DARROW_BUILD_TESTS=ON
    

    Once building ARROW_FLIGHT_SQL statically is supported, it would be more straightforward to enable the ODBC build on top of Flight SQL.

  4. amoeba commented on Mar 24, 2026

    @amoeba
    Member

    Hi @alinaliBQ, I have a draft PR for static linkage up at #49585. It builds locally and looks better but I haven't tested it yet. I'll keep working on this tomorrow.

  5. alinaliBQ commented on Mar 24, 2026

    @alinaliBQ
    CollaboratorAuthor

    Thank you Bryce, I have subscribed to the PR and will keep an eye on it

  6. added a commit that references this issue on Sep 25, 2026
  7. added this to the 26.0.0 milestone on Sep 29, 2026
  8. added a commit that references this issue on Sep 29, 2026
  9. raulcd commented on Sep 29, 2026

    @raulcd
    Member

    Issue resolved by pull request 49585
    #49585

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions