<div dir="ltr">Hi,<div><br></div><div>My earlier point also applies here - mainstream distros have no need to distribute GROMACS packages with tinyxml2 bundled, because it only supports our test code, ie. nothing that we install. They should want to run the tests, but I see no need for any bundling handling at all. I&#39;ll make it possible to use a system install of tinyxml2, though.</div><div><br></div><div>Mark</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Feb 18, 2016 at 4:32 PM Mark Abraham &lt;<a href="mailto:mark.j.abraham@gmail.com">mark.j.abraham@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>For a mainstream distro, I expect pkg-config and/or the buildbot toolchain to be set up to Just Work. Hopefully Dominik can look over what I will propose, to see if it looks suitable from his standpoint. We need a suitable find_package module (which we can contribute upstream), but otherwise we don&#39;t have to do and maintain the complex checking that we do for libxml2 and zlib now.</div></div><div dir="ltr"><div><br></div><div>Mark</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Feb 18, 2016 at 4:23 PM Szilárd Páll &lt;<a href="mailto:pall.szilard@gmail.com" target="_blank">pall.szilard@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Feb 18, 2016 at 3:46 PM, Mark Abraham &lt;<a href="mailto:mark.j.abraham@gmail.com" target="_blank">mark.j.abraham@gmail.com</a>&gt; wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; On Thu, Feb 18, 2016 at 3:28 PM Szilárd Páll &lt;<a href="mailto:pall.szilard@gmail.com" target="_blank">pall.szilard@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hi,<br>
&gt;&gt;<br>
&gt;&gt; Thanks for looking into this!<br>
&gt;&gt;<br>
&gt;&gt; I was not aware that zlib is only required if libxml2 was configured<br>
&gt;&gt; with it. Unless there is an easy way to check for the libxml2<br>
&gt;&gt; dependencies before the xmlTextWriterEndAttribute test is performed, I<br>
&gt;&gt; have no better suggestion. Aren&#39;t there some symbols or exported<br>
&gt;&gt; functions only present when libxml2 is configured with zlib?<br>
&gt;<br>
&gt;<br>
&gt; We could probably do that. If we adopt the tinyxml2 route, then I&#39;d suggest<br>
&gt; we leave such libxml2 management issues as TODOs for if/when we add other<br>
&gt; code that requires functionality from libxml2.<br>
&gt;<br>
&gt;&gt; Replacing libxml2 external dependency for this particular use-case<br>
&gt;&gt; sounds useful, although it does add some code complexity and<br>
&gt;&gt; maintenenace burden. However, I&#39;m not sure the alternative requires<br>
&gt;&gt; less code (especially if the BG/Q issue is a very different one than<br>
&gt;&gt; what I ran into).<br>
&gt;<br>
&gt;<br>
&gt; If we don&#39;t end up needing libxml2 for anything else, then a bunch of code<br>
&gt; that we apparently don&#39;t maintain well enough currently gets to disappear,<br>
&gt; which is something.<br>
<br>
If you&#39;re referring tot he CMake code that&#39;s going to disappear,<br>
similar code (though perhaps more simple) will have to replace if we<br>
want to be distro-friendly.<br>
<br>
&gt; Mark<br>
&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Szilárd<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Thu, Feb 18, 2016 at 2:39 PM, Mark Abraham &lt;<a href="mailto:mark.j.abraham@gmail.com" target="_blank">mark.j.abraham@gmail.com</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt; &gt; Hi,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Yes, perhaps that call to check_library_exists can be improved, e.g. by<br>
&gt;&gt; &gt; setting CMAKE_REQUIRED_LIBRARIES for the check (see<br>
&gt;&gt; &gt; <a href="https://cmake.org/cmake/help/v3.0/module/CheckLibraryExists.html" rel="noreferrer" target="_blank">https://cmake.org/cmake/help/v3.0/module/CheckLibraryExists.html</a>).<br>
&gt;&gt; &gt; However,<br>
&gt;&gt; &gt; it is awkward to do a good job here, because libxml2 only requires zlib<br>
&gt;&gt; &gt; if<br>
&gt;&gt; &gt; the former was configured that way, so we have a fairly large number of<br>
&gt;&gt; &gt; conditions to handle in constructing our handling (shared/static,<br>
&gt;&gt; &gt; whether<br>
&gt;&gt; &gt; either was found, whether libxml2 needs zlib or not, whether test<br>
&gt;&gt; &gt; binaries<br>
&gt;&gt; &gt; need to be built, etc.).<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Roland suggested <a href="https://gerrit.gromacs.org/#/c/5630/2" rel="noreferrer" target="_blank">https://gerrit.gromacs.org/#/c/5630/2</a> but I am not sure<br>
&gt;&gt; &gt; if<br>
&gt;&gt; &gt; it is related.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Alternatively/also, since currently the only use for XML handling in<br>
&gt;&gt; &gt; master<br>
&gt;&gt; &gt; branch is for test reference data, I have uploaded<br>
&gt;&gt; &gt; <a href="https://gerrit.gromacs.org/#/c/5653/" rel="noreferrer" target="_blank">https://gerrit.gromacs.org/#/c/5653/</a> to replace this use of libxml2 with<br>
&gt;&gt; &gt; a<br>
&gt;&gt; &gt; bundled copy of tinyxml2, as part of<br>
&gt;&gt; &gt; <a href="http://redmine.gromacs.org/issues/1908" rel="noreferrer" target="_blank">http://redmine.gromacs.org/issues/1908</a><br>
&gt;&gt; &gt; so that we get rid of such problematic external dependencies. These have<br>
&gt;&gt; &gt; been causing grief lately for users on BG/Q machines. I suggest we keep<br>
&gt;&gt; &gt; libxml2 detection and handling present but inactive while the future of<br>
&gt;&gt; &gt; various patches in Gerrit gets resolved.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Mark<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Wed, Feb 10, 2016 at 4:37 PM Szilárd Páll &lt;<a href="mailto:pall.szilard@gmail.com" target="_blank">pall.szilard@gmail.com</a>&gt;<br>
&gt;&gt; &gt; wrote:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Hi,<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; $ cmake -DGMX_PREFER_STATIC_LIBS=ON -DGMX_BUILD_UNITTESTS=ON<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; [...]<br>
&gt;&gt; &gt;&gt; -- Looking for zlibVersion in /usr/lib/x86_64-linux-gnu/libz.a<br>
&gt;&gt; &gt;&gt; -- Looking for zlibVersion in /usr/lib/x86_64-linux-gnu/libz.a - found<br>
&gt;&gt; &gt;&gt; -- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.a (found version<br>
&gt;&gt; &gt;&gt; &quot;2.9.1&quot;)<br>
&gt;&gt; &gt;&gt; -- Looking for xmlTextWriterEndAttribute in<br>
&gt;&gt; &gt;&gt; /usr/lib/x86_64-linux-gnu/libxml2.a<br>
&gt;&gt; &gt;&gt; -- Looking for xmlTextWriterEndAttribute in<br>
&gt;&gt; &gt;&gt; /usr/lib/x86_64-linux-gnu/libxml2.a - not found<br>
&gt;&gt; &gt;&gt; [...]<br>
&gt;&gt; &gt;&gt; CMake Error at CMakeLists.txt:562 (message):<br>
&gt;&gt; &gt;&gt;   Cannot build unit tests without libxml2.  Either set<br>
&gt;&gt; &gt;&gt;   GMX_BUILD_UNITTESTS=OFF or tell CMake how to find a working version<br>
&gt;&gt; &gt;&gt; of<br>
&gt;&gt; &gt;&gt;   libxml2.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Even though both libz and libxml are detected, the<br>
&gt;&gt; &gt;&gt; xmlTextWriterEndAttribute lib test fails to link as the<br>
&gt;&gt; &gt;&gt; check_library_exists() does not pass -lz.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; I vaguely remember some discussion around it so I thought I&#39;d ask<br>
&gt;&gt; &gt;&gt; whether this is a known issue before filing a report.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Are there any simple workarounds for this? (I tried passing -lz in the<br>
&gt;&gt; &gt;&gt; linker flags, but that does not help).<br>
&gt;&gt; &gt;&gt; Could we provide a better hint in the error?<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Cheers,<br>
&gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt; Szilárd<br>
&gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt; Gromacs Developers mailing list<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; * Please search the archive at<br>
&gt;&gt; &gt;&gt; <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before<br>
&gt;&gt; &gt;&gt; posting!<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; * Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; * For (un)subscribe requests visit<br>
&gt;&gt; &gt;&gt; <a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" rel="noreferrer" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a><br>
&gt;&gt; &gt;&gt; or<br>
&gt;&gt; &gt;&gt; send a mail to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; --<br>
&gt;&gt; &gt; Gromacs Developers mailing list<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; * Please search the archive at<br>
&gt;&gt; &gt; <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before<br>
&gt;&gt; &gt; posting!<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; * Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; * For (un)subscribe requests visit<br>
&gt;&gt; &gt; <a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" rel="noreferrer" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a><br>
&gt;&gt; &gt; or<br>
&gt;&gt; &gt; send a mail to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.<br>
&gt;&gt; --<br>
&gt;&gt; Gromacs Developers mailing list<br>
&gt;&gt;<br>
&gt;&gt; * Please search the archive at<br>
&gt;&gt; <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before<br>
&gt;&gt; posting!<br>
&gt;&gt;<br>
&gt;&gt; * Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
&gt;&gt;<br>
&gt;&gt; * For (un)subscribe requests visit<br>
&gt;&gt; <a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" rel="noreferrer" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or<br>
&gt;&gt; send a mail to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Gromacs Developers mailing list<br>
&gt;<br>
&gt; * Please search the archive at<br>
&gt; <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before<br>
&gt; posting!<br>
&gt;<br>
&gt; * Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
&gt;<br>
&gt; * For (un)subscribe requests visit<br>
&gt; <a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" rel="noreferrer" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or<br>
&gt; send a mail to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.<br>
--<br>
Gromacs Developers mailing list<br>
<br>
* Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br>
<br>
* Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
<br>
* For (un)subscribe requests visit<br>
<a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" rel="noreferrer" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or send a mail to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.</blockquote></div></blockquote></div>