1
votes

First off I know there are several posts similar to this,but I am going to ask anyway. Is there a known problem with boost program_options::options_description in Debian "Buster" and Boost 1.67 packages?

I have code that was developed back in Debian 7, system upgraded to 8.3 then 8.11 now using Boost 1.55.

Code builds and runs. Now upgrade system to Debian Buster with Boost 1.67 and get the link errors for unresolved reference to options_description(const std::string& , unsigned int, unsigned int) along with several other program_options functions. All unresolved, expect the options_description, are from boost calling another boost function, so not even directly called from within my code. boost_program_options IS in the link line. I AM not a novice and understand link order and this has nothing to do with link order. I am going to try getting the source code for boost and building to see if that works, if not I will be building a system from scratch and testing against that. Since this is all on a closed network simply saying try a newer version of boost or Debian is not an option because I am contractually obligated to only use Debian "Buster" and Boost 1.67 as the newest revisions, so if the package is unavailable (newer) in Buster it is out of the question, without having a new contract be drafted and go through approvals which could take months.

So to the point of this question, is there an issue with the out of the box version of Boost in Buster?

1
tried adding a code example but kept getting an error in the insertion. - Gary Barnes
Check your link error carefully. I think, there should be some references to the old version of the boost, somewhere in the code. In other words, you use the new headers of boost 1.67, but old libs of 1.55. - Gupta
Old libs appear to have been removed via apt-get purge libboost* - Gary Barnes
Check your link errors. Make sure that you have the right references to boost libs. - Gupta
exact error is "unresolved reference to boost::program_options::options_description::options_description(const std::string& , unsigned int, unsigned int)" All libraries are 1.67.0 - Gary Barnes

1 Answers

0
votes

I don't think there's gonna be an issue with the package in Buster.

My best bet is that either

  1. you're relinking old objects with the new libraries - and they don't match (did you do a full make clean e.g. to eliminate this possibility?).

    Often build systems do not do complete header dependencies, so the build system might not notice that the boost headers changed, requiring the objects to be be rebuilt.

  2. if that doesn't explain it, there could be another version of boost on the include path, leading to the same problem as under #1 even when rebuilding.

    You could establish this by inspecting the command lines (make -Bsn or compile_commands.json e.g. depending on your tools). Another trick is to include boost/version.hpp and see what BOOST_VERSION evaluates to

  3. Lastly, there could be a problem where the library was built with different compiler version or compiler flags, leading to incompatible synbols (this is a QoI issue that you might want to report with the Boost Developers).

    This is assuming ABI/ODR issues, in case you want to validate this possibility.