Bitcoin full node and query server

Apr 23, 2024

View in context in the libbitcoin Slack #general mirror.

Rich Phillips14:17
@evoskuil can’t seem to download the Mac binary for v3.2 of explorer, get a 404 error. Can that be restored or is there someplace else I can grab it from?
157 replies · Rich Phillips, evoskuil, pmienk · last Apr 23, 2024
Rich Phillips14:17
In gitlab this is, sorry, wasn’t specific :)
evoskuil14:18
Sorry, the binaries were removed, requiring that people build their own :/.
Rich Phillips14:20
😬 ok, was hoping that would be the simple button since the build is sucking right now. What’s the flag to build without boost library? Or do I have to hack it out of the install script?
evoskuil14:22
The default install.sh does not build boost, but commonly the local install of boost isn’t compatible.
Rich Phillips20:27
Ok either I’m being stupid here or I’m doing this wrong but running either auto gen /configure or just install results in a check for boostlib being present. I can’t force it to be ignored. I’ve even forced a false flag on the install scripts etc to try and skip it but as soon as the linker tries to build the system section it falls over here.
evoskuil20:32
It must be present, it's a dependency.
Rich Phillips20:32
Ugh, this can’t run without boost?
evoskuil20:33
Right, the question is only whether you build boost or rely on your preinstalled version.
evoskuil20:33
The install.sh has an option to build boost, which is recommended.
evoskuil20:35
$ ./install.sh --with-icu --build-icu --build-boost --build-zmq --prefix=/home/me/myprefix
evoskuil20:37
This can be reduced to the following since you probably don't need ICU.
$ ./install.sh --build-boost --build-zmq --prefix=/home/me/myprefix
Rich Phillips20:39
I’ve built it, installed boost a hundred times, added to path. And even with all that the linked won’t find the binaries/libraries. Its the last thing that seems to fall over
Rich Phillips20:41
Ok will try this clean over again
evoskuil20:45
Have you run the installer and had it build boost (the recommended build)?
Rich Phillips20:46
I have a cloud flare proxy that blocks downloads from sourceforge
Rich Phillips20:47
Changing that in install to boostorg direct
👍🏻 1
evoskuil20:47
We should change that.
evoskuil20:47
I don't think the boost archives were available when we wrote that.
evoskuil20:47
@pmienk?
Rich Phillips20:55
Ok moved along now it won’t build or find the secp256 library. That worked before.
Rich Phillips20:55
There’s no switches for that, it just gets done each time no?
evoskuil20:56
Show log output.
evoskuil20:57
Rich Phillips20:58
It’s done that one literally every other time 🤷‍♂️
evoskuil20:59
What changed?
Rich Phillips20:59
Only forcing to build boost and zmq
Rich Phillips21:00
And changing to boostorg site for the tarball
pmienk21:00
Please provide command line output of install.sh
evoskuil21:01
BTW, you should also set --disable-shared as we cannot fully control the linker and it tends to to try and dynamically link to installed libs like boost despite the build isolation and direction. Static linking prevents that.
pmienk21:01
It gives us far more data to work with and a greater understanding of your environment
Rich Phillips21:02
That’s the switch I didn’t set this time. Ok, lemme add that back in.
evoskuil21:04
FYI, this is the most recent bx static/osx/clang/build-boost/build-zmq CI build. https://github.com/libbitcoin/libbitcoin-explorer/actions/runs/8117844403/job/22190912983
(edited)
evoskuil21:04
You can see the expected output under "Execute install.sh"
Rich Phillips21:18
output Plain Text · 48.6 KB
Libbitcoin installer configuration.
--------------------------------------------------------------------
OS                    : Darwin
PARALLEL              : 10
CC                    : clang
CXX                   : clang++
CPPFLAGS              : 
CFLAGS                : 
CXXFLAGS              : 
LDFLAGS               : 
LDLIBS                : 
WITH_ICU              : 
WITH_PNG              : 
WITH_QRENCODE         : 
BUILD_ICU             : 
BUILD_ZLIB            : 
BUILD_PNG             : 
BUILD_QRENCODE        : 
BUILD_BOOST           : yes
PREFIX                : /Users/richphillips/bx/
BUILD_DIR             : build-libbitcoin-explorer
DISABLE_SHARED        : yes
DISABLE_STATIC        : 
with_boost            : --with-boost=/Users/richphillips/bx/
with_pkgconfigdir     : --with-pkgconfigdir=/Users/richphillips/bx//lib/pkgconfig
--------------------------------------------------------------------
Initialized empty Git repository in /Users/richphillips/libbitcoin-explorer-3.2.0/build-libbitcoin-explorer/.git/

