Re: [PATCHES] Fix linking of OpenLDAP libraries

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCHES] Fix linking of OpenLDAP libraries
Дата
Msg-id 22812.1157986468@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCHES] Fix linking of OpenLDAP libraries  ("Albe Laurenz" <all@adv.magwien.gv.at>)
Ответы Re: [PATCHES] Fix linking of OpenLDAP libraries  (Kevin Brown <kevin@sysexperts.com>)
Список pgsql-hackers
"Albe Laurenz" <all@adv.magwien.gv.at> writes:
> Let me expand a little on some of the peculiarities of
> shared libraries on AIX:

> - A normal AIX shared library is called libXX.a
>   It is an 'ar' archive that contains the shared object(s).

Ah, so the problem really boils down to funny naming conventions.
If they use ".a" for both shared and static libraries, how does anyone
tell the difference?

> So the linker does not prefer static over dynamic libraries,
> it just perfers libXX.a over libXX.so.

> In our case, we have libpq.a and libpq.so in the same directory,
> so unless you link with -brtl you will get a static link
> (because libpq.a is a static library).

I wonder whether we ought to suppress building (or at least installing)
our .a libraries at all on AIX.  Adding -btrl to LDFLAGS would help
within the context of our own build, but external clients that link
to libpq without saying that are going to get undesirable results.

I think there's a reasonable argument that by installing a .a file that
isn't a shared library, we are violating the platform's conventions.

> Should -brtl be added to src/template/aix?

Sounds that way, but that'll only help for psql and other stuff built
within our build.  Could you try this against CVS tip:

* add -brtl to LDFLAGS in the template
* Remove the AIX-specific hack on $(libpq) at lines 349-354 of src/Makefile.global.in
* see if it configures and builds
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Fixed length data types issue
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Fixed length data types issue