I am trying to build a C++ project of a friend of mine which uses the boost library.
I have installed all libraries that it requires and the build goes through normally, except for one error that we cannot decipher and that only happens on my nixos system and not on his debian system.
The error is as follows:
compile build/dynamic_release/client/native/net.o
In file included from include/boost/beast/core/stream_traits.hpp:15,
from include/boost/beast/core/flat_stream.hpp:16,
from include/boost/beast/ssl/ssl_stream.hpp:18,
from include/boost/beast/ssl.hpp:15,
from src/client/native/net.cpp:8:
include/boost/beast/core/detail/stream_traits.hpp:79:8: error: redefinition of ‘struct boost::beast::detail::BufferSequence<BufferType>’
compilation terminated due to -Wfatal-errors.
make: *** [Makefile:105: build/dynamic_release/client/native/net.o] Error 1
Apparently a struct is being defined more than once inside of the boost library header itself. However the header file contains an include guard to protect against that and our code also does not define these names again.
We have tried to rule out any other possible errors by comparing library and compiler versions.
We both use gcc 10.3.0
and we both have boost174
.
We have a working CI build that builds the project in a docker container running debian.
We even diffed the library files on my system against those on his, which are completely identical, except for an added #line 1 'FILENAME'
in each first line of the nixos boost build which improves gcc compiler error messages on nixos since the path of every library file would be very long otherwise.
Where do I go next? How do I investigate an error like this?
Is this possibly a problem with the library that I can create an issue on the nixpkgs github for?
Should I try to reproduce the problem in isolation?