Обсуждение: AW: [HACKERS] shared lib names

Поиск
Список
Период
Сортировка

AW: [HACKERS] shared lib names

От
Zeugswetter Andreas IZ5
Дата:
> > Why are our shared libs called e.g. ecpg.so and not libecpg.so ?
> 
> Uh, they aren't on at least some platforms. Here is the lib directory
> on my linux box:
> 
Ok, sorry I see the difference now. Those that are for linking are named
lib*.so
and those that are for dyn loading into postgres don't have the lib.
Good, thanks. 

Andreas


Re: AW: [HACKERS] shared lib names

От
Tom Lane
Дата:
Zeugswetter Andreas IZ5 <Andreas.Zeugswetter@telecom.at> writes:
> Ok, sorry I see the difference now. Those that are for linking are named
> lib*.so
> and those that are for dyn loading into postgres don't have the lib.

What?  They should all have the "lib" AFAIK --- dynamic loading takes
the same kind of shared lib as a regular link does on every platform
I've heard about.

I think you were just fooled by having misspelled the "shlib" variable
the first time around... or, perhaps, our dynlink support for aix
is confused too?
        regards, tom lane


Re: AW: [HACKERS] shared lib names

От
"Zeugswetter Andreas"
Дата:
>> Ok, sorry I see the difference now. Those that are for linking are named
>> lib*.so
>> and those that are for dyn loading into postgres don't have the lib.
>
>What?  They should all have the "lib" AFAIK --- dynamic loading takes
>the same kind of shared lib as a regular link does on every platform
>I've heard about.


We are only talking about the naming convention here.
e.g. libpq.so but plpgsql.so

>I think you were just fooled by having misspelled the "shlib" variable
>the first time around... or, perhaps, our dynlink support for aix
>is confused too?

The dynlink support is broken for plpgsql.so on aix,
unless Bruce applies my patch, which I guess he did for current,
but not for the 6.5.1 branch.

Andreas



Re: AW: [HACKERS] shared lib names

От
"Mark Hollomon"
Дата:
Tom Lane wrote:
> 
> Zeugswetter Andreas IZ5 <Andreas.Zeugswetter@telecom.at> writes:
> > Ok, sorry I see the difference now. Those that are for linking are named
> > lib*.so
> > and those that are for dyn loading into postgres don't have the lib.
> 
> What?  They should all have the "lib" AFAIK --- dynamic loading takes
> the same kind of shared lib as a regular link does on every platform
> I've heard about.

I don't know about 'should' but they definitely are not required
to have it.

As Andreas said, the reason for the 'lib' prefix is to allow the -l
flag to the linker to work. What you pass to dlopen is the path to the
file, so
it can have any name you want. Generally (may be some platform this
isn't true)
you don't even have to have a magic suffix.


-- 

Mark Hollomon
mhh@nortelnetworks.com
ESN 451-9008 (302)454-9008


Re: AW: [HACKERS] shared lib names

От
Bruce Momjian
Дата:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> >> Ok, sorry I see the difference now. Those that are for linking are named
> >> lib*.so
> >> and those that are for dyn loading into postgres don't have the lib.
> >
> >What?  They should all have the "lib" AFAIK --- dynamic loading takes
> >the same kind of shared lib as a regular link does on every platform
> >I've heard about.
> 
> 
> We are only talking about the naming convention here.
> e.g. libpq.so but plpgsql.so
> 
> >I think you were just fooled by having misspelled the "shlib" variable
> >the first time around... or, perhaps, our dynlink support for aix
> >is confused too?
> 
> The dynlink support is broken for plpgsql.so on aix,
> unless Bruce applies my patch, which I guess he did for current,
> but not for the 6.5.1 branch.

I have not applied either yet.  I want someone who understands this to
make the decision.

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


Re: AW: [HACKERS] shared lib names

От
Tom Lane
Дата:
Bruce Momjian <maillist@candle.pha.pa.us> writes:
>> The dynlink support is broken for plpgsql.so on aix,
>> unless Bruce applies my patch, which I guess he did for current,
>> but not for the 6.5.1 branch.

> I have not applied either yet.  I want someone who understands this to
> make the decision.

OK, I'll take responsibility for it ...

The double underscore in 'SO__MINOR_VERSION' in the irix5 code is clearly
a typo and should be fixed, so I committed that into 6.5.1.  However I
am leery of committing the AIX code into 6.5 with so little time left
before 6.5.1 release --- too much risk that there will be problems.
Seems better to leave shlibs unimplemented on AIX for 6.5.

I have committed both fixes into the main branch, however.  Plenty of
time to find out if the AIX support has any problems before 6.6.
        regards, tom lane


Re: AW: [HACKERS] shared lib names

От
Tom Lane
Дата:
"Zeugswetter Andreas" <andreas.zeugswetter@telecom.at> writes:
>> What?  They should all have the "lib" AFAIK --- dynamic loading takes
>> the same kind of shared lib as a regular link does on every platform
>> I've heard about.

> We are only talking about the naming convention here.
> e.g. libpq.so but plpgsql.so

Oh, right, I see your point.  plpgsql.so isn't intended to ever be
statically linked so it needn't obey the "lib" naming convention.

Never mind ... ;-)
        regards, tom lane