forked from apache/arrow
-
Notifications
You must be signed in to change notification settings - Fork 0
Enable ODBC Build On Linux #160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
dc4bef8
Build ODBC on Linux CI remotely
alinaliBQ 0e114ba
Reuse existing docker image (no install of unixodbc)
alinaliBQ f157cac
Install unixodbc-dev inside docker
alinaliBQ 68c1d62
Clean up Linux changes
alinaliBQ 489d57e
Comments for next TODO
alinaliBQ 330f68a
Use `ubuntu-cpp-odbc` compose command and change to release mode
alinaliBQ de27e42
Export ODBC APIs on Linux
alinaliBQ 49e53df
Clean up ODBC code
alinaliBQ 126bbe7
Use `reinterpret_cast` as Linux wchar_t is char16
alinaliBQ 64d8ada
Use const & string_view
alinaliBQ 16c29c7
Address my own PR comments
alinaliBQ 308adde
Add patch for Windows build
alinaliBQ File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -151,6 +151,7 @@ x-hierarchy: | |
| - ubuntu-r-only-r | ||
| - ubuntu-cpp-bundled | ||
| - ubuntu-cpp-bundled-offline | ||
| - ubuntu-cpp-odbc | ||
| - ubuntu-cpp-minimal | ||
| - ubuntu-cuda-cpp: | ||
| - ubuntu-cuda-python | ||
|
|
@@ -496,6 +497,43 @@ services: | |
| volumes: *ubuntu-volumes | ||
| command: *cpp-command | ||
|
|
||
| ubuntu-cpp-odbc: | ||
| # Arrow Flight SQL ODBC build with BUNDLED dependencies with downloaded dependencies. | ||
| image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cpp | ||
| build: | ||
| context: . | ||
| dockerfile: ci/docker/ubuntu-${UBUNTU}-cpp.dockerfile | ||
| cache_from: | ||
| - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cpp | ||
| args: | ||
| arch: ${ARCH} | ||
| base: "${ARCH}/ubuntu:${UBUNTU}" | ||
| clang_tools: ${CLANG_TOOLS} | ||
| cmake: ${CMAKE} | ||
| gcc: ${GCC} | ||
| llvm: ${LLVM} | ||
| shm_size: *shm-size | ||
| cap_add: | ||
| - SYS_ADMIN | ||
| devices: | ||
| - "/dev/fuse:/dev/fuse" | ||
| security_opt: | ||
| - apparmor:unconfined | ||
| ulimits: *ulimits | ||
| environment: | ||
| <<: [*common, *ccache, *sccache, *cpp] | ||
| ARROW_BUILD_TYPE: RELEASE | ||
| ARROW_DEPENDENCY_SOURCE: BUNDLED | ||
| ARROW_DEPENDENCY_USE_SHARED: OFF | ||
| ARROW_FLIGHT_SQL_ODBC: ON | ||
| volumes: *ubuntu-volumes | ||
| # Register ODBC before running tests | ||
| command: > | ||
| /bin/bash -c " | ||
| /arrow/ci/scripts/cpp_build.sh /arrow /build && | ||
| sudo /arrow/cpp/src/arrow/flight/sql/odbc/install/unix/install_odbc.sh /usr/local/lib/libarrow_flight_sql_odbc.so && | ||
| /arrow/ci/scripts/cpp_test.sh /arrow /build" | ||
|
Comment on lines
+531
to
+535
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ODBC build, registration, and test is here |
||
|
|
||
| ubuntu-cpp-minimal: | ||
| # Arrow build with minimal components/dependencies | ||
| image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cpp-minimal | ||
|
|
||
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,7 +40,16 @@ if [ ! -f "$ODBC_64BIT" ]; then | |
| exit 1 | ||
| fi | ||
|
|
||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @justing-bq this is the unix registration script |
||
| USER_ODBCINST_FILE="$HOME/Library/ODBC/odbcinst.ini" | ||
| case "$(uname)" in | ||
| Linux) | ||
| USER_ODBCINST_FILE="/etc/odbcinst.ini" | ||
| ;; | ||
| *) | ||
| # macOS | ||
| USER_ODBCINST_FILE="$HOME/Library/ODBC/odbcinst.ini" | ||
| ;; | ||
| esac | ||
|
|
||
| DRIVER_NAME="Apache Arrow Flight SQL ODBC Driver" | ||
|
|
||
| mkdir -p "$HOME"/Library/ODBC | ||
|
|
||
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we want this same "Register Flight SQL ODBC Driver" section for linux as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section is inside
compose.yaml:arrow/compose.yaml
Lines 531 to 535 in 2afc5fd
Because Linux docker file has the test sessions etc inside the docker command, I added ODBC registration at the same place