Bitcoin Core Github
44 subscribers
121K links
Download Telegram
⚠️ pinheadmz opened an issue: "configure: error: cannot figure out how to use std::filesystem"
(https://github.com/bitcoin/bitcoin/issues/27148)
Got this error from `configure` when trying to build from tag `v24.0.1` on Ubuntu 18.

At first my gcc was version `gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)` so I tried installing clang 10: `clang version 10.0.0-4ubuntu1~18.04.2` and linked to `CXX`, etc... still got the same error.

```
$ uname -a
Linux party 4.15.0-163-generic #171-Ubuntu SMP Fri Nov 5 11:55:11 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Descr
...
💬 fanquake commented on issue "configure: error: cannot figure out how to use std::filesystem":
(https://github.com/bitcoin/bitcoin/issues/27148#issuecomment-1442041863)
> ./configure --without-gui --with-incompatible-bdb

I see clang is being used in the output, but how are you passing clang through? `CC=clang=10 CXX=clang++`? What is the actual output in `config.log`?
💬 pinheadmz commented on issue "configure: error: cannot figure out how to use std::filesystem":
(https://github.com/bitcoin/bitcoin/issues/27148#issuecomment-1442049297)
yeah:

```
$ env | grep clang
CC=/usr/bin/clang-10
CXX=/usr/bin/clang++-10
```

This is the relevant chunk from config.log:

```

configure:4823: checking whether /usr/bin/clang++-10 supports C++17 features with -std=c++17
configure:5619: /usr/bin/clang++-10 -std=c++17 -c -g -O2 conftest.cpp >&5
configure:5619: $? = 0
configure:5628: result: yes
configure:6565: checking whether std::filesystem can be used without link library
configure:6581: /usr/bin/clang++-10 -std=c++17 -o co
...
💬 pinheadmz commented on issue "configure: error: cannot figure out how to use std::filesystem":
(https://github.com/bitcoin/bitcoin/issues/27148#issuecomment-1442054213)
Errors in config.log look the same with gcc 7 too:

```
checking whether g++ supports C++17 features with -std=c++17... yes
checking whether std::filesystem can be used without link library... no
checking whether std::filesystem needs -lstdc++fs... no
checking whether std::filesystem needs -lc++fs... configure: error: in `/root/bitcoin':
configure: error: cannot figure out how to use std::filesystem
See `config.log' for more details
```
💬 hebasto commented on issue "configure: error: cannot figure out how to use std::filesystem":
(https://github.com/bitcoin/bitcoin/issues/27148#issuecomment-1442054926)
> yeah:
>
> ```
> $ env | grep clang
> CC=/usr/bin/clang-10
> CXX=/usr/bin/clang++-10
> ```
>

You still using old `libstdc++`.
💬 theuni commented on pull request "Fix various libbitcoinkernel DLL build problems":
(https://github.com/bitcoin/bitcoin/pull/27146#discussion_r1115932874)
From libtool help:
```
-static do not do any dynamic linking of uninstalled libtool libraries
```

So, by default, use a static libbitcoinkernel for bitcoin-chainstate. This matches the default of our other executables linked to libs.

Reason being: otherwise test harnesses, c-i, benchmarks, etc have to play LD_PRELOAD or wrapper tricks.
💬 MarcoFalke commented on issue "configure: error: cannot figure out how to use std::filesystem":
(https://github.com/bitcoin/bitcoin/issues/27148#issuecomment-1442059015)
gcc 7 doesn't have filesystem. You can try `CC=clang-10 CXX="clang++-10 -stdlib=libc++"`
💬 fanquake commented on issue "configure: error: cannot figure out how to use std::filesystem":
(https://github.com/bitcoin/bitcoin/issues/27148#issuecomment-1442064307)
> This is the relevant chunk from config.log:

Installing `libstdc++-8-dev` will solve the problem.
💬 hebasto commented on pull request "contrib: Improve verify-commits.py to work with maintainers leaving":
(https://github.com/bitcoin/bitcoin/pull/27058#issuecomment-1442064325)
This part in the PR description
> I've changed `trusted-keys` from just a list of key ids to a csv file with each row being the key id, and the earliest and latest commits the key is allowed to have signed.

looks outdated.
💬 pinheadmz commented on issue "configure: error: cannot figure out how to use std::filesystem":
(https://github.com/bitcoin/bitcoin/issues/27148#issuecomment-1442066649)
>
> Installing `libstdc++-8-dev` will solve the problem.

YES! Thanks. Add to docs ?
💬 theuni commented on pull request "Fix various libbitcoinkernel DLL build problems":
(https://github.com/bitcoin/bitcoin/pull/27146#issuecomment-1442071126)
@hebasto: I'm not sure how it looked before, but after this PR the exports look nice and clean:

```
$ objdump -p .libs/libbitcoinconsensus-0.dll

...

[Ordinal/Name Pointer] Table
[ 0] bitcoinconsensus_verify_script
[ 1] bitcoinconsensus_verify_script_with_amount
[ 2] bitcoinconsensus_version

The Function Table (interpreted .pdata section contents)
vma: BeginAddress EndAddress UnwindData
000000006db81000: 000000006d
...
💬 hebasto commented on issue "configure: error: cannot figure out how to use std::filesystem":
(https://github.com/bitcoin/bitcoin/issues/27148#issuecomment-1442074169)
> Add to docs ?

Probably, it does not worth, considering that Ubuntu 18 is about to [reach](https://wiki.ubuntu.com/Releases) "End of Standard Support" soon.
pinheadmz closed an issue: "configure: error: cannot figure out how to use std::filesystem"
(https://github.com/bitcoin/bitcoin/issues/27148)
💬 achow101 commented on pull request "contrib: Improve verify-commits.py to work with maintainers leaving":
(https://github.com/bitcoin/bitcoin/pull/27058#issuecomment-1442098740)
> looks outdated.

Updated the description
💬 achow101 commented on pull request "rpc: Add a parameter to sendrawtransaction which sets a maximum value for unspendable outputs.":
(https://github.com/bitcoin/bitcoin/pull/25943#issuecomment-1442102227)
re-ACK 7013da07fbcddb04abae9759767a9419ab90444c
💬 petertodd commented on pull request "contrib: Improve verify-commits.py to work with maintainers leaving":
(https://github.com/bitcoin/bitcoin/pull/27058#issuecomment-1442123316)
@Sjors

> The rule would then be that a [OpenTimestamps] timestamp must exist with a median time past before that date.

The median time past is *not* the correct way to interpret a Bitcoin block time for the purpose of timestamping. The problem is median time past is in the past; a timestamp proof is a **stronger** statement if it's backdated, not weaker.

Instead, the OpenTimestamps client rounds off timestamps to the nearest day in the local timezone to give users the right impression
...
💬 Sjors commented on pull request "wallet: skip R-value signature grinding for external signers":
(https://github.com/bitcoin/bitcoin/pull/26032#discussion_r1116021694)
Good point, I introduced a `const bool` in both places where it's used in a loop.
💬 jamesob commented on pull request "fix: contrib: allow multi-sig binary verification":
(https://github.com/bitcoin/bitcoin/pull/23020#issuecomment-1442170863)
I've rebased/squashed/simplified the script here to
- incorporate the removal of builder keys from this repo, and
- remove support for single-sig release signing (users are referred to old versions of this script for that).
💬 Sjors commented on pull request "wallet: skip R-value signature grinding for external signers":
(https://github.com/bitcoin/bitcoin/pull/26032#discussion_r1116029872)
Though perhaps it's overkill, because `IsWalletFlagSet` is just `m_wallet_flags & flag`.