Skip to content

Commit b87f9c5

Browse files
kiminuofanquake
authored andcommitted
build: remove boost::filesystem usage
1 parent 41d7166 commit b87f9c5

11 files changed

+7
-151
lines changed

build-aux/m4/ax_boost_filesystem.m4

Lines changed: 0 additions & 118 deletions
This file was deleted.

build_msvc/bitcoin_config.h.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@
4444
/* define if the Boost library is available */
4545
#define HAVE_BOOST /**/
4646

47-
/* define if the Boost::Filesystem library is available */
48-
#define HAVE_BOOST_FILESYSTEM /**/
49-
5047
/* define if external signer support is enabled (requires Boost::Process) */
5148
#define ENABLE_EXTERNAL_SIGNER /**/
5249

build_msvc/vcpkg.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"version-string": "1",
44
"dependencies": [
55
"berkeleydb",
6-
"boost-filesystem",
76
"boost-multi-index",
87
"boost-process",
98
"boost-signals2",

ci/test/00_setup_env_native_asan.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
export LC_ALL=C.UTF-8
88

99
export CONTAINER_NAME=ci_native_asan
10-
export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-dev libboost-system-dev libboost-filesystem-dev libboost-test-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libqrencode-dev libsqlite3-dev"
10+
export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-dev libboost-system-dev libboost-test-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libqrencode-dev libsqlite3-dev"
1111
export DOCKER_NAME_TAG=ubuntu:22.04
1212
export NO_DEPENDS=1
1313
export GOAL="install"

ci/test/00_setup_env_native_fuzz.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8
88

99
export DOCKER_NAME_TAG="ubuntu:20.04"
1010
export CONTAINER_NAME=ci_native_fuzz
11-
export PACKAGES="clang llvm python3 libevent-dev bsdmainutils libboost-dev libboost-system-dev libboost-filesystem-dev libboost-test-dev libsqlite3-dev"
11+
export PACKAGES="clang llvm python3 libevent-dev bsdmainutils libboost-dev libboost-system-dev libboost-test-dev libsqlite3-dev"
1212
export NO_DEPENDS=1
1313
export RUN_UNIT_TESTS=false
1414
export RUN_FUNCTIONAL_TESTS=false

ci/test/00_setup_env_native_fuzz_with_valgrind.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8
88

99
export DOCKER_NAME_TAG="ubuntu:20.04"
1010
export CONTAINER_NAME=ci_native_fuzz_valgrind
11-
export PACKAGES="clang llvm python3 libevent-dev bsdmainutils libboost-dev libboost-system-dev libboost-filesystem-dev libboost-test-dev libsqlite3-dev valgrind"
11+
export PACKAGES="clang llvm python3 libevent-dev bsdmainutils libboost-dev libboost-system-dev libboost-test-dev libsqlite3-dev valgrind"
1212
export NO_DEPENDS=1
1313
export RUN_UNIT_TESTS=false
1414
export RUN_FUNCTIONAL_TESTS=false

ci/test/00_setup_env_native_valgrind.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8
88

99
export DOCKER_NAME_TAG="ubuntu:20.04"
1010
export CONTAINER_NAME=ci_native_valgrind
11-
export PACKAGES="valgrind clang llvm python3-zmq libevent-dev bsdmainutils libboost-dev libboost-system-dev libboost-filesystem-dev libboost-test-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libsqlite3-dev"
11+
export PACKAGES="valgrind clang llvm python3-zmq libevent-dev bsdmainutils libboost-dev libboost-system-dev libboost-test-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libsqlite3-dev"
1212
export USE_VALGRIND=1
1313
export NO_DEPENDS=1
1414
export TEST_RUNNER_EXTRA="--nosandbox --exclude rpc_bind,feature_bind_extra" # Excluded for now, see https://github.com/bitcoin/bitcoin/issues/17765#issuecomment-602068547

configure.ac

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,13 +1408,12 @@ if test "$use_boost" = "yes"; then
14081408
AC_MSG_ERROR([only libbitcoinconsensus can be built without Boost])
14091409
fi
14101410
AX_BOOST_SYSTEM
1411-
AX_BOOST_FILESYSTEM
14121411

14131412
if test "$suppress_external_warnings" != "no"; then
14141413
BOOST_CPPFLAGS=SUPPRESS_WARNINGS($BOOST_CPPFLAGS)
14151414
fi
14161415

1417-
BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB"
1416+
BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB"
14181417
fi
14191418

14201419
if test "$use_external_signer" != "no"; then

contrib/valgrind.supp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,6 @@
118118
fun:__wcsnlen_sse4_1
119119
fun:wcsnrtombs
120120
}
121-
{
122-
Suppress wcsnrtombs warning (remove after removing boost::fs)
123-
Memcheck:Cond
124-
...
125-
fun:_ZN5boost10filesystem6detail11unique_pathERKNS0_4pathEPNS_6system10error_codeE
126-
}
127121
{
128122
Suppress boost warning
129123
Memcheck:Leak
@@ -134,21 +128,6 @@
134128
fun:_ZN5boost9unit_test14unit_test_mainEPFbvEiPPc
135129
fun:main
136130
}
137-
{
138-
Suppress boost::filesystem warning (fixed in boost 1.70: https://github.com/boostorg/filesystem/commit/bbe9d1771e5d679b3f10c42a58fc81f7e8c024a9)
139-
Memcheck:Cond
140-
fun:_ZN5boost10filesystem6detail28directory_iterator_incrementERNS0_18directory_iteratorEPNS_6system10error_codeE
141-
...
142-
obj:*/libboost_filesystem.so.*
143-
}
144-
{
145-
Suppress boost::filesystem warning (could be related: https://stackoverflow.com/questions/9830182/function-boostfilesystemcomplete-being-reported-as-possible-memory-leak-by-v)
146-
Memcheck:Leak
147-
match-leak-kinds: reachable
148-
fun:_Znwm
149-
...
150-
fun:_ZN5boost10filesystem8absoluteERKNS0_4pathES3_
151-
}
152131
{
153132
Suppress boost still reachable memory warning
154133
Memcheck:Leak

depends/packages/boost.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ $(package)_toolset_$(host_os)=clang
2222
else
2323
$(package)_toolset_$(host_os)=gcc
2424
endif
25-
$(package)_config_libraries=filesystem,system,test
25+
$(package)_config_libraries=system,test
2626
$(package)_cxxflags+=-std=c++17
2727
$(package)_cxxflags_linux=-fPIC
2828
$(package)_cxxflags_freebsd=-fPIC

0 commit comments

Comments
 (0)