How to set up ODBC for Oracle on Solaris with unixODBC driver manager

I am trying to follow the metalink doc to set up ODBC connections:
https://metalink.oracle.com/metalink/plsql/f?p=130:14:7406918959791655811::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,363899.1,1,0,1,helvetica

But I got the following error:

oracle@ors2di # ./doit
make: Fatal error in reader: /opt/app/oracle/product/10.2.0/db_1/odbc/lib/env_odbc.mk, line 1422: Unexpected end of line seen
./doit: ./odbcsel1: not found
oracle@ors2di #
LVL 12
geotigerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

geotigerAuthor Commented:
Here is what I have done  so far:

1 .Install unixODBC driver
    # pkg-get -i unixodbc
2. Configure DNS
root@ors2di # more odbcinst.ini
[owb1odbc]
Description             = Oracle 10g R2 ODBC driver.
Driver          = /opt/app/oracle/product/10.2.0/db_1/lib/libsqora.so.10.1
Setup           =
FileUsage               =
CPTimeout               =
CPReuse         =
UsageCount              = 1

root@ors2di # more odbc.ini
[ora102]
Application Attributes          = T
Attributes              = W
BatchAutocommitMode             = IfAllSuccessful
CloseCursor             = T
DisableDPM              = F
DisableMTS              = T
Driver          = owb1odbc
DSN             = ora102
EXECSchemaOpt           =
EXECSyntax              = T
Failover                = T
FailoverDelay           = 10
FailoverRetryCount              = 10
FetchBufferSize         = 64000
ForceWCHAR              = F
Lobs            = T
Longs           = T
MetadataIdDefault               = F
QueryTimeout            = T
ResultSets              = T
ServerName              = owb1
SQLGetData extensions           = F
Translation DLL         =
Translation Option              = 0
UserID          = std_rep

root@ors2di #

3. test it
oracle@ors2di # pwd
/opt/app/oracle/product/10.2.0/db_1/odbc/demo/cdemo
oracle@ors2di # more doit
#!/bin/sh
SAMPL=odbcsel1
export SAMPL
rm -rf $SAMPL".o"
rm -rf $SAMPL
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/local/lib
export LD_LIBRARY_PATH
/usr/ccs/bin/make -f cdemo_odbc.mk build OBJS=$SAMPL".o" EXE=$SAMPL
./$SAMPL

oracle@ors2di # isql -v ora102 scott tiger
[01000][unixODBC][Driver Manager]Can't open lib '/opt/app/oracle/product/10.2.0/db_1/lib/libsqora.so.10.1' : ld.so.1: isql: fatal: /opt/app/oracle/product/10.2.0/db_1/lib/libsqora.so.10.1: wrong ELF class: ELFCLASS64
[ISQL]ERROR: Could not SQLConnect
oracle@ors2di #
schwertnerCommented:
To be able to successfully create a two tier connection to a 64-bit Oracle on a 64-bit Solaris machine, include Oracle 32-bit libraries in the PATH.

The binaries are often located in the lib32 directory. For example:
/opt/oracle/9.2.0/lib32
This path should be included in the LD_LIBRARY_PATH to make the two tier connection work in a 64-bit environment.

Also, verify the path is placed before the paths to other Oracle libraries.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.