I was trying to build on my system. But I don't have clang. So I tried with my gcc 4.9.4.
It appears that it works beautifully and generates interop34m.cs with same content as the one made with clang. I suggest that geninterop.py should run with "gcc" if clang is not installed. At least if gcc has version >=4.9.4
I do not think that we need update fake_libc_include. Python C-extension api do not use lot of things and current fake_libc fullfill it completely. Newer fake_libc has IMHO just more fake headers important for other projects.
I do not program in python :) I just replaced string "clang" with "gcc" and it appears to work. I also believe that on Windows VS2015 C compiler can be used, because it has /E and /EP options that yield similar results. The only difference is that VS2015 compiler uses / instead of - for options.
Besides that it is not clear for me why "clang" was used until now and what it should be in future. I would propose:
always use "gcc" on linux, because it is by default already installed
on Mac it may still be "clang" ( I do not have Mac)
on Windows VS2015 or "gcc" (I know some people use mingw) can be probed and used ?
Python 3.6.0 |Anaconda custom (64-bit)| (default, Dec 23 2016, 12:22:00)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
import clr
Error: No managed allocator, but we need one for AOT.
Are you using non-standard GC options?
Stacktrace:
at <0xffffffff>
at System.Collections.Hashtable..ctor (int,single) <0x0020d>
at System.Collections.Hashtable..ctor () <0x00022>
at Python.Runtime.DelegateManager..ctor () <0x00180>
at Python.Runtime.PythonEngine.Initialize (System.Collections.Generic.IEnumerable`1,bool) <0x0008b>
at Python.Runtime.PythonEngine.Initialize (bool) <0x0002f>
at Python.Runtime.PythonEngine.InitExt () <0x00023>
at (wrapper runtime-invoke) .runtime_invoke_intptr (object,intptr,intptr,intptr) <0x00062>
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
On Wed, Jul 5, 2017, 6:08 PM QuantApp ***@***.***> wrote:
Any ideas on the following?
I forked the python net project and changed the clang flag for gcc.
I wish to run this Azure Notebooks
!pip install git+https://github.com/quantapp/pythonnet
Python 3.6.0 |Anaconda custom (64-bit)| (default, Dec 23 2016, 12:22:00)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
import clr
Error: No managed allocator, but we need one for AOT.
Are you using non-standard GC options?
Stacktrace:
at <0xffffffff>
at System.Collections.Hashtable..ctor (int,single) <0x0020d>
at System.Collections.Hashtable..ctor () <0x00022>
at Python.Runtime.DelegateManager..ctor () <0x00180>
at Python.Runtime.PythonEngine.Initialize
(System.Collections.Generic.IEnumerable`1,bool) <0x0008b>
at Python.Runtime.PythonEngine.Initialize (bool) <0x0002f>
at Python.Runtime.PythonEngine.InitExt () <0x00023>
at (wrapper runtime-invoke) .runtime_invoke_intptr
(object,intptr,intptr,intptr) <0x00062>
Native stacktrace:
/usr/lib/libmonosgen-2.0.so.1(+0xdac0d) [0x7fad34baac0d]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390) [0x7fad36adf390]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38) [0x7fad35e21428]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a) [0x7fad35e2302a]
/usr/lib/libmonosgen-2.0.so.1(+0x26c1d9) [0x7fad34d3c1d9]
/usr/lib/libmonosgen-2.0.so.1(+0x26c3e7) [0x7fad34d3c3e7]
/usr/lib/libmonosgen-2.0.so.1(+0x26c492) [0x7fad34d3c492]
/usr/lib/libmonosgen-2.0.so.1(+0xc6170) [0x7fad34b96170]
/usr/lib/libmonosgen-2.0.so.1(+0xc91f4) [0x7fad34b991f4]
/usr/lib/libmonosgen-2.0.so.1(+0xcfefb) [0x7fad34b9fefb]
/usr/lib/libmonosgen-2.0.so.1(+0xdccdd) [0x7fad34baccdd]
[0x40adec15]
Debug info from gdb:
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
Aborted (core dumped)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#458 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHgZ5UfMcHMZOH8F4u_HQ0ov9pJWcrYIks5sLBd6gaJpZM4NPZFY>
.
Activity
den-run-ai commented on May 3, 2017
@testrunner123 pull requests are welcome! We should probably also update fake_libc_include:
https://github.com/eliben/pycparser/tree/master/utils/fake_libc_include
https://github.com/pythonnet/pythonnet/tree/master/tools/geninterop/fake_libc_include
testrunner123 commented on May 4, 2017
I do not think that we need update fake_libc_include. Python C-extension api do not use lot of things and current fake_libc fullfill it completely. Newer fake_libc has IMHO just more fake headers important for other projects.
I do not program in python :) I just replaced string "clang" with "gcc" and it appears to work. I also believe that on Windows VS2015 C compiler can be used, because it has /E and /EP options that yield similar results. The only difference is that VS2015 compiler uses / instead of - for options.
Besides that it is not clear for me why "clang" was used until now and what it should be in future. I would propose:
So what do you think?
den-run-ai commented on May 31, 2017
I think @tonyroberts chose clang because this is recommended by pycparser and is very light dependency on all platforms.
CoFlows commented on Jul 5, 2017
Any ideas on the following?
I forked the python net project and changed the clang flag for gcc.
I wish to run this Azure Notebooks
!pip install git+https://github.com/quantapp/pythonnet
Python 3.6.0 |Anaconda custom (64-bit)| (default, Dec 23 2016, 12:22:00)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
Stacktrace:
at <0xffffffff>
at System.Collections.Hashtable..ctor (int,single) <0x0020d>
at System.Collections.Hashtable..ctor () <0x00022>
at Python.Runtime.DelegateManager..ctor () <0x00180>
at Python.Runtime.PythonEngine.Initialize (System.Collections.Generic.IEnumerable`1,bool) <0x0008b>
at Python.Runtime.PythonEngine.Initialize (bool) <0x0002f>
at Python.Runtime.PythonEngine.InitExt () <0x00023>
at (wrapper runtime-invoke) .runtime_invoke_intptr (object,intptr,intptr,intptr) <0x00062>
Native stacktrace:
/usr/lib/libmonosgen-2.0.so.1(+0xdac0d) [0x7fad34baac0d] /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390) [0x7fad36adf390] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38) [0x7fad35e21428] /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a) [0x7fad35e2302a] /usr/lib/libmonosgen-2.0.so.1(+0x26c1d9) [0x7fad34d3c1d9] /usr/lib/libmonosgen-2.0.so.1(+0x26c3e7) [0x7fad34d3c3e7] /usr/lib/libmonosgen-2.0.so.1(+0x26c492) [0x7fad34d3c492] /usr/lib/libmonosgen-2.0.so.1(+0xc6170) [0x7fad34b96170] /usr/lib/libmonosgen-2.0.so.1(+0xc91f4) [0x7fad34b991f4] /usr/lib/libmonosgen-2.0.so.1(+0xcfefb) [0x7fad34b9fefb] /usr/lib/libmonosgen-2.0.so.1(+0xdccdd) [0x7fad34baccdd] [0x40adec15]Debug info from gdb:
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
Aborted (core dumped)
den-run-ai commented on Jul 6, 2017
CoFlows commented on Jul 6, 2017
Problem is that I am running from Azure Notebook so can't update mono...
matrixhead commented on Aug 17, 2021
hey, can i work on this issue? I'm quite new to this i don't know where to start.
filmor commented on Aug 17, 2021
This is not necessary anymore as we don't require pycparser for supported versions during build on master.
matrixhead commented on Aug 17, 2021
👍