Fix MOSES build failure due to missing ostream_container symbol visibility #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves a C++ compilation error in MOSES where the
ostream_containerutility function was not being found during builds, particularly when compiling feature selection algorithms.Problem
The MOSES build was failing with a missing symbol error for
ostream_containerinmoses/moses/comboreduct/table/table.h. While the headeropencog/util/iostreamContainer.hwas properly included, the function calls were not using explicit namespace qualification, causing symbol visibility issues during compilation.The error occurred in two template visitor classes:
push_back_visitor::operator()(line 119)insert_at_visitor::operator()(line 209)Both classes are used for error handling in the table manipulation code and contain calls to
ostream_containerwithout theopencog::namespace prefix.Solution
Added explicit namespace qualification to the
ostream_containerfunction calls:This ensures the compiler can properly resolve the function from the
opencognamespace, even when called from within the nestedopencog::combonamespace context.Changes
opencog::prefix to twoostream_containercalls (lines 119 and 209)This is a minimal, surgical fix that resolves the symbol visibility issue without affecting any other functionality. The change restores build integrity and enables further development of cognitive diagnostics in MOSES.
Testing
Verified the fix through isolated compilation tests that confirm:
ostream_containerfunction works correctly with the explicit qualificationWarning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
esm.ubuntu.com/usr/lib/apt/methods/https(dns block)If you need me to access, download, or install something from one of these locations, you can either:
This pull request was created as a result of the following prompt from Copilot chat.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.