-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
solve portability issues for Ubuntu 16.04.4 LTS #298
Conversation
Great cleanup across the board! Sorry about the collision issue due to using the |
No prob! I will see if I can add a commit to skip the failing simulator testing, as discussed. |
Problem: --with-boost=path has no effect on the search location for libboost_graph.so. boost_graph is found with AC_CHECK_LIB, while the rest of boost is found with purpose-build autoconf macros. The macro for boost_graph is included but not used. Call AX_BOOST_GRAPH and adjust Makefiles accordingly.
Once this is rebased, this can go in. |
It's been rebased. Hopefully travis likes it. |
Uh oh, stuck here
|
Ah... I remember now. I think the reason I switched to |
grug2dot successfully linked on a debian system with packaged boost 1.55, and on my desktop Ubuntu system with side-installed 1.53. Not sure why travis with packaged boost 1.54 cannot be linked or why that function is missing/not matched by this call. I guess I'm assuming the link line is fine, and this has to do with the proposed namespace changes. The prototype in namespace boost {
...
void BOOST_GRAPH_DECL
read_graphml(std::istream& in, mutate_graph& g, size_t desired_idx);
...
} // namespace boost I can't see any obvious namespace issues, though when I look at how boost::read_graphml() is called in our code, I find I need to review/learn more C++ to understand how the types manage to match, or what if anything the "using" change could do to impact that. // resource_gen_spec.hpp
class resource_gen_spec_t {
public:
resource_gen_spec_t ();
resource_gen_spec_t (const resource_gen_spec_t &o);
const gg_t &gen_graph ();
const gen_meth_t to_gen_method_t (const std::string &s) const;
int read_graphml (const std::string &ifn);
int write_graphviz (const std::string &ofn, bool simple=false);
private:
void setup_dynamic_property (boost::dynamic_properties &dp, gg_t &g);
gg_t g;
boost::dynamic_properties dp;
};
// resource_gen_spec.cpp
/*! Load resource generator recipe graph from a graphml file
*
* \param ifn resource generator recipe file in graphml
* \return 0 on success; -1 otherwise
*/
int resource_gen_spec_t::read_graphml (const string &ifn)
{
int rc = 0;
ifstream in_file (ifn.c_str ());
if (!in_file.good ())
return -1;
try {
boost::read_graphml (in_file, g, dp);
} catch (boost::graph_exception &e) {
cerr << e.what () << endl;
rc = -1;
}
in_file.close ();
return rc;
} |
Never mind, I tried dropping the namespace commit on a test branch, and that one fails in travis in the same place, so your lead is probably the right one @dongahn. |
Problem: AX_BOOST_GRAPH, in its search for the graph library, matches libboost_graph_parallel.so over libboost_graph.so, but graph_parallel is not a replacement for graph. Alter the glob used so that it doesn't match graph_parallel.
The problem was AX_BOOST_GRAPH was picking up Fixed the glob in there, and also tweaked warning options so that older compilers don't choke on the newer Forced a push, fingers crossed. |
Excellent!
|
05a2802
to
61e9b8e
Compare
Problem: sched fails to compile with gcc-5.4.0 and boost-1.53 due to excessive compiler warnings that are treated as errors. Suppress the following warnings completely: unused-local-typedefs deprecated-declarations unused-variable maybe-uninitialized
Problem: boost_regex library, apparently a dependency of boost_graph, cannot be found during linkage. Add AX_BOOST_REGEX macro and adjust Makefile.am accordingly.
Problem: cannot find boost libraries when building test executables. When linking against a side installed boost, $(BOOST_LDFLAGS) is required. Add it.
Problem: with g++ 5.4.0, the integer types in stdint.h (or cstdint) have the same names as types defined within boost, resulting in "ambiguous type" errors. Avoid 'using namespace boost' in Flux code. Instead, prefix all boost symbols with boost::
Problem: clang-3.8 doesn't grok -Wno-maybe-uninitialized, and gcc-5.4.0 doesn't grok -Wno-error=unknown-warning-option. For now, add -Wno-error in the resource directory and drop -Wno-maybe-uninitialized so we can get this built on travis.
Codecov Report
@@ Coverage Diff @@
## master #298 +/- ##
=======================================
Coverage 67.74% 67.74%
=======================================
Files 46 46
Lines 8692 8692
=======================================
Hits 5888 5888
Misses 2804 2804
Continue to review full report at Codecov.
|
Finally passed travis by finding the right combination of warning options across all compilers, I left this "band-aid" as a separate commit so the original set of warning suppressions is there, and the rationale for the band-aid is too. Ideally we'll address the root cause of those "maybe-uninitialized" warnings and then be able to drop |
Yes, we should look into this. Could you kindly open up an issue for this? |
OK. LGTM! Thank you @garlick. |
This PR contains the changes I needed in order to bulid flux-sched on an Ubuntu 16.04.4 LTS system using a side-installed version of boost-1.53. The problems solved are:
configure --with-boost=path
worksI tested against the last version of flux-core known to work with flux-sched (two PR's ago, flux-framework/flux-core@cdc9e9b) and it works.
The only thing that's still not quite right is I needed to set LD_LIBRARY_PATH on the "make check" command line in order for in-tree test executables to find the boost libraries. I guess usually libtool magically takes care of this, but flux-sched doesn't use libtool.
Some of this was discussed in #297