Skip to content

Error Compiling #1

Open
Open

Description

@zoecarver

When I tried to compile this project I got the following error:

EXCEPTION
Traceback (most recent call last):
  File "compile.py", line 26, in <module>
    line: assert os.path.exists(DEVROOT)
    locals:
      os = <local> <module 'os' from '/usr/local/Cellar/python/2.7.14_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.pyc'>
      os.path = <local> <module 'posixpath' from '/usr/local/Cellar/python/2.7.14_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.pyc'>
      os.path.exists = <local> <function exists at 0x10e4a1ed8>
      DEVROOT = <local> '/Developer/Platforms/iPhoneOS.platform/Developer', len = 48
AssertionError

This project looks super cool and I would love to play around with it, thanks!

Activity

  1. zoecarver commented on Feb 10, 2018

    @zoecarver
    Author

    I fixed this issue by changing LIBTOOL, LD, CC, SDKROOT, and DEVROOT in compile.py. However, now it is giving me the error:

    CPython/Modules/posixmodule.c:2660:11: error: 'system' is
          unavailable: not available on iOS
        sts = system(command);
              ^

    Sorry for all the question, I am just really excited to get this to work :)

  2. zoecarver commented on Feb 10, 2018

    @zoecarver
    Author

    I got rid of the error simply by deleting the line, this does not seem to be a good long term solution, but it compiled successfully. Now, in XCode, I am getting: Implicit declaration of function 'Py_Initialize' is invalid in C99 when I try to call any of the methods (eg. Py_Initialize()). Any ideas on why this is?

  3. albertz commented on Feb 14, 2018

    @albertz
    Owner

    Probably you miss the right #include statement which declares Py_Initialize.

  4. zoecarver commented on Feb 14, 2018

    @zoecarver
    Author

    So I played around with it quite a bit more. I finally got to a place where I got everything working except CPython was having a bunch of errors - I am not exactly sure why. Xcode was complaining about angular vs quoted imports. After I fixed all of these it gave me errors about undefined functions and variables, this is where I pretty much gave up; I don't think I have the skills to debug most of that. That being said, I would really like to get this working and if you can provide some help I would really appreciate it.

    PS. The thing I forgot to include was Python.h. Another thing that I needed to do was compile with the arm64 architecture.

    Edit

    If you want to see the errors I am getting I put my project here and you can see my modified version of python-embedded here. Thanks again for the help :)

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions