Jump to content

ROSE Compiler Framework/boost

From Wikibooks, open books for an open world

Impact of Using Boost in ROSE

[edit | edit source]

The current way of using of Boost in ROSE has a love&hate impact. Some developers use Boost to simplify their work, but the cost is

  • one mandatory external dependency for all other (users and developers who don't use Boost at all) and
  • portability/maintenance issues (much of the limited supported GCC versions is caused by Boost libraries).

This page tries to document the boost libraries used by ROSE. Hopefully we can figure out why we must have each of them and if some can be made optional (not required by users who are not interested in the features a library supports)


To be crystal clear, we appreciate the Open Source Boost Community providing free and wonderful libraries. The issue is how we can better use Boost in ROSE to obtain a good balance of productivity, portability, and maintainability.

Action Items

[edit | edit source]

Make some less used libraries optional

  • thread
  • iostream
  • wave

Current dependent libraries

[edit | edit source]

http://www.boost.org/doc/libs/ lists 113 libraries as 1/24/2015. Fortunately, we don't require all of them!

Expected complete list -- Boost version: 1.45.0 -- Found the following Boost libraries:

--   date_time
--   filesystem
--   iostreams
--   program_options
--   regex
--   system
--   wave
--   thread

Code including boost

[edit | edit source]
demo@ubuntu:~/rose-edg4x.git/src$ grep -r  "<boost/" *

backend/asmUnparser/AsmFunctionIndex.C:#include <boost/shared_ptr.hpp>
backend/asmUnparser/unparseM68kAsm.C:#include <boost/foreach.hpp>
backend/asmUnparser/unparsePowerpcAsm.C:#include <boost/lexical_cast.hpp>
backend/unparser/JavaCodeGeneration/unparseJava_statements.C:#include <boost/foreach.hpp>
backend/unparser/unparser.C:#include <boost/algorithm/string.hpp>
backend/unparser/unparser.C:// #include <boost/test/unit_test.hpp>
backend/unparser/PythonCodeGeneration/unparsePython.C:#include <boost/foreach.hpp>
backend/unparser/X10CodeGeneration/unparseX10_statements.C:#include <boost/foreach.hpp>
frontend/ECJ_ROSE_Connection/jni_JavaSourceCodePosition.C:#include <boost/algorithm/string.hpp>
frontend/Partitioner2/Modules.C:#include <boost/algorithm/string/predicate.hpp>
frontend/Partitioner2/Modules.C:#include <boost/algorithm/string/replace.hpp>
frontend/Partitioner2/AddressUsageMap.h:#include <boost/foreach.hpp>
frontend/Partitioner2/Attribute.h:#include <boost/any.hpp>
frontend/Partitioner2/Partitioner.C:#include <boost/algorithm/string/predicate.hpp>
frontend/Partitioner2/Partitioner.C:#include <boost/foreach.hpp>
frontend/Partitioner2/ModulesM68k.C:#include <boost/foreach.hpp>
frontend/Partitioner2/ModulesPe.C:#include <boost/foreach.hpp>
frontend/Partitioner2/AddressUsageMap.C:#include <boost/foreach.hpp>
frontend/Partitioner2/ModulesElf.C:#include <boost/foreach.hpp>
frontend/Partitioner2/BasicBlock.C:#include <boost/foreach.hpp>
frontend/SageIII/rose_attributes_list.C:#include <boost/wave.hpp>
frontend/SageIII/rose_attributes_list.C:// #include <boost/wave/grammars/cpp_xpression_grammar.hpp> //as_string
frontend/SageIII/rose_graph_support.C:#include <boost/graph/adjacency_list.hpp>
frontend/SageIII/rose_graph_support.C:#include <boost/graph/kruskal_min_spanning_tree.hpp>
frontend/SageIII/attachPreprocessingInfo.C:#include <boost/wave.hpp>
frontend/SageIII/attachPreprocessingInfo.C:#include <boost/wave/cpplexer/cpp_lex_token.hpp>    // token class
frontend/SageIII/attachPreprocessingInfo.C:#include <boost/wave/cpplexer/cpp_lex_iterator.hpp> // lexer class
frontend/SageIII/attachPreprocessingInfo.C:#include <boost/filesystem.hpp>         // exsits()
frontend/SageIII/sage_support/sage_support.cpp:#include <boost/algorithm/string/join.hpp>
frontend/SageIII/sage_support/sage_support.cpp:#include <boost/filesystem.hpp>
frontend/SageIII/sage_support/sage_support.cpp:#include <boost/foreach.hpp>
frontend/SageIII/sage_support/cmdline.cpp:#include <boost/foreach.hpp>
frontend/SageIII/sage_support/cmdline.cpp:#include <boost/algorithm/string/replace.hpp>
frontend/SageIII/rose_attributes_list.h:    #include <boost/preprocessor/iteration/iterate.hpp> // Liao, 7/10/2009, required by GCC 4.4.0 for a #define line of BOOST_PP_ITERATION_DEPTH
frontend/SageIII/rose_attributes_list.h:      #include <boost/wave.hpp> // CH (4/7/2010): Put this header here to avoid compiling error about mismatch between definition and declaration
frontend/SageIII/rose_attributes_list.h:    #include <boost/wave/cpplexer/cpp_lex_token.hpp>    // token class
frontend/SageIII/rose_attributes_list.h:    #include <boost/wave/cpplexer/cpp_lex_iterator.hpp>   // lexer type
frontend/SageIII/advanced_preprocessing_hooks.h:#include <boost/assert.hpp>
frontend/SageIII/advanced_preprocessing_hooks.h:#include <boost/config.hpp>
frontend/SageIII/advanced_preprocessing_hooks.h:#include <boost/wave/token_ids.hpp>
frontend/SageIII/advanced_preprocessing_hooks.h:#include <boost/wave/util/macro_helpers.hpp>
frontend/SageIII/advanced_preprocessing_hooks.h:#include <boost/wave/preprocessing_hooks.hpp>
frontend/SageIII/sageInterface/sageBuilder_untypedNodes.C:#include <boost/algorithm/string/trim.hpp>
frontend/SageIII/sageInterface/sageBuilder.C:   #include <boost/algorithm/string/trim.hpp>
frontend/SageIII/sageInterface/sageBuilder.C:   #include <boost/foreach.hpp>
frontend/SageIII/sageInterface/sageBuilder.C:   #include <boost/algorithm/string/trim.hpp>
frontend/SageIII/sageInterface/sageBuilder.C:   #include <boost/foreach.hpp>
frontend/SageIII/sageInterface/sageBuilderAsm.C:#include <boost/foreach.hpp>
frontend/SageIII/sageInterface/sageInterface_type.C:#include <boost/foreach.hpp>
frontend/SageIII/sageInterface/sageBuilder_fortran.C:#include <boost/algorithm/string/trim.hpp>
frontend/SageIII/sageInterface/integerOps.h:#include <boost/static_assert.hpp>
frontend/SageIII/sageInterface/integerOps.h:#include <boost/optional.hpp>
frontend/SageIII/sageInterface/sageInterface.C:#include <boost/lexical_cast.hpp>
frontend/SageIII/sageInterface/sageInterface.C:#include <boost/foreach.hpp>
frontend/SageIII/rtiHelpers.h:#include <boost/lexical_cast.hpp>
frontend/SageIII/virtualCFG/staticCFG.C:#include <boost/foreach.hpp>
frontend/SageIII/virtualCFG/customFilteredCFG.C:#include <boost/foreach.hpp>
frontend/SageIII/virtualCFG/memberFunctions.C:#include <boost/foreach.hpp>
frontend/SageIII/virtualCFG/interproceduralCFG.C:#include <boost/foreach.hpp>
frontend/SageIII/astTokenStream/doCompleteMapping.h:#include <boost/tuple/tuple.hpp>
frontend/SageIII/astTokenStream/linearizeAST.C:#include <boost/lexical_cast.hpp>
frontend/SageIII/astTokenStream/tokenStreamMapping.C:// #include <boost/icl/interval_map.hpp>
frontend/SageIII/attributeListMap.h:#include <boost/wave.hpp>
frontend/SageIII/attributeListMap.h:#include <boost/wave/cpplexer/cpp_lex_token.hpp>    // token class
frontend/SageIII/attributeListMap.h:#include <boost/wave/cpplexer/cpp_lex_iterator.hpp> // lexer class
frontend/BinaryDisassembly/RoseBin_file.cpp:#include <boost/lexical_cast.hpp>
frontend/BinaryDisassembly/RoseBin_support.h:#include <boost/unordered_map.hpp>
frontend/BinaryDisassembly/RoseBin_support.h:#include <boost/unordered_set.hpp>
frontend/Disassemblers/PStatistics.C:#include <boost/graph/adjacency_list.hpp>
frontend/Disassemblers/PStatistics.C:#include <boost/graph/connected_components.hpp>
frontend/Disassemblers/PStatistics.C:#include <boost/math/special_functions/erf.hpp> // for erf
frontend/Disassemblers/BinaryDebugger.C:#include <boost/algorithm/string/case_conv.hpp>
frontend/Disassemblers/BinaryDebugger.C:#include <boost/config.hpp>
frontend/BinaryLoader/BinaryLoaderElf.C:#include <boost/regex.hpp>
frontend/BinaryLoader/BinaryLoaderElf.C:#include <boost/filesystem.hpp>
frontend/BinaryFormats/GenericFile.C:#include <boost/math/common_factor.hpp>
frontend/BinaryFormats/MemoryMap.C:#include <boost/filesystem.hpp>
frontend/BinaryFormats/MemoryMap.C:#include <boost/foreach.hpp>
frontend/BinaryFormats/MemoryMap.C:#include <boost/config.hpp>
frontend/BinaryFormats/ExtentMap.C:#include <boost/foreach.hpp>
frontend/BinaryFormats/SRecord.C:#include <boost/foreach.hpp>
frontend/BinaryFormats/WorkLists.h:#include <boost/logic/tribool.hpp>
midend/astDiagnostics/AstPerformance.C:#include <boost/thread.hpp>     // sleep()
midend/astSnippet/Snippet.h:#include <boost/shared_ptr.hpp>
midend/astSnippet/Snippet.h:#include <boost/enable_shared_from_this.hpp>
midend/astSnippet/Snippet.C:#include <boost/algorithm/string/erase.hpp>
midend/astSnippet/Snippet.C:#include <boost/algorithm/string/predicate.hpp>
midend/astSnippet/Snippet.C:#include <boost/algorithm/string/replace.hpp>
midend/astSnippet/Snippet.C:#include <boost/algorithm/string/split.hpp>
midend/astSnippet/Snippet.C:#include <boost/algorithm/string/trim.hpp>
midend/astSnippet/Snippet.C:#include <boost/filesystem.hpp>
midend/astSnippet/Snippet.C:#include <boost/foreach.hpp>
midend/astSnippet/Snippet.C:#include <boost/lexical_cast.hpp>
midend/astSnippet/Snippet.C:#include <boost/regex.hpp>
midend/programAnalysis/staticSingleAssignment/staticSingleAssignmentInterprocedural.C:#include <boost/timer.hpp>
midend/programAnalysis/staticSingleAssignment/iteratedDominanceFrontier.h:#include <boost/foreach.hpp>
midend/programAnalysis/staticSingleAssignment/iteratedDominanceFrontier.h:#include <boost/graph/adjacency_list.hpp>
midend/programAnalysis/staticSingleAssignment/iteratedDominanceFrontier.h:#include <boost/graph/topological_sort.hpp>
midend/programAnalysis/staticSingleAssignment/reachingDef.C:#include <boost/foreach.hpp>
midend/programAnalysis/staticSingleAssignment/reachingDef.C:#include <boost/unordered_set.hpp>
midend/programAnalysis/staticSingleAssignment/reachingDef.C:#include <boost/tuple/tuple.hpp>
midend/programAnalysis/staticSingleAssignment/controlDependence.h:#include <boost/foreach.hpp>
midend/programAnalysis/staticSingleAssignment/staticSingleAssignment.h:#include <boost/foreach.hpp>
midend/programAnalysis/staticSingleAssignment/staticSingleAssignment.h:#include <boost/unordered_map.hpp>
midend/programAnalysis/staticSingleAssignment/staticSingleAssignmentQueries.C:#include <boost/foreach.hpp>
midend/programAnalysis/staticSingleAssignment/boostGraphCFG.h:#include <boost/graph/adjacency_list.hpp>
midend/programAnalysis/staticSingleAssignment/boostGraphCFG.h:#include <boost/bind.hpp>
midend/programAnalysis/staticSingleAssignment/boostGraphCFG.h:#include <boost/foreach.hpp>
midend/programAnalysis/staticSingleAssignment/boostGraphCFG.h:#include <boost/tuple/tuple.hpp>
midend/programAnalysis/staticSingleAssignment/boostGraphCFG.h:#include <boost/graph/graphviz.hpp>
midend/programAnalysis/staticSingleAssignment/boostGraphCFG.h:#include <boost/graph/dominator_tree.hpp>
midend/programAnalysis/staticSingleAssignment/boostGraphCFG.h:#include <boost/graph/reverse_graph.hpp>
midend/programAnalysis/staticSingleAssignment/boostGraphCFG.h:#include <boost/graph/transpose_graph.hpp>
midend/programAnalysis/staticSingleAssignment/boostGraphCFG.h:#include <boost/algorithm/string.hpp>
midend/programAnalysis/staticSingleAssignment/uniqueNameTraversal.C:#include <boost/foreach.hpp>
midend/programAnalysis/staticSingleAssignment/staticSingleAssignmentCalculation.C:#include <boost/timer.hpp>
midend/programAnalysis/staticSingleAssignment/staticSingleAssignmentCalculation.C:#include <boost/foreach.hpp>
midend/programAnalysis/staticSingleAssignment/staticSingleAssignmentCalculation.C:#include <boost/unordered_set.hpp>
midend/programAnalysis/staticSingleAssignment/staticSingleAssignmentCalculation.C:#include <boost/tuple/tuple.hpp>
midend/programAnalysis/staticSingleAssignment/reachingDef.h:#include <boost/shared_ptr.hpp>
midend/programAnalysis/staticSingleAssignment/defsAndUsesTraversal.C:#include <boost/foreach.hpp>
midend/programAnalysis/sideEffectAnalysis/sideEffect.C:#include <boost/unordered_map.hpp>
midend/programAnalysis/sideEffectAnalysis/sideEffect.C:#include <boost/unordered_set.hpp>
midend/programAnalysis/sideEffectAnalysis/sideEffect.C:#include <boost/config.hpp>
midend/programAnalysis/sideEffectAnalysis/SqliteDatabaseGraph.h:#include <boost/graph/graphviz.hpp>
midend/programAnalysis/ssaUnfilteredCfg/reachingDefUnfilteredCfg.C:#include <boost/foreach.hpp>
midend/programAnalysis/ssaUnfilteredCfg/reachingDefUnfilteredCfg.C:#include <boost/unordered_set.hpp>
midend/programAnalysis/ssaUnfilteredCfg/reachingDefUnfilteredCfg.C:#include <boost/tuple/tuple.hpp>
midend/programAnalysis/ssaUnfilteredCfg/ssaUnfilteredCfgQueries.C:#include <boost/foreach.hpp>
midend/programAnalysis/ssaUnfilteredCfg/defsAndUsesUnfilteredCfg.C:#include <boost/foreach.hpp>
midend/programAnalysis/ssaUnfilteredCfg/reachingDefUnfilteredCfg.h:#include <boost/shared_ptr.hpp>
midend/programAnalysis/ssaUnfilteredCfg/ssaUnfilteredCfgCalculation.C:#include <boost/timer.hpp>
midend/programAnalysis/ssaUnfilteredCfg/ssaUnfilteredCfgCalculation.C:#include <boost/foreach.hpp>
midend/programAnalysis/ssaUnfilteredCfg/ssaUnfilteredCfgCalculation.C:#include <boost/unordered_set.hpp>
midend/programAnalysis/ssaUnfilteredCfg/ssaUnfilteredCfgCalculation.C:#include <boost/tuple/tuple.hpp>
midend/programAnalysis/ssaUnfilteredCfg/ssaUnfilteredCfg.h:#include <boost/foreach.hpp>
midend/programAnalysis/ssaUnfilteredCfg/ssaUnfilteredCfg.h:#include <boost/unordered_map.hpp>
midend/programAnalysis/CallGraphAnalysis/CallGraphDB.C:#include <boost/lexical_cast.hpp>
midend/programAnalysis/CallGraphAnalysis/CallGraph.C:#include <boost/foreach.hpp>
midend/programAnalysis/CallGraphAnalysis/CallGraph.h:#include <boost/foreach.hpp>
midend/programAnalysis/CallGraphAnalysis/CallGraph.h:#include <boost/unordered_map.hpp>
midend/programAnalysis/CallGraphAnalysis/ClassHierarchyGraph.h:#include <boost/unordered_set.hpp>
midend/programAnalysis/CallGraphAnalysis/ClassHierarchyGraph.C:#include <boost/foreach.hpp>
midend/programAnalysis/CallGraphAnalysis/ClassHierarchyGraph.C:#include <boost/tuple/tuple.hpp>
midend/programAnalysis/defUseAnalysis/DefUseAnalysis.cpp:#include <boost/config.hpp>
midend/programAnalysis/defUseAnalysis/DefUseAnalysis.cpp:#include <boost/bind.hpp>
midend/programAnalysis/defUseAnalysis/DefUseAnalysis.h:#include <boost/unordered_map.hpp>
midend/programAnalysis/defUseAnalysis/DefUseAnalysis.h:#include <boost/unordered_set.hpp>
midend/programAnalysis/defUseAnalysis/LivenessAnalysis.cpp:#include <boost/config.hpp>
midend/programAnalysis/defUseAnalysis/LivenessAnalysis.cpp:#include <boost/bind.hpp>
midend/programAnalysis/pointerAnal/PtrAnal.h:#include <boost/unordered_map.hpp>
midend/programAnalysis/EditDistance/TreeEditDistance.C:#include <boost/graph/dijkstra_shortest_paths.hpp>
midend/programAnalysis/EditDistance/TreeEditDistance.h:#include <boost/graph/adjacency_list.hpp>
midend/programAnalysis/EditDistance/TreeEditDistance.h:#include <boost/graph/graph_traits.hpp>
midend/programAnalysis/genericDataflow/simpleAnalyses/divAnalysis.C:#include <boost/bind.hpp>
midend/programAnalysis/genericDataflow/simpleAnalyses/divAnalysis.C:#include <boost/mem_fn.hpp>
midend/programAnalysis/genericDataflow/analysis/dataflow.h:#include <boost/shared_ptr.hpp>
midend/programAnalysis/genericDataflow/analysis/dataflow.C:#include <boost/mem_fn.hpp>
midend/programAnalysis/variableRenaming/VariableRenaming.C:#include <boost/foreach.hpp>
midend/programAnalysis/variableRenaming/VariableRenaming.C:#include <boost/unordered_set.hpp>
midend/programAnalysis/variableRenaming/VariableRenaming.h:#include <boost/foreach.hpp>
midend/programAnalysis/variableRenaming/VariableRenaming.h:#include <boost/unordered_map.hpp>
midend/programAnalysis/systemDependenceGraph/SDG.h:#include <boost/function.hpp>
midend/programAnalysis/systemDependenceGraph/SDG.h:#include <boost/unordered_map.hpp>
midend/programAnalysis/systemDependenceGraph/newDDG.C:#include <boost/bind.hpp>
midend/programAnalysis/systemDependenceGraph/newDDG.C:#include <boost/lambda/lambda.hpp>
midend/programAnalysis/systemDependenceGraph/newDDG.C:#include <boost/graph/graphviz.hpp>
midend/programAnalysis/systemDependenceGraph/newDDG.C:#include <boost/unordered_set.hpp>
midend/programAnalysis/systemDependenceGraph/SDG.C:#include <boost/algorithm/string.hpp>
midend/programAnalysis/systemDependenceGraph/SDG.C:#include <boost/bind.hpp>
midend/programAnalysis/systemDependenceGraph/SDG.C:#include <boost/foreach.hpp>
midend/programAnalysis/systemDependenceGraph/SDG.C:#include <boost/lambda/lambda.hpp>
midend/programAnalysis/systemDependenceGraph/SDG.C:#include <boost/graph/depth_first_search.hpp>
midend/programAnalysis/systemDependenceGraph/SDG.C:#include <boost/graph/graphviz.hpp>
midend/programAnalysis/systemDependenceGraph/cong_staticCFG.h:#include <boost/function.hpp>
midend/programAnalysis/systemDependenceGraph/cong_staticCFG.h:#include <boost/graph/adjacency_list.hpp>
midend/programAnalysis/systemDependenceGraph/cong_staticCFG.h:#include <boost/shared_ptr.hpp>
midend/programAnalysis/systemDependenceGraph/staticCFG.C:#include <boost/algorithm/string.hpp>
midend/programAnalysis/systemDependenceGraph/staticCFG.C:#include <boost/bind.hpp>
midend/programAnalysis/systemDependenceGraph/staticCFG.C:#include <boost/foreach.hpp>
midend/programAnalysis/systemDependenceGraph/staticCFG.C:#include <boost/graph/dominator_tree.hpp>
midend/programAnalysis/systemDependenceGraph/staticCFG.C:#include <boost/graph/graphviz.hpp>
midend/programAnalysis/systemDependenceGraph/staticCFG.C:#include <boost/graph/reverse_graph.hpp>
midend/programAnalysis/systemDependenceGraph/staticCFG.C:#include <boost/graph/transpose_graph.hpp>
midend/programAnalysis/systemDependenceGraph/staticCFG.C:#include <boost/tuple/tuple.hpp>
midend/programAnalysis/systemDependenceGraph/util.C:#include <boost/foreach.hpp>
midend/programAnalysis/systemDependenceGraph/util.C:#include <boost/graph/strong_components.hpp>
midend/programAnalysis/systemDependenceGraph/newCDG.C:#include <boost/bind.hpp>
midend/programAnalysis/systemDependenceGraph/newCDG.C:#include <boost/foreach.hpp>
midend/programAnalysis/systemDependenceGraph/newCDG.C:#include <boost/graph/graph_utility.hpp>
midend/programAnalysis/systemDependenceGraph/newCDG.C:#include <boost/graph/graphviz.hpp>
midend/programAnalysis/systemDependenceGraph/newCDG.C:#include <boost/graph/strong_components.hpp>
midend/programAnalysis/systemDependenceGraph/newCDG.C:#include <boost/tuple/tuple.hpp>
midend/programAnalysis/systemDependenceGraph/PDG.C:#include <boost/bind.hpp>
midend/programAnalysis/systemDependenceGraph/PDG.C:#include <boost/foreach.hpp>
midend/programAnalysis/systemDependenceGraph/PDG.C:#include <boost/lambda/lambda.hpp>
midend/programAnalysis/systemDependenceGraph/PDG.C:#include <boost/graph/graphviz.hpp>
midend/programAnalysis/systemDependenceGraph/defUseChains.C:#include <boost/foreach.hpp>
midend/programAnalysis/VirtualFunctionAnalysis/IntraProcAliasAnalysis.h:#include <boost/foreach.hpp>
midend/programAnalysis/VirtualFunctionAnalysis/IntraProcAliasAnalysis.h:#include <boost/shared_ptr.hpp>
midend/programAnalysis/VirtualFunctionAnalysis/IntraProcAliasAnalysis.h:#include <boost/unordered_map.hpp>
midend/programAnalysis/VirtualFunctionAnalysis/InterProcDataFlowAnalysis.C:#include <boost/foreach.hpp>
midend/programTransformation/astOutlining/PragmaInterface.cc:#include <boost/algorithm/string/trim.hpp>
midend/programTransformation/extractFunctionArgumentsNormalization/ExtractFunctionArguments.C:#include <boost/foreach.hpp>
midend/programTransformation/extractFunctionArgumentsNormalization/ExtractFunctionArguments.C:#include <boost/tuple/tuple.hpp>
midend/astQuery/nodeQuery.C:#include <boost/bind.hpp>
midend/astProcessing/SgGraphTemplate.h:#include <boost/graph/adjacency_list.hpp>
midend/astProcessing/SgGraphTemplate.h:#include <boost/graph/astar_search.hpp>
midend/astProcessing/AstAttributeMechanism.C:#include <boost/numeric/conversion/cast.hpp>
midend/astProcessing/graphTemplate.h:#include <boost/graph/adjacency_list.hpp>
midend/astProcessing/graphTemplate.h:#include <boost/bind.hpp>
midend/astProcessing/graphTemplate.h:#include <boost/foreach.hpp>
midend/astProcessing/graphTemplate.h:#include <boost/tuple/tuple.hpp>
midend/astProcessing/graphTemplate.h:#include <boost/graph/graphviz.hpp>
midend/astProcessing/graphTemplate.h:#include <boost/graph/dominator_tree.hpp>
midend/astProcessing/graphTemplate.h:#include <boost/graph/reverse_graph.hpp>
midend/astProcessing/graphTemplate.h:#include <boost/graph/transpose_graph.hpp>
midend/astProcessing/graphTemplate.h:#include <boost/algorithm/string.hpp>
midend/astProcessing/graphProcessingSgIncGraph.h:#include <boost/regex.hpp> 
midend/astProcessing/graphProcessing.h:#include <boost/regex.hpp>
midend/astProcessing/graphProcessing.h:#include <boost/graph/adjacency_list.hpp>
midend/astProcessing/graphProcessing.h:#include <boost/bind.hpp>
midend/astProcessing/graphProcessing.h:#include <boost/foreach.hpp>
midend/astProcessing/graphProcessing.h:#include <boost/tuple/tuple.hpp>
midend/astProcessing/graphProcessing.h:#include <boost/graph/graphviz.hpp>
midend/astProcessing/graphProcessing.h:#include <boost/graph/dominator_tree.hpp>
midend/astProcessing/graphProcessing.h:#include <boost/graph/reverse_graph.hpp>
midend/astProcessing/graphProcessing.h:#include <boost/graph/transpose_graph.hpp>
midend/astProcessing/graphProcessing.h:#include <boost/algorithm/string.hpp>
midend/abstractLayer/VariableIdMapping.h:#include <boost/unordered_set.hpp>
midend/binaryAnalyses/BinaryControlFlow.h:#include <boost/foreach.hpp>
midend/binaryAnalyses/BinaryControlFlow.h:#include <boost/graph/adjacency_list.hpp>
midend/binaryAnalyses/BinaryControlFlow.h:#include <boost/graph/reverse_graph.hpp>
midend/binaryAnalyses/BinaryControlFlow.h:#include <boost/graph/depth_first_search.hpp>
midend/binaryAnalyses/BinaryTaintedFlow.h:#include <boost/foreach.hpp>
midend/binaryAnalyses/BinaryTaintedFlow.h:#include <boost/shared_ptr.hpp>
midend/binaryAnalyses/BinaryReturnValueUsed.C:#include <boost/algorithm/string/erase.hpp>
midend/binaryAnalyses/BinaryReturnValueUsed.C:#include <boost/algorithm/string/predicate.hpp>
midend/binaryAnalyses/BinaryReturnValueUsed.C:#include <boost/foreach.hpp>
midend/binaryAnalyses/BinaryDominance.h:#include <boost/graph/depth_first_search.hpp>
midend/binaryAnalyses/BinaryDominance.h:#include <boost/graph/reverse_graph.hpp>
midend/binaryAnalyses/BinaryDataFlow.h:#include <boost/foreach.hpp>
midend/binaryAnalyses/BinaryDataFlow.h:#include <boost/lexical_cast.hpp>
midend/binaryAnalyses/BinaryControlFlow.C:#include <boost/graph/depth_first_search.hpp>
midend/binaryAnalyses/instructionSemantics/DispatcherM68k.C:#include <boost/foreach.hpp>
midend/binaryAnalyses/instructionSemantics/findConstants.h:#include <boost/lexical_cast.hpp>
midend/binaryAnalyses/instructionSemantics/BaseSemantics2.h:#include <boost/shared_ptr.hpp>
midend/binaryAnalyses/instructionSemantics/BaseSemantics2.h:#include <boost/enable_shared_from_this.hpp>
midend/binaryAnalyses/instructionSemantics/BaseSemantics2.h:#include <boost/optional.hpp>
midend/binaryAnalyses/instructionSemantics/DataFlowSemantics2.h:#include <boost/foreach.hpp>
midend/binaryAnalyses/binary_analysis.C:#include <boost/lexical_cast.hpp>
midend/binaryAnalyses/libraryIdentification/functionIdentification.C:#include <boost/lexical_cast.hpp>
roseExtensions/roseHPCToolkit/src/profir/profir.cc:#include <boost/lexical_cast.hpp> // DXN: converting int to string
roseExtensions/roseHPCToolkit/src/gprof/gprof_info.cc:#include <boost/version.hpp>
roseExtensions/roseHPCToolkit/src/gprof/gprof_info.cc: #include <boost/spirit/include/classic_core.hpp>
roseExtensions/roseHPCToolkit/src/gprof/gprof_info.cc: #include <boost/spirit.hpp>
roseExtensions/sqlite3x/sqlite3x.h:#include <boost/utility.hpp>
roseExtensions/qtWidgets/util/LCS.cpp:#include <boost/algorithm/string.hpp>
roseExtensions/qtWidgets/util/LCS.h:#include <boost/smart_ptr.hpp>
roseSupport/SqlDatabase.h:#include <boost/enable_shared_from_this.hpp>
roseSupport/SqlDatabase.h:#include <boost/shared_ptr.hpp>
roseSupport/SqlDatabase.C:#include <boost/regex.hpp>
roseSupport/SqlDatabase.C:#include <boost/algorithm/string.hpp>
roseSupport/SqlDatabase.C:#include <boost/algorithm/string/regex.hpp>
ROSETTA/Grammar/Support.code:#include <boost/graph/adjacency_list.hpp>
ROSETTA/Grammar/Support.code:#include <boost/graph/kruskal_min_spanning_tree.hpp>
ROSETTA/Grammar/Node.code:#include <boost/unordered_map.hpp>
ROSETTA/Grammar/Node.code:#include <boost/unordered_set.hpp>
util/stringSupport/string_functions.cpp:#include <boost/foreach.hpp>
util/stringSupport/string_functions.cpp:#include <boost/lexical_cast.hpp>
util/stringSupport/FileNameClassifier.C:#include <boost/foreach.hpp>
util/stringSupport/FileNameClassifier.C:#include <boost/filesystem.hpp>
util/stringSupport/FileNameClassifier.C:#include <boost/version.hpp>
util/ParallelSort.h:#include <boost/thread.hpp>
util/commandlineProcessing/sla++.C: #include <boost/regex.h>
util/commandlineProcessing/commandline_processing.C:# include <boost/lexical_cast.hpp>
util/Map.h:#include <boost/optional.hpp>
Binary file util/support/.FileHelper.h.swp matches
util/support/FileHelper.h:#include <boost/filesystem.hpp>
util/sawyer/BitVector.h:#include <boost/cstdint.hpp>
util/sawyer/IntervalSet.h:#include <boost/integer_traits.hpp>
util/sawyer/IntervalSet.h:#include <boost/iterator/iterator_facade.hpp>
util/sawyer/Markup.C:#include <boost/foreach.hpp>
util/sawyer/Markup.C:#include <boost/lexical_cast.hpp>
util/sawyer/Stopwatch.C:#   include <boost/chrono/duration.hpp>
util/sawyer/Stopwatch.C:#   include <boost/chrono/system_clocks.hpp>
util/sawyer/IndexedList.h:#include <boost/range/iterator_range.hpp>
util/sawyer/GraphBoost.h:#include <boost/graph/graph_traits.hpp>
util/sawyer/GraphBoost.h:#include <boost/graph/properties.hpp>
util/sawyer/CommandLine.C:#include <boost/algorithm/string/case_conv.hpp>
util/sawyer/CommandLine.C:#include <boost/algorithm/string/join.hpp>
util/sawyer/CommandLine.C:#include <boost/algorithm/string/predicate.hpp>
util/sawyer/CommandLine.C:#include <boost/algorithm/string/regex.hpp>
util/sawyer/CommandLine.C:#include <boost/algorithm/string/trim.hpp>
util/sawyer/CommandLine.C:#include <boost/config.hpp>
util/sawyer/CommandLine.C:#include <boost/foreach.hpp>
util/sawyer/CommandLine.C:#include <boost/numeric/conversion/cast.hpp>
util/sawyer/CommandLine.C:#include <boost/regex.hpp>
util/sawyer/ProgressBar.C:#include <boost/numeric/conversion/cast.hpp>
util/sawyer/AllocatingBuffer.h:#include <boost/lexical_cast.hpp>
util/sawyer/AddressSegment.h:#include <boost/cstdint.hpp>
util/sawyer/MappedBuffer.h:#include <boost/iostreams/device/mapped_file.hpp>
util/sawyer/MappedBuffer.h:#include <boost/lexical_cast.hpp>
util/sawyer/IntervalMap.h:#include <boost/cstdint.hpp>
util/sawyer/Stopwatch.h:# include <boost/chrono/duration.hpp>
util/sawyer/Stopwatch.h:# include <boost/chrono/system_clocks.hpp>
util/sawyer/Graph.h:#include <boost/range/iterator_range.hpp>
util/sawyer/Message.C:#include <boost/algorithm/string/case_conv.hpp>
util/sawyer/Message.C:#include <boost/algorithm/string/classification.hpp>
util/sawyer/Message.C:#include <boost/algorithm/string/find.hpp>
util/sawyer/Message.C:#include <boost/algorithm/string/predicate.hpp>
util/sawyer/Message.C:#include <boost/config.hpp>
util/sawyer/Message.C:#include <boost/foreach.hpp>
util/sawyer/Message.C:#   include <boost/chrono.hpp>
util/sawyer/AddressMap.h:#include <boost/algorithm/string/predicate.hpp>
util/sawyer/AddressMap.h:#include <boost/cstdint.hpp>
util/sawyer/AddressMap.h:#include <boost/foreach.hpp>
util/sawyer/AddressMap.h:#include <boost/integer_traits.hpp>
util/sawyer/AddressMap.h:#include <boost/lexical_cast.hpp>
util/sawyer/DistinctList.h:#include <boost/foreach.hpp>
util/sawyer/Sawyer.h:#include <boost/cstdint.hpp>
util/sawyer/Sawyer.h://     BOOST_WINDOWS    The Windows API is present.  This is defined (or not) by including <boost/config.hpp>.
util/sawyer/Map.h:#include <boost/range/iterator_range.hpp>
util/sawyer/BitVectorSupport.h:#include <boost/cstdint.hpp>
util/sawyer/BitVectorSupport.h:#include <boost/lexical_cast.hpp>
util/sawyer/PoolAllocator.h:#include <boost/foreach.hpp>
util/sawyer/PoolAllocator.h:#include <boost/static_assert.hpp>
util/sawyer/PoolAllocator.h:#include <boost/cstdint.hpp>
util/sawyer/MarkupPod.C:#include <boost/foreach.hpp>
util/sawyer/Message.h:#include <boost/config.hpp>
util/sawyer/Message.h:#include <boost/logic/tribool.hpp>
util/sawyer/Interval.h:#include <boost/integer_traits.hpp>
util/sawyer/CommandLine.h:#include <boost/algorithm/string/case_conv.hpp>
util/sawyer/CommandLine.h:#include <boost/any.hpp>
util/sawyer/CommandLine.h:#include <boost/cstdint.hpp>
util/sawyer/CommandLine.h:#include <boost/foreach.hpp>
util/sawyer/CommandLine.h:#include <boost/lexical_cast.hpp>
util/sawyer/CommandLine.h:#include <boost/numeric/conversion/cast.hpp>
util/GraphUtility.h:#include <boost/cstdint.hpp>

iostreams

[edit | edit source]

The boost::iostreams is currently used only in the binary analysis parts of ROSE, and only for its portable (Windows + Unix) implementation of memory mapping. But the default boost installation process may not install it due to some unmet dependence.

Code using iostreams

  • util/sawyer/MappedBuffer.h:#include <boost/iostreams/device/mapped_file.hpp>

Cannot find error

[edit | edit source]

If you see errors about missing iostreams, you can

  • Option 1: Configure ROSE without binary analysis support, rerun the configuration command you just used, but this time add the "--enable-binary-analysis=no" switch. this library should not bother you anymore.
  • Option 2: install iostreams: need libbz2 and zlib to install or it will be be built.
    • sudo apt-get install zlibc zlib1g zlib1g-dev libbz2-dev
    • Still have iostreams installed without bz2 and zlib: when you compile boost and your system doesn't have all boost's prerequisites installed, you need to tell it that by adding -sNO_BZIP2=1 -sNO_ZLIB=1 to boost's configuration command line. I think "-sNO_COMPRESSION=1" works also.


More information

demo@ubuntu:~/rose-edg4x.git/src$ grep -r  wave.hpp *
frontend/SageIII/rose_attributes_list.C:#include <boost/wave.hpp>
frontend/SageIII/attachPreprocessingInfo.C:#include <boost/wave.hpp>
frontend/SageIII/rose_attributes_list.h:      #include <boost/wave.hpp> // CH (4/7/2010): Put this header here to avoid compiling error about mismatch between definition and declaration
frontend/SageIII/attributeListMap.h:#include <boost/wave.hpp>

filesystem

[edit | edit source]

grep -r filesystem.hpp *

frontend/OpenFortranParser_SAGE_Connection/FortranModuleInfo.C:#include "boost/filesystem.hpp"
frontend/SageIII/attachPreprocessingInfo.C:#include <boost/filesystem.hpp>         // exsits()
frontend/SageIII/sage_support/sage_support.cpp:#include <boost/filesystem.hpp>
frontend/SageIII/sage_support/sage_support.h:#include "boost/filesystem.hpp"
frontend/BinaryLoader/BinaryLoaderElf.C:#include <boost/filesystem.hpp>
frontend/BinaryFormats/MemoryMap.C:#include <boost/filesystem.hpp>
midend/astSnippet/Snippet.C:#include <boost/filesystem.hpp>
midend/programTransformation/astOutlining/Outliner.cc:#include "boost/filesystem.hpp"
util/stringSupport/FileNameClassifier.C:#include <boost/filesystem.hpp>
Binary file util/support/.FileHelper.h.swp matches
util/support/FileHelper.h:#include <boost/filesystem.hpp>

Example use src/util/support/FileHelper.h

412795ae (Stanislav Negara 2011-07-15 15:13:34 -0700  16) #include <boost/filesystem.hpp>
412795ae (Stanislav Negara 2011-07-15 15:13:34 -0700  17) 
412795ae (Stanislav Negara 2011-07-15 15:13:34 -0700  18) #include <string>

no member named generic_string

[edit | edit source]

Related error messages

In file included from ../../../../../rose-edg4x.git/src/frontend/SageIII/includeDirectivesProcessing/CompilerOutputParser.C:10:0:
../../../../../rose-edg4x.git/src/util/support/FileHelper.h: In static member function 'static std::string FileHelper::getFileName(const string&)':
../../../../../rose-edg4x.git/src/util/support/FileHelper.h:70:37: error: 'boost::filesystem2::basic_path<std::basic_string<char>, boost::filesystem2::path_traits>::string_type' has no member named 'generic_string'
         return boostPath.filename().generic_string();
                                     ^
../../../../../rose-edg4x.git/src/util/support/FileHelper.h: In static member function 'static std::string FileHelper::getRelativePath(const string&, const string&)':
../../../../../rose-edg4x.git/src/util/support/FileHelper.h:140:45: error: 'const class std::basic_string<char>' has no member named 'generic_string'
             relativePath += toPathIterator->generic_string(); //The first path element comes without the leading path delimiter
                                             ^
../../../../../rose-edg4x.git/src/util/support/FileHelper.h:155:65: error: 'const class std::basic_string<char>' has no member named 'generic_string'
                 relativePath += pathDelimiter + toPathIterator->generic_string();
                                                                 ^
In file included from /home/demo/opt/boost_1.45.0_inst/include/boost/system/system_error.hpp:14:0,
                 from /home/demo/opt/boost_1.45.0_inst/include/boost/filesystem/v2/path.hpp:21,
                 from /home/demo/opt/boost_1.45.0_inst/include/boost/filesystem.hpp:26,
                 from ../../../../../rose-edg4x.git/src/util/support/FileHelper.h:16,
                 from ../../../../../rose-edg4x.git/src/frontend/SageIII/includeDirectivesProcessing/CompilerOutputParser.C:10:


relevant code src/util/support/FileHelper.h


// DQ (3/8/2014): Adding use of BACKEND_CXX_IS_INTEL_COMPILER to support Intel compiler for backend use.
// DQ (2/10/2014): I have fixed boost filesystem 3 issues so we now want to avoid specifying this explicitly if possible.
// Non-windows support should used boost filesystem 2 if using GNU version less than 4.7.
#ifndef _MSC_VER
// #if ((BACKEND_CXX_COMPILER_MAJOR_VERSION_NUMBER == 4) && (BACKEND_CXX_COMPILER_MINOR_VERSION_NUMBER < 7))
#if (defined(BACKEND_CXX_IS_INTEL_COMPILER) || ((BACKEND_CXX_COMPILER_MAJOR_VERSION_NUMBER == 4) && (BACKEND_CXX_COMPILER_MINOR_VERSION_NUMBER < 7)))
  #define BOOST_FILESYSTEM_VERSION 2
#endif
#else
// Windows support should be using boost file system 2 (for now).
  #define BOOST_FILESYSTEM_VERSION 2
#endif


412795ae (Stanislav Negara 2011-07-15 15:13:34 -0700  16) #include <boost/filesystem.hpp>
412795ae (Stanislav Negara 2011-07-15 15:13:34 -0700  17) 
412795ae (Stanislav Negara 2011-07-15 15:13:34 -0700  18) #include <string>
412795ae (Stanislav Negara 2011-07-15 15:13:34 -0700  19) 
412795ae (Stanislav Negara 2011-07-15 15:13:34 -0700  20) using namespace std;
412795ae (Stanislav Negara 2011-07-15 15:13:34 -0700  21) using namespace boost::filesystem;


#ifndef _MSC_VER
// DQ (3/8/2014): Adding use of BACKEND_CXX_IS_INTEL_COMPILER to support Intel compiler for backend use.
// #if ((BACKEND_CXX_COMPILER_MAJOR_VERSION_NUMBER == 4) && (BACKEND_CXX_COMPILER_MINOR_VERSION_NUMBER < 7))
#if (defined(BACKEND_CXX_IS_INTEL_COMPILER) || ((BACKEND_CXX_COMPILER_MAJOR_VERSION_NUMBER == 4) && (BACKEND_CXX_COMPILER_MINOR_VERSION_NUMBER < 7)))
         // DQ (2/10/2014): I think this is the older BOOST_FILESYSTEM_VERSION 2 specific code.
            relativePath += *toPathIterator; //The first path element comes without the leading path delimiter
#else
         // DQ (2/10/2014): I think this is the BOOST_FILESYSTEM_VERSION 3 fix.
            relativePath += toPathIterator->generic_string(); //The first path element comes without the leading path delimiter
#endif
#else
         // DQ (2/10/2014): I think this is the older BOOST_FILESYSTEM_VERSION 2 specific code.
            relativePath += *toPathIterator; //The first path element comes without the leading path delimiter
#endif

thread

[edit | edit source]

boost thread 1.45-1.47 cannot be installed with gcc 4.7 and after. Some patches are needed.


code using boost thread

[edit | edit source]

demo@ubuntu:~/rose-edg4x.git/src$ grep -r thread.hpp *

 midend/astDiagnostics/AstPerformance.C:#include <boost/thread.hpp>     // sleep()
 util/ParallelSort.h:#include <boost/thread.hpp>


xtime.hpp error TIME_UTC

[edit | edit source]

from /home/demo/development/priv-rose-codethorn/src/frontend/SageIII/attachPreprocessingInfo.C:30:

/home/demo/development/install/gcc-4.4.7/boost-1.45.0/include/boost/thread/xtime.hpp:23: error: expected identifier before numeric constant

WORKAROUND: in file boost/thread/xtime.hpp WORKAROUND THAT DOES WORK FOR THREAD AND WAVE:

only undefine the C11 macro: (the following 3 lines are new, followed by the existing troublesome enum in the file)

#ifdef TIME_UTC
#undef TIME_UTC
#endif

enum xtime_clock_types
{
    TIME_UTC=1
};

PS: you will also find that people fixed it by renaming the variable. This leads to errors in some libs later. Therefore I used my above workaround.

self disabled for gcc 4.7 and after

[edit | edit source]

Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS

  • I was lucky to even catch this message. It was buried in the earlier process of screen output and quickly disappeared. It would be more help to show this in the end when screen output is stopped!!

http://stackoverflow.com/questions/8297652/error-boost-disable-threads

GCC doesn't "disable" anything, Boost.Threads 1.47 failed to correctly detect thread support in the compiler, because the undocumented implementation detail that Boost relied on changed. This is also nothing to do with experimental vs release versions, the same applies to all versions of 4.7

To define 'threads' support,

GCC <= 4.6 defines _GLIBCXX__PTHREADS whereas GCC >= 4.7 defines _GLIBCXX_HAS_GTHREADS. So, in order to compile older Boosts using any GCC more recent than 4.6 you need the patch libstdcpp3.hpp.patch enclosed in that ticket. Another problem that could also prevent Boost on working with modern compiler is ticket 6940 (TIME_UTC has a special meanhing in C11, therefore Boost >= 1.50 use TIME_UTC_ instead)

patch for boost/config/stdlib/libstdcpp3.hpp

33	33	 
34	34	#ifdef __GLIBCXX__ // gcc 3.4 and greater: 
35	35	#  if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \ 
36	 	        || defined(_GLIBCXX__PTHREADS) 
 	36	        || defined(_GLIBCXX__PTHREADS) \ 
 	37	        || defined(_GLIBCXX_HAS_GTHREADS) 
37	38	      // 
38	39	      // If the std lib has thread support turned on, then turn it on in Boost 
39	40	      // as well.  We do this because some gcc-3.4 std lib headers define _REENTANT