Discussion:
[sword-devel] gcc 4.9.0
Greg Hellings
2014-05-16 04:19:59 UTC
Permalink
What's wrong with this line that would cause gcc 4.9.0 to complain where
previously it did not?

inline SWBuf &operator >>(unsigned long n) { setSize(length()+n);
memmove(buf+n, buf, length()-n); return *this; }

Line 362 in swbuf.h

--Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140515/1cb1e8e7/attachment.html>
Greg Hellings
2014-05-16 04:28:56 UTC
Permalink
Gonna self-reply on this one:

Seems that gcc 4.9.0 is fine with that line but swig has upgraded to 3.0.0
which is not. Guess I'll have to file a bug with them.

--Greg
Post by Greg Hellings
What's wrong with this line that would cause gcc 4.9.0 to complain where
previously it did not?
inline SWBuf &operator >>(unsigned long n) { setSize(length()+n);
memmove(buf+n, buf, length()-n); return *this; }
Line 362 in swbuf.h
--Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140515/0f57b04e/attachment.html>
R Johnson
2014-05-16 20:37:15 UTC
Permalink
Interestingly, I just got that exact same error now when I tried to
build Python bindings to Sword with VS2010, so this isn't just a GCC
problem. I also got this same error when I tried to build Sword using
the C# project file (and had mentioned it to you and Ben).

As I said in my other thread, it makes no sense why that line (362)
should cause an error when all of the functions called in it are used
without any problem in the preceding lines. The only thing different I
can see about it is that it uses the >> operator, so it seems to me like
the error probably is a SWIG bug.

(Maybe the C# project file was working better than we thought. But I
still would prefer not to use it, since it's unmaintained and would
likely need numerous hacks to work with Python. And CMake is more
official and much nicer to use.)

Have you been able to contact SWIG about this bug? If not, should I do
so? Where do you think we should go from here?

Thank you.

-- Timothy
Greg Hellings
2014-05-16 22:10:20 UTC
Permalink
I encountered the bug while I was working from Fedora's rawhide in an
attempt to build sword 1.7.3 with bindings for the next release of Fedora.
I filed the issue with the Fedora bugtracker and they suggested I file it
upstream. I have not yet copied that bug report to upstream.

I can verify that the exact same code builds fine with swig 2.0.11 in
Fedora 20 and gcc 4.8.?. But with you getting it on Windows with swig 3.0
and MSVC rules out the possibility that it's a gcc 4.8-4.9 issue. I'll copy
my bugzilla from redhat to the upstream tracker next chance I get. Until
that time, you can try building with swig 2.0.12, which is the latest
pre-3.0 release that I'm aware of. It's also entirely possible that there
is a swig devel repository somewhere that might already have this resolved
that we could check. It would probably be easier for me to check that on
Linux than for you to compile swig on Windows.

--Greg


On Fri, May 16, 2014 at 3:37 PM, R Johnson <
Interestingly, I just got that exact same error now when I tried to build
Python bindings to Sword with VS2010, so this isn't just a GCC problem. I
also got this same error when I tried to build Sword using the C# project
file (and had mentioned it to you and Ben).
As I said in my other thread, it makes no sense why that line (362) should
cause an error when all of the functions called in it are used without any
problem in the preceding lines. The only thing different I can see about it
is that it uses the >> operator, so it seems to me like the error probably
is a SWIG bug.
(Maybe the C# project file was working better than we thought. But I still
would prefer not to use it, since it's unmaintained and would likely need
numerous hacks to work with Python. And CMake is more official and much
nicer to use.)
Have you been able to contact SWIG about this bug? If not, should I do so?
Where do you think we should go from here?
Thank you.
-- Timothy
_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140516/6dfc5747/attachment.html>
Jaak Ristioja
2014-05-17 06:02:05 UTC
Permalink
What is the error?
Post by Greg Hellings
What's wrong with this line that would cause gcc 4.9.0 to complain
where previously it did not?
inline SWBuf &operator >>(unsigned long n) { setSize(length()+n);
memmove(buf+n, buf, length()-n); return *this; }
Line 362 in swbuf.h
--Greg
_______________________________________________ sword-devel mailing
list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel Instructions
to unsubscribe/change your settings at above page
Greg Hellings
2014-05-17 06:17:36 UTC
Permalink
It's a swig problem. It's just reporting "Syntax error" on that line. No
more specific details than that. gcc cleanly compiles the line, as does
MSVC, and clang. And cmake 2.0.12. Seems to be a swig 3.0 regression.

