Discussion:
[Docutils-users] Weirdly generated C code
Matěj Cepl
2017-04-10 16:25:46 UTC
Permalink
Hi,

when trying to build M2Crypto with swig 3.0.12 and gcc 7.0.1
20170327 on Fedora/Rawhide. Swig generates this C file
(plain C, not C++)
https://mcepl.fedorapeople.org/tmp/_m2crypto_wrap.c.bz2

and when I try to build it with GCC I get the following errors
(the full log is at
https://mcepl.fedorapeople.org/tmp/python-clean-build-log.txt ).

Any ideas how to make it working? Another problem is that
I would need a solution which works from swig 2.0.10 upwards as
M2Crypto should be able to be build and maintained on RHEL-7 as
well. Any help?

Best,

Matěj
--
https://matej.ceplovi.cz/blog/, Jabber: ***@ceplovi.cz
GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8

Of course I'm respectable. I'm old. Politicians, ugly buildings,
and whores all get respectable if they last long enough.
--John Huston in "Chinatown."

====================================================================
SWIG/_m2crypto_wrap.c: In function ‘init_m2crypto’:
SWIG/_m2crypto_wrap.c:33295:79: warning: implicit declaration of function ‘SWIG_From_wchar_t’; did you mean ‘SWIG_FromCharPtr’? [-Wimplicit-function-declaration]
SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "__WCHAR_MAX",SWIG_From_wchar_t((wchar_t)((0x7fffffff+L\'\\0\'))));
^~~~~~~~~~~~~~~~~
SWIG_FromCharPtr
SWIG/_m2crypto_wrap.c:33295:120: error: stray ‘\’ in program
SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "__WCHAR_MAX",SWIG_From_wchar_t((wchar_t)((0x7fffffff+L\'\\0\'))));
^
SWIG/_m2crypto_wrap.c:33295:121: warning: missing terminating ' character
SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "__WCHAR_MAX",SWIG_From_wchar_t((wchar_t)((0x7fffffff+L\'\\0\'))));
^
SWIG/_m2crypto_wrap.c:33295:121: error: missing terminating ' character
SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "__WCHAR_MAX",SWIG_From_wchar_t((wchar_t)((0x7fffffff+L\'\\0\'))));
^~~~~~~~~~~
SWIG/_m2crypto_wrap.c:33295:119: error: ‘L’ undeclared (first use in this function)
SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "__WCHAR_MAX",SWIG_From_wchar_t((wchar_t)((0x7fffffff+L\'\\0\'))));
^
SWIG/_m2crypto_wrap.c:33295:119: note: each undeclared identifier is reported only once for each function it appears in
SWIG/_m2crypto_wrap.c:33296:3: error: expected ‘)’ before ‘SWIG_Python_SetConstant’
SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "__WCHAR_MIN",SWIG_From_int((int)((-(0x7fffffff+L'\0') -1))));
^~~~~~~~~~~~~~~~~~~~~~~
SWIG/_m2crypto_wrap.c:33345:118: error: stray ‘\’ in program
SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "WCHAR_MAX",SWIG_From_wchar_t((wchar_t)((0x7fffffff+L\'\\0\'))));
^
SWIG/_m2crypto_wrap.c:33345:119: warning: missing terminating ' character
SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "WCHAR_MAX",SWIG_From_wchar_t((wchar_t)((0x7fffffff+L\'\\0\'))));
^
SWIG/_m2crypto_wrap.c:33345:119: error: missing terminating ' character
SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "WCHAR_MAX",SWIG_From_wchar_t((wchar_t)((0x7fffffff+L\'\\0\'))));
^~~~~~~~~~~
SWIG/_m2crypto_wrap.c:33678:1: error: expected declaration or statement at end of input
}
David Goodger
2017-04-10 16:52:32 UTC
Permalink
You wrote to the wrong list.

David Goodger
<http://python.net/~goodger>
Post by Matěj Cepl
Hi,
when trying to build M2Crypto with swig 3.0.12 and gcc 7.0.1
20170327 on Fedora/Rawhide. Swig generates this C file
(plain C, not C++)
https://mcepl.fedorapeople.org/tmp/_m2crypto_wrap.c.bz2
and when I try to build it with GCC I get the following errors
(the full log is at
https://mcepl.fedorapeople.org/tmp/python-clean-build-log.txt ).
Any ideas how to make it working? Another problem is that
I would need a solution which works from swig 2.0.10 upwards as
M2Crypto should be able to be build and maintained on RHEL-7 as
well. Any help?
Best,
Matěj
--
GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8
Of course I'm respectable. I'm old. Politicians, ugly buildings,
and whores all get respectable if they last long enough.
--John Huston in "Chinatown."
====================================================================
SWIG/_m2crypto_wrap.c:33295:79: warning: implicit declaration of function ‘SWIG_From_wchar_t’; did you mean ‘SWIG_FromCharPtr’? [-Wimplicit-function-declaration]
SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "__WCHAR_MAX",SWIG_From_wchar_t((wchar_t)((0x7fffffff+L\'\\0\'))));
^~~~~~~~~~~~~~~~~
SWIG_FromCharPtr
SWIG/_m2crypto_wrap.c:33295:120: error: stray ‘\’ in program
SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "__WCHAR_MAX",SWIG_From_wchar_t((wchar_t)((0x7fffffff+L\'\\0\'))));
^
SWIG/_m2crypto_wrap.c:33295:121: warning: missing terminating ' character
SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "__WCHAR_MAX",SWIG_From_wchar_t((wchar_t)((0x7fffffff+L\'\\0\'))));
^
SWIG/_m2crypto_wrap.c:33295:121: error: missing terminating ' character
SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "__WCHAR_MAX",SWIG_From_wchar_t((wchar_t)((0x7fffffff+L\'\\0\'))));
^~~~~~~~~~~
SWIG/_m2crypto_wrap.c:33295:119: error: ‘L’ undeclared (first use in this function)
SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "__WCHAR_MAX",SWIG_From_wchar_t((wchar_t)((0x7fffffff+L\'\\0\'))));
^
SWIG/_m2crypto_wrap.c:33295:119: note: each undeclared identifier is reported only once for each function it appears in
SWIG/_m2crypto_wrap.c:33296:3: error: expected ‘)’ before ‘SWIG_Python_SetConstant’
SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "__WCHAR_MIN",SWIG_From_int((int)((-(0x7fffffff+L'\0') -1))));
^~~~~~~~~~~~~~~~~~~~~~~
SWIG/_m2crypto_wrap.c:33345:118: error: stray ‘\’ in program
SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "WCHAR_MAX",SWIG_From_wchar_t((wchar_t)((0x7fffffff+L\'\\0\'))));
^
SWIG/_m2crypto_wrap.c:33345:119: warning: missing terminating ' character
SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "WCHAR_MAX",SWIG_From_wchar_t((wchar_t)((0x7fffffff+L\'\\0\'))));
^
SWIG/_m2crypto_wrap.c:33345:119: error: missing terminating ' character
SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "WCHAR_MAX",SWIG_From_wchar_t((wchar_t)((0x7fffffff+L\'\\0\'))));
^~~~~~~~~~~
SWIG/_m2crypto_wrap.c:33678:1: error: expected declaration or statement at end of input
}
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Docutils-users mailing list
https://lists.sourceforge.net/lists/listinfo/docutils-users
Please use "Reply All" to reply to the list.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to
Matej Cepl
2017-04-10 17:17:12 UTC
Permalink
Post by David Goodger
You wrote to the wrong list.
Damn! Too many lists. I am sorry.

Matěj
--
https://matej.ceplovi.cz/blog/, Jabber: ***@ceplovi.cz
GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8

Of course I'm respectable. I'm old. Politicians, ugly buildings,
and whores all get respectable if they last long enough.
--John Huston in "Chinatown."
Continue reading on narkive:
Search results for '[Docutils-users] Weirdly generated C code' (Questions and Answers)
23
replies
What is your reason and logic behind believing in God?
started 2010-02-04 00:34:39 UTC
religion & spirituality
Loading...