********************** Download boost_1_85_0.tar.bz2 **********************

Libbitcoin boost configuration.
--------------------------------------------------------------------
variant               : release
threading             : multi
toolset               : clang
cxxflags              : 
linkflags             : 
link                  : static
boost.locale.iconv    : on
boost.locale.posix    : on
full file
pmienk21:32
Try removing the trailing / from your prefix
evoskuil21:33
@pmienk Going back to /version4 there was no versioning in secp256k1, just [0.1] even with changes, which is why we retain branches for versioning.
evoskuil21:37
Master shows 0.4.2.0. As of our most recent /version8 they were still showing 0.1.0.0. But the install is checking for 0.1.0.19.
evoskuil21:42
I'm not sure what's up, but the log output doesn't match our current /version3 CI build.
pmienk21:42
@evoskuil you are referring to constraints that preexist the build project merging versions 3 and 4. I do not recall those limits
evoskuil21:43
libsec versioning hasn't changed
pmienk21:45
Correct. The .19 ending has been generated for more than 3 years by my quick check of the file history
evoskuil21:45
Notice that in our latest /version3 CI the following text:
********************** Prepairing to aquire libbitcoin/secp256k1/version7 **********************
Cloning libbitcoin/secp256k1/version7...
evoskuil21:45
That's pulling /version7 libsecp
pmienk21:45
Ahh, didn't think tocheck whether he's using an old install.sh
(edited)
evoskuil21:46
That CI installer also shows this line:
checking for libsecp256k1 >= 0.1.0.19... yes
evoskuil21:49
I see that /version7 is actually versioned to that level, so that's correct.
evoskuil21:50
And now see /version8 is actually at 0.1.0.20. It looks like we did transition to using the libsecp versioning, which I forgot.
evoskuil21:51
But the install script posted above doesn't match latest /version3, and is pulling /version4 branch libsecp (which is unversioned).
pmienk21:52
Agreed, had assumed no other alteration of a fresh install.sh. any url substitution should be performed on latest version3 install.sh
👍🏻 1
evoskuil21:54
So is that the master install.sh? Confused because of this:
********************** Download libbitcoin/secp256k1/version4 **********************
Rich Phillips22:05
Yeah that’s what’s in the v3.2 download
evoskuil22:06
I'm not sure what you mean by v3.2 download.
Rich Phillips22:07
Ive downloaded the src For explorer v3,2
evoskuil22:07
Are you trying to build from the v3.2 tag as opposed to /version3 top?
Rich Phillips22:07
That’s what I’m trying to build
Rich Phillips22:07
Well. Good question
evoskuil22:08
Have you made any modifications to the installer apart from the boost URL?
Rich Phillips22:08
I’m grabbing the 3.2 tag
Rich Phillips22:08
Not head of v3
Rich Phillips22:09
And no other mods other than boost url
evoskuil22:10
Download boost_1_85_0.tar.bz2
(edited)
evoskuil22:10
That could not be from v3.2, which was tagged in 2017
(edited)
Rich Phillips22:10
No I pointed it at latest boost code
Rich Phillips22:11
Can switch to 1.73 if better suited?
evoskuil22:11
Change the URL, not the version.
evoskuil22:11
Boost hits incompat with new compilers etc. It is not always easy to get a version that works. You may even have to downgrade your compiler.
(edited)
Rich Phillips22:12
Ok
evoskuil22:13
But this line emitted from a v3.2 installer doesn't make sense.
checking for libsecp256k1 >= 0.1.0.19... no
Rich Phillips22:14
I’m gonna try the 3.8 tag instead. Start there. I think as long as it’s v3 should be ok
evoskuil22:14
Why were you looking at v3.2?
Rich Phillips22:15
Had it in my mind that I needed 3.2 but looking back at notes it just needs v3
evoskuil22:16
Major versions maintain compatibility. So v3 latest is where you should be. I am still curious though how a 7 year old build is trying to find a very recent version of libsecp256k1.
(edited)
Rich Phillips22:16
That part I couldn’t tell you. I tried to trace where it was looking for v4 and couldn’t find it
evoskuil22:17
Line 671 in your log shows it installing libsecp from our /version4 branch.
evoskuil22:17
********************** Download libbitcoin/secp256k1/version4 **********************
Rich Phillips22:17
Yup I know
Rich Phillips22:17
Not something I asked it to do
Rich Phillips22:17
Didn’t change any of that
evoskuil22:18
That part is correct. /version4 secp is not the same as /version4 libbitcoin. They aren't aligned.
Rich Phillips22:19
Ah ok
evoskuil22:19
But that version of secp is "unversioned" (which is why we maintain branches).
evoskuil22:19
AC_INIT([libsecp256k1],[0.1])
evoskuil22:20
So that build would never work if looking for 0.1.0.19 - it didn't even exist until 5+ years later.
(edited)
Rich Phillips22:20
As I said, no idea why it was looking for that version, didn’t edit those parts. Just the boost url
evoskuil22:21
Do you have libsecp256k1 installed on your system?
Rich Phillips22:24
No
evoskuil22:24
Or did you install a more recent version of libbitcoin locally?
Rich Phillips22:24
Neither
evoskuil22:26
I think I have it...
evoskuil22:27
This is from the /version3 head (v3.8) configure.ac:
# Require secp256k1 of at least version 0.1.0.19 and output ${secp256k1_CPPFLAGS/LIBS/PKG}.
#------------------------------------------------------------------------------
PKG_CHECK_MODULES([secp256k1], [libsecp256k1 >= 0.1.0.19],
    [secp256k1_INCLUDEDIR="`$PKG_CONFIG --variable=includedir "libsecp256k1 >= 0.1.0.19" 2>/dev/null`"
     secp256k1_OTHER_CFLAGS="`$PKG_CONFIG --cflags-only-other "libsecp256k1 >= 0.1.0.19" 2>/dev/null`"],
    [AC_MSG_ERROR([libsecp256k1 >= 0.1.0.19 is required but was not found.])])
