Clickhouse odbc issue
Guys we have followed below link for debian installation clickhouse with odbc driver but we face below error
https://github.com/ClickHouse/clickhouse-odbc#building-from-sources-debianubuntu
perl: warning: Falling back to the standard locale ("C"). Can't locate DBI.pm in @inc (@inc contains: /opt/rh/devtoolset-8/root//usr/lib64/perl5/vendor_perl /opt/rh/devtoolset-8/root/usr/lib/perl5 /opt/rh/devtoolset-8/root//usr/share/perl5/vendor_perl /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /home/centos/clickhouse-odbc/test/detect_driver_manager.pl line 8. BEGIN failed--compilation aborted at /home/centos/clickhouse-odbc/test/detect_driver_manager.pl line 8. -- ODBC Driver Manager used by Perl's DBD::ODBC: Traceback (most recent call last): File "/home/centos/clickhouse-odbc/test/detect_driver_manager.py", line 5, in import pyodbc
Can you post the entire output of cmake configure step? Does it generate the build scripts after outputting this? Such errors are not critical, the appropriate test (perl client) will be just disabled.
Hi ClickHouse/clickhouse-odbc,
Please find details below process - we are using debian 9.4
sudo apt install build-essential git cmake libpoco-dev libssl-dev libicu-dev unixodbc-dev
sudo snap install cmake --classic
git clone --recursive https://github.com/ClickHouse/clickhouse-odbc.git
163 cd clickhouse-odbc/
164 ls
165 mkdir build
166 cd build/
167 cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
168 sudo apt-get install libdbi-perl
now it gave below error
cmake --build . --config RelWithDebInfo
[ 93%] Built target Foundation
[ 93%] Built target crypto
[ 93%] Built target ssl
[ 93%] Built target Crypto
[ 93%] Built target XML
[ 93%] Built target JSON
[ 93%] Built target Util
[ 93%] Built target Net
[ 93%] Built target NetSSL
[ 93%] Building CXX object driver/CMakeFiles/clickhouse-odbc-impl.dir/utils/type_parser.cpp.o
In file included from /home/debian/clickhouse-odbc/driver/utils/type_parser.cpp:2:0:
/home/debian/clickhouse-odbc/driver/utils/utils.h:30:23: *fatal error: *string_view: No such file or directory
#include <string_view>
*^*
compilation terminated.
driver/CMakeFiles/clickhouse-odbc-impl.dir/build.make:81: recipe for target 'driver/CMakeFiles/clickhouse-odbc-impl.dir/utils/type_parser.cpp.o' failed
make[2]: *** [driver/CMakeFiles/clickhouse-odbc-impl.dir/utils/type_parser.cpp.o] Error 1
CMakeFiles/Makefile2:2346: recipe for target 'driver/CMakeFiles/clickhouse-odbc-impl.dir/all' failed
make[1]: *** [driver/CMakeFiles/clickhouse-odbc-impl.dir/all] Error 2
Makefile:181: recipe for target 'all' failed
make: *** [all] Error 2
On Tue, Sep 15, 2020 at 8:43 PM Denis Glazachev [email protected] wrote:
Can you post the entire output of cmake configure step? Does it generate the build scripts after outputting this? Such errors are not critical, the appropriate test (perl client) will be just disabled.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ClickHouse/clickhouse-odbc/issues/317#issuecomment-692782031, or unsubscribe https://github.com/notifications/unsubscribe-auth/APILF3IURNE7TXONPKTLR63SF6AA7ANCNFSM4RM6I25Q .
string_view is C++17 feature. Does your compiler fully support C++17?
g++ --version
g++ (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
On Tue, Sep 15, 2020 at 8:52 PM Denis Glazachev [email protected] wrote:
string_view is C++17 feature. Does your compiler fully support C++17?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ClickHouse/clickhouse-odbc/issues/317#issuecomment-692789396, or unsubscribe https://github.com/notifications/unsubscribe-auth/APILF3KV3DXBWBUB6YWUMXTSF6BE5ANCNFSM4RM6I25Q .
How can we install c++17 on debian.
On Tue, Sep 15, 2020 at 9:41 PM Sanjay Agrawal [email protected] wrote:
g++ --version
g++ (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
On Tue, Sep 15, 2020 at 8:52 PM Denis Glazachev [email protected] wrote:
string_view is C++17 feature. Does your compiler fully support C++17?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ClickHouse/clickhouse-odbc/issues/317#issuecomment-692789396, or unsubscribe https://github.com/notifications/unsubscribe-auth/APILF3KV3DXBWBUB6YWUMXTSF6BE5ANCNFSM4RM6I25Q .
Try installing g++-7 or g++-8 package.
Hi ClickHouse/clickhouse-odbc,
How to install C++17 in debian 9.4
On Tue, Sep 15, 2020 at 9:44 PM Sanjay Agrawal [email protected] wrote:
How can we install c++17 on debian.
On Tue, Sep 15, 2020 at 9:41 PM Sanjay Agrawal [email protected] wrote:
g++ --version
g++ (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
On Tue, Sep 15, 2020 at 8:52 PM Denis Glazachev [email protected] wrote:
string_view is C++17 feature. Does your compiler fully support C++17?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ClickHouse/clickhouse-odbc/issues/317#issuecomment-692789396, or unsubscribe https://github.com/notifications/unsubscribe-auth/APILF3KV3DXBWBUB6YWUMXTSF6BE5ANCNFSM4RM6I25Q .
Currently it is 6.3 how to upgrade g++8 version.. Please share steps
On Tue, 15 Sep, 2020, 9:51 pm Sanjay Agrawal, [email protected] wrote:
Hi ClickHouse/clickhouse-odbc,
How to install C++17 in debian 9.4
On Tue, Sep 15, 2020 at 9:44 PM Sanjay Agrawal [email protected] wrote:
How can we install c++17 on debian.
On Tue, Sep 15, 2020 at 9:41 PM Sanjay Agrawal [email protected] wrote:
g++ --version
g++ (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
On Tue, Sep 15, 2020 at 8:52 PM Denis Glazachev < [email protected]> wrote:
string_view is C++17 feature. Does your compiler fully support C++17?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ClickHouse/clickhouse-odbc/issues/317#issuecomment-692789396, or unsubscribe https://github.com/notifications/unsubscribe-auth/APILF3KV3DXBWBUB6YWUMXTSF6BE5ANCNFSM4RM6I25Q .
Try
sudo apt install g++-8
or
sudo apt install gcc-8
then set the following env vars before calling cmake configure step (in clean build dir):
CXX=g++-8 CC=gcc-8 cmake ...
I installed above github procedure on debian 10 and get following error.
Can't locate DBI.pm in @INC (you may need to install the DBI module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /home/ubuntu/clickhouse-odbc/test/detect_driver_manager.pl line 8. BEGIN failed--compilation aborted at /home/ubuntu/clickhouse-odbc/test/detect_driver_manager.pl line 8. -- ODBC Driver Manager used by Perl's DBD::ODBC: -- ODBC Driver Manager used by Python 3's pyodbc: unixODBC -- Testing with: TEST_DSN_LIST=ClickHouse DSN (ANSI);ClickHouse DSN (Unicode) PERL=/usr/bin/perl PERL_USES_MDAC=0 PERL_USES_UNIXODBC=0 PERL_USES_IODBC=0 PYTHON2=PYTHON2-NOTFOUND PYTHON2_USES_MDAC=0 PYTHON2_USES_UNIXODBC=0 PYTHON2_USES_IODBC=0 PYTHON3=/usr/bin/python3 PYTHON3_USES_MDAC=0 PYTHON3_USES_UNIXODBC=1 PYTHON3_USES_IODBC=0 ODBC_UNIXODBC_ISQL= ODBC_UNIXODBC_IUSQL= ODBC_IODBC_IODBCTEST= ODBC_IODBC_IODBCTESTW= SQLCMD=SQLCMD-NOTFOUND -- Configuring done -- Generating done
sudo apt-get install libdbi-perl now getting below error.
install_driver(ODBC) failed: Can't locate DBD/ODBC.pm in @INC (you may need to install the DBD::ODBC module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at (eval 8) line 3.Perhaps the DBD::ODBC perl module hasn't been fully installed,or perhaps the capitalisation of 'ODBC' isn't right.
I have install this one cpan DBD::ODBC also but same issue. Please help.
final command gave below error
cmake --build . --config RelWithDebInfo --target test Running tests... Test project /home/ubuntu/clickhouse-odbc/build Start 1: clickhouse-odbc-ut 1/20 Test #1: clickhouse-odbc-ut ................... Passed 0.02 sec Start 2: clickhouse-odbc-load-ut 2/20 Test #2: clickhouse-odbc-load-ut .............. Passed 0.00 sec Start 3: clickhouse-odbc-load-ut-w 3/20 Test #3: clickhouse-odbc-load-ut-w ............ Passed 0.00 sec Start 4: clickhouse-odbc-client-it-dsn-0 4/20 Test #4: clickhouse-odbc-client-it-dsn-0 ......***Failed 0.03 sec Start 5: clickhouse-odbc-client-it-dsn-1 5/20 Test #5: clickhouse-odbc-client-it-dsn-1 ......***Failed 0.02 sec Start 6: clickhouse-odbc-nano-it-dsn-0 6/20 Test #6: clickhouse-odbc-nano-it-dsn-0 ........***Failed 0.00 sec Start 7: clickhouse-odbc-nano-it-dsn-1 7/20 Test #7: clickhouse-odbc-nano-it-dsn-1 ........***Failed 0.00 sec Start 8: clickhouse-odbcw-ut 8/20 Test #8: clickhouse-odbcw-ut .................. Passed 0.01 sec Start 9: clickhouse-odbcw-load-ut 9/20 Test #9: clickhouse-odbcw-load-ut ............. Passed 0.00 sec Start 10: clickhouse-odbcw-load-ut-w 10/20 Test #10: clickhouse-odbcw-load-ut-w ........... Passed 0.00 sec Start 11: clickhouse-odbcw-client-it-dsn-0 11/20 Test #11: clickhouse-odbcw-client-it-dsn-0 .....***Failed 0.03 sec Start 12: clickhouse-odbcw-client-it-dsn-1 12/20 Test #12: clickhouse-odbcw-client-it-dsn-1 .....***Failed 0.02 sec Start 13: clickhouse-odbcw-nano-it-dsn-0 13/20 Test #13: clickhouse-odbcw-nano-it-dsn-0 .......***Failed 0.00 sec Start 14: clickhouse-odbcw-nano-it-dsn-1 14/20 Test #14: clickhouse-odbcw-nano-it-dsn-1 .......***Failed 0.00 sec Start 15: test.pl-dsn-0 15/20 Test #15: test.pl-dsn-0 ........................***Failed 0.18 sec Start 16: test.py-3-dsn-0 16/20 Test #16: test.py-3-dsn-0 ......................***Failed 0.23 sec Start 17: parametrized-regression.py-3-dsn-0 17/20 Test #17: parametrized-regression.py-3-dsn-0 ...***Failed 0.20 sec Start 18: test.pl-dsn-1 18/20 Test #18: test.pl-dsn-1 ........................***Failed 0.12 sec Start 19: test.py-3-dsn-1 19/20 Test #19: test.py-3-dsn-1 ......................***Failed 0.19 sec Start 20: parametrized-regression.py-3-dsn-1 20/20 Test #20: parametrized-regression.py-3-dsn-1 ...***Failed 0.20 sec
30% tests passed, 14 tests failed out of 20
Total Test time (real) = 1.30 sec
The following tests FAILED: 4 - clickhouse-odbc-client-it-dsn-0 (Failed) 5 - clickhouse-odbc-client-it-dsn-1 (Failed) 6 - clickhouse-odbc-nano-it-dsn-0 (Failed) 7 - clickhouse-odbc-nano-it-dsn-1 (Failed) 11 - clickhouse-odbcw-client-it-dsn-0 (Failed) 12 - clickhouse-odbcw-client-it-dsn-1 (Failed) 13 - clickhouse-odbcw-nano-it-dsn-0 (Failed) 14 - clickhouse-odbcw-nano-it-dsn-1 (Failed) 15 - test.pl-dsn-0 (Failed) 16 - test.py-3-dsn-0 (Failed) 17 - parametrized-regression.py-3-dsn-0 (Failed) 18 - test.pl-dsn-1 (Failed) 19 - test.py-3-dsn-1 (Failed) 20 - parametrized-regression.py-3-dsn-1 (Failed) Errors while running CTest make: *** [Makefile:126: test] Error 8
Its is done but in tableau server get following error -
================================================================= [unixODBC][Driver Manager]Can't open lib 'ClickHouse Unicode' : file not found Generic ODBC requires additional configuration. The driver and DSN (data source name) must be installed and configured to match the connection. Unable to connect using the DSN named "test". Check that the DSN exists and is a valid connection.
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
-- CMAKE_BUILD_TYPE: RelWithDebInfo
-- Using ODBC: UnixODBC
-- ODBC_DIR=/usr
-- ODBC_CONFIG_SCRIPT=
-- ODBC_UNIXODBC_ISQL=
-- ODBC_UNIXODBC_IUSQL=
-- ODBC_APP_DEFINES=
-- ODBC_APP_INCLUDE_DIRS=/usr/include
-- ODBC_APP_COMPILER_FLAGS=
-- ODBC_APP_LINKER_FLAGS=/usr/lib/x86_64-linux-gnu/libodbc.so
-- ODBC_DRIVER_DEFINES=
-- ODBC_DRIVER_INCLUDE_DIRS=/usr/include
-- ODBC_DRIVER_COMPILER_FLAGS=
-- ODBC_DRIVER_LINKER_FLAGS=/usr/lib/x86_64-linux-gnu/libodbcinst.so
-- Found ODBC: TRUE
-- Found the following ICU libraries:
-- uc (required)
CMake Warning (dev) at contrib/ssl/CMakeLists.txt:11 (project):
Policy CMP0048 is not set: project() command manages VERSION variables.
Run "cmake --help-policy CMP0048" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
The following variable(s) would be set to empty:
PROJECT_VERSION
PROJECT_VERSION_MAJOR
PROJECT_VERSION_MINOR
PROJECT_VERSION_PATCH
PROJECT_VERSION_TWEAK
This warning is for project developers. Use -Wno-dev to suppress it.
-- Poco package version: 1.9.4
-- Checking for C++11 compiler
-- Checking for C++11 compiler - available
-- Checking for C++14 compiler
-- Checking for C++14 compiler - available
-- Setting Poco build type - RelWithDebInfo
-- Building static libraries
-- Building without tests & samples
-- Using internal sqlite, zlib, pcre, expat, ...
-- Platform has THREE PARAM at PTHREAD_SETAFFINITY_NP
-- Couldn't find MySQL or MariaDB
-- MySQL Support Disabled - no MySQL library
-- Found ODBC: /usr/include
-- ODBC Support Enabled
-- CMake 3.18.2 successfully configured Poco using Unix Makefiles generator
-- Installation target path: /usr/local
-- C_FLAGS: =
-- CMAKE_C_FLAGS_DEBUG:=-g -DBUILD_TYPE_DEBUG -D_DEBUG
-- CMAKE_C_FLAGS_RELEASE:=-O3 -DNDEBUG -DNDEBUG -DBUILD_TYPE_RELEASE
-- CMAKE_C_FLAGS_MINSIZEREL:=-Os -DNDEBUG -DNDEBUG -DBUILD_TYPE_MINSIZEREL
-- CMAKE_C_FLAGS_RELWITHDEBINFO:=-O2 -g -DNDEBUG -DNDEBUG -DBUILD_TYPE_RELWITHDEBINFO
-- -- CXX_FLAGS:= -- CMAKE_CXX_FLAGS_DEBUG:=-g -DBUILD_TYPE_DEBUG -D_DEBUG -- CMAKE_CXX_FLAGS_RELEASE:=-O3 -DNDEBUG -DNDEBUG -DBUILD_TYPE_RELEASE -- CMAKE_CXX_FLAGS_MINSIZEREL:=-Os -DNDEBUG -DNDEBUG -DBUILD_TYPE_MINSIZEREL -- CMAKE_CXX_FLAGS_RELWITHDEBINFO:=-O2 -g -DNDEBUG -DNDEBUG -DBUILD_TYPE_RELWITHDEBINFO -- Building: Encodings -- Building: XML -- Building: JSON -- Building: Util -- Building: Net -- Building: MongoDB -- Building: Redis -- Building: NetSSL_OpenSSL -- Building: Crypto -- Building: Data -- Building: Zip -- Building: PageCompiler -- Building: File2Page -- nanodbc version: 2.13.0 -- nanodbc compile: C++14 -- nanodbc build: Disable linking libc++ - 1 -- nanodbc feature: ODBC Version Override - OFF -- nanodbc feature: Disable async features - OFF -- nanodbc feature: Enable Unicode - 0 -- nanodbc feature: Enable Boost - OFF -- nanodbc feature: Enable SQL_NO_DATA bug workaround - OFF -- nanodbc build: ODBC on Unix - unixODBC -- ODBC compile flags: -I/usr/include -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 -- ODBC link flags: -- nanodbc build: Enable nanodbc target - STATIC -- nanodbc build: Disable install target - 1 -- nanodbc build: Disable tests target - 1 -- nanodbc build: Disable examples target - 1 -- clickhouse-odbc: ANSI -- clickhouse-odbcw: Unicode perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = "UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to a fallback locale ("en_US.UTF-8"). -- ODBC Driver Manager used by Perl's DBD::ODBC: unixODBC -- ODBC Driver Manager used by Python 2's pyodbc: unixODBC -- ODBC Driver Manager used by Python 3's pyodbc: unixODBC -- Testing with: TEST_DSN_LIST=ClickHouse DSN (ANSI);ClickHouse DSN (Unicode) PERL=/usr/bin/perl PERL_USES_MDAC=0 PERL_USES_UNIXODBC=1 PERL_USES_IODBC=0 PYTHON2=/usr/bin/python2 PYTHON2_USES_MDAC=0 PYTHON2_USES_UNIXODBC=1 PYTHON2_USES_IODBC=0 PYTHON3=/usr/bin/python3 PYTHON3_USES_MDAC=0 PYTHON3_USES_UNIXODBC=1 PYTHON3_USES_IODBC=0 ODBC_UNIXODBC_ISQL= ODBC_UNIXODBC_IUSQL= ODBC_IODBC_IODBCTEST= ODBC_IODBC_IODBCTESTW= SQLCMD=SQLCMD-NOTFOUND -- Configuring done -- Generating done -- Build files have been written to: /home/debian/clickhouse-odbc/build
-- Build files have been written to: /home/debian/clickhouse-odbc/build
This means you can proceed and run compilation. The warnings are benign.
Errors while running CTest
This is because you didn't configure Driver and DSN for those tests. Only unit tests can be run without configured Driver and DSN (that should point to newly built binaries) and a running ClickHouse server. You can skip this unless you really want to run tests.
Its is done but in tableau server get following error - [unixODBC][Driver Manager]Can't open lib 'ClickHouse Unicode' : file not found Generic ODBC requires additional configuration. The driver and DSN (data source name) must be installed and configured to match the connection. Unable to connect using the DSN named "test". Check that the DSN exists and is a valid connection.
You need to properly configure Driver and DSN entry for Tableau to see the driver and ClickHouse data source.
yes the main problem is after all step above i did not find clcikhouse.so file on server
[ClickHouse] Driver=/usr/lib/x86_64-linux-gnu/odbc/libclickhouseodbc.so
On Fri, Sep 18, 2020 at 3:56 AM Denis Glazachev [email protected] wrote:
-- Build files have been written to: /home/debian/clickhouse-odbc/build
This means you can proceed and run compilation. The warnings are benign.
Errors while running CTest
This is because you didn't configure Driver and DSN for those tests. Only unit tests can be run without configured Driver and DSN (that should point to newly built binaries) and a running ClickHouse server. You can skip this unless you really want to run tests.
Its is done but in tableau server get following error - [unixODBC][Driver Manager]Can't open lib 'ClickHouse Unicode' : file not found Generic ODBC requires additional configuration. The driver and DSN (data source name) must be installed and configured to match the connection. Unable to connect using the DSN named "test". Check that the DSN exists and is a valid connection.
You need to properly configure Driver and DSN entry for Tableau to see the driver and ClickHouse data source.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ClickHouse/clickhouse-odbc/issues/317#issuecomment-694532681, or unsubscribe https://github.com/notifications/unsubscribe-auth/APILF3PC2UZ7DZFUMZYNB4LSGKELBANCNFSM4RM6I25Q .
When you build from sources, the binary is somewhere in build folder.
You can also run cmake --build . --config RelWithDebInfo --target package and find everything needed in the generated packages. No DEB package for Debian yet, you have to use .tar.gz file, copy and unpack it manually and fix paths accordingly. The .tar.gz file will be in build dir.