FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Propose allow gcc usage instead of clang if not available · Issue #458 · pythonnet/pythonnet · GitHub

Repository navigation

Propose allow gcc usage instead of clang if not available #458

Closed

Description

Environment

  • Pythonnet version: 2.3.0
  • Python version: 3.4
  • Operating System: Ubuntu 14.04

Details

  • Describe what you were trying to get done.

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

  1. I replaced string "clang" with "gcc" in geninterop.py.
  2. run setup.py.

Activity

  1. den-run-ai commented on May 3, 2017

    Contributor
  2. testrunner123 commented on May 4, 2017

    ContributorAuthor

    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 ?

    So what do you think?

  3. den-run-ai commented on May 31, 2017

    Contributor

    I think @tonyroberts chose clang because this is recommended by pycparser and is very light dependency on all platforms.

  4. 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.

    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)

  5. den-run-ai commented on Jul 6, 2017

    Contributor
  6. CoFlows commented on Jul 6, 2017

    Problem is that I am running from Azure Notebook so can't update mono...

  7. 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.

  8. filmor commented on Aug 17, 2021

    Member

    This is not necessary anymore as we don't require pycparser for supported versions during build on master.

  9. matrixhead commented on Aug 17, 2021

    👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL