I'm having issues while compiling litecoin. upon make it gives me an error error: ‘class boost::dynamic_bitset<>’ has no member named ‘reserve’ ret.bitset.reserve(bytes.size() * 8);

I’m having issues while compiling litecoin. upon make it gives me an error error: ‘class boost::dynamic_bitset<>’ has no member named ‘reserve’ ret.bitset.reserve(bytes.size() * 8);
and
4:14: warning: ‘nullopt’ defined but not used [-Wunused-variable]
static auto& nullopt = boost::none;

1 Like

It could be the case that you’re using old Boost libraries or that the Boost library is too new and has changed things. The newer C++ 2020 standard has a “bits” header, so maybe something has changed in Boost.

This is just speculation and a quick answer. I’ll try to compile Litecoin myself, by the way.

1 Like

kindly do tell me when you done with compiling

1 Like

I have managed to successfully build Litecoin on Fedora 36. It was the first time ever I’ve tried to compile it. It was more complicated than expected, but I managed to find help online for the problems. I’m thinking of writing a full tutorial in the near future.

I don’t know which Linux distribution you’re using, but in Fedora 36, the following packages solved all of my problems:

git g++ autoconf automake libtool patch openssl-devel libevent-devel cppzmq-devel fmt-devel boost-devel qt5-qtbase-devel qt5-linguist

If you’re using Ubuntu, there’s a chance that their “boost-dev” package is not up to date, so this might be the reason for this problem.

2 Likes

I am using ubuntu 16 and ubuntu 18 and its gives same error on both
upon running git g++ it gives me “git: ‘g++’ is not a git command. See ‘git --help’.”

1 Like

The list of packages that I have presented is not a command. It’s just the list of dependencies required for building the project on Fedora 36.

The problem you are facing is possibly caused by an old boost package. I’m not sure on how to help you on Ubuntu.

2 Likes

thanks alot

1 Like