Opened 13 years ago
Last modified 3 years ago
#31000 assigned defect
postgresql90: pg_config contains -arch flags
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | jyrkiwahlstedt |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.0.1 |
Keywords: | Cc: | Veence (Vincent), cooljeanius (Eric Gallager) | |
Port: | postgresql90 |
Description
postgresql90's pg_config program prints out -arch
flags:
$ /opt/local/lib/postgresql90/bin/pg_config | grep -- -arch CONFIGURE = '--prefix=/opt/local' '--disable-dependency-tracking' '--sysconfdir=/opt/local/etc/postgresql90' '--bindir=/opt/local/lib/postgresql90/bin' '--libdir=/opt/local/lib/postgresql90' '--includedir=/opt/local/include/postgresql90' '--datadir=/opt/local/share/postgresql90' '--mandir=/opt/local/share/man' '--with-includes=/opt/local/include' '--with-libraries=/opt/local/lib' '--with-openssl' '--with-bonjour' '--with-readline' '--with-zlib' '--with-libxml' '--with-libxslt' '--enable-thread-safety' '--enable-integer-datetimes' '--with-ossp-uuid' 'CC=ccache /usr/bin/gcc-4.2' 'CFLAGS=-pipe -O2 -DAC_APPLE_UNIVERSAL_BUILD -arch x86_64 -arch i386' 'LDFLAGS=-L/opt/local/lib -arch x86_64 -arch i386' 'CPPFLAGS=-I/opt/local/include -I/opt/local/include/ossp' CFLAGS = -pipe -O2 -DAC_APPLE_UNIVERSAL_BUILD -arch x86_64 -arch i386 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv LDFLAGS = -L/opt/local/lib -arch x86_64 -arch i386 -L/opt/local/lib -L/opt/local/lib -Wl,-dead_strip_dylibs
This needs to be fixed, for the reasons explained in PortfileRecipes. When postgresql90 is installed universal, it causes ports using pg_config to fail when they are not built universal, for example postgis as reported on the mailing list.
I only tested postgresql90 but I imagine other postgresql ports are also affected.
Change History (6)
comment:1 Changed 13 years ago by Veence (Vincent)
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | vince@… added |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
postgresql90 and postgresql91 have had the -arch flags removed from their Makefile.globals, but the other postgresql ports have not had the same change made, nor has pg_config been fixed in any version. Please don't close this ticket until all -arch flags have been removed from all affected existing versions of postgresql.
comment:3 Changed 12 years ago by Veence (Vincent)
Ryan, The title of the bug was only mentioning PostGreSQL 9.0, wherefore my decision to close the bug. Now, you’re both right: neither the 8.x branch, nor pg_config have been altered. I am not aware of any PostGreSQL extension using pg_config to figure out its flags. Besides, is it worth fixing it in 8.x knowing that it will force a recompilation – recompilation that could be used to upgrade to 9.1, for example.
comment:4 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Yes, it is worth fixing this in all affected ports.
comment:5 Changed 8 years ago by mf2k (Frank Schima)
Cc: | jyrkiwahlstedt removed |
---|---|
Owner: | changed from mww@… to jyrkiwahlstedt |
Status: | reopened → assigned |
comment:6 Changed 3 years ago by cooljeanius (Eric Gallager)
Cc: | cooljeanius added |
---|
Fixed in r92951. Extensions such as PostGIS do not use pg_ config directly, but include PGXS/src/Makefile.global, which overrides CFLAGS and LDFLAGS.