problem with undefined symbols

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

problem with undefined symbols

Breazeale, Joel L - Eagan, MN - Contractor

Folks,

 

I am using Perl 5.10.0-64.67.52, perl-DBD-ODBC 1.17-1.15, unixODBC 2.2.12-198.17 on SUSE Enterprise 11.

 

I have set the OOBCSYSINI environment variable to ~/.odbcsysinst and have the following files in that directory:

 

odbc.ini:

Driver=SQL Server

Description=ESMWI Database

Database=ESMWI

Server=ESMHOST

Port=1433

User=USER

Password=PW

Trace=Yes

TraceFile=/tmp/ESMWI.log

 

edbcinst.ini:

[SQL Server]

Description=Microsoft SQL Server

Driver=/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so

FileUsage=1

CommLog=1

 

These are the two problems I’m seeing when trying to connect to the ESMWI database:

 

From Perl:

 

> updpconfig.pl -he

DBI connect('ESMWI','USER',...) failed: [unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed (SQL-IM004) at /home/k5ycc0/bin/updpconfig.pl line 86

>

 

From isql:

 

> isql -v ESMWI

[01000][unixODBC][Driver Manager]Can't open lib '/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so' : file not found

[ISQL]ERROR: Could not SQLConnect

> 

 

I’ve been looking around a lot for the solution to these two problems and have seen a lot, but nothing on my side parallels the problems I’ve seen so far.  However, I did find one thing…

 

If you look at the following output you’ll see a bunch of undefined symbols:

 

> ldd --data-relocs --unused --verbose --function-relocs /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so

      6413:     /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so: error: symbol lookup error: undefined symbol: PL_no_modify (continued)

undefined symbol: PL_no_modify  (/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so)

      6413:     /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so: error: symbol lookup error: undefined symbol: PL_memory_wrap (continued)

undefined symbol: PL_memory_wrap        (/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so)

      6413:     /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so: error: symbol lookup error: undefined symbol: Perl_hv_iterinit (continued)

undefined symbol: Perl_hv_iterinit      (/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so)

      6413:     /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so: error: symbol lookup error: undefined symbol: Perl_mg_get (continued)

. . .

undefined symbol: Perl_markstack_grow   (/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so)

      6413:     /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so: error: symbol lookup error: undefined symbol: Perl_newRV (continued)

undefined symbol: Perl_newRV    (/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so)

      6413:     /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so: error: symbol lookup error: undefined symbol: Perl_sv_backoff (continued)

undefined symbol: Perl_sv_backoff       (/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so)

      6413:     /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so: error: symbol lookup error: undefined symbol: Perl_dowantarray (continued)

undefined symbol: Perl_dowantarray      (/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so)

      6413:     /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so: error: symbol lookup error: undefined symbol: Perl_sv_2pv_flags (continued)

undefined symbol: Perl_sv_2pv_flags     (/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so)

Unused direct dependencies:

 

> 

 

Can any of you give me a roadmap on how to resolve my Perl connection issue using the evidence presented?

 

Thank you!

 

--Joel


_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|

Re: problem with undefined symbols

Nick Gorham-2
On 07/07/14 17:34, Breazeale, Joel L - Eagan, MN - Contractor wrote:

Folks,

 

I am using Perl 5.10.0-64.67.52, perl-DBD-ODBC 1.17-1.15, unixODBC 2.2.12-198.17 on SUSE Enterprise 11.

 

I have set the OOBCSYSINI environment variable to ~/.odbcsysinst and have the following files in that directory:


/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so

Is the Perl DBD::ODBC library, what you need is a actual ODBC Driver. Assuming you are trying to get to sql server, have a look at

http://www.easysoft.com/products/data_access/odbc-sql-server-driver

That works just fine under DBD::ODBC

--
Nick


_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|

Re: problem with undefined symbols

Breazeale, Joel L - Eagan, MN - Contractor

Yes, I am trying to get to MS SQL Server.  I have to use exactly what’s in the SUSE Enterprise Linux 11 distribution as I work in a highly secured environment.  To get a third-party package installed would be a lot of red tape.  Is there a SUSE-based solution?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Nick Gorham
Sent: Monday, July 07, 2014 11:46 AM
To: Support for the unixODBC project
Subject: Re: [unixODBC-support] problem with undefined symbols

 

On 07/07/14 17:34, Breazeale, Joel L - Eagan, MN - Contractor wrote:

Folks,

 

I am using Perl 5.10.0-64.67.52, perl-DBD-ODBC 1.17-1.15, unixODBC 2.2.12-198.17 on SUSE Enterprise 11.

 

I have set the OOBCSYSINI environment variable to ~/.odbcsysinst and have the following files in that directory:


/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so

Is the Perl DBD::ODBC library, what you need is a actual ODBC Driver. Assuming you are trying to get to sql server, have a look at

http://www.easysoft.com/products/data_access/odbc-sql-server-driver

That works just fine under DBD::ODBC

--
Nick


_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|

Re: problem with undefined symbols

Nick Gorham-2
On 07/07/14 17:59, Breazeale, Joel L - Eagan, MN - Contractor wrote:

Yes, I am trying to get to MS SQL Server.  I have to use exactly what’s in the SUSE Enterprise Linux 11 distribution as I work in a highly secured environment.  To get a third-party package installed would be a lot of red tape.  Is there a SUSE-based solution?


I dont know, sorry.

--
Nick

_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|

Re: problem with undefined symbols

Martin J. Evans
In reply to this post by Breazeale, Joel L - Eagan, MN - Contractor
On 07/07/2014 17:34, Breazeale, Joel L - Eagan, MN - Contractor wrote:
> Folks,
>
> I am using Perl 5.10.0-64.67.52, perl-DBD-ODBC 1.17-1.15, unixODBC
> 2.2.12-198.17 on SUSE Enterprise 11.

That version of DBD::ODBC is sooo old (sep 2008 - 8 years old). The
current version is 1.48 or 1.49 development release.

> I have set the OOBCSYSINI environment variable to ~/.odbcsysinst and
> have the following files in that directory:
>
> odbc.ini:
>
> Driver=SQL Server
>
> Description=ESMWI Database
>
> Database=ESMWI
>
> Server=ESMHOST
>
> Port=1433
>
> User=USER
>
> Password=PW
>
> Trace=Yes
>
> TraceFile=/tmp/ESMWI.log
>
> edbcinst.ini:
>
> [SQL Server]
>
> Description=Microsoft SQL Server
>
> Driver=/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so

As Nick said, don't do this. DBD::ODBC is not an ODBC driver it is a
Database Driver for Perl which is run under Perl's DBI. You need to
install a Microsoft SQL Server driver and the Driver attribute in your
odbc.ini should point to that.


> FileUsage=1
>
> CommLog=1
>
> These are the two problems I’m seeing when trying to connect to the
> ESMWI database:
>
>  From Perl:
>
>> updpconfig.pl -he
>
> DBI connect('ESMWI','USER',...) failed: [unixODBC][Driver
> Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed (SQL-IM004) at
> /home/k5ycc0/bin/updpconfig.pl line 86

I'm guessing this happened as you pointed unixODBC at a shared object
(DBD::ODBC) which does not even contain the symbol for SQLAllocHandle -
as it wouldn't as it is not an ODBC driver.

>>
>
>  From isql:
>
>> isql -v ESMWI
>
> [01000][unixODBC][Driver Manager]Can't open lib
> '/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so'
> : file not found
>
> [ISQL]ERROR: Could not SQLConnect
>
>>
>
> I’ve been looking around a lot for the solution to these two problems
> and have seen a lot, but nothing on my side parallels the problems I’ve
> seen so far.  However, I did find one thing…
>
> If you look at the following output you’ll see a bunch of undefined symbols:
>
>> ldd --data-relocs --unused --verbose --function-relocs /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so
>
>        6413:
> /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so:
> error: symbol lookup error: undefined symbol: PL_no_modify (continued)
>
> undefined symbol: PL_no_modify
> (/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so)
>
>        6413:
> /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so:
> error: symbol lookup error: undefined symbol: PL_memory_wrap (continued)
>
> undefined symbol: PL_memory_wrap
> (/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so)
>
>        6413:
> /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so:
> error: symbol lookup error: undefined symbol: Perl_hv_iterinit (continued)
>
> undefined symbol: Perl_hv_iterinit
> (/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so)
>
>        6413:
> /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so:
> error: symbol lookup error: undefined symbol: Perl_mg_get (continued)
>
> . . .
>
> undefined symbol: Perl_markstack_grow
> (/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so)
>
>        6413:
> /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so:
> error: symbol lookup error: undefined symbol: Perl_newRV (continued)
>
> undefined symbol: Perl_newRV
> (/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so)
>
>        6413:
> /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so:
> error: symbol lookup error: undefined symbol: Perl_sv_backoff (continued)
>
> undefined symbol: Perl_sv_backoff
> (/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so)
>
>        6413:
> /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so:
> error: symbol lookup error: undefined symbol: Perl_dowantarray (continued)
>
> undefined symbol: Perl_dowantarray
> (/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so)
>
>        6413:
> /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so:
> error: symbol lookup error: undefined symbol: Perl_sv_2pv_flags (continued)
>
> undefined symbol: Perl_sv_2pv_flags
> (/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so)
>
> Unused direct dependencies:

Those symbols are in perl itself.
>>
>
> Can any of you give me a roadmap on how to resolve my Perl connection
> issue using the evidence presented?
>
> Thank you!
>
> --Joel

1. Install an ODBC driver
2. Point your odbcinst.ini and odbc.ini at it.

That's it.

Martin
--
Martin J. Evans
Wetherby, UK
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|

Re: problem with undefined symbols

Luis Tavera
As far as an odbc driver for Microsoft SQL server for linux, I have successfully used Microsoft's own driver:

http://www.microsoft.com/en-us/download/details.aspx?id=28160

I doubt very much though that it would come pre-installed with any linux distribution, but it would not hurt to check if that is the case for the one you have to use.

luis

----- Original Message -----
From: "Martin J. Evans" <[hidden email]>
To: "Support for the unixODBC project" <[hidden email]>
Sent: Monday, July 7, 2014 12:39:08 PM
Subject: Re: [unixODBC-support] problem with undefined symbols

On 07/07/2014 17:34, Breazeale, Joel L - Eagan, MN - Contractor wrote:
> Folks,
>
> I am using Perl 5.10.0-64.67.52, perl-DBD-ODBC 1.17-1.15, unixODBC
> 2.2.12-198.17 on SUSE Enterprise 11.

That version of DBD::ODBC is sooo old (sep 2008 - 8 years old). The
current version is 1.48 or 1.49 development release.

> I have set the OOBCSYSINI environment variable to ~/.odbcsysinst and
> have the following files in that directory:
>
> odbc.ini:
>
> Driver=SQL Server
>
> Description=ESMWI Database
>
> Database=ESMWI
>
> Server=ESMHOST
>
> Port=1433
>
> User=USER
>
> Password=PW
>
> Trace=Yes
>
> TraceFile=/tmp/ESMWI.log
>
> edbcinst.ini:
>
> [SQL Server]
>
> Description=Microsoft SQL Server
>
> Driver=/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so

As Nick said, don't do this. DBD::ODBC is not an ODBC driver it is a
Database Driver for Perl which is run under Perl's DBI. You need to
install a Microsoft SQL Server driver and the Driver attribute in your
odbc.ini should point to that.


> FileUsage=1
>
> CommLog=1
>
> These are the two problems I’m seeing when trying to connect to the
> ESMWI database:
>
>  From Perl:
>
>> updpconfig.pl -he
>
> DBI connect('ESMWI','USER',...) failed: [unixODBC][Driver
> Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed (SQL-IM004) at
> /home/k5ycc0/bin/updpconfig.pl line 86

I'm guessing this happened as you pointed unixODBC at a shared object
(DBD::ODBC) which does not even contain the symbol for SQLAllocHandle -
as it wouldn't as it is not an ODBC driver.

>>
>
>  From isql:
>
>> isql -v ESMWI
>
> [01000][unixODBC][Driver Manager]Can't open lib
> '/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so'
> : file not found
>
> [ISQL]ERROR: Could not SQLConnect
>
>>
>
> I’ve been looking around a lot for the solution to these two problems
> and have seen a lot, but nothing on my side parallels the problems I’ve
> seen so far.  However, I did find one thing…
>
> If you look at the following output you’ll see a bunch of undefined symbols:
>
>> ldd --data-relocs --unused --verbose --function-relocs /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so
>
>        6413:
> /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so:
> error: symbol lookup error: undefined symbol: PL_no_modify (continued)
>
> undefined symbol: PL_no_modify
> (/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so)
>
>        6413:
> /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so:
> error: symbol lookup error: undefined symbol: PL_memory_wrap (continued)
>
> undefined symbol: PL_memory_wrap
> (/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so)
>
>        6413:
> /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so:
> error: symbol lookup error: undefined symbol: Perl_hv_iterinit (continued)
>
> undefined symbol: Perl_hv_iterinit
> (/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so)
>
>        6413:
> /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so:
> error: symbol lookup error: undefined symbol: Perl_mg_get (continued)
>
> . . .
>
> undefined symbol: Perl_markstack_grow
> (/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so)
>
>        6413:
> /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so:
> error: symbol lookup error: undefined symbol: Perl_newRV (continued)
>
> undefined symbol: Perl_newRV
> (/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so)
>
>        6413:
> /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so:
> error: symbol lookup error: undefined symbol: Perl_sv_backoff (continued)
>
> undefined symbol: Perl_sv_backoff
> (/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so)
>
>        6413:
> /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so:
> error: symbol lookup error: undefined symbol: Perl_dowantarray (continued)
>
> undefined symbol: Perl_dowantarray
> (/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so)
>
>        6413:
> /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so:
> error: symbol lookup error: undefined symbol: Perl_sv_2pv_flags (continued)
>
> undefined symbol: Perl_sv_2pv_flags
> (/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/ODBC/ODBC.so)
>
> Unused direct dependencies:

Those symbols are in perl itself.
>>
>
> Can any of you give me a roadmap on how to resolve my Perl connection
> issue using the evidence presented?
>
> Thank you!
>
> --Joel

1. Install an ODBC driver
2. Point your odbcinst.ini and odbc.ini at it.

That's it.

Martin
--
Martin J. Evans
Wetherby, UK
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support