Re: Osis2mod debug messages
DM Smith <[email protected]> Wed, 9 Jul 2025 07:01:47 -0400
| Newsgroups | gmane.comp.literature.sword.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============1287427022497370078== Content-Type: multipart/alternative; boundary="Apple-Mail=_65C4F6AC-B71F-4C7A-A57C-764BDCDD67C5" --Apple-Mail=_65C4F6AC-B71F-4C7A-A57C-764BDCDD67C5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I did not indicate I was initially building with MSVC. I am compiling on = a Mac using cmake. I don=E2=80=99t know what it's defaults are. -- DM > On Jul 8, 2025, at 11:42=E2=80=AFPM, Greg Hellings = <[email protected]> wrote: >=20 > Including it also fixes the build in my cross-build environment. Did = you indicate you were initially building with MSVC? That might explain = the difference. >=20 > --Greg >=20 > On Tue, Jul 8, 2025 at 9:54=E2=80=AFPM DM Smith <[email protected] = <mailto:[email protected]>> wrote: >> While I don=E2=80=99t get the error in my local build environment, I = get it on the crosswire server. If I include <cstring>, it compiles just = fine. >> I=E2=80=99ll guess that my build environment includes it indirectly. >>=20 >> DM >>=20 >>> On Jul 8, 2025, at 10:40=E2=80=AFPM, DM Smith <[email protected] = <mailto:[email protected]>> wrote: >>>=20 >>> Greg, >>> Could you try 2 different things and let me know what the result is? >>> a) include <cstring> as I didn=E2=80=99t include it, but somehow = =E2=80=9CIt works for me=E2=80=9D. >>> b) remove the namespace. >>>=20 >>> I=E2=80=99ll try the same on the crosswire server. >>>=20 >>> Thanks, >>> DM >>>=20 >>>> On Jul 8, 2025, at 9:35=E2=80=AFPM, Greg Hellings = <[email protected] <mailto:[email protected]>> wrote: >>>>=20 >>>> DM, >>>>=20 >>>> As mentioned elsewhere, here is the compile error from gcc when = trying to cross-build osis2mod. It appears to be a case where the = function exists but is not namespaced to `std::` in whichever version of = C++ is the default version. =46rom a quick glance around it appears = there is a difference between <string.h>, which defines the function for = C and <cstring> which defines the function for C++ within the `std` = namespace. >>>>=20 >>>> --Greg >>>>=20 >>>> sword> osis2mod.cpp:371:19: error: 'strpbrk' is not a member of = 'std'; did you mean 'strpbrk'? >>>> sword> 371 | if (!std::strpbrk(bufStart, "! :")) { >>>> sword> | ^~~~~~~ >>>> sword> In file included from = /nix/store/np3pb3a6wd1bf55hp0rl3i64mfzrcilm-x86_64-w64-mingw32-gcc-14.2.1.= 20250322/x86_64-w64-mingw32/sys-include/io.h: >>>> 10, >>>> sword> from = /nix/store/np3pb3a6wd1bf55hp0rl3i64mfzrcilm-x86_64-w64-mingw32-gcc-14.2.1.= 20250322/x86_64-w64-mingw32/sys-include/fcntl >>>> .h:8, >>>> sword> from osis2mod.cpp:29: >>>> sword> = /nix/store/np3pb3a6wd1bf55hp0rl3i64mfzrcilm-x86_64-w64-mingw32-gcc-14.2.1.= 20250322/x86_64-w64-mingw32/sys-include/string.h:92:31: note: 'strp >>>> brk' declared here >>>> sword> 92 | _CONST_RETURN char *__cdecl strpbrk(const char = *_Str,const char *_Control); >>>> sword> | ^~~~~~~ >>>> sword> osis2mod.cpp:392:40: error: 'strpbrk' is not a member of = 'std'; did you mean 'strpbrk'? >>>> sword> 392 | char* lookahead =3D = std::strpbrk(bufRead, ": -"); >>>> sword> | ^~~~~~~ >>>> sword> = /nix/store/np3pb3a6wd1bf55hp0rl3i64mfzrcilm-x86_64-w64-mingw32-gcc-14.2.1.= 20250322/x86_64-w64-mingw32/sys-include/string.h:92:31: note: 'strp >>>> brk' declared here >>>> sword> 92 | _CONST_RETURN char *__cdecl strpbrk(const char = *_Str,const char *_Control); >>>> sword> | ^~~~~~~ >>>> sword> osis2mod.cpp:411:34: error: 'strpbrk' is not a member of = 'std'; did you mean 'strpbrk'? >>>> sword> 411 | lookahead =3D std::strpbrk(bufRead, = "! -"); >>>> sword> | ^~~~~~~ >>>> sword> = /nix/store/np3pb3a6wd1bf55hp0rl3i64mfzrcilm-x86_64-w64-mingw32-gcc-14.2.1.= 20250322/x86_64-w64-mingw32/sys-include/string.h:92:31: note: 'strp >>>> brk' declared here >>>> sword> 92 | _CONST_RETURN char *__cdecl strpbrk(const char = *_Str,const char *_Control); >>>> sword> osis2mod.cpp:434:40: error: 'strpbrk' is not a member of = 'std'; did you mean 'strpbrk'? >>>> sword> 434 | bufRead =3D = std::strpbrk(tokenStart, " -"); >>>> sword> | ^~~~~~~ >>>> sword> = /nix/store/np3pb3a6wd1bf55hp0rl3i64mfzrcilm-x86_64-w64-mingw32-gcc-14.2.1.= 20250322/x86_64-w64-mingw32/sys-include/string.h:92:31: note: 'strp >>>> brk' declared here >>>> sword> 92 | _CONST_RETURN char *__cdecl strpbrk(const char = *_Str,const char *_Control); >>>> sword> | ^~~~~~~ >>>>=20 >>>>=20 >>>> On Mon, Jul 7, 2025 at 4:14=E2=80=AFPM DM Smith = <[email protected] <mailto:[email protected]>> wrote: >>>>> I have just committed revision 3907 for osis2mod, adding location = information to messages so that one can more readily tie reported events = to the OSIS input file. >>>>>=20 >>>>> I have updated the osis2mod wiki entry to document it more fully: = https://wiki.crosswire.org/Osis2mod#Messages >>>>>=20 >>>>> MODTOOLS-25 give location in input for messages. >>>>>=20 >>>>> Created identifyMsg which creates a standardized message for = reporting >>>>> and used it for all messages to standard out. >>>>>=20 >>>>> The message is of the form: >>>>> type(kind)[linePos,charPos] osisID=3DosisID: message >>>>>=20 >>>>> Where: >>>>> type The message type (e.g., "ERROR", "WARNING", = "INFO"). >>>>> kind The message category or kind (e.g., "REF", = "PARSE"). >>>>> linePos The position in the file of the last line that was = read. >>>>> charPos The position in the line of the last character = that was read. >>>>> osisID (Optional) The current OSIS ID to include. May be = nullptr or empty. >>>>> message event description with details >>>>>=20 >>>>> * If linePos is 0, the position ([linePos,charPos]) is omitted. >>>>> * If osisID is nullptr or empty, the osisID part is omitted. >>>>> * The returned string always ends with a colon and a trailing = space (": =E2=80=9C). >>>>>=20 >>>>> In Him, >>>>> DM >>>>>=20 >>>>> _______________________________________________ >>>>> sword-devel mailing list: [email protected] = <mailto:[email protected]> >>>>> http://crosswire.org/mailman/listinfo/sword-devel >>>>> Instructions to unsubscribe/change your settings at above page >>>> _______________________________________________ >>>> sword-devel mailing list: [email protected] = <mailto:[email protected]> >>>> http://crosswire.org/mailman/listinfo/sword-devel >>>> Instructions to unsubscribe/change your settings at above page >>>=20 >>=20 >> _______________________________________________ >> sword-devel mailing list: [email protected] = <mailto:[email protected]> >> http://crosswire.org/mailman/listinfo/sword-devel >> Instructions to unsubscribe/change your settings at above page > _______________________________________________ > sword-devel mailing list: [email protected] > http://crosswire.org/mailman/listinfo/sword-devel > Instructions to unsubscribe/change your settings at above page --Apple-Mail=_65C4F6AC-B71F-4C7A-A57C-764BDCDD67C5 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"content-type" content=3D"text/html; = charset=3Dutf-8"></head><body style=3D"overflow-wrap: break-word; = -webkit-nbsp-mode: space; line-break: after-white-space;">I did not = indicate I was initially building with MSVC. I am compiling on a Mac = using cmake. I don=E2=80=99t know what it's defaults = are.<div><br></div><div>-- DM<br = id=3D"lineBreakAtBeginningOfMessage"><div><br><blockquote = type=3D"cite"><div>On Jul 8, 2025, at 11:42=E2=80=AFPM, Greg Hellings = <[email protected]> wrote:</div><br = class=3D"Apple-interchange-newline"><div><div dir=3D"ltr"><div>Including = it also fixes the build in my cross-build environment. Did you indicate = you were initially building with MSVC? That might explain the = difference.</div><div><br></div><div>--Greg</div></div><br><div = class=3D"gmail_quote gmail_quote_container"><div dir=3D"ltr" = class=3D"gmail_attr">On Tue, Jul 8, 2025 at 9:54=E2=80=AFPM DM Smith = <<a href=3D"mailto:[email protected]">[email protected]</a>>= wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px = 0px 0px 0.8ex;border-left:1px solid = rgb(204,204,204);padding-left:1ex"><div>While I don=E2=80=99t get the = error in my local build environment, I get it on the crosswire server. = If I include <cstring>, it compiles just fine.<div>I=E2=80=99ll = guess that my build environment includes it = indirectly.<br><div><br></div><div>DM<br = id=3D"m_-4153283895800732367lineBreakAtBeginningOfMessage"><div><br><block= quote type=3D"cite"><div>On Jul 8, 2025, at 10:40=E2=80=AFPM, DM Smith = <<a href=3D"mailto:[email protected]" = target=3D"_blank">[email protected]</a>> = wrote:</div><br><div><div>Greg,<div>Could you try 2 different things and = let me know what the result is?<div>a) include <cstring> as I = didn=E2=80=99t include it, but somehow =E2=80=9CIt works for = me=E2=80=9D.</div><div>b) remove the = namespace.</div><div><br></div><div>I=E2=80=99ll try the same on the = crosswire server.</div><div><br></div><div>Thanks,</div><div><span = style=3D"white-space:pre-wrap"> </span>DM<br = id=3D"m_-4153283895800732367lineBreakAtBeginningOfMessage"><div><br><block= quote type=3D"cite"><div>On Jul 8, 2025, at 9:35=E2=80=AFPM, Greg = Hellings <<a href=3D"mailto:[email protected]" = target=3D"_blank">[email protected]</a>> = wrote:</div><br><div><div dir=3D"ltr"><div>DM,</div><div><br></div><div>As= mentioned elsewhere, here is the compile error from gcc when trying to = cross-build osis2mod. It appears to be a case where the function exists = but is not namespaced to `std::` in whichever version of C++ is the = default version. =46rom a quick glance around it appears there is a = difference between <string.h>, which defines the function for C = and <cstring> which defines the function for C++ within the `std` = namespace.</div><div><br></div><div>--Greg</div><div><br></div><div>sword&= gt; osis2mod.cpp:371:19: error: 'strpbrk' is not a member of 'std'; did = you mean 'strpbrk'?<br>sword> 371 | = if (!std::strpbrk(bufStart, "! :")) {<br>sword> = | = ^~~~~~~<br>sword> In file included from = /nix/store/np3pb3a6wd1bf55hp0rl3i64mfzrcilm-x86_64-w64-mingw32-gcc-14.2.1.= 20250322/x86_64-w64-mingw32/sys-include/io.h:<br>10,<br>sword> = from = /nix/store/np3pb3a6wd1bf55hp0rl3i64mfzrcilm-x86_64-w64-mingw32-gcc-14.2.1.= 20250322/x86_64-w64-mingw32/sys-include/fcntl<br>.h:8,<br>sword> = from = osis2mod.cpp:29:<br>sword> = /nix/store/np3pb3a6wd1bf55hp0rl3i64mfzrcilm-x86_64-w64-mingw32-gcc-14.2.1.= 20250322/x86_64-w64-mingw32/sys-include/string.h:92:31: note: = 'strp<br>brk' declared here<br>sword> 92 | = _CONST_RETURN char *__cdecl strpbrk(const char *_Str,const char = *_Control);<br>sword> | = = ^~~~~~~<br>sword> osis2mod.cpp:392:40: error: 'strpbrk' = is not a member of 'std'; did you mean 'strpbrk'?<br>sword> = 392 | char* = lookahead =3D std::strpbrk(bufRead, ": -");<br>sword> = | = = ^~~~~~~<br>sword> = /nix/store/np3pb3a6wd1bf55hp0rl3i64mfzrcilm-x86_64-w64-mingw32-gcc-14.2.1.= 20250322/x86_64-w64-mingw32/sys-include/string.h:92:31: note: = 'strp<br>brk' declared here<br>sword> 92 | = _CONST_RETURN char *__cdecl strpbrk(const char *_Str,const char = *_Control);<br>sword> | = = ^~~~~~~<br>sword> osis2mod.cpp:411:34: error: 'strpbrk' = is not a member of 'std'; did you mean 'strpbrk'?<br>sword> = 411 | lookahead = =3D std::strpbrk(bufRead, "! -");<br>sword> | = = ^~~~~~~<br>sword> = /nix/store/np3pb3a6wd1bf55hp0rl3i64mfzrcilm-x86_64-w64-mingw32-gcc-14.2.1.= 20250322/x86_64-w64-mingw32/sys-include/string.h:92:31: note: = 'strp<br>brk' declared here<br>sword> 92 | = _CONST_RETURN char *__cdecl strpbrk(const char *_Str,const char = *_Control);<br>sword> osis2mod.cpp:434:40: error: 'strpbrk' is not a = member of 'std'; did you mean 'strpbrk'?<br>sword> 434 | = = bufRead =3D std::strpbrk(tokenStart, " -");<br>sword> = | = = ^~~~~~~<br>sword> = /nix/store/np3pb3a6wd1bf55hp0rl3i64mfzrcilm-x86_64-w64-mingw32-gcc-14.2.1.= 20250322/x86_64-w64-mingw32/sys-include/string.h:92:31: note: = 'strp<br>brk' declared here<br>sword> 92 | = _CONST_RETURN char *__cdecl strpbrk(const char *_Str,const char = *_Control);<br>sword> | = = ^~~~~~~<br><br></div></div><br><div = class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Mon, Jul = 7, 2025 at 4:14=E2=80=AFPM DM Smith <<a = href=3D"mailto:[email protected]" = target=3D"_blank">[email protected]</a>> = wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px = 0px 0px 0.8ex;border-left:1px solid = rgb(204,204,204);padding-left:1ex"><div>I have just committed revision = 3907 for osis2mod, adding location information to messages so that one = can more readily tie reported events to the OSIS input = file.<div><br></div><div>I have updated the osis2mod wiki entry to = document it more fully: <a = href=3D"https://wiki.crosswire.org/Osis2mod#Messages" = target=3D"_blank">https://wiki.crosswire.org/Osis2mod#Messages</a><br><div= ><br><div>MODTOOLS-25 give location in input for = messages.<br><br>Created identifyMsg which creates a standardized = message for reporting<br>and used it for all messages to standard = out.<br><br>The message is of the = form:<br> type(kind)[linePos,charPos] osisID=3DosisID: = message<br><br>Where:<br> type = The message = type (e.g., "ERROR", "WARNING", "INFO").<br> kind = The message = category or kind (e.g., "REF", "PARSE").<br> linePos = The position in the file of = the last line that was read.<br> charPos = The position in the line of = the last character that was read.<br> osisID = (Optional) The current = OSIS ID to include. May be nullptr or empty.<br> message = event description with = details<br><br>* If linePos is 0, the position ([linePos,charPos]) is = omitted.<br>* If osisID is nullptr or empty, the osisID part is = omitted.<br>* The returned string always ends with a colon and a = trailing space (": =E2=80=9C).</div><div><br></div><div>In = Him,</div><div><span style=3D"white-space:pre-wrap"> = </span>DM<br><br></div></div></div></div>_________________________________= ______________<br> sword-devel mailing list: <a href=3D"mailto:[email protected]" = target=3D"_blank">[email protected]</a><br> <a href=3D"http://crosswire.org/mailman/listinfo/sword-devel" = rel=3D"noreferrer" = target=3D"_blank">http://crosswire.org/mailman/listinfo/sword-devel</a><br= > Instructions to unsubscribe/change your settings at above page<br> </blockquote></div> _______________________________________________<br>sword-devel mailing = list: <a href=3D"mailto:[email protected]" = target=3D"_blank">[email protected]</a><br><a = href=3D"http://crosswire.org/mailman/listinfo/sword-devel" = target=3D"_blank">http://crosswire.org/mailman/listinfo/sword-devel</a><br= >Instructions to unsubscribe/change your settings at above = page<br></div></blockquote></div><br></div></div></div></div></blockquote>= </div><br></div></div></div>______________________________________________= _<br> sword-devel mailing list: <a href=3D"mailto:[email protected]" = target=3D"_blank">[email protected]</a><br> <a href=3D"http://crosswire.org/mailman/listinfo/sword-devel" = rel=3D"noreferrer" = target=3D"_blank">http://crosswire.org/mailman/listinfo/sword-devel</a><br= > Instructions to unsubscribe/change your settings at above page<br> </blockquote></div> _______________________________________________<br>sword-devel mailing = list: = [email protected]<br>http://crosswire.org/mailman/listinfo/sword-d= evel<br>Instructions to unsubscribe/change your settings at above = page<br></div></blockquote></div><br></div></body></html>= --Apple-Mail=_65C4F6AC-B71F-4C7A-A57C-764BDCDD67C5-- --===============1287427022497370078== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ sword-devel mailing list: [email protected] http://crosswire.org/mailman/listinfo/sword-devel Instructions to unsubscribe/change your settings at above page --===============1287427022497370078==--