mirror of
https://github.com/sqlite/sqlite.git
synced 2024-11-21 19:29:09 +01:00
In the interest of minimizing downstream disruption, set the soname of libsqlite3.so to (by default) its legacy value of libsqlite3.so.0 and unconditionally create (or replace) a symlink with that name at install-time, in addition to the newer-named symlinks.
FossilOrigin-Name: 0773677b553e032e992266c6c75e10565729238df3ef52b56602a92cf651bea7
This commit is contained in:
parent
e69b4d757e
commit
1adf87592f
@ -154,7 +154,7 @@ LDFLAGS.readline = @LDFLAGS_READLINE@
|
||||
CFLAGS.readline = @CFLAGS_READLINE@
|
||||
LDFLAGS.icu = @LDFLAGS_ICU@
|
||||
CFLAGS.icu = @CFLAGS_ICU@
|
||||
LDFLAGS.soname.libsqlite3 = @LDFLAGS_SONAME_LIBSQLITE3@
|
||||
LDFLAGS.libsqlite3.soname = @LDFLAGS_LIBSQLITE3_SONAME@
|
||||
ENABLE_SHARED = @ENABLE_SHARED@
|
||||
ENABLE_STATIC = @ENABLE_STATIC@
|
||||
HAVE_WASI_SDK = @HAVE_WASI_SDK@
|
||||
|
41
auto.def
41
auto.def
@ -198,12 +198,7 @@ set flags {
|
||||
linemacros => {Enable #line macros in the amalgamation}
|
||||
dev => {Enable dev-mode build: automatically enables certain other flags}
|
||||
dump-defines=0 => {Dump autosetup defines to $DUMP_DEFINES_TXT (for build debugging)}
|
||||
#soname:=none => {SONAME for libsqlite3.so}
|
||||
#^^^ we "could", but arguably shouldn't, support clients passing a
|
||||
# value of libsqlite3.so.0 for compatibility with clients which
|
||||
# linked against a pre-3.48 build.
|
||||
# Maybe we should support values of --soname=(none,auto,legacy), where auto means
|
||||
# to use the 3.48+ value of libsqlite3.so.3..
|
||||
soname:=legacy => {SONAME for libsqlite3.so. Must be one of: none, auto, legacy}
|
||||
# </developer>
|
||||
}
|
||||
if {"" ne $DUMP_DEFINES_JSON} {
|
||||
@ -452,32 +447,46 @@ proj-check-rpath ; # Determine proper rpath-handling flag
|
||||
# It's not yet clear whether we gain anything from setting -soname,
|
||||
# but not having it has been a source of anxiety for some users.
|
||||
# Setting it to any value other than its historical value of
|
||||
# libsqlite3.so.0 may (this is not certain) break dynamic linking of
|
||||
# clients which initially linked against a legacy build.
|
||||
# libsqlite3.so.0 may break dynamic linking of clients which initially
|
||||
# linked against a legacy build (with its SONAME of libsqlite3.so.0).
|
||||
#
|
||||
# To be clear: the ABI has not changed between pre-3.48 and post-3.47
|
||||
# builds, but version number 0 (pre-3.48) was a historical remnant
|
||||
# from libtool which "should" have always been version number 3 but
|
||||
# was not, for reasons lost to history.
|
||||
#
|
||||
# If the goal is to reduce downstream disruption then we need to
|
||||
# retain the SONAME libsqlite3.so.0. If the goal is to "pull the
|
||||
# bandaid off" then switching libsqlite3.so.3 is arguably the right
|
||||
# thing to do (at the very real risk of causing a fair amount of
|
||||
# downstream disruption for package maintainers).
|
||||
#
|
||||
# See discussion in/around:
|
||||
# https://sqlite.org/forum/forumpost/0c6fc6f46b2cb3
|
||||
apply {{} {
|
||||
define LDFLAGS_SONAME_LIBSQLITE3 ""
|
||||
define LDFLAGS_LIBSQLITE3_SONAME ""
|
||||
if {[proj-opt-was-provided soname]} {
|
||||
set soname [opt-val soname]
|
||||
} else {
|
||||
return 0
|
||||
set soname legacy
|
||||
}
|
||||
switch -exact -- $soname {
|
||||
none { return 0 }
|
||||
auto - 3 { set soname libsqlite3.so.3 }
|
||||
legacy - 0 { set soname libsqlite3.so.0 }
|
||||
none { return 0 }
|
||||
auto { set soname libsqlite3.so.3 }
|
||||
legacy { set soname libsqlite3.so.0 }
|
||||
default {
|
||||
proj-fatal "Invalid value for --soname. Use one of (none, auto, legacy)."
|
||||
}
|
||||
}
|
||||
msg-debug "soname=$soname"
|
||||
if {[proj-check-soname $soname]} {
|
||||
define LDFLAGS_SONAME_LIBSQLITE3 [get-define LDFLAGS_SONAME_PREFIX]$soname
|
||||
msg-result "Setting SONAME: [get-define LDFLAGS_SONAME_LIBSQLITE3]"
|
||||
} else {
|
||||
define LDFLAGS_LIBSQLITE3_SONAME [get-define LDFLAGS_SONAME_PREFIX]$soname
|
||||
msg-result "Setting SONAME: [get-define LDFLAGS_LIBSQLITE3_SONAME]"
|
||||
} elseif {[proj-opt-was-provided soname]} {
|
||||
# --soname was explicitly requested but not available, so fail fatally
|
||||
proj-fatal "This environment does not support SONAME."
|
||||
} else {
|
||||
msg-result "This environment does not support SONAME."
|
||||
}
|
||||
}}
|
||||
|
||||
|
@ -947,7 +947,7 @@ proc proj-check-rpath {} {
|
||||
#
|
||||
# Checks whether CC supports the -Wl,soname,lib... flag. If so, it
|
||||
# returns 1 and defines LDFLAGS_SONAME_PREFIX to the flag's prefix, to
|
||||
# which the client would need to append "libwhatever.N". If not, it
|
||||
# which the client would need to append "libwhatever.N". If not, it
|
||||
# returns 0 and defines LDFLAGS_SONAME_PREFIX to an empty string.
|
||||
#
|
||||
# The libname argument is only for purposes of running the flag
|
||||
@ -1207,10 +1207,9 @@ proc proj-which-linenoise {dotH} {
|
||||
proc proj-remap-autoconf-dir-vars {} {
|
||||
set prefix [get-define prefix]
|
||||
set exec_prefix [get-define exec_prefix $prefix]
|
||||
# Note that the ${...} here refers to make-side var derefs, not
|
||||
# TCL-side vars. They must be formulated such that they are legal
|
||||
# for use in (A) makefiles, (B) pkgconfig files, and (C) TCL's
|
||||
# [subst] command. i.e. they must use the form ${X}.
|
||||
# The following var derefs must be formulated such that they are
|
||||
# legal for use in (A) makefiles, (B) pkgconfig files, and (C) TCL's
|
||||
# [subst] command. i.e. they must use the form ${X}.
|
||||
foreach {flag makeVar makeDeref} {
|
||||
exec-prefix exec_prefix ${prefix}
|
||||
datadir datadir ${prefix}/share
|
||||
|
43
main.mk
43
main.mk
@ -1389,7 +1389,8 @@ all: lib
|
||||
# Dynamic libsqlite3
|
||||
#
|
||||
$(libsqlite3.SO): $(LIBOBJ)
|
||||
$(T.link.shared) -o $@ $(LIBOBJ) $(LDFLAGS.soname.libsqlite3) $(LDFLAGS.libsqlite3)
|
||||
$(T.link.shared) -o $@ $(LIBOBJ) $(LDFLAGS.soname.libsqlite3) \
|
||||
$(LDFLAGS.libsqlite3) $(LDFLAGS.libsqlite3.soname)
|
||||
$(libsqlite3.SO)-1: $(libsqlite3.SO)
|
||||
$(libsqlite3.SO)-0 $(libsqlite3.SO)-:
|
||||
so: $(libsqlite3.SO)-$(ENABLE_SHARED)
|
||||
@ -1401,9 +1402,13 @@ all: so
|
||||
#
|
||||
# - libsqlite3.so.$(PACKAGE_VERSION)
|
||||
# - libsqlite3.so.3 =symlink-> libsqlite3.so.$(PACKAGE_VERSION)
|
||||
# - libsqlite3.so.0 =symlink-> libsqlite3.so.$(PACKAGE_VERSION) (see below)
|
||||
# - libsqlite3.so =symlink-> libsqlite3.so.3
|
||||
#
|
||||
# Regarding the historcal installation name of libsqlite3.so.0.8.6:
|
||||
# The link named libsqlite3.so.0 is provided in an attempt to reduce
|
||||
# downstream disruption when performing upgrades from pre-3.48 to a
|
||||
# version 3.48 or higher. That name is considered a legacy remnant
|
||||
# and will eventually be removed from this installation process.
|
||||
#
|
||||
# Historically libtool installed the library like so:
|
||||
#
|
||||
@ -1417,13 +1422,12 @@ all: so
|
||||
# compatibility for systems which have libraries installed using those
|
||||
# conventions:
|
||||
#
|
||||
# 1) If libsqlite3.so.0 is found in the target installation directory
|
||||
# then it and libsqlite3.so.0.8.6 are re-linked to point to the
|
||||
# newer-style names. We cannot retain both the old and new
|
||||
# installation because they both share the high-level name
|
||||
# $(libsqlite3.SO). The down-side of this is that it may well upset
|
||||
# packaging tools when we replace libsqlite3.so (from a legacy
|
||||
# package) with a new symlink.
|
||||
# 1) If libsqlite3.so.0.8.6 is found in the target installation
|
||||
# directory then it is re-linked to point to the newer-style
|
||||
# names. We cannot retain both the old and new installation because
|
||||
# they both share the high-level name $(libsqlite3.SO). The
|
||||
# down-side of this is that it may upset packaging tools when we
|
||||
# replace libsqlite3.so (from a legacy package) with a new symlink.
|
||||
#
|
||||
# 2) If INSTALL_SO_086_LINKS=1 and point (1) does not apply then links
|
||||
# to the legacy-style names are created. The primary intent of this
|
||||
@ -1437,25 +1441,24 @@ all: so
|
||||
#
|
||||
install-so-1: $(install-dir.lib) $(libsqlite3.SO)
|
||||
$(INSTALL) $(libsqlite3.SO) "$(install-dir.lib)"
|
||||
@echo "Setting up SO symlinks..."; \
|
||||
@echo "Setting up $(libsqlite3.SO) symlinks..."; \
|
||||
cd "$(install-dir.lib)" || exit $$?; \
|
||||
rm -f $(libsqlite3.SO).3 $(libsqlite3.SO).$(PACKAGE_VERSION) || exit $$?; \
|
||||
rm -f $(libsqlite3.SO).3 $(libsqlite3.SO).0 $(libsqlite3.SO).$(PACKAGE_VERSION) || exit $$?; \
|
||||
mv $(libsqlite3.SO) $(libsqlite3.SO).$(PACKAGE_VERSION) || exit $$?; \
|
||||
ln -s $(libsqlite3.SO).$(PACKAGE_VERSION) $(libsqlite3.SO) || exit $$?; \
|
||||
ln -s $(libsqlite3.SO).$(PACKAGE_VERSION) $(libsqlite3.SO).3 || exit $$?; \
|
||||
ln -s $(libsqlite3.SO).3 $(libsqlite3.SO) || exit $$?; \
|
||||
ls -la $(libsqlite3.SO) $(libsqlite3.SO).3*; \
|
||||
if [ -e $(libsqlite3.SO).0 ]; then \
|
||||
ln -s $(libsqlite3.SO).$(PACKAGE_VERSION) $(libsqlite3.SO).0 || exit $$?; \
|
||||
ls -la $(libsqlite3.SO) $(libsqlite3.SO).[03]*; \
|
||||
if [ -e $(libsqlite3.SO).0.8.6 ]; then \
|
||||
echo "ACHTUNG: legacy libtool-compatible install found. Re-linking it..."; \
|
||||
rm -f libsqlite3.la $(libsqlite3.SO).0* || exit $$?; \
|
||||
ln -s $(libsqlite3.SO).$(PACKAGE_VERSION) $(libsqlite3.SO).0 || exit $$?; \
|
||||
rm -f libsqlite3.la $(libsqlite3.SO).0.8.6 || exit $$?; \
|
||||
ln -s $(libsqlite3.SO).$(PACKAGE_VERSION) $(libsqlite3.SO).0.8.6 || exit $$?; \
|
||||
ls -la $(libsqlite3.SO).0*; \
|
||||
ls -la $(libsqlite3.SO).0.8.6; \
|
||||
elif [ x1 = "x$(INSTALL_SO_086_LINKS)" ]; then \
|
||||
echo "ACHTUNG: installing legacy libtool-style links because INSTALL_SO_086_LINKS=1"; \
|
||||
rm -f libsqlite3.la $(libsqlite3.SO).0* || exit $$?; \
|
||||
ln -s $(libsqlite3.SO).$(PACKAGE_VERSION) $(libsqlite3.SO).0 || exit $$?; \
|
||||
rm -f libsqlite3.la $(libsqlite3.SO).0.8.6 || exit $$?; \
|
||||
ln -s $(libsqlite3.SO).$(PACKAGE_VERSION) $(libsqlite3.SO).0.8.6 || exit $$?; \
|
||||
ls -la $(libsqlite3.SO).0*; \
|
||||
ls -la $(libsqlite3.SO).0.8.6; \
|
||||
fi
|
||||
install-so-0 install-so-:
|
||||
install-so: install-so-$(ENABLE_SHARED)
|
||||
|
18
manifest
18
manifest
@ -1,9 +1,9 @@
|
||||
C Generic\sauto.def\scleanups.\sNo\sfunctional\sdifferences.
|
||||
D 2024-11-15T16:35:24.257
|
||||
C In\sthe\sinterest\sof\sminimizing\sdownstream\sdisruption,\sset\sthe\ssoname\sof\slibsqlite3.so\sto\s(by\sdefault)\sits\slegacy\svalue\sof\slibsqlite3.so.0\sand\sunconditionally\screate\s(or\sreplace)\sa\ssymlink\swith\sthat\sname\sat\sinstall-time,\sin\saddition\sto\sthe\snewer-named\ssymlinks.
|
||||
D 2024-11-15T19:42:49.439
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
|
||||
F Makefile.in 6b8dd4c654bd0bddc2ac4d38e57521482896ebc6249a1a445a180100bc60826f
|
||||
F Makefile.in 2c90ab3183f810086878a784c323b7816238a5e6943d267c25a71edc623a05a3
|
||||
F Makefile.linux-generic bd3e3cacd369821a6241d4ea1967395c962dfe3057e38cb0a435cee0e8b789d0
|
||||
F Makefile.msc a92237976eb92c5efaa0dd2524746aec12c196e12df8d4dbff9543a4648c3312
|
||||
F README.md c3c0f19532ce28f6297a71870f3c7b424729f0e6d9ab889616d3587dd2332159
|
||||
@ -13,7 +13,7 @@ F art/icon-80x90.gif 65509ce3e5f86a9cd64fe7fca2d23954199f31fe44c1e09e208c80fb83d
|
||||
F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2
|
||||
F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90
|
||||
F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2
|
||||
F auto.def a0f92f2d7762735da5f5728ffbcf44052d8b485b207ec87d13703b681dd7820f
|
||||
F auto.def ec2fa2ea6fd691af4a991e1906da314ce094d019b1b9d08563167b138114bbdc
|
||||
F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903
|
||||
F autoconf/Makefile.am adedc1324b6a87fdd1265ddd336d2fb7d4f36a0e77b86ea553ae7cc4ea239347
|
||||
F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac
|
||||
@ -49,7 +49,7 @@ F autosetup/cc-shared.tcl 4f024e94a47f427ba61de1739f6381ef0080210f9fae89112d5c1d
|
||||
F autosetup/cc.tcl c0fcc50ca91deff8741e449ddad05bcd08268bc31177e613a6343bbd1fd3e45f
|
||||
F autosetup/jimsh0.c d40e381ea4526a067590e7b91bd4b2efa6d4980d286f908054c647b3df4aee14
|
||||
F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba
|
||||
F autosetup/proj.tcl 9772d3f89634089add92e2238551a59a5c764d501327f6eb433dca7f98138802
|
||||
F autosetup/proj.tcl dd4cdf0c31967056bc2c1956b0601118182b7e143cffb184d79c6a625ae9ef87
|
||||
F autosetup/system.tcl 51d4be76cd9a9074704b584e5c9cbba616202c8468cf9ba8a4f8294a7ab1dba9
|
||||
F configure 9a00b21dfd13757bbfb8d89b30660a89ec1f8f3a79402b8f9f9b6fc475c3303a x
|
||||
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
|
||||
@ -696,7 +696,7 @@ F ext/wasm/tests/opfs/concurrency/test.js d08889a5bb6e61937d0b8cbb78c9efbefbf65a
|
||||
F ext/wasm/tests/opfs/concurrency/worker.js 0a8c1a3e6ebb38aabbee24f122693f1fb29d599948915c76906681bb7da1d3d2
|
||||
F ext/wasm/wasmfs.make bc8bb227f35d5bd3863a7bd2233437c37472a0d81585979f058f9b9b503bef35
|
||||
F magic.txt 5ade0bc977aa135e79e3faaea894d5671b26107cc91e70783aa7dc83f22f3ba0
|
||||
F main.mk b50bf0907d551b9596d0e4ce1e74c2179885364b87eb921fcf685521cba8d335
|
||||
F main.mk 579c3f70be718c97b82c12c14942305ed0c330619355aad26ed14a752f6daf57
|
||||
F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271
|
||||
F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504
|
||||
F mptest/crash01.test 61e61469e257df0850df4293d7d4d6c2af301421
|
||||
@ -2198,8 +2198,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
|
||||
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
|
||||
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
|
||||
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
||||
P e24a3efec8c168b69d665ab20e8d715210208e6cf291ac93549fdd175a9009d6
|
||||
R c10328ada1a32fcd8e3a4906d06b0161
|
||||
P 02aceb8c138b5b8f38c75aa0792efa12f14b002083df6141cf56ea0602d3174b
|
||||
R 5c04b60962f1254417c6b379054d3030
|
||||
U stephan
|
||||
Z 9ca9b894bda23cfd0311c07f841cb8fa
|
||||
Z 553f27947bf815a9543e751ee4c1db5b
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
|
@ -1 +1 @@
|
||||
02aceb8c138b5b8f38c75aa0792efa12f14b002083df6141cf56ea0602d3174b
|
||||
0773677b553e032e992266c6c75e10565729238df3ef52b56602a92cf651bea7
|
||||
|
Loading…
Reference in New Issue
Block a user