rupurt / odbc-scanner-duckdb-extension

A DuckDB extension to read data directly from databases supporting the ODBC interface
MIT License
79 stars 4 forks source link

Assistance with building the extension #30

Open chrisfw opened 1 year ago

chrisfw commented 1 year ago

Hello,

I am hoping you can assist me with a build issue. I cloned the odbc scanner git repo and I am attempting to build the odbc scanner extension following the instructions, but I have encountered the error below. I also tried cloning the duckdb source into the /home/cwhelan/duckdb/odbc-scanner-duckdb-extension/duckdb folder and then built successfully with the provided nix command, but no odbc scanner extension binary seemed to be created. Any assistance you can provide would be greatly appreciated.

cwhelan@localhost:~/duckdb/odbc-scanner-duckdb-extension$ nix develop -c $SHELL
cwhelan@localhost:~/duckdb/odbc-scanner-duckdb-extension$ nix run .#generate-dot-clangd
cwhelan@localhost:~/duckdb/odbc-scanner-duckdb-extension$ nix run .#build
mkdir -p build/release && \
cmake -G "Ninja" -DFORCE_COLORED_OUTPUT=1 -DDUCKDB_OOT_EXTENSION_NAMES="odbc_scanner" -DDUCKDB_OOT_EXTENSION_ODBC_SCANNER_PATH="/home/cwhelan/duckdb/odbc-scanner-duckdb-extension/" -DDUCKDB_OOT_EXTENSION_ODBC_SCANNER_SHOULD_LINK="TRUE" -DDUCKDB_OOT_EXTENSION_ODBC_SCANNER_INCLUDE_PATH="/home/cwhelan/duckdb/odbc-scanner-duckdb-extension/src/include" -DODBC_CONFIG=/nix/store/lzi1paqcnailv7x94g81s324853ja8pa-unixODBC-2.3.11/bin/odbc_config -DEXTENSION_STATIC_BUILD=1 -DCMAKE_BUILD_TYPE=Release -DEXTENSION_STATIC_BUILD=1 -DBUILD_TPCH_EXTENSION=1 -DBUILD_PARQUET_EXTENSION=1   -S ./duckdb/ -B build/release && \
cmake --build build/release --config Release
CMake Error: The source directory "/home/cwhelan/duckdb/odbc-scanner-duckdb-extension/duckdb" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
make: *** [Makefile:44: release] Error 1

When I cloned the duckdb repo and put it in the duckdb folder I noticed that the variables being specified to build the odbc scanner extension are apparently not being used.

cwhelan@localhost:~/duckdb/odbc-scanner-duckdb-extension$ nix run .#build
mkdir -p build/release && \
cmake -G "Ninja" -DFORCE_COLORED_OUTPUT=1 -DDUCKDB_OOT_EXTENSION_NAMES="odbc_scanner" -DDUCKDB_OOT_EXTENSION_ODBC_SCANNER_PATH="/home/cwhelan/duckdb/odbc-scanner-duckdb-extension/" -DDUCKDB_OOT_EXTENSION_ODBC_SCANNER_SHOULD_LINK="TRUE" -DDUCKDB_OOT_EXTENSION_ODBC_SCANNER_INCLUDE_PATH="/home/cwhelan/duckdb/odbc-scanner-duckdb-extension/src/include" -DODBC_CONFIG=/nix/store/lzi1paqcnailv7x94g81s324853ja8pa-unixODBC-2.3.11/bin/odbc_config -DEXTENSION_STATIC_BUILD=1 -DCMAKE_BUILD_TYPE=Release -DEXTENSION_STATIC_BUILD=1 -DBUILD_TPCH_EXTENSION=1 -DBUILD_PARQUET_EXTENSION=1   -S ./duckdb/ -B build/release && \
cmake --build build/release --config Release
-- The C compiler identification is Clang 15.0.7
-- The CXX compiler identification is Clang 15.0.7
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /nix/store/7hknjc39fp3ag93g2b8xq01mxr2dbrv5-clang-wrapper-15.0.7/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /nix/store/7hknjc39fp3ag93g2b8xq01mxr2dbrv5-clang-wrapper-15.0.7/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found Git: /nix/store/73mc3hjk8c0fa5njc9ynm5ngqmv04ysx-git-2.41.0/bin/git (found version "2.41.0")
-- git hash 6095ea51ea, version v0.9.2-dev235
-- Load extension 'parquet' from '/home/cwhelan/duckdb/odbc-scanner-duckdb-extension/duckdb/extensions'
-- Load extension 'jemalloc' from '/home/cwhelan/duckdb/odbc-scanner-duckdb-extension/duckdb/extensions'
-- Extensions linked into DuckDB: [parquet, jemalloc]
-- Configuring done (12.6s)
-- Generating done (0.6s)
CMake Warning:
  Manually-specified variables were not used by the project:

    BUILD_PARQUET_EXTENSION
    BUILD_TPCH_EXTENSION
    DUCKDB_OOT_EXTENSION_NAMES
    DUCKDB_OOT_EXTENSION_ODBC_SCANNER_INCLUDE_PATH
    DUCKDB_OOT_EXTENSION_ODBC_SCANNER_PATH
    DUCKDB_OOT_EXTENSION_ODBC_SCANNER_SHOULD_LINK
    ODBC_CONFIG

-- Build files have been written to: /home/cwhelan/duckdb/odbc-scanner-duckdb-extension/build/release
[401/401] Linking CXX executable tools/sqlite3_api_wrapper/test_sqlite3_api_wrapper
chrisfw commented 1 year ago

Hello @rupurt , I am unfortunately still unable to build the extension successfully. Any guidance you can provide to resolve this build problem would be really appreciated.

Regards, Chris