Re: Raphael Hertzog 2016-12-06 <20161206172047.5jz4tg6nmjded...@home.ouaza.com> > On Tue, 06 Dec 2016, Jonas Smedegaard wrote: > > Excerpts from Raphaël Hertzog's message of December 6, 2016 3:25 pm: > > > I have the feeling that this is all related to the "-Wl,-z,now" flag but > > > I don't know what > > > is injecting this flag here... > > > > Seems to come from LDFLAGS setting of /usr/lib/postgresql/9.6/bin/pg_config > > in package > > postgresql-server-dev-9.6. > > > > Is that a bug in that postgreql package? > > Maybe. It's certainly not a required flag to make the build succeed... > so it could be dropped there but if it was added in the first place, > it's for a purpose (hardening I guess).
Hi, half of the pg_config output bits are more informational and not really supposed to be used for building other pieces of software. pg_config(1) says: --ldflags Print the value of the LDFLAGS variable that was used for building PostgreSQL. This shows linker switches. The same holds for CFLAGS: --cflags Print the value of the CFLAGS variable that was used for building PostgreSQL. This shows C compiler switches. I think these bits should simply be dropped from plugins/emperor_pg/uwsgiplugin.py. Its usage of `pg_config --includedir` is correct. (The usage of `pg_config --libdir` is correct, but useless in Debian because it's just the default lib dir.) Admittedly the fact that "usable" options like "--includedir-server" are intermixed with informational options like "--configure" is confusing. Christoph