Re: [GENERAL] Can't Build 7.3.4 on OS X

Поиск
Список
Период
Сортировка
От Marko Karppinen
Тема Re: [GENERAL] Can't Build 7.3.4 on OS X
Дата
Msg-id 3C150879-EDE6-11D7-B9FE-000A958D89B8@pobox.com
обсуждение исходный текст
Ответ на Re: [GENERAL] Can't Build 7.3.4 on OS X  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [GENERAL] Can't Build 7.3.4 on OS X  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 23.9.2003, at 19:01, Tom Lane wrote:
> 1.  Doesn't this break backward compatibility with Darwin 1.0-1.2?
>     (If so, does anyone care anymore?)

No. The two-level namespace feature was added in 10.1, and the
-flat_namespace hack was included in pgsql to unbreak the compile
on 10.1 and later. This change hence doesn't have any effect on
10.0 / Darwin 1.x -- except for gcc warnings about unknown flags.

The other change we discussed, ie. using -no-cpp-precomp instead
of -traditional-cpp, will break Darwin 1.x support.

> 2.  Why is the postgres executable added to LINK.shared?  Doesn't this
>     break building shlibs that are not intended to be linked into the
>     backend (eg libpq)?

When linking a shared object, the Darwin linker wants to know that all
the symbols are accounted for -- it doesn't allow undefined symbols.
The bundle_loader flag gives the linker a hint: these symbols will be
provided by the application that loads us, so you don't need raise
an error about them being undefined.

In other words, the -bundle_loader /path/to/postgresql doesn't affect
the build results at all. In the case where there are no undefined 
symbols
(like in libpq), the flag is ignored.

> 3.  What's with the WITHOUT_DARWIN_BUNDLE_LOADER hack for ecpg?

The linker doesn't like symbols that are defined both in the shared 
object
that's being linked and the bundle_loader binary. ecpg contains symbols
that are in the postgresql binary, too, leading to the link failing with
multiply-defined errors.

The easiest way for me to fix this -- I don't really know my way around 
the
source base -- was to specify by hand that the -bundle-loader flag isn't
used on these occasions. Perhaps a more prudent way would be to
examine which shared objects actually have undefined symbols and
use the bundle-loader flag only when linking them, but I think it'd lead
to much more maintenance and bloated Makefiles.

cheers
mk

> Marko Karppinen <karppinen@pobox.com> writes:
>> While we're on a Mac-related note, I managed to compile PostgreSQL on
>> Mac OS X 10.2 Jaguar with two-level namespace support.
>> <http://developer.apple.com/documentation/ReleaseNotes/DeveloperTools/
>> TwoLevelNamespaces.html> This is quite useful, so I hope you can look
>> into incorporating the changes.
>
>> http://www.markokarppinen.com/pg-two-level-namespace.diff



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

Предыдущее
От: Gaetano Mendola
Дата:
Сообщение: Re: Improving REINDEX for system indexes (long)
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: pg_dump doesn't dump binary compatible casts