--Greg
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
What is the error?
Post by Greg Hellings
What's wrong with this line that would cause gcc 4.9.0 to complain
where previously it did not?
inline SWBuf &operator >>(unsigned long n) { setSize(length()+n);
memmove(buf+n, buf, length()-n); return *this; }
Line 362 in swbuf.h
--Greg
_______________________________________________ sword-devel mailing
list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel Instructions
to unsubscribe/change your settings at above page
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQgcBAEBAgAGBQJTdvtaAAoJELozJlbjIn79okk//jUGsLMHt4Q+Qb1JbmUiht00
ntChsziBuDc+n3DNjx5Z4fQlZiea/XTT0m/zkn9J29POhGynsgOhcCTHasTnbzER
A2bWrn1Pnt1Ln4MB7Y+pj6CdBdyOiGDLAzgQStt7BcGx2YCgvtI68bTAu/tCJnlH
RYQ8Zx0YcX0VkB45K9Yv2ws9Bh4Dd3vqQC29RoeeOzYDQKyKb0mMecP94picBtlX
TAEd/BOZiyXc3tnPyXBVpjgv+529hfX6pMLTXQqLDRaysflhMDukjdSol80U83xz
gfvLPSgEXQBtbqHE1zRRRvbtye3UyhFzhscZCBL/IM4bJFuJfG0wAXZRwzXoFzlU
ereJO3e/mmp7xVBzJm/tmT/8sMeuLjx6qe77mxLVnrGXhG+JLVUhgDcCYBKMTFn2
N1JXa0lSUM/2oEV7S54YRK9wARurcW8PSIZBu0g7FQRZbrzmRULHx1/cS3dHwiI8
Hb4tFwebWydTyMmlyqgY2uGaaoFSVkJVW7D4B/wzX3EaRBG2yAagnOM+0VziXcbz
1RzLGQ/Jk9DL/fCTDlgL9FYuVKlfgOGQdcoY4f8MmAvis1TQponF5R3xm3riSX3H
/PTYUNGHZSzEQeMlJfpdcWR6EOYDaAiIq4Ox17EGPBqADhW4uzotmDoLf16jrUHP
gfeLnBFOyfTqbja7OKzyUADa1rQG2f9TRLL89/q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dAmULoXQjSUVg8rIcF2FjubIH+OAX4
UnMfVZz3nY6phaeyt0dDfeeIkkINMAykSFU+JL2STWATulW8r05hI0xKGOdEx17r
B73jPx5iqhXZJOPbaidFI79Ob4YXARn0wsHfSeO7VZP0rzkFxsPl/6Mi6579yJVL
MrTOq5ir8XbSfDUXPP8TJHfux8ouBZ0SwLU4nBTf+ylrqvEaQ8jgOfC2DMGHPENO
UvzZYBYLfa8Di1nI59rhcseJjsLOSq2bhyhLKCSgSaYr6ZXDV515N4m16NgvCR+3
0XMDrCp4sMKyx1NekNmsFWSPoxyTevjenahs5yZ4J2UZ0gmPUE9NCV2vUkqLHY6a
NFFGqgKfTy/6qB8+IMm9eFVLiWCH5H11dZyu5y8TEsbM9e17vFBVe4utHHvn2csz
HsO7QzCYMlwZ3lx5aCEN3/T8b7Q52zVl3OLnztPJQ1wk8Vh5hMnqyj9WsEQcHkY+
SMCgpfHH8yEjLdOjSFlwTA+Q8nfUncmMP1GXD+TUsvp4tZDYvqzJOcr7MhClQ81X
f5P7i/LM0lAg5bybtpvGyDuX9+134YyXfaFQTGs73Illcec8s7vtiYBFm/NRd7Xf
4ppHV6ePMdNyXSFUZ1FEHdK29gpGsKFU1lz2ZVaiMSGmjYXsyE1Msjm6JyX+PZHL
SvrD/QW/EldaeVjXPbHIQQ2V/Phy/e7BJ/0BnReep+pdP9UgqIwDsrpQpjcTLTVr
kdSlbMokKapLQmQZhg/XxcKUrM34M1VekAQGbtXIumSfS/F0bhy2/gbXGK5ZmDGK
Vp1aCtJ0EnXuzzRlZAuUQDgMtx15OXntnhQDQNiy88+wrN3FFaVyV/uMRuc97SYM
Mkf/B2eb/N5hycz46o4gA1iMQZtJNbx1lPpAF5m8WBniEdrJ5Uw7aEEehEB9SOhM
9qu3f0ZJ7vwN0f6MbERx
=HyfJ
-----END PGP SIGNATURE-----
_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140517/c1fecbab/attachment.html>
Loading...