rjhb@xxxxxxx (Rainer J.H. Brandt) writes: > Tom Lane writes: >> The whole thing's odd though --- certainly many people are building >> PG successfully on macOS. There's got to be something unusual about >> Rainer's build environment, but what? > I thought so, too, but I'm beginning to doubt it. I'm now down to > ./configure --prefix=/opt/bb/170705 > and the initdb failure is the same. The build machine is a few months old > and has current OS and Xcode, and certainly no other build tools or other > relevant stuff. I have no special environment variables set. Hmph. I confess bafflement --- it works fine for me on curremt macOS. After reading the clang & ld man pages for a bit I wondered if I could reproduce the problem by adding -flto to the compiler switches. I was right that that causes "unused" functions to get stripped out of the postgres executable, but then you get a pile of failures when these libraries get built: undef: _pg_mic2ascii undef: _check_encoding_conversion_args undef: _pg_ascii2mic Undefined symbols for architecture x86_64: "_pg_mic2ascii", referenced from: _mic_to_ascii in lto.o "_check_encoding_conversion_args", referenced from: _ascii_to_mic in lto.o _mic_to_ascii in lto.o "_pg_ascii2mic", referenced from: _ascii_to_mic in lto.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[3]: *** [ascii_and_mic.so] Error 1 Given that macOS's linker checks the resolvability of such symbols at dylib build time, I really don't see how you could get through the build successfully and then have a failure at run time. It's weird. Lacking any better ideas to offer, I can only suggest that maybe removing/reinstalling Xcode would help. (Hm, are you sure you've installed Xcode's command line tools? Try xcode-select --install to be sure.) regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general