AC_SUBST([secp256k1_PKG], ['libsecp256k1 >= 0.1.0.19'])
AC_SUBST([secp256k1_CPPFLAGS], [${secp256k1_CFLAGS}])
AS_IF([test x${secp256k1_INCLUDEDIR} != "x"],
    [AC_SUBST([secp256k1_ISYS_CPPFLAGS], ["-isystem${secp256k1_INCLUDEDIR} ${secp256k1_OTHER_CFLAGS}"])],
    [AC_SUBST([secp256k1_ISYS_CPPFLAGS], [${secp256k1_OTHER_CFLAGS}])])
AC_MSG_NOTICE([secp256k1_CPPFLAGS : ${secp256k1_CPPFLAGS}])
AC_MSG_NOTICE([secp256k1_ISYS_CPPFLAGS : ${secp256k1_ISYS_CPPFLAGS}])
AC_MSG_NOTICE([secp256k1_OTHER_CFLAGS : ${secp256k1_OTHER_CFLAGS}])
AC_MSG_NOTICE([secp256k1_INCLUDEDIR : ${secp256k1_INCLUDEDIR}])
AC_MSG_NOTICE([secp256k1_LIBS : ${secp256k1_LIBS}])

AS_CASE([${enable_isystem}],[yes],
    [AC_SUBST([secp256k1_BUILD_CPPFLAGS], [${secp256k1_ISYS_CPPFLAGS}])],
    [AC_SUBST([secp256k1_BUILD_CPPFLAGS], [${secp256k1_CPPFLAGS}])])

AC_MSG_NOTICE([secp256k1_BUILD_CPPFLAGS : ${secp256k1_BUILD_CPPFLAGS}])
evoskuil22:28
When you use the install.sh it does not build from tags, it builds latest from branches. So by using a v3.2 install.sh you were mixing updates to v3 that are 7 years apart.
Rich Phillips22:29
I literally trashed the folders and downloaded fresh from the tag version for each build
evoskuil22:29
Doesn't matter.
evoskuil22:30
The installer is designed to build the latest of the branch it resides in, which means the latest from all corresponding branches in the other libbitcoin repos (not secp256k1).
Rich Phillips22:31
Oh so even a 3.2 installer will reference 3.8 head?
Rich Phillips22:32
Ok I see what you mean
evoskuil22:32
So when you get the v3.2 installer it builds external dependencies like boost/zeromq/secp from its recorded versions/URLs. But all the libbitcoin repos are built from their /version3 branch tops. And /libbitcoin-system/version3/ (v3.8) requires a much more recent libsecp than the v3.2 install.sh is building.
(edited)
evoskuil22:33
If one wants to build from tags it's a manual process.
pmienk22:42
Install.sh will download and build master regardless of tag
evoskuil22:42
Not master, top of branch.
pmienk22:42
That will shoot you in the foot
pmienk22:43
Yeah sorry
evoskuil22:43
Yeah, you cannot target tags with the installer. It's not intended for that.
Rich Phillips22:49
Ok moved on from that, building 3.8 explorer, now we get past most stuff , finds the boost 1.73 content ok but, can’t find version for the Chrono library. It’s definitely there in the boost directory, have rebuilt boost a few times to make sure.
Rich Phillips22:50
checking for boostlib >= 1.73.0 (107300) includes in "/Users/richphillips/boost_1_73_0//include"... no checking for boostlib >= 1.73.0 (107300)... yes configure: boost_CPPFLAGS : configure: boost_ISYS_CPPFLAGS : configure: boost_LDFLAGS : configure: boost_BUILD_CPPFLAGS : checking whether the Boost::Chrono library is available... yes configure: error: Could not find a version of the Boost::Chrono library!
Rich Phillips22:55
If I have the installer build boost instead of using one already built it throws build errors
Rich Phillips22:55
I can’t fix the src as it redownloads it each time
pmienk22:55
Reporting is spotty from those boost checks. The m4s commonly report the wrong library. Likely it's the one immediately preceeding
pmienk22:56
Its likely failing detection for boost entirely
Rich Phillips22:57
If I force using —with-boost and give a path, it finds it but can’t version chrono.
Rich Phillips22:57
If I have install build it, I get out of range error for a static cast for an enumerator
(edited)
Rich Phillips22:57
Which isn’t an error I get when I build it manually
pmienk23:00
The supplied m4s have this as a known issue. What other output are you relying on to say it's found with the provided parameterization? Did the boost build share static/dynamic parameterization as your libbitcoin build?
evoskuil23:00
As I said, reliance on local installs is problematic because parts are often missing or compiled differently.
evoskuil23:00
And as Phillip says, the m4 packages often identify the wrong installation.
evoskuil23:01
So I would ask, what errors are you seeing when you use the installer to build it into a prefix lib, are you building static and not into a system directory.
evoskuil23:02
And what is your compiler version. There are known issues with boost and recent compilers.
Rich Phillips23:02
Just building static yes
Rich Phillips23:03
When I build it using the boost bootstrap and b2 system, it builds fine.
Rich Phillips23:03
When I try to build using the libbtc install script it fails.
Rich Phillips23:04
And because I’m Setting the boost url, it’s building from The same source tarball as I use for a Static build
evoskuil23:06
You obviously aren't building the same thing.
evoskuil23:07
There are different components and build parameters. This is why preinstalled packages aren't generally usable.
evoskuil23:08
What is the build error you get when install.sh builds boost?
(edited)
Rich Phillips23:09
In file included from libs/thread/src/pthread/thread.cpp:11: In file included from ./boost/thread/thread_only.hpp:17: In file included from ./boost/thread/pthread/thread_data.hpp:12: In file included from ./boost/thread/lock_types.hpp:18: In file included from ./boost/thread/thread_time.hpp:11: In file included from ./boost/date_time/posix_time/posix_time_types.hpp:16: In file included from ./boost/date_time/posix_time/posix_time_duration.hpp:15: In file included from ./boost/numeric/conversion/cast.hpp:33: In file included from ./boost/numeric/conversion/converter.hpp:13: In file included from ./boost/numeric/conversion/conversion_traits.hpp:13: In file included from ./boost/numeric/conversion/detail/conversion_traits.hpp:18: In file included from ./boost/numeric/conversion/detail/int_float_mixture.hpp:19: In file included from ./boost/mpl/integral_c.hpp:32: ./boost/mpl/aux_/integral_wrapper.hpp:73:31: error: integer value -1 is outside the valid range of values [0, 3] for this enumeration type [-Wenum-constexpr-conversion] ./boost/mpl/aux_/static_cast.hpp:24:47: note: expanded from macro 'BOOST_MPL_AUX_STATIC_CAST' #   define BOOST_MPL_AUX_STATIC_CAST(T, expr) static_cast<T>(expr)
evoskuil23:09
Yes, we've seen that one.
Rich Phillips23:09
I get two of the same errors on this file. I can edit the cast to fix but next build those changes are overwritten again
evoskuil23:10
It's the compiler. The warning has been elevated to an error by clang and cannot be suppressed.
Rich Phillips23:10
So downgrade compiler
evoskuil23:11
Boost hasn't fixed it yet, so the only option is to regress the compiler, which is what we did in CI.
evoskuil23:11
clang knew they were breaking shit, I read thru their issues.
Rich Phillips23:14
Don’t know what version of command line tools works?
Rich Phillips23:14
I have Xcode 15 , will 14.3 be far enough back?
evoskuil23:14
Apple clang version 14.0.0 (clang-1400.0.29.202)
evoskuil23:14
That works in our CI for master.
(edited)
Rich Phillips23:16
Ah crap. Not compatible with sonoma:)
evoskuil23:16
And works in our v3 CI with boost 1.73.
evoskuil23:17
It's always something 🙂
evoskuil23:17
Mac/Linux fixed DLL hell right?
Rich Phillips23:17
Ugh yeah and introduced a bunch of new pain
evoskuil23:17
I've been removing dependencies from libbitcoin for years.
Rich Phillips23:18
I literally can’t go below 15
Rich Phillips23:18
That’s really crappy
evoskuil23:19
I've got it down to libsecp and a much smaller boost subset, and zeromq for client/server and optional ICU.
evoskuil23:19
Don't think It will get smaller than that for a while.
evoskuil23:19
That's about 1/3 of what we started with 😂
evoskuil23:20
You can hack around the boost sources.
evoskuil23:20
Build your own zipped package and let the installer do its thing.
Rich Phillips23:51
Well I got further again but now it throws 20 errors and fatal errors out. Gonna have to work through each and see if I can work around them.
Rich Phillips23:51
Looks like this is driven by compiler version but don’t have a choice (thanks Apple :))
evoskuil23:56
Yeah, it sucks that they just decided to break this, and that boost didn't get it resolved.
evoskuil23:58
We've been lucky to be able to remove a lot of boost as that code has worked it's way into c++20 etc. But we'll probably at least have ASIO for some time.
evoskuil23:58
In v3 there's a lot more. We got rid of chrono for example in v4.