You can translate the question and the replies:

Compiling Denodo 8 ODBC driver on macOS Big Sur

I was trying to get the Denodo8 ODBC driver to work an MasOS and I managed to get that working by following these steps in case anyone finds it useful. To connect to the Denodo Server from OSx we will have to use either unixODBC or iODBC and recompile the Denodo ODBC driver on your Mac. ## Compile the Denodo ODBC Driver for unixODBC on OSx. ### Install Brew and the dependencies ⚠ With Denodo8’s update 1, the ODBC driver support Oauth 2.0 and additional dependencies are required ```shell $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" $ brew install python3 $ brew install unixodbc $ brew install openssl $ brew install curl-openssl $ brew install gcc $ brew install postgresql ``` ### Copy the source code to a working directory and unzip it ```shell $ cp <DENODO_HOME>/tools/client-drivers/denodo-vdp-odbcdriver-linux.tar.gz /var/tmp $ cd /var/tmp $ tar -zxvf denodo-vdp-odbcdriver-linux.tar.gz ``` You might need to setup the following env variables ```shell $ export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/curl/lib -lcurl" $ export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/curl/include" $ export DENODO_ODBC_HOME=<DENODO_ODBC_HOME> <DENODO_ODBC_HOME> in this case is: /var/tmp/denodo-vdp-odbcdriver-linux ``` ### Run the configure & make command ```shell $ cd $DENODO_ODBC_HOME/src/denodo-pgsqlodbc $ ./configure --prefix=$DENODO_ODBC_HOME/dist/unixodbc $ sudo make clean $ sudo make $ sudo make install $ ll $DENODO_ODBC_HOME/dist/unixodbc/denodoodbc.so ``` ## Compile the Denodo ODBC Driver for iODBC on OSx. ### Install Brew and the dependencies iODBC Lib ```shell $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" $ brew install python3 $ brew unlink unixodbc #This is necessary in you had unixODBC lib linked $ brew install libiodbc $ brew install openssl $ brew install curl-openssl $ brew install gcc $ brew install postgresql ``` ### Copy the source code to a working directory and unzip it ```shell $ cp <DENODO_HOME>/tools/client-drivers/denodo-vdp-odbcdriver-linux.tar.gz /var/tmp $ cd /var/tmp $ tar -zxvf denodo-vdp-odbcdriver-linux.tar.gz ``` ### You might need to setup the following env variables ```shell $ export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/curl/lib -lcurl" $ export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/curl/include" $ export DENODO_ODBC_HOME=<DENODO_ODBC_HOME> <DENODO_ODBC_HOME> in this case is: /var/tmp/denodo-vdp-odbcdriver-linux ``` ### Edit the sqlext.h headers file of iODBC library ⚠There is a missing declaration in the iODBC sqlext.h file ```shell $ cd /usr/local/Cellar/libiodbc/<version#> $ cd include $ vi sqlext.h ``` Add the following line at the end of the section #if (ODBCVER >= 0x0300) section under: /* SQL_CONVERT_* return value bitmasks */ \#define SQL_CVT_GUID 0x01000000L See below the reference to a sample sqlext.h header file [https://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/sqlext_8h_source.html](https://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/sqlext_8h_source.html]) ### Run the configure & make command ```shell $ cd $DENODO_ODBC_HOME/src/denodo-pgsqlodbc $ ./configure --with-iodbc --prefix=$DENODO_ODBC_HOME/dist/iODBC $ sudo make clean $ sudo make $ sudo make install $ ll $DENODO_ODBC_HOME/dist/iODBC/lib/denodoodbca.so ``` ## Build options ### Compile the Denodo ANSI ODBC Driver on OSx. You need to add the following option --disable-unicode in the configure command parameter ```shell $ cd $DENODO_ODBC_HOME/src/denodo-pgsqlodbc $ ./configure --disable-unicode --prefix=$DENODO_ODBC_HOME/dist/<odbcmanager> $ sudo make clean $ sudo make $ sudo make install $ ll /var/tmp/dist/<odbcmanager>/lib/denodoodbca.so ``` ### Compile the Denodo ODBC Driver with all dependencies on OSx. You can build a library with all the dependencies rather than having reference to external libraries with the following option --disable-shared in the configure command parameters ```shell cd $DENODO_ODBC_HOME/src/denodo-pgsqlodbc $ ./configure --enable-shared=no --prefix=$DENODO_ODBC_HOME/dist/<odbcmanager> $ sudo make clean $ sudo make $ sudo make install $ ll $DENODO_ODBC_HOME/dist/<odbcmanager>/lib/denodoodbca.so ``` ## Create the DSN to the Denodo database. ### Install the ODBC Driver To install the Denodo ODBC driver on Mac OSx follow these steps: ```shell $ cd /var/tmp/ $ vim denodoODBCDriver.template Enter the following text [DenodoODBCDriver] Description=ODBC driver of Denodo Driver=./dist/lib/denodoodbc.so UsageCount=1 ``` ```shell $odbcinst -install -driver -file denodoODBCDriver.template ``` ### Set up a DSN in unixODBC on Mac OSx Register the Denodo ODBC Driver in unixODBC Follow these steps to register the Denodo ODBC driver in the unixODBC driver manager: Create a new file denodoODBCDriver.template with the content below: ```shell $ cd /var/tmp/ $ vim denodoDSN.template Then enter: [Denodo_DSN] Description = Denodo connection Driver = DenodoODBCDriver Servername = <dns_name_of_denodo_server> Port = 9996 UserName = <user> Password = <password> Database = <vdb> UserAgent = unixodbc Protocol = 7.4 BoolsAsChar = 0 ByteaAsLongVarBinary= 1 ConnSettings = SET QUERYTIMEOUT TO 3600000; SET I18N TO us_pst; /*krbsrvname=HTTP*/ Debug = 1 Commlog = 1 FakeOidIndex = 0 Fetch = 1000 Ksqo = 0 LFConversion = 1 Optimizer = 0 ReadOnly = 0 RowVersioning = 0 ShowOidColumn = 0 ShowSystemTables = 0 # Uncomment the "Sslmode" property if SSL is enabled in the Virtual DataPort Server # Sslmode = require UniqueIndex = 1 UpdatableCursors = 0 UseDeclareFetch = 1 UseServerSidePrepare= 0 ``` ```shell $ sudo odbcinst -install -s -l -f denodoDSN.template ``` ### Make sure it did it right: ```shell $ odbcinst -j $ cat /etc/odbcinst.ini $ cat /etc/odbc.ini $ odbcinst -query -driver $ odbcinst -query -s ```
user
17-03-2021 04:37:56 -0400
code

1 Answer

Could you please add some significant additional details on how to handle errors like: configure: error: unixODBC library "odbcinst" not found or configure: error: odbc_config not found (required for unixODBC build) or configure: error: iodbc-config not found (required for iODBC build) or configure: error: ssl library not found As you can see, I've run into a large number of different errors, trying diferent things out, and nothing's working, yet.
user
11-01-2023 14:47:02 -0500
You must sign in to add an answer. If you do not have an account, you can register here