<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jul 26, 2020 at 10:34 AM Troy A. Griffitts <<a href="mailto:scribe@crosswire.org">scribe@crosswire.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>So Greg,</p>
<p>I learned about cmake a bit today :)</p>
<p>Nice work on the build system.</p>
<p>I checked out a clean copy from source control, built with cmake,
proceeded into the tests/testsuite folder</p>
<p>ran: ./runall.sh</p>
<p>and sure enough, it failed for me.</p>
<p>Went back and re-read your sword/cmake/README to figure out how
to build with debug. Turned that on, rebuild, and stepped through
the code.</p>
<p>The difference:</p>
<p>autotools does not include bindings/flatapi.cpp by default in the
lib</p>
<p>cmake does.</p>
<p>The flatapi bindings injects its own StringMgr into SWORD to
allow you to implement your own toUpperUTF C function (this is
really the only necessary method SWORD requires to support Unicode
at a basic level).</p></div></blockquote><div>Aha! I figured there must be a discrepancy I couldn't spot. I did the first pass of the cmake system before I knew very much about autotools at all. I've gleaned quite a bit more about it, since then, but hadn't managed to tease out that difference. Thanks! <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
<p>This was overriding the ICUStringMgr that was injected because of
the build defines.</p>
<p>I've enhanced this "feature" of flatapi.cpp to only inject its
own StringMgr if StringMgr::hasUTF8Support == false. Now
flatapi.cpp can be included in libsword.so</p>
<p>Anyway, in summary, if you update and build again and run the
tests, they should work now. Again, well done on the cmake
system!</p></div></blockquote><div>Confirmed - everything builds and runs perfectly with a freshly updated copy of trunk.</div><div><br></div><div>As an interesting sidenote, all of the parsing code is about twice as fast now in the testsuite. The regular verseparsing test was running a little over 60 seconds before and it's now down around 35! The UTF8 one is down from a few seconds to 1 second flat.<br></div><div><br></div><div>One thing about the shell scripts that I've learned - you might be best to include a "set -e" in some of them. And, if they include pipes, a "set -o pipefail" - which can be combined into "set -e -o pipefail". This will ensure that the shell scripts will actually error out if a command isn't found or exits improperly. Not necessary and might not be applicable to all tests. But could be worth a consideration. I've had some tests give weird results because they failed to write a file early on, but the shell script continued going (due to having wonky directory permissions after accidentally doing a build as root) and left odd behaviors in the test result. Editing my local copy to include the "set -e" caused the whole thing to stop at the moment of the write failure and made the test easier to diagnose, instead of losing that output somewhere else.<br></div><div><br></div><div>--Greg<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
<p>Troy<br>
</p>
<p><br>
</p>
<div>On 7/26/20 2:47 PM, Greg Hellings
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sun, Jul 26, 2020 at 7:29
AM Troy A. Griffitts <<a href="mailto:scribe@crosswire.org" target="_blank">scribe@crosswire.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Greg, what's the output, or at least the couple lines
of output from your failed unit test? It might help.
When I saw your note, I had suspected it was because of
something I had installed on my machine that was
enabling the test to pass (/etc/sword.conf) or
something. But I've removed what I thought might be
helping and I still pass all unit tests here on F32
using autotools to build.</p>
</div>
</blockquote>
<div>Oh yes, that's probably relevant!</div>
<div><br>
</div>
<div>$ ./runtest.sh verseparsing-utf8<br>
Script failed at: (- bad output; + should have been)<br>
--- verseparsing-utf8.try 2020-07-26 08:45:12.077941691
-0400<br>
+++ verseparsing-utf8.good 2020-07-26 08:43:25.621662269
-0400<br>
@@ -1,7 +1,7 @@<br>
-Matthäus 2:3-12 de KJV ge 1: <br>
-Römer 2:13 de KJV ge 1: <br>
-Matthäus 1:2-Röm 3:13 de KJV ge 1: <br>
-1. Könige 2 de KJV ge 1: <br>
-1. Könige - 2. Könige; Markus 1:1; Matthäus 2:1; Matthäus;
1.Kön de KJV ge 1: Markus 1:1<br>
-1. Könige - 2. Könige; Markus 1:1; Matthäus 2:1; Matthäus;
1.Kön-2.Kön;I Kings-Matthäus de KJV ge 1: Markus 1:1; 1.
K�nige 1:1-Markus 1:1<br>
-Maleachi 1:1 - Matthäus 2:1 de KJV ge 1: Maleachi
1:1-Offenbarung 22:21<br>
+Matthäus 2:3-12 de KJV ge 1: Matthäus 2:3-Matthäus 2:12<br>
+Römer 2:13 de KJV ge 1: Römer 2:13<br>
+Matthäus 1:2-Röm 3:13 de KJV ge 1: Matthäus 1:2-Römer 3:13<br>
+1. Könige 2 de KJV ge 1: 1. Könige 2:1-1. Könige 2:46<br>
+1. Könige - 2. Könige; Markus 1:1; Matthäus 2:1; Matthäus;
1.Kön de KJV ge 1: 1. Könige 1:1-2. Könige 25:30; Markus
1:1; Matthäus 2:1; Matthäus 1:1-Matthäus 28:20; 1. Könige
1:1-1. Könige 22:53<br>
+1. Könige - 2. Könige; Markus 1:1; Matthäus 2:1; Matthäus;
1.Kön-2.Kön;I Kings-Matthäus de KJV ge 1: 1. Könige 1:1-2.
Könige 25:30; Markus 1:1; Matthäus 2:1; Matthäus
1:1-Matthäus 28:20; 1. Könige 1:1-2. Könige 25:30; 1. Könige
1:1-Matthäus 28:20<br>
+Maleachi 1:1 - Matthäus 2:1 de KJV ge 1: Maleachi
1:1-Matthäus 2:1</div>
<div><br>
</div>
<div>It appears the test isn't even trying to parse the
inputs? It's certainly not giving any output to make it look
like it is.<br>
</div>
<div><br>
</div>
<div>--Greg<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Hope we can figure it out,</p>
<p>Troy</p>
<p><br>
</p>
<div>On 7/25/20 5:46 AM, Greg Hellings wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Quick question - maybe a longer answer. Mostly
for Troy, as you're probably the only one familiar
with this code:</div>
<div><br>
</div>
<div>I'm trying to get the testsuit working in the
CMake build. Things seem to be going great. I can
get 13/14 tests passing. But I've had a long-nagging
issue with getting verparsing-utf8 to pass in the
CMake build. I'm building with -D_ICU_ throughout,
so it's not that the flag is missing. I'm also not
getting passing results out of the autotools build,
so this isn't just a problem with CMake - although
in the past I've had systems where I could get the
autotools build to work properly but the CMake one
would not.<br>
</div>
<div><br>
</div>
<div>I don't know enough about running a C++ debugger
to dig into where the problem lives. The
verseparsing-utf8 is clear that the library needs
ICU in order for it to work, and it shows up in the
list of linked libraries off the sword library and
in the compile flags.</div>
<div><br>
</div>
<div>I assume the tests are still working for you? If
so, any hints I can use to track down why it's not
working for me?</div>
<div><br>
</div>
<div>--Greg<br>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org" target="_blank">sword-devel@crosswire.org</a>
<a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page</pre>
</blockquote>
</div>
_______________________________________________<br>
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org" target="_blank">sword-devel@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/sword-devel" rel="noreferrer" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>
Instructions to unsubscribe/change your settings at above
page</blockquote>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org" target="_blank">sword-devel@crosswire.org</a>
<a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page</pre>
</blockquote>
</div>
_______________________________________________<br>
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org" target="_blank">sword-devel@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/sword-devel" rel="noreferrer" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>
Instructions to unsubscribe/change your settings at above page</blockquote></div></div>