--disable-shared is entirely broken these days
A gripe today in pgsql-novice made me realize that configure's
--disable-shared option has been useless since 9.0, because it prevents
plpgsql.so from being built, which causes initdb to fail now that
plpgsql is installed "by default" --- which actually seems to mean
"you don't have any choice about whether to install it".
So, a few questions:
1. Should we honor the promise implicit in the "by default" wording
that there should be a way to initdb without plpgsql?
2. Seeing that this is the first complaint since 9.0, should we decide
that --disable-shared is no longer worth supporting? Seems like we
should either make this case work or remove this switch. I notice
that the switch isn't documented anywhere in the SGML docs, either.
If we do keep it, we'd better document that it results in a severely
crippled version of Postgres.
regards, tom lane
On Sat, May 26, 2012 at 12:53 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
2. Seeing that this is the first complaint since 9.0, should we decide
that --disable-shared is no longer worth supporting? Seems like we
should either make this case work or remove this switch. I notice
that the switch isn't documented anywhere in the SGML docs, either.
If we do keep it, we'd better document that it results in a severely
crippled version of Postgres.
I can't really imagine the reasons to support this switch at this
time. Compile times are fast, disk space cheap, and if one wanted to
avoid the dynamic linker entirely and use features like replication
(which, IIRC, is dynamically linked for libpqwalreceiver.so) and
plpgsql then people are out of luck without some work of (perhaps?)
questionable value.
--
fdr
On lör, 2012-05-26 at 15:53 -0400, Tom Lane wrote:
2. Seeing that this is the first complaint since 9.0, should we decide
that --disable-shared is no longer worth supporting? Seems like we
should either make this case work or remove this switch.
I think the last remaining use was the QNX port, which didn't support
shared libraries.
We should just remove it now.
On Mon, May 28, 2012 at 02:27:15AM +0300, Peter Eisentraut wrote:
On l�r, 2012-05-26 at 15:53 -0400, Tom Lane wrote:
2. Seeing that this is the first complaint since 9.0, should we decide
that --disable-shared is no longer worth supporting? Seems like we
should either make this case work or remove this switch.I think the last remaining use was the QNX port, which didn't support
shared libraries.We should just remove it now.
--disable-shared removed, with the attached, applied patch.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
Attachments:
share.difftext/x-diff; charset=us-asciiDownload
diff --git a/configure b/configure
new file mode 100755
index 6a89cca..8f59c93
*** a/configure
--- b/configure
*************** LCOV
*** 748,754 ****
GCOV
enable_debug
enable_rpath
- enable_shared
default_port
WANTED_LANGUAGES
enable_nls
--- 748,753 ----
*************** with_libs
*** 810,816 ****
enable_integer_datetimes
enable_nls
with_pgport
- enable_shared
enable_rpath
enable_spinlocks
enable_debug
--- 809,814 ----
*************** Optional Features:
*** 1490,1496 ****
disable 64-bit integer date/time support
--enable-nls[=LANGUAGES]
enable Native Language Support
- --disable-shared do not build shared libraries
--disable-rpath do not embed shared library search path in
executables
--disable-spinlocks do not use spinlocks
--- 1488,1493 ----
*************** _ACEOF
*** 2471,2506 ****
- #
- # Option to disable shared libraries
- #
-
-
- # Check whether --enable-shared was given.
- if test "${enable_shared+set}" = set; then
- enableval=$enable_shared;
- case $enableval in
- yes)
- :
- ;;
- no)
- :
- ;;
- *)
- { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-shared option" >&5
- $as_echo "$as_me: error: no argument expected for --enable-shared option" >&2;}
- { (exit 1); exit 1; }; }
- ;;
- esac
-
- else
- enable_shared=yes
-
- fi
-
-
-
-
#
# '-rpath'-like feature can be disabled
#
--- 2468,2473 ----
diff --git a/configure.in b/configure.in
new file mode 100644
index fa48a2b..3acefa1
*** a/configure.in
--- b/configure.in
*************** AC_DEFINE_UNQUOTED(DEF_PGPORT_STR, "${de
*** 164,176 ****
AC_SUBST(default_port)
#
- # Option to disable shared libraries
- #
- PGAC_ARG_BOOL(enable, shared, yes,
- [do not build shared libraries])
- AC_SUBST(enable_shared)
-
- #
# '-rpath'-like feature can be disabled
#
PGAC_ARG_BOOL(enable, rpath, yes,
--- 164,169 ----
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
new file mode 100644
index 5b43819..1e3b401
*** a/src/Makefile.global.in
--- b/src/Makefile.global.in
*************** with_libxml = @with_libxml@
*** 165,171 ****
with_libxslt = @with_libxslt@
with_system_tzdata = @with_system_tzdata@
with_zlib = @with_zlib@
- enable_shared = @enable_shared@
enable_rpath = @enable_rpath@
enable_nls = @enable_nls@
enable_debug = @enable_debug@
--- 165,170 ----
*************** endif
*** 397,409 ****
# isn't created with the same link flags as libpq, it can't be used.)
libpq = -L$(libpq_builddir) -lpq
- # If doing static linking, shared library dependency info isn't available,
- # so add in the libraries that libpq depends on.
- ifeq ($(enable_shared), no)
- libpq += $(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt, $(LIBS)) \
- $(LDAP_LIBS_FE) $(PTHREAD_LIBS)
- endif
-
# This macro is for use by client executables (not libraries) that use libpq.
# We force clients to pull symbols from the non-shared library libpgport
# rather than pulling some libpgport symbols from libpq just because
--- 396,401 ----
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
new file mode 100644
index 294d10f..4da2f10
*** a/src/Makefile.shlib
--- b/src/Makefile.shlib
*************** LINK.static = $(AR) $(AROPT)
*** 81,100 ****
ifdef SO_MAJOR_VERSION
# Default library naming convention used by the majority of platforms
- ifeq ($(enable_shared), yes)
shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
shlib_major = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
shlib_bare = lib$(NAME)$(DLSUFFIX)
- endif
# Testing the soname variable is a reliable way to determine whether a
# linkable library is being built.
soname = $(shlib_major)
else
# Naming convention for dynamically loadable modules
- ifeq ($(enable_shared), yes)
shlib = $(NAME)$(DLSUFFIX)
endif
- endif
stlib = lib$(NAME).a
ifndef soname
--- 81,96 ----
*************** $(stlib): $(OBJS) | $(SHLIB_PREREQS)
*** 321,327 ****
$(RANLIB) $@
endif #haslibarule
- ifeq ($(enable_shared), yes)
ifeq (,$(filter cygwin win32,$(PORTNAME)))
ifneq ($(PORTNAME), aix)
--- 317,322 ----
*************** $(stlib): $(shlib) $(DLL_DEFFILE) | $(SH
*** 392,399 ****
endif # PORTNAME == cygwin || PORTNAME == win32
- endif # enable_shared
-
# We need several not-quite-identical variants of .DEF files to build
# DLLs for Windows. These are made from the single source file
--- 387,392 ----
*************** ifeq ($(PORTNAME), darwin)
*** 446,452 ****
ranlib $(stlib)
endif
- ifeq ($(enable_shared), yes)
install-lib-shared: $(shlib) installdirs-lib
ifdef soname
# we don't install $(shlib) on AIX
--- 439,444 ----
*************** endif # not aix
*** 471,484 ****
else # no soname
$(INSTALL_SHLIB) $< '$(DESTDIR)$(pkglibdir)/$(shlib)'
endif
- else # not enable_shared
- ifndef soname
- install-lib-shared:
- @echo "*****"; \
- echo "* Module $(NAME) was not installed due to lack of shared library support."; \
- echo "*****"
- endif
- endif # enable_shared
installdirs-lib:
--- 463,468 ----
*************** endif
*** 497,507 ****
uninstall-lib:
ifdef soname
rm -f '$(DESTDIR)$(libdir)/$(stlib)'
- ifeq ($(enable_shared), yes)
rm -f '$(DESTDIR)$(libdir)/$(shlib_bare)' \
'$(DESTDIR)$(libdir)/$(shlib_major)' \
'$(DESTDIR)$(libdir)/$(shlib)'
- endif # enable_shared
else # no soname
rm -f '$(DESTDIR)$(pkglibdir)/$(shlib)'
endif # no soname
--- 481,489 ----
diff --git a/src/backend/snowball/Makefile b/src/backend/snowball/Makefile
new file mode 100644
index c528be9..ac80efe
*** a/src/backend/snowball/Makefile
--- b/src/backend/snowball/Makefile
*************** all: all-shared-lib $(SQLSCRIPT)
*** 81,87 ****
include $(top_srcdir)/src/Makefile.shlib
$(SQLSCRIPT): Makefile snowball_func.sql.in snowball.sql.in
- ifeq ($(enable_shared), yes)
echo '-- Language-specific snowball dictionaries' > $@
cat $(srcdir)/snowball_func.sql.in >> $@
@set -e; \
--- 81,86 ----
*************** ifeq ($(enable_shared), yes)
*** 104,112 ****
sed -e "s#_NONASCDICTNAME_#$${nonascdictname}_stem#g" | \
sed -e "s#_STOPWORDS_#$$stop#g" ; \
done >> $@
- else
- echo "-- No language-specific snowball dictionaries, for lack of shared library support" > $@
- endif
install: all installdirs install-lib
$(INSTALL_DATA) $(SQLSCRIPT) '$(DESTDIR)$(datadir)'
--- 103,108 ----
diff --git a/src/backend/utils/mb/conversion_procs/Makefile b/src/backend/utils/mb/conversion_procs/Makefile
new file mode 100644
index 0848d96..8481721
*** a/src/backend/utils/mb/conversion_procs/Makefile
--- b/src/backend/utils/mb/conversion_procs/Makefile
*************** CONVERSIONS = \
*** 166,172 ****
all: $(SQLSCRIPT)
$(SQLSCRIPT): Makefile
- ifeq ($(enable_shared), yes)
@set -e; \
set $(CONVERSIONS) ; \
while [ "$$#" -gt 0 ] ; \
--- 166,171 ----
*************** ifeq ($(enable_shared), yes)
*** 183,191 ****
echo "CREATE DEFAULT CONVERSION pg_catalog.$$name FOR '$$se' TO '$$de' FROM $$func;"; \
echo "COMMENT ON CONVERSION pg_catalog.$$name IS 'conversion for $$se to $$de';"; \
done > $@
- else
- echo "-- No conversion support, for lack of shared library support" > $@
- endif
$(REGRESSION_SCRIPT): Makefile
@set -e; \
--- 182,187 ----
Bruce Momjian <bruce@momjian.us> writes:
On Mon, May 28, 2012 at 02:27:15AM +0300, Peter Eisentraut wrote:
We should just remove it now.
--disable-shared removed, with the attached, applied patch.
No documentation changes?
regards, tom lane
On Thu, Aug 30, 2012 at 04:50:22PM -0400, Tom Lane wrote:
Bruce Momjian <bruce@momjian.us> writes:
On Mon, May 28, 2012 at 02:27:15AM +0300, Peter Eisentraut wrote:
We should just remove it now.
--disable-shared removed, with the attached, applied patch.
No documentation changes?
I couldn't find any place we document it. I did:
grep _shared *.sgml
and no hits were returned. Should I search for something else?
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
Bruce Momjian <bruce@momjian.us> writes:
On Thu, Aug 30, 2012 at 04:50:22PM -0400, Tom Lane wrote:
No documentation changes?
I couldn't find any place we document it. I did:
grep _shared *.sgml
and no hits were returned. Should I search for something else?
It's --enable-shared, not --enable_shared. I see at least one hit, in
installation.sgml.
regards, tom lane
On Thu, Aug 30, 2012 at 04:57:30PM -0400, Tom Lane wrote:
Bruce Momjian <bruce@momjian.us> writes:
On Thu, Aug 30, 2012 at 04:50:22PM -0400, Tom Lane wrote:
No documentation changes?
I couldn't find any place we document it. I did:
grep _shared *.sgml
and no hits were returned. Should I search for something else?It's --enable-shared, not --enable_shared. I see at least one hit, in
installation.sgml.
Oh, got -/_ mixed up. Fixed with attached applied patch.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
Attachments:
shared2.difftext/x-diff; charset=us-asciiDownload
diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml
new file mode 100644
index c02ed87..81cd550
*** a/doc/src/sgml/installation.sgml
--- b/doc/src/sgml/installation.sgml
*************** su - postgres
*** 234,241 ****
</para>
<para>
! If you have problems, run <productname>Python</> 2.3 or later's
! configure using the <literal>--enable-shared</> flag. On some
operating systems you don't have to build a shared library, but
you will have to convince the <productname>PostgreSQL</> build
system of this. Consult the <filename>Makefile</filename> in
--- 234,240 ----
</para>
<para>
! On some
operating systems you don't have to build a shared library, but
you will have to convince the <productname>PostgreSQL</> build
system of this. Consult the <filename>Makefile</filename> in
On Thu, Aug 30, 2012 at 05:01:39PM -0400, Bruce Momjian wrote:
On Thu, Aug 30, 2012 at 04:57:30PM -0400, Tom Lane wrote:
Bruce Momjian <bruce@momjian.us> writes:
On Thu, Aug 30, 2012 at 04:50:22PM -0400, Tom Lane wrote:
No documentation changes?
I couldn't find any place we document it. I did:
grep _shared *.sgml
and no hits were returned. Should I search for something else?It's --enable-shared, not --enable_shared. I see at least one hit, in
installation.sgml.Oh, got -/_ mixed up. Fixed with attached applied patch.
Oops, that text is talking about Python's configure, so I put the text
back. Seemed we had _no_ mention of our own --enable-shared.
---------------------------------------------------------------------------
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com+ It's impossible for everything to be true. +
diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml new file mode 100644 index c02ed87..81cd550 *** a/doc/src/sgml/installation.sgml --- b/doc/src/sgml/installation.sgml *************** su - postgres *** 234,241 **** </para><para> ! If you have problems, run <productname>Python</> 2.3 or later's ! configure using the <literal>--enable-shared</> flag. On some operating systems you don't have to build a shared library, but you will have to convince the <productname>PostgreSQL</> build system of this. Consult the <filename>Makefile</filename> in --- 234,240 ---- </para><para>
! On some
operating systems you don't have to build a shared library, but
you will have to convince the <productname>PostgreSQL</> build
system of this. Consult the <filename>Makefile</filename> in
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
Bruce Momjian <bruce@momjian.us> writes:
On Thu, Aug 30, 2012 at 05:01:39PM -0400, Bruce Momjian wrote:
Oh, got -/_ mixed up. Fixed with attached applied patch.
Oops, that text is talking about Python's configure, so I put the text
back. Seemed we had _no_ mention of our own --enable-shared.
Yeah, I just realized the same. Apparently the configure script's
--help output was indeed the only documentation.
regards, tom lane