Comments (6)
Works like a charm, thank you!
from clickhouse-odbc.
- Please try with this commit 13cabc5
- You should change PORT to 8123
from clickhouse-odbc.
@artpaul, thank you for your quick response.
After changes made in 13cabc5:
When iusql
is used, nothing is changed since iusql
calls SQLDriverConnect
, which hasn't been changed.
When isql
is used, I can see the following error in /tmp/clickhouse-odbc-stderr
:
isql: symbol lookup error: /usr/local/lib/clickhouse_odbc.so: undefined symbol: SQLGetPrivateProfileString
Adding -lodbcinst
to compiler options didn't help:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libodbcinst.a(ODBCINSTConstructProperties.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libodbcinst.a(ODBCINSTConstructProperties.o): error adding symbols: Bad value
collect2: error: ld returned 1 exit status
It seems that libodbcinst
was compiled without -fPIC
in Ubuntu.
$ ar -x /usr/lib/x86_64-linux-gnu/libodbcinst.a; readelf --relocs ODBCINSTConstructProperties.o | egrep '(GOT|PLT|JU?MP_SLOT)'
$
BTW, there are compilation warnings didn't allow to compile the driver with build.sh
(with -Werror
, properly speaking):
In file included from attr.cpp:5:0:
utils.h: In instantiation of ‘RETCODE fillOutputString(const string&, PTR, LENGTH, LENGTH*) [with PTR = void*; LENGTH = int; RETCODE = short int; std::__cxx11::string = std::__cxx11::basic_string<char>]’:
attr.cpp:138:104: required from here
utils.h:137:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (out_value_max_length >= (size_without_zero + 1) * sizeof(TCHAR))
^
utils.h:33:21: warning: ‘const char* nextKeyValuePair(const char*, const char*, StringRef&, StringRef&)’ defined but not used [-Wunused-function]
static const char * nextKeyValuePair(const char * data, const char * end, StringRef & out_key, StringRef & out_value)
^
In file included from handles.cpp:5:0:
utils.h:33:21: warning: ‘const char* nextKeyValuePair(const char*, const char*, StringRef&, StringRef&)’ defined but not used [-Wunused-function]
static const char * nextKeyValuePair(const char * data, const char * end, StringRef & out_key, StringRef & out_value)
^
In file included from info.cpp:3:0:
utils.h: In instantiation of ‘RETCODE fillOutputString(const string&, PTR, LENGTH, LENGTH*) [with PTR = void*; LENGTH = short int; RETCODE = short int; std::__cxx11::string = std::__cxx11::basic_string<char>]’:
info.cpp:50:13: required from here
utils.h:137:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (out_value_max_length >= (size_without_zero + 1) * sizeof(TCHAR))
^
utils.h:33:21: warning: ‘const char* nextKeyValuePair(const char*, const char*, StringRef&, StringRef&)’ defined but not used [-Wunused-function]
static const char * nextKeyValuePair(const char * data, const char * end, StringRef & out_key, StringRef & out_value)
^
In file included from odbc.cpp:8:0:
utils.h: In instantiation of ‘RETCODE fillOutputString(const string&, PTR, LENGTH, LENGTH*) [with PTR = void*; LENGTH = short int; RETCODE = short int; std::__cxx11::string = std::__cxx11::basic_string<char>]’:
odbc.cpp:244:110: required from here
utils.h:137:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (out_value_max_length >= (size_without_zero + 1) * sizeof(TCHAR))
^
utils.h: In instantiation of ‘RETCODE fillOutputString(const string&, PTR, LENGTH, LENGTH*) [with PTR = unsigned char*; LENGTH = short int; RETCODE = short int; std::__cxx11::string = std::__cxx11::basic_string<char>]’:
odbc.cpp:276:114: required from here
utils.h:137:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
utils.h: In instantiation of ‘RETCODE fillOutputString(const string&, PTR, LENGTH, LENGTH*) [with PTR = void*; LENGTH = long int; RETCODE = short int; std::__cxx11::string = std::__cxx11::basic_string<char>]’:
odbc.cpp:304:111: required from here
utils.h:137:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
utils.h: In instantiation of ‘RETCODE fillOutputString(const string&, PTR, LENGTH, LENGTH*) [with PTR = unsigned char*; LENGTH = int; RETCODE = short int; std::__cxx11::string = std::__cxx11::basic_string<char>]’:
odbc.cpp:793:93: required from here
utils.h:137:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
utils.h:33:21: warning: ‘const char* nextKeyValuePair(const char*, const char*, StringRef&, StringRef&)’ defined but not used [-Wunused-function]
static const char * nextKeyValuePair(const char * data, const char * end, StringRef & out_key, StringRef & out_value)
Not sure if it could be related and if I should submit separate issue for that.
from clickhouse-odbc.
When isql is used, I can see the following error in /tmp/clickhouse-odbc-stderr
Have you tried to purge whole cmake's cache? I had same issue but after this change to CMakeLists.txt - 13cabc5#diff-b21b3f1540f8dc19a7c21f1ed6c38dd1R23 everything became fine.
from clickhouse-odbc.
Building via cmake
works, thank you. Shouldn't building instructions in README.md mention need of using cmake
?
As of the issue subject, values of Port
and Database
keys are used now. But neither Host
's or ServerName
's value is used, isql
still connects to localhost. Maybe because of Connection::init
not using ci.server
?
from clickhouse-odbc.
Try this commit - 158d3d3
Please also note that HOST renamed to SERVER and odbc.so renamed to clickhouse-odbc.so
from clickhouse-odbc.
Related Issues (20)
- got code SQL_INVALID_HANDLE when SQLGetData called
- segmentation fault (core dumped) when exception happend in SQLExecute
- The driver is obviously wrong HOT 1
- The driver does not work HOT 4
- Homebrew reports a warning of libc++ incompatibilities upon installation
- Issue using power query in Power Bi
- Wrong number of fields with grouparray via ODBC
- problem in power bi report server schedule refresh
- Convert string to varchar error on mssql linked server
- Mac ODBC build errors - folly HOT 4
- Error "ERROR [HY000] SSL Exception: Error during handshake: failed to read data" on connect HOT 3
- The last working release on Ubuntu 22.04 is 1.1.6
- Incomplete data loaded without errors
- Does the ODBC driver support connecting to materialized views?
- Slowness for workbooks in tableau server
- ODBC: ERROR [HY000] Certificate validation error: Failed to verify certificate chain: CA not trusted
- Clickhouse ODBC Destination SSIS batch size issue. HOT 1
- Int64 columns are loaded as binary columns in PowerBI HOT 2
- ODBC driver causes failed refresh of dashboards in Power BI
- ODBC Table Function with Oracle ODBC Driver Causes [Oracle][ODBC] Timeout Expired
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clickhouse-odbc.