Skip to content

Commit

Permalink
Fix build failure in the flightsql-odbc repo
Browse files Browse the repository at this point in the history
* Use 1.3 Zlib version
- The built-in base line does not work, since it will try to get zlib from https://www.zlib.net/zlib-1.2.12.tar.gz,
which is no longer valid. To fix this, I changed ZLIB version to 1.3.
* Fix ARROW_GIT_REPOSITORY not set error
   * In `flight_sql\CMakeLists.txt`, set(ARROW_GIT_REPOSITORY ... CACHE STRING) only sets the default value of ARROW_GIT_REPOSITORY. This value is supposed to be set in the build script (e.g.,  `cpp/src/flightsql_odbc/flightsql-odbc/build_win64.bat`), and the setting of this value is fixed.
* Create flightsqlodbc_build.yml to add workflow to build flightsql-odbc.
  • Loading branch information
alinaliBQ committed Dec 18, 2023
1 parent 59a015f commit 62d3817
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 4 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/flightsqlodbc_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Flight SQL ODBC Driver Client for Windows

on:
push:
paths:
- '.github/workflows/flightsqlodbc_build.yml'
- 'cpp/src/flightsql_odbc/flightsql-odbc/**'
pull_request:
paths:
- '.github/workflows/flightsqlodbc_build.yml'
- 'cpp/src/flightsql_odbc/flightsql-odbc/**'

env:
VCPKG_ROOT: "c:/vcpkg"

jobs:
build-windows32:
runs-on: windows-2022
steps:
- uses: actions/checkout@v2

- name: configure-and-build-driver
run: |
cd cpp/src/flightsql_odbc/flightsql-odbc
.\build_win32.bat
build-windows64:
runs-on: windows-2022
steps:
- uses: actions/checkout@v2

- name: configure-and-build-driver
run: |
cd cpp/src/flightsql_odbc/flightsql-odbc
.\build_win64.bat
4 changes: 3 additions & 1 deletion cpp/src/flightsql_odbc/flightsql-odbc/build_win64.bat
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ mkdir build

cd build

if NOT DEFINED ARROW_GIT_REPOSITORY SET ARROW_GIT_REPOSITORY = "https://github.com/apache/arrow"
if NOT DEFINED ARROW_GIT_REPOSITORY (
SET ARROW_GIT_REPOSITORY="https://github.com/apache/arrow"
)

cmake ..^
-DARROW_GIT_REPOSITORY=%ARROW_GIT_REPOSITORY%^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,13 @@ else()
)
endif()

# If build fails, need to remove build folder to re-build.
set(ARROW_GIT_REPOSITORY "https://github.com/apache/arrow.git" CACHE STRING "Arrow repository path or URL")
set(ARROW_GIT_TAG "b050bd0d31db6412256cec3362c0d57c9732e1f2" CACHE STRING "Tag for the Arrow repository")

message("Using Arrow from ${ARROW_GIT_REPOSITORY} on tag ${ARROW_GIT_TAG}")
ExternalProject_Add(ApacheArrow
ExternalProject_Add(
ApacheArrow
GIT_REPOSITORY ${ARROW_GIT_REPOSITORY}
GIT_TAG ${ARROW_GIT_TAG}
CMAKE_ARGS ${ARROW_CMAKE_ARGS})
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/flightsql_odbc/flightsql-odbc/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@
"boost-optional",
"boost-process",
"boost-system",
"boost-test",
"boost-variant",
"boost-xpressive",
"brotli",
"gflags",
"openssl",
"protobuf",
"zlib",
{ "name": "zlib", "version>=": "1.3" },
"re2",
"spdlog",
"grpc",
"utf8proc",
"zlib",
"zstd",
"rapidjson"
],
Expand Down

0 comments on commit 62d3817

Please sign in to comment.