qsimulate-open / bagel

Brilliantly Advanced General Electronic-structure Library
GNU General Public License v3.0
92 stars 44 forks source link

Add missing boost includes and fix ambiguous function call #229

Closed susilehtola closed 2 years ago

susilehtola commented 3 years ago

Fixes boost error

/usr/include/boost/property_tree/ptree_serialization.hpp:69:47: error: ‘library_version’ was not declared in this scope
shiozaki commented 3 years ago

Thanks - I will need you to sign the copyright transfer to QSimulate (or I will fix this by myself) if I were to merge this into the main branch.

susilehtola commented 3 years ago

Sure, what do I need to do? Looks like there's going to be a number of other changes too since GCC 11.1 is not happy :)

shiozaki commented 3 years ago

I will write an email to you tomorrow (also a reply to the other email)!

shiozaki commented 3 years ago

I think archive includes should be right before implementation of serialization. I will take a look when I have time - Generally this should not be included at random places just to make it compiled.

shiozaki commented 3 years ago

PS: I believe that this missing library_version is a bug in Boost that has to be fixed in Boost. I will think of least invasive way to have BAGEL compiled.

susilehtola commented 3 years ago

Yeah. It's also weird that I was able to build BAGEL manually after a few boost fixes, but when I do it via rpmbuild I get many more boost errors!

susilehtola commented 3 years ago

I see this has been a problem before: https://github.com/qsimulate-open/bagel/commit/4c0ab21158dbe1ef4373cce5735cc1392146386c

Boost is well-known to be problematic...

shiozaki commented 3 years ago

Yeah, I hate it (they sometimes even change the APIs), but replacing boost::serialization with software like Cereal requires a lot of effort... When I tried two years ago, I only figured out after a lot of work that Cereal could not serialize shared_ptr\<const T>... it seems that's been fixed now, if I get a summer intern I could ask her/him to remove Boost from bagel.

Ok I'll pull this branch and take a look soon. Just a quick question, what's your Boost version? I am assuming from the previous conversation that GCC version is 11.1

susilehtola commented 3 years ago
$ rpm -q gcc boost-devel 
gcc-11.1.1-3.fc34.x86_64
boost-devel-1.75.0-4.fc34.x86_64
shiozaki commented 2 years ago

(I have not forgotten, sorry taking time to work on this!!)

susilehtola commented 2 years ago

Not a problem, I almost forgot about this ;) The boost issue is the difficult part

shiozaki commented 2 years ago

Let me close this PR as it includes incorrect fix on legendre - but I am not forgotten... I will continue on #228

shiozaki commented 2 years ago

PS: it was not incorrect - sorry, but anyways I will continue on #228