Re: 64bit initdb failure on macOS 10.11 and 10.12

From: rjhb(at)bb-c(dot)de (Rainer J(dot)H(dot) Brandt)
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: 64bit initdb failure on macOS 10.11 and 10.12
Date: 2017-07-04 20:29:17
Message-ID: 22875.64157.929458.415705@x2270a.bb-c.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane writes:
> rjhb(at)bb-c(dot)de (Rainer J.H. Brandt) writes:
> > I got this initdb error for a 64bit-build on macOS El Capitan and Sierra:
>
> > creating conversions ... FATAL: could not load library "/opt/bb/170704/lib/postgresql/ascii_and_mic.so": dlopen(/opt/bb/170704/lib/postgresql/ascii_and_mic.so, 10): Symbol not found: _check_encoding_conversion_args
> > Referenced from: /opt/bb/170704/lib/postgresql/ascii_and_mic.so
> > Expected in: /opt/bb/170704/bin/postgres
> > in /opt/bb/170704/lib/postgresql/ascii_and_mic.so
>
> check_encoding_conversion_args() should certainly be there in any PG
> version released since 2009 (see src/backend/utils/mb/wchar.c). But it's
> unreferenced in the core Postgres executable, only in the loadable
> conversion libraries. I wonder if you have somehow enabled a link-time
> optimization to remove "unreferenced" symbols, or at least not export them
> to libraries. Are you using Apple's stock toolchain, or something else?
Yes: current Xcode, nothing else.

> > I configured with ./configure CC='gcc -m64' --prefix=/opt/bb/170704
> > and also tried with CFLAGS=-m64 LDFLAGS=-m64.
> > With the same procedures, but 32-bit-builds, I don't get this error,
> > and everything works fine. Unfortunately, I need the 64-bit version.
>
> This makes little sense to me. 64-bit builds have been the default on
> macOS for some time.
Good to know. I removed those options and tried again.

> It's possible that by overriding LDFLAGS you're removing linker switches
> that need to be there ...
Thanks for that suggestion. I'm now using this (with 9.6.3):

./configure PERL=/opt/bb/170704/bin/perl --with-perl --prefix=/opt/bb/170704

I still get the error. I don't see how Perl can make the difference,
but I guess it's not relevant that I can't see it ;-(

Thanks for taking the time to answer.
Rainer
--
Email: rjhb(at)bb-c(dot)de
Telefon: 0172/9593205

Brandt & Brandt Computer GmbH
Am Wiesenpfad 6, 53340 Meckenheim
Geschäftsführer: Rainer J.H. Brandt und Volker A. Brandt
Handelsregister: Amtsgericht Bonn, HRB 10513

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2017-07-04 20:46:21 Re: 64bit initdb failure on macOS 10.11 and 10.12
Previous Message Tom Lane 2017-07-04 19:23:07 Re: 64bit initdb failure on macOS 10.11 and 10.12