From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. |
Date: | 2016-10-07 22:57:18 |
Message-ID: | CA+TgmoaHJKU5kcWZcYduATYVT7Mnx+8jUnycaYYL7OtCwCigug@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On Wed, Oct 5, 2016 at 11:04 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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(dot)1475512158(at)sss(dot)pgh(dot)pa(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-10-07 23:10:35 | Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. |
Previous Message | Heikki Linnakangas | 2016-10-07 20:57:30 | pgsql: Remove bogus mapping from UTF-8 to SJIS conversion table. |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-10-07 23:10:35 | Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. |
Previous Message | Corey Huinker | 2016-10-07 21:40:18 | Re: Fixing inheritance merge behavior in ALTER TABLE ADD CONSTRAINT |