pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build.
7+ messages / 2 participants
[nested] [flat]

* pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build.
@ 2016-10-06 03:04 Tom Lane <tgl@sss.pgh.pa.us>
  2016-10-07 22:57 ` Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Robert Haas <robertmhaas@gmail.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Tom Lane @ 2016-10-06 03:04 UTC (permalink / raw)
  To: pgsql-committers

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.1475512158@sss.pgh.pa.us>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/bfe2e847811a4d0a46c8cdf16195c0e5929b6f83

Modified Files
--------------
src/Makefile.shlib | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


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


^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build.
  2016-10-06 03:04 pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-10-07 22:57 ` Robert Haas <robertmhaas@gmail.com>
  2016-10-07 23:10   ` Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 7+ messages in thread

From: Robert Haas @ 2016-10-07 22:57 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>

On Wed, Oct 5, 2016 at 11:04 PM, Tom Lane <tgl@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.1475512158@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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build.
  2016-10-06 03:04 pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Tom Lane <tgl@sss.pgh.pa.us>
  2016-10-07 22:57 ` Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Robert Haas <robertmhaas@gmail.com>
@ 2016-10-07 23:10   ` Tom Lane <tgl@sss.pgh.pa.us>
  2016-10-07 23:14     ` Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 7+ messages in thread

From: Tom Lane @ 2016-10-07 23:10 UTC (permalink / raw)
  To: Robert Haas <robertmhaas@gmail.com>; +Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>

Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Oct 5, 2016 at 11:04 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Remove -Wl,-undefined,dynamic_lookup in macOS build.

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

Hm, probably means we need an explicit reference to -lintl when
linking libpqwalreceiver.so.

			regards, tom lane


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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build.
  2016-10-06 03:04 pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Tom Lane <tgl@sss.pgh.pa.us>
  2016-10-07 22:57 ` Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Robert Haas <robertmhaas@gmail.com>
  2016-10-07 23:10   ` Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-10-07 23:14     ` Tom Lane <tgl@sss.pgh.pa.us>
  2016-10-07 23:41       ` Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Robert Haas <robertmhaas@gmail.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Tom Lane @ 2016-10-07 23:14 UTC (permalink / raw)
  To: Robert Haas <robertmhaas@gmail.com>; +Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>

I wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> This broke the build for me.  OS X Yosemite, 10.10.5.

> Hm, probably means we need an explicit reference to -lintl when
> linking libpqwalreceiver.so.

BTW, OS X hasn't got libintl AFAICT:

# ./configure --enable-nls
...
checking for library containing bind_textdomain_codeset... no
configure: error: a gettext implementation is required for NLS

What are you using to get past that?

			regards, tom lane


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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build.
  2016-10-06 03:04 pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Tom Lane <tgl@sss.pgh.pa.us>
  2016-10-07 22:57 ` Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Robert Haas <robertmhaas@gmail.com>
  2016-10-07 23:10   ` Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Tom Lane <tgl@sss.pgh.pa.us>
  2016-10-07 23:14     ` Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-10-07 23:41       ` Robert Haas <robertmhaas@gmail.com>
  2016-10-07 23:58         ` Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 7+ messages in thread

From: Robert Haas @ 2016-10-07 23:41 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>

On Fri, Oct 7, 2016 at 7:14 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I wrote:
>> Robert Haas <robertmhaas@gmail.com> writes:
>>> This broke the build for me.  OS X Yosemite, 10.10.5.
>
>> Hm, probably means we need an explicit reference to -lintl when
>> linking libpqwalreceiver.so.
>
> BTW, OS X hasn't got libintl AFAICT:
>
> # ./configure --enable-nls
> ...
> checking for library containing bind_textdomain_codeset... no
> configure: error: a gettext implementation is required for NLS
>
> What are you using to get past that?

MacPorts.

[rhaas pgsql]$ port contents gettext | grep libintl
  /opt/local/include/libintl.h
  /opt/local/lib/libintl.8.dylib
  /opt/local/lib/libintl.a
  /opt/local/lib/libintl.dylib
  /opt/local/share/gettext/intl/libintl.rc
  /opt/local/share/gettext/libintl.jar
[rhaas pgsql]$

-- 
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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build.
  2016-10-06 03:04 pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Tom Lane <tgl@sss.pgh.pa.us>
  2016-10-07 22:57 ` Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Robert Haas <robertmhaas@gmail.com>
  2016-10-07 23:10   ` Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Tom Lane <tgl@sss.pgh.pa.us>
  2016-10-07 23:14     ` Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Tom Lane <tgl@sss.pgh.pa.us>
  2016-10-07 23:41       ` Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Robert Haas <robertmhaas@gmail.com>
@ 2016-10-07 23:58         ` Tom Lane <tgl@sss.pgh.pa.us>
  2016-10-09 22:12           ` Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Robert Haas <robertmhaas@gmail.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Tom Lane @ 2016-10-07 23:58 UTC (permalink / raw)
  To: Robert Haas <robertmhaas@gmail.com>; +Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>

Robert Haas <robertmhaas@gmail.com> writes:
> On Fri, Oct 7, 2016 at 7:14 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> BTW, OS X hasn't got libintl AFAICT:
>> What are you using to get past that?

> MacPorts.

OK, I'll take a look.

			regards, tom lane


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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build.
  2016-10-06 03:04 pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Tom Lane <tgl@sss.pgh.pa.us>
  2016-10-07 22:57 ` Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Robert Haas <robertmhaas@gmail.com>
  2016-10-07 23:10   ` Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Tom Lane <tgl@sss.pgh.pa.us>
  2016-10-07 23:14     ` Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Tom Lane <tgl@sss.pgh.pa.us>
  2016-10-07 23:41       ` Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Robert Haas <robertmhaas@gmail.com>
  2016-10-07 23:58         ` Re: [COMMITTERS] pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-10-09 22:12           ` Robert Haas <robertmhaas@gmail.com>
  0 siblings, 0 replies; 7+ messages in thread

From: Robert Haas @ 2016-10-09 22:12 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>

On Fri, Oct 7, 2016 at 7:58 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Fri, Oct 7, 2016 at 7:14 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> BTW, OS X hasn't got libintl AFAICT:
>>> What are you using to get past that?
>
>> MacPorts.
>
> OK, I'll take a look.

Thanks.  Everything seems OK again now.

-- 
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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2016-10-09 22:12 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-10-06 03:04 pgsql: Remove -Wl,-undefined,dynamic_lookup in macOS build. Tom Lane <tgl@sss.pgh.pa.us>
2016-10-07 22:57 ` Robert Haas <robertmhaas@gmail.com>
2016-10-07 23:10   ` Tom Lane <tgl@sss.pgh.pa.us>
2016-10-07 23:14     ` Tom Lane <tgl@sss.pgh.pa.us>
2016-10-07 23:41       ` Robert Haas <robertmhaas@gmail.com>
2016-10-07 23:58         ` Tom Lane <tgl@sss.pgh.pa.us>
2016-10-09 22:12           ` Robert Haas <robertmhaas@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox