pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Three posts and no response 8--(
10+ messages / 3 participants
[nested] [flat]

* Three posts and no response 8--(
@ 1999-07-13 00:32  Daren Sefcik <daren@partnersdata.com>
  0 siblings, 1 reply; 10+ messages in thread

From: Daren Sefcik @ 1999-07-13 00:32 UTC (permalink / raw)
  To: pgsql-interfaces

I know there must be somebody out there who can help me this,I need help
with getting psqlodbc working on Solaris 2.6..when I try to run the .so
file I get the following error:

/opt/ISLIodbc/2.11/bin/qetestlib: fatal: relocation error: file
/usr/local/pgsql/lib/libpsqlodbc.so: symbol shutdown: referenced symbol
not found 

And when I run ldd -r I get the following:
> ldd -r /usr/local/pgsql/lib/libpsqlodbc.so
warning: ldd: /usr/local/pgsql/lib/libpsqlodbc.so: is not executable
        symbol not found: __ctype
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: strlen
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: strncmp
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: malloc
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: memset
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: strcpy
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: strcat
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: strtok
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: free
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: strstr
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: atoi
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: sprintf
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: realloc
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: strcmp
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: tolower
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: .div
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: strdup
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: strncpy
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: time
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: .umul
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: localtime
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: sscanf
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: strncasecmp
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: atof
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: atol
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: memcpy
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: strchr
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: strcasecmp
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: pow
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: getuid
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: getpwuid
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: getpid
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: fopen
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: setbuf
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: vfprintf
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: .rem
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: strrchr
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: shutdown
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: close
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: inet_addr
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: gethostbyname
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: socket
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: connect
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: send
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: recv
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: fclose
(/usr/local/pgsql/lib/libpsqlodbc.so)
        symbol not found: fgets
(/usr/local/pgsql/lib/libpsqlodbc.so)

Does anybody have any ideas?? TIA, Daren 




^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: [INTERFACES] Three posts and no response 8--(
@ 1999-07-13 13:56  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Daren Sefcik <daren@partnersdata.com>
  0 siblings, 0 replies; 10+ messages in thread

From: Tom Lane @ 1999-07-13 13:56 UTC (permalink / raw)
  To: Daren Sefcik <daren@partnersdata.com>; +Cc: pgsql-interfaces

Daren Sefcik <daren@partnersdata.com> writes:
> I know there must be somebody out there who can help me this,I need help
> with getting psqlodbc working on Solaris 2.6..when I try to run the .so
> file I get the following error:

> /opt/ISLIodbc/2.11/bin/qetestlib: fatal: relocation error: file
> /usr/local/pgsql/lib/libpsqlodbc.so: symbol shutdown: referenced symbol
> not found 

This looks like libpsqlodbc.so hasn't been linked to libc.so properly.

Unfortunately, every flavor of Unix seems to have different ideas about
how shared libs should be built :-(, and I have no idea what the magic
incantation may be on Solaris.  A lot of Unixes require "-lc" to be
mentioned when linking a shlib that makes use of libc.  You might
check whether that's happening when libpsqlodbc is built.

Which version of Postgres are you using, anyway, and which port
(solaris_i386 or solaris_sparc)?

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* RE: [INTERFACES] Three posts and no response 8--(
@ 1999-07-13 15:23  Daren Sefcik <daren@partnersdata.com>
  0 siblings, 1 reply; 10+ messages in thread

From: Daren Sefcik @ 1999-07-13 15:23 UTC (permalink / raw)
  To: 'Tom Lane' <tgl@sss.pgh.pa.us>; +Cc: pgsql-interfaces



On Tuesday, July 13, 1999 6:57 AM, Tom Lane [SMTP:tgl@sss.pgh.pa.us]
wrote:
> Daren Sefcik <daren@partnersdata.com> writes:
> > I know there must be somebody out there who can help me this,I need
help
> > with getting psqlodbc working on Solaris 2.6..when I try to run the
.so
> > file I get the following error:
> 
> > /opt/ISLIodbc/2.11/bin/qetestlib: fatal: relocation error: file
> > /usr/local/pgsql/lib/libpsqlodbc.so: symbol shutdown: referenced
symbol
> > not found 
> 
> This looks like libpsqlodbc.so hasn't been linked to libc.so properly.
> 
> Unfortunately, every flavor of Unix seems to have different ideas
about
> how shared libs should be built :-(, and I have no idea what the magic
> incantation may be on Solaris.  A lot of Unixes require "-lc" to be
> mentioned when linking a shlib that makes use of libc.  You might
> check whether that's happening when libpsqlodbc is built.

How would I go about this..??
I am basically just untarring the archive, doing a configure --with-odbc
and then make, make install.
I do not get any fatal errors, everything completes and installs fine
and postgresql works fine as well.
Should I be doing it different???
I get the feeling I need to add a switch to a makefile or edit my
environment path or something but am
not sure what.


> 
> Which version of Postgres are you using, anyway, and which port
> (solaris_i386 or solaris_sparc)?


Sparc Solaris.

Thanks...
Daren



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: [INTERFACES] Three posts and no response 8--(
@ 1999-07-13 15:55  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Daren Sefcik <daren@partnersdata.com>
  0 siblings, 0 replies; 10+ messages in thread

From: Tom Lane @ 1999-07-13 15:55 UTC (permalink / raw)
  To: Daren Sefcik <daren@partnersdata.com>; +Cc: pgsql-interfaces

Daren Sefcik <daren@partnersdata.com> writes:
> I am basically just untarring the archive, doing a configure --with-odbc
> and then make, make install.
> I do not get any fatal errors, everything completes and installs fine
> and postgresql works fine as well.

Do the regression tests pass?

> Should I be doing it different???
> I get the feeling I need to add a switch to a makefile or edit my
> environment path or something but am
> not sure what.

The eventual patch will be a change/addition in src/Makefile.shlib,
in the section for your platform (solaris_sparc).  I am guessing that
we might need to add a line like
  SHLIB_LINK		+= -lc
but at this stage that's no more than a guess.  If that doesn't help,
you could look at the sections for the other platforms and see if you
see any switches that are mentioned in your system's documentation about
shared libs (try "man ld" if you have no other idea where to find it).

After editing Makefile.shlib, you can just go into src/interfaces/odbc
and do "make clean", "make", "make install" --- it shouldn't be
necessary to rebuild all of Postgres.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* RE: [INTERFACES] Three posts and no response 8--(
@ 1999-07-13 16:50  Daren Sefcik <daren@partnersdata.com>
  0 siblings, 1 reply; 10+ messages in thread

From: Daren Sefcik @ 1999-07-13 16:50 UTC (permalink / raw)
  To: 'Tom Lane' <tgl@sss.pgh.pa.us>; +Cc: pgsql-interfaces


> Do the regression tests pass?

I am running them now..am I looking for something
in particular??.it seems like some fail and some don't
which kinda follows what the docs say.


> The eventual patch will be a change/addition in src/Makefile.shlib,
> in the section for your platform (solaris_sparc).  I am guessing that
> we might need to add a line like
>   SHLIB_LINK		+= -lc


Well that did something..but I don't think it fixed it completly:

ldd -r ./libpsqlodbc.so.0.25
warning: ldd: ./libpsqlodbc.so.0.25: is not executable
        libc.so.1 =>     /usr/lib/libc.so.1
        libdl.so.1 =>    /usr/lib/libdl.so.1
        /usr/platform/SUNW,UltraSPARC-IIi-Engine/lib/libc_psr.so.1
        symbol not found: pow           (./libpsqlodbc.so.0.25)
        symbol not found: shutdown              (./libpsqlodbc.so.0.25)
        symbol not found: inet_addr             (./libpsqlodbc.so.0.25)
        symbol not found: gethostbyname         (./libpsqlodbc.so.0.25)
        symbol not found: socket                (./libpsqlodbc.so.0.25)
        symbol not found: connect               (./libpsqlodbc.so.0.25)
        symbol not found: send          (./libpsqlodbc.so.0.25)
        symbol not found: recv          (./libpsqlodbc.so.0.25)


Any other thoughts..??

Thanks for the help!
Daren



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: [INTERFACES] Three posts and no response 8--(
@ 1999-07-13 17:14  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Daren Sefcik <daren@partnersdata.com>
  0 siblings, 1 reply; 10+ messages in thread

From: Tom Lane @ 1999-07-13 17:14 UTC (permalink / raw)
  To: Daren Sefcik <daren@partnersdata.com>; +Cc: pgsql-interfaces

Daren Sefcik <daren@partnersdata.com> writes:
>> The eventual patch will be a change/addition in src/Makefile.shlib,
>> in the section for your platform (solaris_sparc).  I am guessing that
>> we might need to add a line like
>> SHLIB_LINK		+= -lc

> Well that did something..but I don't think it fixed it completly:

> ldd -r ./libpsqlodbc.so.0.25
> warning: ldd: ./libpsqlodbc.so.0.25: is not executable
>         libc.so.1 =>     /usr/lib/libc.so.1
>         libdl.so.1 =>    /usr/lib/libdl.so.1
>         /usr/platform/SUNW,UltraSPARC-IIi-Engine/lib/libc_psr.so.1
>         symbol not found: pow           (./libpsqlodbc.so.0.25)
>         symbol not found: shutdown              (./libpsqlodbc.so.0.25)
>         symbol not found: inet_addr             (./libpsqlodbc.so.0.25)
>         symbol not found: gethostbyname         (./libpsqlodbc.so.0.25)
>         symbol not found: socket                (./libpsqlodbc.so.0.25)
>         symbol not found: connect               (./libpsqlodbc.so.0.25)
>         symbol not found: send          (./libpsqlodbc.so.0.25)
>         symbol not found: recv          (./libpsqlodbc.so.0.25)

Ah: looks like we are on the right track but you need more than just
-lc, then.  pow() would be in libm, so you need -lm as well, and I'll
bet that the networking calls are not in libc on your platform either.
Do you have a libsocket?  Check to see what is getting linked to psql,
for example (go into src/bin/psql, remove and remake psql, and look
at the command that make is using).  Add -l switches to SHLIB_LINK as
needed.  I'd keep -lc last.  Maybe "-lsocket -lm -lc" will do it.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* RE: [INTERFACES] Three posts and no response 8--(
@ 1999-07-13 17:44  Daren Sefcik <daren@partnersdata.com>
  0 siblings, 1 reply; 10+ messages in thread

From: Daren Sefcik @ 1999-07-13 17:44 UTC (permalink / raw)
  To: 'Tom Lane' <tgl@sss.pgh.pa.us>; +Cc: pgsql-interfaces



On Tuesday, July 13, 1999 10:15 AM, Tom Lane [SMTP:tgl@sss.pgh.pa.us]
wrote:
> Daren Sefcik <daren@partnersdata.com> writes:
> >> The eventual patch will be a change/addition in src/Makefile.shlib,
> >> in the section for your platform (solaris_sparc).  I am guessing
that
> >> we might need to add a line like
> >> SHLIB_LINK		+= -lc
> 
> > Well that did something..but I don't think it fixed it completly:
> 
> > ldd -r ./libpsqlodbc.so.0.25
> > warning: ldd: ./libpsqlodbc.so.0.25: is not executable
> >         libc.so.1 =>     /usr/lib/libc.so.1
> >         libdl.so.1 =>    /usr/lib/libdl.so.1
> >         /usr/platform/SUNW,UltraSPARC-IIi-Engine/lib/libc_psr.so.1
> >         symbol not found: pow           (./libpsqlodbc.so.0.25)
> >         symbol not found: shutdown
(./libpsqlodbc.so.0.25)
> >         symbol not found: inet_addr
(./libpsqlodbc.so.0.25)
> >         symbol not found: gethostbyname
(./libpsqlodbc.so.0.25)
> >         symbol not found: socket
(./libpsqlodbc.so.0.25)
> >         symbol not found: connect
(./libpsqlodbc.so.0.25)
> >         symbol not found: send          (./libpsqlodbc.so.0.25)
> >         symbol not found: recv          (./libpsqlodbc.so.0.25)
> 
> Ah: looks like we are on the right track but you need more than just
> -lc, then.  pow() would be in libm, so you need -lm as well, and I'll
> bet that the networking calls are not in libc on your platform either.
> Do you have a libsocket?  Check to see what is getting linked to psql,
> for example (go into src/bin/psql, remove and remake psql, and look
> at the command that make is using).  Add -l switches to SHLIB_LINK as
> needed.  I'd keep -lc last.  Maybe "-lsocket -lm -lc" will do it.


Ahhhh....THANKS!!
I have been at this for three weeks...here is what did it:


-ldl -lsocket -lresolv -lnsl -lm -lc

Now it seems to work:

> ldd -r lib/libpsqlodbc.so
warning: ldd: lib/libpsqlodbc.so: is not executable
        libdl.so.1 =>    /usr/lib/libdl.so.1
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
        libresolv.so.2 =>        /usr/lib/libresolv.so.2
        libnsl.so.1 =>   /usr/lib/libnsl.so.1
        libm.so.1 =>     /usr/lib/libm.so.1
        libc.so.1 =>     /usr/lib/libc.so.1
        libmp.so.2 =>    /usr/lib/libmp.so.2
        /usr/platform/SUNW,UltraSPARC-IIi-Engine/lib/libc_psr.so.1

> /opt/ISLIodbc/2.11/bin/qetestlib /usr/local/pgsql/lib/libpsqlodbc.so
Load of /usr/local/pgsql/lib/libpsqlodbc.so successful, qehandle is
0xEF6C078C


Now I can try to actually use it...
THANKS!!

Daren

BTW---are you the person who could submit this for future reference
and/or patches???



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: [INTERFACES] Three posts and no response 8--(
@ 1999-07-13 18:08  Craig Orsinger <orsingerc@epg-gw1.lewis.army.mil>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 10+ messages in thread

From: Craig Orsinger @ 1999-07-13 18:08 UTC (permalink / raw)
  To: pgsql-interfaces; +Cc: Daren Sefcik <daren@partnersdata.com>


On 13-Jul-99 Tom Lane wrote:
> Daren Sefcik <daren@partnersdata.com> writes:
>>> The eventual patch will be a change/addition in src/Makefile.shlib,
>>> in the section for your platform (solaris_sparc).  I am guessing that
>>> we might need to add a line like
>>> SHLIB_LINK          += -lc
> 
>> Well that did something..but I don't think it fixed it completly:
> 
>> ldd -r ./libpsqlodbc.so.0.25
>> warning: ldd: ./libpsqlodbc.so.0.25: is not executable
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

        This may be the problem. Most OS's demand that a shared library
be executable. Try doing a "chmod ugo+x ./libpsqlodbc.so.0.25" (or 
wherever your ODBC library ended up). It's also possible that some part
of your compile failed when you were building the library, which would
explain why the permissions aren't already set correctly.

>>         libc.so.1 =>     /usr/lib/libc.so.1
>>         libdl.so.1 =>    /usr/lib/libdl.so.1
>>         /usr/platform/SUNW,UltraSPARC-IIi-Engine/lib/libc_psr.so.1
>>         symbol not found: pow           (./libpsqlodbc.so.0.25)
>>         symbol not found: shutdown              (./libpsqlodbc.so.0.25)
>>         symbol not found: inet_addr             (./libpsqlodbc.so.0.25)
>>         symbol not found: gethostbyname         (./libpsqlodbc.so.0.25)
>>         symbol not found: socket                (./libpsqlodbc.so.0.25)
>>         symbol not found: connect               (./libpsqlodbc.so.0.25)
>>         symbol not found: send          (./libpsqlodbc.so.0.25)
>>         symbol not found: recv          (./libpsqlodbc.so.0.25)
> 


----------------------------------
Date: 13-Jul-99  Time: 11:01:36

Craig Orsinger                  (email: <orsingerc@epg.lewis.army.mil>)
Logicon RDA
Bldg. 8B28                      "Just another megalomaniac with ideas above his
6th & F Streets                 station. The Universe is full of them."
Ft. Lewis, WA   98433                   - The Doctor
----------------------------------



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: [INTERFACES] Three posts and no response 8--(
@ 1999-07-13 19:24  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Daren Sefcik <daren@partnersdata.com>
  0 siblings, 0 replies; 10+ messages in thread

From: Tom Lane @ 1999-07-13 19:24 UTC (permalink / raw)
  To: Daren Sefcik <daren@partnersdata.com>; +Cc: pgsql-interfaces

Daren Sefcik <daren@partnersdata.com> writes:
> Ahhhh....THANKS!!
> I have been at this for three weeks...here is what did it:
> -ldl -lsocket -lresolv -lnsl -lm -lc

Yipes!  You really need all of those?

> BTW---are you the person who could submit this for future reference
> and/or patches???

Yeah, I can install the patch.  I presume we need the same thing for
solaris_i386 as well as solaris_sparc ... can anyone out there confirm
or deny?

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* RE: [INTERFACES] Three posts and no response 8--(
@ 1999-07-13 19:34  Daren Sefcik <daren@partnersdata.com>
  0 siblings, 0 replies; 10+ messages in thread

From: Daren Sefcik @ 1999-07-13 19:34 UTC (permalink / raw)
  To: 'Tom Lane' <tgl@sss.pgh.pa.us>; +Cc: pgsql-interfaces


> > I have been at this for three weeks...here is what did it:
> > -ldl -lsocket -lresolv -lnsl -lm -lc
> 
> Yipes!  You really need all of those?

Well I looked at what I needed to make the 
MySQL odbc stuff worked and that is what
was in there..so I just used the same.
I hope I can get this working with ColdFusion
or else I will have to stay with MySQL.

> Yeah, I can install the patch.  I presume we need the same thing for
> solaris_i386 as well as solaris_sparc ... can anyone out there confirm
> or deny?


I have an i386 setup at home..I will post my results
tommorow after I try it tonight.



^ permalink  raw  reply  [nested|flat] 10+ messages in thread


end of thread, other threads:[~1999-07-13 19:34 UTC | newest]

Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-07-13 00:32 Three posts and no response 8--( Daren Sefcik <daren@partnersdata.com>
1999-07-13 13:56 ` Tom Lane <tgl@sss.pgh.pa.us>
1999-07-13 15:23 RE: [INTERFACES] Three posts and no response 8--( Daren Sefcik <daren@partnersdata.com>
1999-07-13 15:55 ` Tom Lane <tgl@sss.pgh.pa.us>
1999-07-13 16:50 RE: [INTERFACES] Three posts and no response 8--( Daren Sefcik <daren@partnersdata.com>
1999-07-13 17:14 ` Tom Lane <tgl@sss.pgh.pa.us>
1999-07-13 18:08   ` Craig Orsinger <orsingerc@epg-gw1.lewis.army.mil>
1999-07-13 17:44 RE: [INTERFACES] Three posts and no response 8--( Daren Sefcik <daren@partnersdata.com>
1999-07-13 19:24 ` Tom Lane <tgl@sss.pgh.pa.us>
1999-07-13 19:34 RE: [INTERFACES] Three posts and no response 8--( Daren Sefcik <daren@partnersdata.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox