fix: fix depends builds on FreeBSD hosts#6109
Merged
Merged
Conversation
…th c++11 we can revert this after upgrading to boost 1.81
knst
reviewed
Jul 12, 2024
| endif | ||
| $(package)_config_libraries=filesystem,test | ||
| $(package)_cxxflags=-std=c++17 | ||
| $(package)_cxxflags=-std=c++11 |
Collaborator
There was a problem hiding this comment.
could you add TODO here so far as it is not permanent change?
Collaborator
Author
There was a problem hiding this comment.
Mentioned it in https://github.com/dashpay/dash-issues/issues/53
Collaborator
There was a problem hiding this comment.
I meant TODO right here, so, next release we can re-evaluate it if it is still necessary or can be removed, but I guess you should not forget it yourself :D
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Additional Information
Despite builders for BSD-based platforms being backported as early as dash#5362, they didn't work on account of using a
curlflag,--retry, that was lopped off other builders in dash#3003 as a way to mitigate aberrant Travis CI-specific behaviour.As the variable
$(DOWNLOAD_RETRIES)was removed as part of that mitigation, the introduction of builders that rely on this variable caused failures as the flag was accompanied by nothing. As our CI host isn't based on FreeBSD, this went unnoticed. When deciding between extending the existing patch and reverting it, reverting it proved to be more attractive on account of us no longer using Travis CI and the revert bringing us closer to upstream.Additionally, the
std::unary_functionpatch that was introduced in dash#5610 proves to be necessary on BSD-based platforms as well (had to be extended for and tested on GhostBSD, based on FreeBSD 13.2-STABLE, Clang 16). Instead of conditionally patching based on platform and compiler, a more reliable patch would be to downgrade the C++ version used to build Boost at the last version to havestd::unary_function, which would be C++11, albeit deprecated (source).Though it's likely this route wasn't taken originally due to compiler errors that happened despite downgrading to C++11. These errors were due to the compiler objecting to
std::unary_functionusage in Boost headers, despite the backport of bitcoin#25436, which should've solved this problem. The reason the errors were still persisting is because the necessary flag,-DBOOST_NO_CXX98_FUNCTION_BASE, was only applied if--enable-suppress-external-warningswas set. CI didn't catch this, as the flag is always set, to keep log lengths manageable. This has been rectified.All changes combined, one should be able to build non-Qt Dash binaries using
dependsthough building the Qt client fromdependsunfortunately remains a problem, even upstream (source, source).Demo
Based on bbc9957
Built using:
dependsflags:NO_QT=1 ALLOW_HOST_PACKAGES=1 HOST=x86_64-unknown-freebsd13.2configureflags :--prefix=$(pwd)/depends/x86_64-unknown-freebsd13.2 --enable-debug --enable-suppress-external-warnings --with-guipkg(qt5)Checklist: