If UniValue is present on the system, it will be used instead of bundled copy. If not, bundled copy will automatically be built and used statically.
User can override either way using --with[out]-system-univalue configure option.
If UniValue is present on the system, it will be used instead of bundled copy. If not, bundled copy will automatically be built and used statically.
User can override either way using --with[out]-system-univalue configure option.
This is nice. Concept ACK.
ut ACK
utACK
Concept ack, but let's not default to using the system lib unless --with-system-univalue is specified, please. Otherwise someone (like myself) who has at some point built/installed univalue to system will suddenly find themselves frustrated when their in-tree univalue source changes aren't reflected in the build.
0 | @@ -1,9 +1,20 @@ 1 | -DIST_SUBDIRS = secp256k1 univalue 2 | +DIST_SUBDIRS = secp256k1 3 | 4 | AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS) $(HARDENED_LDFLAGS) 5 | AM_CXXFLAGS = $(HARDENED_CXXFLAGS) 6 | AM_CPPFLAGS = $(HARDENED_CPPFLAGS) 7 | 8 | +if EMBEDDED_UNIVALUE 9 | +DIST_SUBDIRS += univalue
always add to dist, regardless of the config.
13 | @@ -14,7 +14,7 @@ bench_bench_bitcoin_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) 14 | bench_bench_bitcoin_LDADD = \ 15 | $(LIBBITCOIN_SERVER) \ 16 | $(LIBBITCOIN_COMMON) \ 17 | - $(LIBBITCOIN_UNIVALUE) \ 18 | + $(LIBUNIVALUE) \
Please move univalue to after the internal libs while you're at it, since it's not possible for univalue to depend on them.
Concept ack, but let's not default to using the system lib unless --with-system-univalue is specified, please. Otherwise someone (like myself) who has at some point built/installed univalue to system will suddenly find themselves frustrated when their in-tree univalue source changes aren't reflected in the build.
Just use --without-system-univalue. Defaults should not be set just for niche scenarios...
Agreed, and the new (system) scenario is the niche scenario. It should be opt-in as long as we build it in-tree.
I'm not yet convinced that univalue will be a library found by default on many systems, will be maintained actively, and if so will do proper versioning in lock-step with our requirements.
So to err on the side of caution I agree with @theuni, defaulting to the in-tree univalue makes sense.
It can always be reconsidered later when things have matured for a few versions.
45 | @@ -46,6 +46,7 @@ Optional dependencies: 46 | qt | GUI | GUI toolkit (only needed when GUI enabled) 47 | protobuf | Payments in GUI | Data interchange format used for payment protocol (only needed when GUI enabled) 48 | libqrencode | QR codes in GUI | Optional for generating QR codes (only needed when GUI enabled) 49 | + univalue | Utility | JSON parsing and encoding (if missing, bundled version will be used)
Nit: should specify that bundled version is used except if --with-system-univalue
Fixed
Thanks, ut ack.