Bug#973196: monero: FTBFS: optional.hpp:1591:3: error: static assertion failed: If you want to output boost::optional, include header

2021-01-27 Thread mjxmr
Hi Jonas,

The Dockerfile is my personal method of setting up an experiment, which quickly 
reproduces your problem by uncommenting line #8 and commenting the line #4. I 
honestly don't know how to build the Debian package like you do. If you have a 
script, that could do it in no time for me, just like I shared the Docker 
solution with you, I can help a bit further, by transferring the same 
experiment into your realm, just using a different software technology.

Please note, that declaring libboost-all-dev as the only boost dependency is 
most probably the decisive difference.

To sum up, we have 2 competing, pragmatic solutions:
1) libboost-all-dev (and the rest of the officially listed deps) - a high 
caliber solution, that drags quite too many boost dependencies
2) Xiphon's solution of test modification - another developer might reintroduce 
the same bug by demanding the same missing (in your case) boost templates, and 
our CI will not be able to catch this. You will be the first one, unfortunately.

The real solution would be to try to find the minimal, yet satisfying 
individual boost libraries, needed to compile the test. This might uncover some 
hidden bug in libboost-*dev packaging. This approach requires some time, that I 
currently not have, but may have in near future.

BR
MJ

‐‐‐ Original Message ‐‐‐
On Wednesday, January 27, 2021 12:11 PM, Jonas Smedegaard  
wrote:

> Hi MJ,
>
> Quoting mj...@protonmail.com (2021-01-26 20:31:49)
>
> > The following list of packages allows to build Monero under sid:
> > build-essential cmake pkg-config libboost-all-dev libssl-dev libzmq3-dev 
> > libunbound-dev libsodium-dev libunwind8-dev liblzma-dev libreadline6-dev 
> > libldns-dev libexpat1-dev libpgm-dev libhidapi-dev libusb-1.0-0-dev 
> > libprotobuf-dev protobuf-compiler libudev-dev
>
> These were already declared as build-dependencies:
>
> build-essential (implicit part of official Debian build environment)
> cmake
> pkg-config
> libssl-dev
> libzmq3-dev
> libunbound-dev
> libsodium-dev
> libreadline6-dev (virtual package provided by libreadline-dev)
> libhidapi-dev
>
> These were not:
>
> libboost-all-dev
> libunwind8-dev
> liblzma-dev
> libldns-dev
> libexpat1-dev
> libpgm-dev
> libusb-1.0-0-dev
> libprotobuf-dev
> protobuf-compiler
> libudev-dev
>
> Adding them all caused the build to fail at exactly the same place,
> however.
>
> Thanks, but what I need help with is to build an official Debian
> package, not make a custom .deb using Docker.
>
> I do appreciate your input, regardless, and will examine that list of
> proposed build-dependencies closer, for general refinement of the
> package (but unfortunately didn't help solve this concrete issue).
>
> -   Jonas
>
> --
>
>
> -   Jonas Smedegaard - idealist & Internet-arkitekt
> -   Tlf.: +45 40843136 Website: http://dr.jones.dk/
>
> [x] quote me freely [ ] ask before reusing [ ] keep private
>



Bug#973196: monero: FTBFS: optional.hpp:1591:3: error: static assertion failed: If you want to output boost::optional, include header

2021-01-26 Thread mjxmr
Dear Jonas,

TL;DR:

The following list of packages allows to build Monero under sid:

build-essential cmake pkg-config libboost-all-dev libssl-dev libzmq3-dev 
libunbound-dev libsodium-dev libunwind8-dev liblzma-dev libreadline6-dev 
libldns-dev libexpat1-dev libpgm-dev libhidapi-dev libusb-1.0-0-dev 
libprotobuf-dev protobuf-compiler libudev-dev

Longer explanation:

I have been experimenting with sid, using Docker (see attachement) and I was 
able to reproduce the problem, by simulating the list of dependencies, that 
occur in your build log (line 8 of the attached Dockerfile). The problem 
appears to be, that the Debian's dependency list is missing some of the boost 
libraries, needed to build Monero. The list above (and the only uncommented one 
in the Dockerfile) is the default, officially documented list. This list is 
being used in the Monero CI and it should serve as a pragmatic solution for you 
for the time being.

What I didn't have time to do, is to bisect the individual packages, in order 
to find the root cause of the problem, which might turn out to be simply a 
packaging problem.
I was looking for the optional_io.hpp file, mentioned in the error log, and it 
does appear to be available in the default 
[libboost1.74-dev](https://packages.debian.org/sid/libboost1.74-dev):
https://packages.debian.org/search?suite=sid=amd64=path=contents=optional_io.hpp
... so I got not more clues unfortunately.

In order to use the Dockerfile properly, please put it into the monero root 
source tree and run from the same directory:
sudo docker build -t monero .

I hope it helps.

MJ
Monero dev

Dockerfile
Description: Binary data