Teradata ODBC Driver PHP Compile Error - Undefined Symbols

Database
Highlighted
New Member

Teradata ODBC Driver PHP Compile Error - Undefined Symbols

I have tried to compile the teradata odbc driver with PHP but getting the undefined error in the below

 

Mac OS X: High Sierra

 

Step1: 

export ODBC_HOME=/opt/teradata/client/16.10

export ODBCINI=$ODBC_HOME/ODBC/odbc.ini

export CPPFLAGS="-I$ODBC_HOME/include"

export CUSTOM_ODBC_LIBS="-L$ODBC_HOME/lib -lodbc -lodbcinst"

export LD_LIBRARY_PATH=$ODBC_HOME/lib

 

./configure --prefix=/usr/local/Cellar/php71/7.1.11_22  -with-custom-odbc=$ODBC_HOME

 

Step 2: make 

 

Get the error in below

======================

clang: error: linker command failed with exit code 1 (use -v to see invocation)

clang: error: linker command failed with exit code 1 (use -v to see invocation)

make: *** [sapi/cgi/php-cgi] Error 1

make: *** Waiting for unfinished jobs....

make: *** [sapi/cli/php] Error 1

Undefined symbols for architecture x86_64:

  "_SQLAllocConnect", referenced from:

      _odbc_sqlconnect in php_odbc.o

  "_SQLAllocEnv", referenced from:

      _odbc_sqlconnect in php_odbc.o

  "_SQLAllocHandle", referenced from:

      _zif_odbc_columns in php_odbc.o

      _zif_odbc_exec in php_odbc.o

      _zif_odbc_gettypeinfo in php_odbc.o

      _zif_odbc_prepare in php_odbc.o

      _zif_odbc_specialcolumns in php_odbc.o

      _zif_odbc_statistics in php_odbc.o

      _zif_odbc_tables in php_odbc.o

      ...

  "_SQLBindCol", referenced from:

      _odbc_bindcols in php_odbc.o

  "_SQLBindParameter", referenced from:

      _zif_odbc_execute in php_odbc.o

  "_SQLColAttribute", referenced from:

      _zif_odbc_field_type in php_odbc.o

      _zif_odbc_result in php_odbc.o

      _odbc_bindcols in php_odbc.o

      _odbc_column_lengths in php_odbc.o

  "_SQLColAttributes", referenced from:

      _odbc_bindcols in php_odbc.o

  "_SQLColumnPrivileges", referenced from:

      _zif_odbc_columnprivileges in php_odbc.o

  "_SQLColumns", referenced from:

      _zif_odbc_columns in php_odbc.o

  "_SQLConnect", referenced from:

      _odbc_sqlconnect in php_odbc.o

  "_SQLDataSources", referenced from:

      _zif_odbc_data_source in php_odbc.o

  "_SQLDescribeParam", referenced from:

      _zif_odbc_prepare in php_odbc.o

  "_SQLDisconnect", referenced from:

      __close_odbc_conn in php_odbc.o

      __close_odbc_pconn in php_odbc.o

  "_SQLError", referenced from:

      _zif_odbc_cursor in php_odbc.o

      _odbc_sql_error in php_odbc.o

  "_SQLExecDirect", referenced from:

      _zif_odbc_exec in php_odbc.o

  "_SQLExecute", referenced from:

      _zif_odbc_execute in php_odbc.o

  "_SQLExtendedFetch", referenced from:

      _zif_odbc_fetch_row in php_odbc.o

      _zif_odbc_fetch_into in php_odbc.o

      _zif_odbc_result in php_odbc.o

      _zif_odbc_result_all in php_odbc.o

  "_SQLFetch", referenced from:

      _zif_odbc_fetch_row in php_odbc.o

      _zif_odbc_fetch_into in php_odbc.o

      _zif_odbc_result in php_odbc.o

      _zif_odbc_result_all in php_odbc.o

  "_SQLForeignKeys", referenced from:

      _zif_odbc_foreignkeys in php_odbc.o

  "_SQLFreeConnect", referenced from:

      __close_odbc_conn in php_odbc.o

      __close_odbc_pconn in php_odbc.o

      _odbc_sqlconnect in php_odbc.o

  "_SQLFreeEnv", referenced from:

      __close_odbc_conn in php_odbc.o

      __close_odbc_pconn in php_odbc.o

  "_SQLFreeStmt", referenced from:

      _zif_odbc_execute in php_odbc.o

      _zif_odbc_exec in php_odbc.o

      _zif_odbc_next_result in php_odbc.o

      _zif_odbc_prepare in php_odbc.o

      __free_odbc_result in php_odbc.o

  "_SQLGetConnectOption", referenced from:

      _zif_odbc_autocommit in php_odbc.o

  "_SQLGetCursorName", referenced from:

      _zif_odbc_cursor in php_odbc.o

  "_SQLGetData", referenced from:

      _zif_odbc_fetch_into in php_odbc.o

      _zif_odbc_result in php_odbc.o

      _zif_odbc_result_all in php_odbc.o

  "_SQLGetDiagRec", referenced from:

      _odbc_bindcols in php_odbc.o

  "_SQLGetInfo", referenced from:

      _zif_odbc_cursor in php_odbc.o

      _zif_odbc_exec in php_odbc.o

      _zif_odbc_prepare in php_odbc.o

      _odbc_do_connect in php_odbc.o

  "_SQLGetTypeInfo", referenced from:

      _zif_odbc_gettypeinfo in php_odbc.o

  "_SQLMoreResults", referenced from:

      _zif_odbc_next_result in php_odbc.o

  "_SQLNumParams", referenced from:

      _zif_odbc_next_result in php_odbc.o

      _zif_odbc_prepare in php_odbc.o

  "_SQLNumResultCols", referenced from:

      _zif_odbc_columns in php_odbc.o

      _zif_odbc_execute in php_odbc.o

      _zif_odbc_exec in php_odbc.o

      _zif_odbc_gettypeinfo in php_odbc.o

      _zif_odbc_next_result in php_odbc.o

      _zif_odbc_prepare in php_odbc.o

      _zif_odbc_specialcolumns in php_odbc.o

      ...

  "_SQLParamData", referenced from:

      _zif_odbc_execute in php_odbc.o

  "_SQLPrepare", referenced from:

      _zif_odbc_prepare in php_odbc.o

  "_SQLPrimaryKeys", referenced from:

      _zif_odbc_primarykeys in php_odbc.o

  "_SQLProcedureColumns", referenced from:

      _zif_odbc_procedurecolumns in php_odbc.o

  "_SQLProcedures", referenced from:

      _zif_odbc_procedures in php_odbc.o

  "_SQLPutData", referenced from:

      _zif_odbc_execute in php_odbc.o

  "_SQLRowCount", referenced from:

      _zif_odbc_num_rows in php_odbc.o

  "_SQLSetConnectOption", referenced from:

      _zif_odbc_autocommit in php_odbc.o

      _zif_odbc_setoption in php_odbc.o

      _odbc_sqlconnect in php_odbc.o

  "_SQLSetCursorName", referenced from:

      _zif_odbc_cursor in php_odbc.o

  "_SQLSetStmtOption", referenced from:

      _zif_odbc_exec in php_odbc.o

      _zif_odbc_prepare in php_odbc.o

      _zif_odbc_setoption in php_odbc.o

  "_SQLSpecialColumns", referenced from:

      _zif_odbc_specialcolumns in php_odbc.o

  "_SQLStatistics", referenced from:

      _zif_odbc_statistics in php_odbc.o

  "_SQLTablePrivileges", referenced from:

      _zif_odbc_tableprivileges in php_odbc.o

  "_SQLTables", referenced from:

      _zif_odbc_tables in php_odbc.o

  "_SQLTransact", referenced from:

      __close_odbc_conn in php_odbc.o

      __close_odbc_pconn in php_odbc.o

      _odbc_transact in php_odbc.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)