pg.ddx.io  pgsql-ports@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Solaris SONAME not matching libraries
5+ messages / 3 participants
[nested] [flat]

* Solaris SONAME not matching libraries
@ 2007-05-28 15:01 Mark Round <mark@markround.com>
  2007-05-28 16:58 ` Re: Solaris SONAME not matching libraries Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 5+ messages in thread

From: Mark Round @ 2007-05-28 15:01 UTC (permalink / raw)
  To: pgsql-ports

Hi all,

I have noticed some odd behaviour under Solaris when various  
libraries are installed from the source package. Using 8.2.4 tarballs  
on Solaris 8, Sun Studio 11 (cc: Sun C 5.8 Patch 121016-05  
2007/01/10), I get the following behaviour (using plpgsql.so as an  
example, there are many others) :

# elfdump -d plpgsql.so | grep SONAME
        [2]  SONAME           0x10da            libplpgsql.so.1

As you can see, the file is installed with the name "plpgsql.so",  
although it's SONAME according to elfdump is set to libplpgsql.so.1.

Why the discrepancy ?

Many thanks in advance for any pointers, advice etc.

-Mark

--
Mark Round
mark@markround.com
:wq

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

* Re: Solaris SONAME not matching libraries
  2007-05-28 15:01 Solaris SONAME not matching libraries Mark Round <mark@markround.com>
@ 2007-05-28 16:58 ` Tom Lane <tgl@sss.pgh.pa.us>
  2007-05-29 12:16   ` Re: Solaris SONAME not matching libraries Zdenek Kotala <Zdenek.Kotala@Sun.COM>
  0 siblings, 1 reply; 5+ messages in thread

From: Tom Lane @ 2007-05-28 16:58 UTC (permalink / raw)
  To: Mark Round <mark@markround.com>; +Cc: pgsql-ports

Mark Round <mark@markround.com> writes:
> As you can see, the file is installed with the name "plpgsql.so",  
> although it's SONAME according to elfdump is set to libplpgsql.so.1.
> Why the discrepancy ?

It's an artifact of the Makefile rules we use to generate shared
libraries --- Makefile.shlib insists on building any shared library
under the name 'libsomething'.  Is it important enough to fix?

			regards, tom lane



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

* Re: Solaris SONAME not matching libraries
  2007-05-28 15:01 Solaris SONAME not matching libraries Mark Round <mark@markround.com>
  2007-05-28 16:58 ` Re: Solaris SONAME not matching libraries Tom Lane <tgl@sss.pgh.pa.us>
@ 2007-05-29 12:16   ` Zdenek Kotala <Zdenek.Kotala@Sun.COM>
  2007-05-29 20:56     ` Re: Solaris SONAME not matching libraries Mark Round <mark@markround.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Zdenek Kotala @ 2007-05-29 12:16 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Mark Round <mark@markround.com>; pgsql-ports

Tom Lane wrote:
> Mark Round <mark@markround.com> writes:
>> As you can see, the file is installed with the name "plpgsql.so",  
>> although it's SONAME according to elfdump is set to libplpgsql.so.1.
>> Why the discrepancy ?
> 
> It's an artifact of the Makefile rules we use to generate shared
> libraries --- Makefile.shlib insists on building any shared library
> under the name 'libsomething'.  Is it important enough to fix?

I think it is minor bug. SONAME is used by linker to setup dependencies 
(NEEDED) in a final binary. Plpgsql is loaded dynamically and postmaster 
is not linked with this library directly. It means that this problem 
does not occur anywhere. I don't expect that somebody will link these 
libraries and create separate binary.

However, if I look into lib directory there are only five libraries with 
lib prefix and 60 without prefix.

I suggested to introduce SO_PREFIX variable which will be used for 
affected five libraries in their makefiles. And also adjust pgxs.mk to 
keep name untouched.


		Zdenek



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

* Re: Solaris SONAME not matching libraries
  2007-05-28 15:01 Solaris SONAME not matching libraries Mark Round <mark@markround.com>
  2007-05-28 16:58 ` Re: Solaris SONAME not matching libraries Tom Lane <tgl@sss.pgh.pa.us>
  2007-05-29 12:16   ` Re: Solaris SONAME not matching libraries Zdenek Kotala <Zdenek.Kotala@Sun.COM>
@ 2007-05-29 20:56     ` Mark Round <mark@markround.com>
  2007-05-29 21:18       ` Re: Solaris SONAME not matching libraries Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 5+ messages in thread

From: Mark Round @ 2007-05-29 20:56 UTC (permalink / raw)
  To: pgsql-ports

> I think it is minor bug. SONAME is used by linker to setup  
> dependencies (NEEDED) in a final binary.

This is the reason that was given to me by a developer - they were  
trying to link against one of these libraries, and the linker was  
putting the wrong thing in the NEEDED dependency - the value of  
SONAME, which referred to a non-existant file. The plpgsql.so file  
was just to give an example, like you say there are many more of  
these libraries in lib/ .

-Mark



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

* Re: Solaris SONAME not matching libraries
  2007-05-28 15:01 Solaris SONAME not matching libraries Mark Round <mark@markround.com>
  2007-05-28 16:58 ` Re: Solaris SONAME not matching libraries Tom Lane <tgl@sss.pgh.pa.us>
  2007-05-29 12:16   ` Re: Solaris SONAME not matching libraries Zdenek Kotala <Zdenek.Kotala@Sun.COM>
  2007-05-29 20:56     ` Re: Solaris SONAME not matching libraries Mark Round <mark@markround.com>
@ 2007-05-29 21:18       ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2007-05-29 21:18 UTC (permalink / raw)
  To: Mark Round <mark@markround.com>; +Cc: pgsql-ports

Mark Round <mark@markround.com> writes:
>> I think it is minor bug. SONAME is used by linker to setup  
>> dependencies (NEEDED) in a final binary.

> This is the reason that was given to me by a developer - they were  
> trying to link against one of these libraries,

The question is why they were trying to do that; there's no point in
it that I can see for any dynamically loaded pgsql module.

			regards, tom lane



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


end of thread, other threads:[~2007-05-29 21:18 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-05-28 15:01 Solaris SONAME not matching libraries Mark Round <mark@markround.com>
2007-05-28 16:58 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-05-29 12:16   ` Zdenek Kotala <Zdenek.Kotala@Sun.COM>
2007-05-29 20:56     ` Mark Round <mark@markround.com>
2007-05-29 21:18       ` Tom Lane <tgl@sss.pgh.pa.us>

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