Re: Osis2mod debug messages

DM Smith <[email protected]> Tue, 8 Jul 2025 22:54:02 -0400
Newsgroups gmane.comp.literature.sword.devel
Message-ID <[email protected]>
--===============1910465375104714822==
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_41D766EF-7F7A-43C4-9B00-1F8228911478"


--Apple-Mail=_41D766EF-7F7A-43C4-9B00-1F8228911478
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

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.

DM

> On Jul 8, 2025, at 10:40=E2=80=AFPM, DM Smith <[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=9C=
It 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]> 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]
>> http://crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
>=20


--Apple-Mail=_41D766EF-7F7A-43C4-9B00-1F8228911478
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;">While I =
don=E2=80=99t get the error in my local build environment, I get it on =
the crosswire server. If I include &lt;cstring&gt;, 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"lineBreakAtBeginningOfMessage"><div><br><blockquote =
type=3D"cite"><div>On Jul 8, 2025, at 10:40=E2=80=AFPM, DM Smith =
&lt;[email protected]&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div><meta http-equiv=3D"content-type"=
 content=3D"text/html; charset=3Dutf-8"><div style=3D"overflow-wrap: =
break-word; -webkit-nbsp-mode: space; line-break: =
after-white-space;">Greg,<div>Could you try 2 different things and let =
me know what the result is?<div>a) include &lt;cstring&gt; 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 =
class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>DM<br =
id=3D"lineBreakAtBeginningOfMessage"><div><br><blockquote =
type=3D"cite"><div>On Jul 8, 2025, at 9:35=E2=80=AFPM, Greg Hellings =
&lt;[email protected]&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><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&nbsp;version. =46rom=
 a quick glance around it appears there is a difference between =
&lt;string.h&gt;, which defines the function for C and &lt;cstring&gt; =
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&gt; &nbsp; 371 | &nbsp; &nbsp; &nbsp; =
&nbsp; if (!std::strpbrk(bufStart, "! :")) {<br>sword&gt; &nbsp; &nbsp; =
&nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
^~~~~~~<br>sword&gt; 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&gt; &nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;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&gt; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;from =
osis2mod.cpp:29:<br>sword&gt; =
/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&gt; &nbsp; &nbsp;92 | &nbsp; =
_CONST_RETURN char *__cdecl strpbrk(const char *_Str,const char =
*_Control);<br>sword&gt; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; ^~~~~~~<br>sword&gt; osis2mod.cpp:392:40: error: 'strpbrk' =
is not a member of 'std'; did you mean 'strpbrk'?<br>sword&gt; &nbsp; =
392 | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; char* =
lookahead =3D std::strpbrk(bufRead, ": -");<br>sword&gt; &nbsp; &nbsp; =
&nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp;^~~~~~~<br>sword&gt; =
/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&gt; &nbsp; &nbsp;92 | &nbsp; =
_CONST_RETURN char *__cdecl strpbrk(const char *_Str,const char =
*_Control);<br>sword&gt; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; ^~~~~~~<br>sword&gt; osis2mod.cpp:411:34: error: 'strpbrk' =
is not a member of 'std'; did you mean 'strpbrk'?<br>sword&gt; &nbsp; =
411 | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lookahead =
=3D std::strpbrk(bufRead, "! -");<br>sword&gt; &nbsp; &nbsp; &nbsp; | =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;^~~~~~~<br>sword&gt; =
/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&gt; &nbsp; &nbsp;92 | &nbsp; =
_CONST_RETURN char *__cdecl strpbrk(const char *_Str,const char =
*_Control);<br>sword&gt; osis2mod.cpp:434:40: error: 'strpbrk' is not a =
member of 'std'; did you mean 'strpbrk'?<br>sword&gt; &nbsp; 434 | =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; bufRead =3D std::strpbrk(tokenStart, " -");<br>sword&gt; =
&nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp;^~~~~~~<br>sword&gt; =
/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&gt; &nbsp; &nbsp;92 | &nbsp; =
_CONST_RETURN char *__cdecl strpbrk(const char *_Str,const char =
*_Control);<br>sword&gt; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; ^~~~~~~<br><br></div></div><br><div class=3D"gmail_quote =
gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Mon, Jul =
7, 2025 at 4:14=E2=80=AFPM DM Smith &lt;<a =
href=3D"mailto:[email protected]">[email protected]</a>&gt; =
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:&nbsp;<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>&nbsp;type(kind)[linePos,charPos] osisID=3DosisID: =
message<br><br>Where:<br>&nbsp;type =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The message =
type (e.g., "ERROR", "WARNING", "INFO").<br>&nbsp;kind =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The message =
category or kind (e.g., "REF", "PARSE").<br>&nbsp;linePos =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The position in the file of =
the last line that was read.<br>&nbsp;charPos =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The position in the line of =
the last character that was read.<br>&nbsp;osisID =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Optional) The current =
OSIS ID to include. May be nullptr or empty.<br>&nbsp;message =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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: =
[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></div></div></div></blockquote>=
</div><br></div></div></body></html>=

--Apple-Mail=_41D766EF-7F7A-43C4-9B00-1F8228911478--

--===============1910465375104714822==
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

--===============1910465375104714822==--