Search code examples
pythonpython-3.xpipqpid

Installing python-qpid-proton fails on MacOSX python 3.8


This previously hasn't happened so I don't know what has changed over the course of the last few months but unfortunately I've found myself in the position of having to re-install python-qpid-proton and now I'm running into errors that I can not find a good fix for at all.

The Problem

If I run the following line:

pip install python-qpid-proton

I get the following output all in red:

    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported
    #error architecture not supported
     ^
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/src/core/log.c:20:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/src/core/log_private.h:27:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/log.h:23:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/logger.h:32:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/object.h:26:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/types.h:27:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/type_compat.h:75:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/types.h:79:
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'
    typedef __int64_t       __darwin_blkcnt_t;      /* total blocks */
            ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
    typedef __int32_t       __darwin_blksize_t;     /* preferred block size */
            ^
    note: '__int128_t' declared here
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
    typedef __int32_t       __darwin_dev_t;         /* dev_t */
            ^
    note: '__int128_t' declared here
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
    typedef __uint32_t      __darwin_gid_t;         /* [???] process and group IDs */
            ^
    note: '__uint128_t' declared here
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
    typedef __uint32_t      __darwin_id_t;          /* [XSI] pid_t, uid_t, or gid_t*/
            ^
    note: '__uint128_t' declared here
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'
    typedef __uint64_t      __darwin_ino64_t;       /* [???] Used for 64 bit inodes */
            ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
    typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
            ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'; did you mean '__uint128_t'?
    typedef __uint16_t      __darwin_mode_t;        /* [???] Some file attributes */
            ^
    note: '__uint128_t' declared here
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'
    typedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */
            ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
    typedef __int32_t       __darwin_pid_t;         /* [???] process and group IDs */
            ^
    note: '__int128_t' declared here
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
    typedef __uint32_t      __darwin_sigset_t;      /* [???] signal set */
            ^
    note: '__uint128_t' declared here
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
    typedef __int32_t       __darwin_suseconds_t;   /* [???] microseconds */
            ^
    note: '__int128_t' declared here
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
    typedef __uint32_t      __darwin_uid_t;         /* [???] user IDs */
            ^
    note: '__uint128_t' declared here
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
    typedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */
            ^
    note: '__uint128_t' declared here
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/src/core/log.c:20:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/src/core/log_private.h:27:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/log.h:23:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/logger.h:32:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/object.h:26:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/types.h:27:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/type_compat.h:75:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/types.h:81:
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/machine/endian.h:37:2: error: architecture not supported
    #error architecture not supported
     ^
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/src/core/log.c:20:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/src/core/log_private.h:27:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/log.h:23:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/logger.h:32:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/object.h:26:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/types.h:27:
    In file included from /private/var/folders/l_/y17fz4qs6mn4wvdb781hnn50dbr4xv/T/pip-install-01kp069a/python-qpid-proton/include/proton/type_compat.h:75:
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/types.h:95:9: error: unknown type name 'u_int64_t'
    typedef u_int64_t               u_quad_t;       /* quads */
            ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    20 errors generated.
    error: command 'xcrun' failed with exit status 1

I'm not sure what I should do at this point or if I should go to the creators and report this. Any help would be appreciated.

Environment - Edit

I use Python 3.7 and now 3.8. I've installed this using homebrew. I do not use the OSX version which is python 2.7. I also use virtualenv to create as an environment for python applications. The reason why I had to reinstall qpid is because if I let my solution sit for a while (working on something else) then I come back to it it breaks. I think the reason is that I inadvertently updated python from 3.7 to 3.8 using brew update. Which I probably shouldn't have done. This broke virtualenv using python3.7.

So as you know, I use a virtual environment for my application. I'm using 3.8 python and when I'm in my virtual environment and running pip install the above problem happens.

Thanks,


Solution

  • Well! Qpid Proton doesn't work with 3.8 it looks like. 3.7.8 installs Qpid Proton just fine.

    As a solution I had to bypass homebrew and use pyenv.

    Using pyenv's directory and virtualenv, I was able to successfully re-install qpid and run the app. I still have to go back and clean up homebrew and get rid of python entirely on that ecosphere so I can control it using pyenv instead. Essentially when brew updated to 3.8 (without me knowing it) it broke my code. Going back and downgrading through homebrew seemed expensive so I opted to use another python environment tool.

    So anyone out there, don't upgrade to 3.8 yet if you're using Qpid Proton from Apache.