On Wed, Oct 5, 2016 at 11:04 PM, Tom Lane <t...@sss.pgh.pa.us> wrote:
> Remove -Wl,-undefined,dynamic_lookup in macOS build.
>
> We don't need this anymore, and it prevents build-time error checking
> that's usually good to have, so remove it.  Undoes one change of commit
> cac765820.
>
> Unfortunately, it's much harder to get a similar effect on other common
> platforms, because we don't want the linker to throw errors for symbols
> that will be resolved in the core backend.  Only macOS and AIX expect the
> core backend executable to be available while linking loadable modules,
> so only these platforms can usefully throw errors for unresolved symbols
> at link time.
>
> Discussion: <2652.1475512...@sss.pgh.pa.us>

This broke the build for me.  OS X Yosemite, 10.10.5.

$ ./configure --enable-nls --with-libraries=/opt/local/lib
--with-includes=/opt/local/include
$ make
...
gcc -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute -Wformat-security -fno-strict-aliasing
-fwrapv -Wno-unused-command-line-argument -O2  -bundle
-multiply_defined suppress -o libpqwalreceiver.so libpqwalreceiver.o
-L../../../../src/port -L../../../../src/common -L/opt/local/lib
-Wl,-dead_strip_dylibs   -L../../../../src/interfaces/libpq -lpq
-bundle_loader ../../../../src/backend/postgres
Undefined symbols for architecture x86_64:
  "_libintl_gettext", referenced from:
      _libpqrcv_get_conninfo in libpqwalreceiver.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[2]: *** [libpqwalreceiver.so] Error 1
make[1]: *** [all-backend/replication/libpqwalreceiver-recurse] Error 2
make: *** [all-src-recurse] Error 2

Without --enable-nls, or if I back up one commit, it works.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to