Tom Lane writes:
> rjhb@bb-c.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@bb-c.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