Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildozer ios debug build fails on MacOS Mavericks #83

Closed
dusty-phillips opened this issue Feb 17, 2014 · 6 comments
Closed

buildozer ios debug build fails on MacOS Mavericks #83

dusty-phillips opened this issue Feb 17, 2014 · 6 comments

Comments

@dusty-phillips
Copy link

I'm not sure if this is an OS flaw or a missing/invalid dependency, but when I try to build my Kivy app for ios, I get an error:

~/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios/build/python/lib
~/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios/src/ios ~/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios
-- cythonize ['/Users/dgp/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios/tools/cythonize.py', 'ios.pyx']
cythonize: ios.pyx
no need to rewrite ios.pyx
running build_ext
building 'ios' extension
creating build
creating build/temp.macosx-10.9-intel-2.7
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -I/Users/dgp/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios/build/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -miphoneos-version-min=7.0 -O3 -arch i386 -arch x86_64 -I/Users/dgp/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios/tmp/Python-2.7.1/Include -I/Users/dgp/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios/tmp/Python-2.7.1 -c ios.c -o build/temp.macosx-10.9-intel-2.7/ios.o
In file included from ios.c:16:
In file included from /Users/dgp/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios/tmp/Python-2.7.1/Include/Python.h:19:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0/include/limits.h:38:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/limits.h:63:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/cdefs.h:655:2: error: Unsupported architecture
#error Unsupported architecture
 ^
In file included from ios.c:16:
In file included from /Users/dgp/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios/tmp/Python-2.7.1/Include/Python.h:19:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0/include/limits.h:38:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/limits.h:64:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/machine/limits.h:8:2: error: architecture not supported
#error architecture not supported
 ^
In file included from ios.c:16:
In file included from /Users/dgp/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios/tmp/Python-2.7.1/Include/Python.h:33:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/stdio.h:67:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/_types.h:27:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:33:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported
#error architecture not supported
 ^
In file included from ios.c:16:
In file included from /Users/dgp/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios/tmp/Python-2.7.1/Include/Python.h:33:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/stdio.h:67:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/_types.h:27:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:94:9: error: unknown type name '__int64_t'
typedef __int64_t       __darwin_blkcnt_t;      /* total blocks */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:95:9: error: unknown type name '__int32_t'
typedef __int32_t       __darwin_blksize_t;     /* preferred block size */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:96:9: error: unknown type name '__int32_t'
typedef __int32_t       __darwin_dev_t;         /* dev_t */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:99:9: error: unknown type name '__uint32_t'
typedef __uint32_t      __darwin_gid_t;         /* [???] process and group IDs */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:100:9: error: unknown type name '__uint32_t'
typedef __uint32_t      __darwin_id_t;          /* [XSI] pid_t, uid_t, or gid_t*/
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:101:9: error: unknown type name '__uint64_t'
typedef __uint64_t      __darwin_ino64_t;       /* [???] Used for 64 bit inodes */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:107: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/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:109:9: error: unknown type name '__uint16_t'
typedef __uint16_t      __darwin_mode_t;        /* [???] Some file attributes */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:110:9: error: unknown type name '__int64_t'
typedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:111:9: error: unknown type name '__int32_t'
typedef __int32_t       __darwin_pid_t;         /* [???] process and group IDs */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:131:9: error: unknown type name '__uint32_t'
typedef __uint32_t      __darwin_sigset_t;      /* [???] signal set */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:132:9: error: unknown type name '__int32_t'
typedef __int32_t       __darwin_suseconds_t;   /* [???] microseconds */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:133:9: error: unknown type name '__uint32_t'
typedef __uint32_t      __darwin_uid_t;         /* [???] user IDs */
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:134:9: error: unknown type name '__uint32_t'
typedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */
        ^
In file included from ios.c:16:
In file included from /Users/dgp/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios/tmp/Python-2.7.1/Include/Python.h:33:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/stdio.h:71:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types/_va_list.h:31:9: error: unknown type name '__darwin_va_list'; did you mean '__builtin_va_list'?
typedef __darwin_va_list va_list;
        ^
note: '__builtin_va_list' declared here
In file included from ios.c:16:
In file included from /Users/dgp/code/kivapp/code/10-02_buildozer_ios/.buildozer/ios/platform/kivy-ios/tmp/Python-2.7.1/Include/Python.h:33:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/stdio.h:72:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types/_size_t.h:30:9: error: unknown type name '__darwin_size_t'; did you mean '__darwin_ino_t'?
typedef __darwin_size_t        size_t;
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/sys/_types.h:103:26: note: '__darwin_ino_t' declared here
typedef __darwin_ino64_t __darwin_ino_t;        /* [???] Used for inodes */
                         ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' failed with exit status 1
# Command failed: tools/build-all.sh

This looks to me like a missing dependency or invalid compiler version, so here's mine:

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix

Any ideas to solve would be most welcome!

@tito
Copy link
Member

tito commented Feb 19, 2014

Something is wrong. I don't know why, but in the compilation line, there is: -arch i386 -arch x86_64. This will obviously not work for ARM/iOS. But i don't know who is adding it. Do you have already customized env ?

@dusty-phillips
Copy link
Author

I haven't customized it on purpose. I deleted my ~/.buildozer and my .buildozer and built from there. The only thing I remember changing is I added a symlink from /usr/local/bin/pip-2.7 to /usr/local/bin/pip2.7 to work around #22.

I had to install some extra packages that buildozer was previously failing on; I don't remember the details, but it was auto-conf related stuff. Other than that, I think it's a pretty standard macos install.

@dusty-phillips
Copy link
Author

On posting that, I realized that having the symlink in /usr/local/bin wouldn't help much. ;-) So I put one in .buildozer/venv/bin as well, but I'm still getting arch related errors.

@tito
Copy link
Member

tito commented Apr 21, 2014

Things to check:

  • ensure that you don't have custom CC / CXX in your environment
  • ensure you don't have $HOSTPYTHON variable set
  • ensure that if you have ARCHFLAGS, it doesn't contain -x86 -...
  • ensure your shell is a bash/sh, not another one.

Tell me if you have something different :)
And / or, dump your 'env' here please.

The -arch is not determined by Cython, but by Python and the env/platform.

@dusty-phillips
Copy link
Author

Ah, I was using ZSH, maybe that was the problem. I don't have a test Apple device anymore, but I'll try it again someday.

@tito
Copy link
Member

tito commented Mar 8, 2015

The kivy-ios toolchain has been rewritten, this is not valid anymore :)

@tito tito closed this as completed Mar 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants