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

ios deployment fails (buildozer --verbose ios debug deploy) #330

Closed
ghost opened this issue May 3, 2016 · 26 comments
Closed

ios deployment fails (buildozer --verbose ios debug deploy) #330

ghost opened this issue May 3, 2016 · 26 comments

Comments

@ghost
Copy link

ghost commented May 3, 2016

ios deployment fails on OSX El Capitan 10.11.4, iPhone 6, iOS 9.3
Error:

Run 'make ios-deploy'

Cwd /Users/victor/Documents/Projects/kivy/KWeather/.buildozer/ios/platform/ios-deploy

Command failed: make ios-deploy

Buildozer failed to execute the last command

The error might be hidden in the log above this error

Please read the full log, and search for it before

raising an issue with buildozer itself.

In case of a bug report, please add a full log with log_level = 2

@kived
Copy link
Contributor

kived commented May 3, 2016

This bug has already been fixed in master. Please update to the latest master version (i.e. pip install https://github.com/kivy/buildozer/archive/master.zip), and remember to search the existing issues (both open and closed) before submitting a new one.

@kived kived closed this as completed May 3, 2016
@ghost
Copy link
Author

ghost commented May 3, 2016

thanks i appreciate it

@cbenhagen
Copy link
Contributor

@kived maybe we could release a point release with this fix?

@ghost
Copy link
Author

ghost commented May 3, 2016

uninstalled buildozer, re-installed as above, getting xcodebuild error. Oh no.

@kived
Copy link
Contributor

kived commented May 3, 2016

Is it the bitcode error? I have a PR for that (#317). If that is your issue, try installing my branch (pip install https://github.com/kived/buildozer/archive/ios-bitcode.zip), and if it fixes your problem note as such on the PR.

@ghost
Copy link
Author

ghost commented May 3, 2016

IOError: [Errno 2] No such file or directory: u'/Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios/build/kivy/i386/kivy/.building'

Command failed: ./toolchain.py build kivy

Buildozer failed to execute the last command

it was looking for setup.py before, now .building... dont think its compatible

@kived
Copy link
Contributor

kived commented May 3, 2016

Please provide full logs, and fence them in a code block (the <> icon on the toolbar).

@ghost
Copy link
Author

ghost commented May 3, 2016

# (ignored) Download ios
# (ignored) Extract ios
# (ignored) Build_all ios
# (ignored) Download kivy
# (ignored) Extract kivy
Build_all kivy
Build kivy for i386, x86_64, armv7, arm64 (filtered)
Build kivy
Traceback (most recent call last):
  File "./toolchain.py", line 1310, in <module>
    ToolchainCL()
  File "./toolchain.py", line 1081, in __init__
    getattr(self, args.command)()
  File "./toolchain.py", line 1105, in build
    build_recipes(args.recipe, ctx)
  File "./toolchain.py", line 974, in build_recipes
    recipe.execute()
  File "/Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios/toolchain.py", line 586, in execute
    self.build_all()
  File "/Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios/toolchain.py", line 56, in _cache_execution
    f(self, *args, **kwargs)
  File "/Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios/toolchain.py", line 673, in build_all
    self.build(arch)
  File "/Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios/toolchain.py", line 56, in _cache_execution
    f(self, *args, **kwargs)
  File "/Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios/toolchain.py", line 654, in build
    self.set_marker("building")
  File "/Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios/toolchain.py", line 495, in set_marker
    with open(join(self.build_dir, ".{}".format(marker)), "w") as fd:
IOError: [Errno 2] No such file or directory: u'/Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios/build/kivy/i386/kivy/.building'
# Command failed: ./toolchain.py build kivy
# 
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
(PySandbox)MBPRECVG:kweather victor$ 

@ghost
Copy link
Author

ghost commented May 3, 2016

When it said that .building folder doesnt exist, i noticed that soon after i manually created it, the folder would get deleted, no idea why. I have all hidden folders visible.

@kived
Copy link
Contributor

kived commented May 3, 2016

You should try deleting the .buildozer folder and rebuilding. Also, don't run buildozer in a virtualenv, as it won't work if you need to install any pure-Python packages.

@ghost
Copy link
Author

ghost commented May 3, 2016

Or maybe that buildozer is multi-threaded and it is trying to look for a folder that the script has not yet created. Not sure.

@ghost
Copy link
Author

ghost commented May 3, 2016

Hmm okay. Ill hop out of the virtual environment and see how it goes.

@ghost
Copy link
Author

ghost commented May 3, 2016

MBPRECVG:kweather victor$ buildozer --verbose ios debug deploy
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Run 'security find-identity -v -p codesigning'
# Cwd None
  1) CDB6AFF07F7843B2F388218E45EC2FEC51156A8D "iPhone Developer: vjgaero@gmail.com (CAZ3DXG882)"
     1 valid identities found
# Preparing build
# Check requirements for ios
# Search for Xcode xcodebuild
#  -> found at /usr/bin/xcodebuild
# Search for Xcode xcode-select
#  -> found at /usr/bin/xcode-select
# Search for Git git
#  -> found at /usr/bin/git
# Search for Cython cython
#  -> found at /usr/local/bin/cython
# Search for pkg-config
#  -> found at /usr/local/Cellar/pkg-config/0.29/bin/pkg-config
# Search for autoconf
#  -> found at /usr/local/Cellar/autoconf/2.69/bin/autoconf
# Search for automake
#  -> found at /usr/local/Cellar/automake/1.15/bin/automake
# Search for libtool
#  -> found at /usr/bin/libtool
# Check availability of a iPhone SDK
# Run 'xcodebuild -showsdks | fgrep "iphoneos" |tail -n 1 | awk \'{print $2}\''
# Cwd None
9.3
#  -> found u'9.3\n'
# Check Xcode path
# Run 'xcode-select -print-path'
# Cwd None
/Applications/Xcode.app/Contents/Developer
#  -> found /Applications/Xcode.app/Contents/Developer

# Install platform
# Check application requirements
# Run './toolchain.py recipes --compact'
# Cwd /Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios
audiostream ffmpeg ffpyplayer freetype host_setuptools hostlibffi hostpython ios kivy libffi libjpeg moodstocks numpy openssl photolibrary pil pkgresources plyer pycrypto pymoodstocks pyobjus python sdl2 sdl2_image sdl2_mixer sdl2_ttf
# Application requirements already installed, pass
# Check garden requirements
# Compile platform
# Run './toolchain.py recipes --compact'
# Cwd /Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios
audiostream ffmpeg ffpyplayer freetype host_setuptools hostlibffi hostpython ios kivy libffi libjpeg moodstocks numpy openssl photolibrary pil pkgresources plyer pycrypto pymoodstocks pyobjus python sdl2 sdl2_image sdl2_mixer sdl2_ttf
# Run './toolchain.py build kivy'
# Cwd /Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios
Want to build ['kivy']
Loaded recipe kivy (depends of ['python', 'sdl2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'ios'], optional are [])
Loaded recipe python (depends of ['hostpython', 'libffi'], optional are ['openssl'])
Loaded recipe sdl2 (depends of [], optional are [])
Loaded recipe sdl2_image (depends of ['sdl2'], optional are [])
Loaded recipe sdl2_mixer (depends of ['sdl2'], optional are [])
Loaded recipe sdl2_ttf (depends of ['sdl2', 'freetype'], optional are [])
Loaded recipe ios (depends of ['python'], optional are [])
Loaded recipe hostpython (depends of ['hostlibffi'], optional are [])
Loaded recipe libffi (depends of [], optional are [])
Loaded recipe freetype (depends of [], optional are [])
Loaded recipe hostlibffi (depends of [], optional are [])
Build order is ['freetype', 'hostlibffi', 'libffi', 'sdl2', 'hostpython', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python', 'ios', 'kivy']
Include dir added: {arch.arch}/freetype
Include dir added: {arch.arch}/hostlibffi
Include dir added: {arch.arch}/libffi
Include dir added: common/sdl2
Global: hostpython located at /Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios/dist/hostpython/bin/python
Global: hostpgen located at /Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios/dist/hostpython/bin/pgen
Include dir added: common/sdl2_image
Include dir added: common/sdl2_mixer
Include dir added: common/sdl2_ttf
# (ignored) Download freetype
Extract freetype
Extract freetype for i386
Traceback (most recent call last):
  File "./toolchain.py", line 1310, in <module>
    ToolchainCL()
  File "./toolchain.py", line 1081, in __init__
    getattr(self, args.command)()
  File "./toolchain.py", line 1105, in build
    build_recipes(args.recipe, ctx)
  File "./toolchain.py", line 974, in build_recipes
    recipe.execute()
  File "/Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios/toolchain.py", line 585, in execute
    self.extract()
  File "/Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios/toolchain.py", line 56, in _cache_execution
    f(self, *args, **kwargs)
  File "/Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios/toolchain.py", line 621, in extract
    self.extract_arch(arch.arch)
  File "/Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios/toolchain.py", line 625, in extract_arch
    dest_dir = join(build_dir, self.archive_root)
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 68, in join
    if b.startswith('/'):
AttributeError: 'NoneType' object has no attribute 'startswith'
# Command failed: ./toolchain.py build kivy
# 
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
MBPRECVG:kweather victor$ 

@kived
Copy link
Contributor

kived commented May 3, 2016

That is a bug in kivy-ios, but it's easily worked around by deleting the .buildozer folder as I suggested already.

@ghost
Copy link
Author

ghost commented May 4, 2016

Alright ill delete the buidozer file and run the command again

@ghost
Copy link
Author

ghost commented May 4, 2016

deleted the buildozer folder a few times before it worked but we're getting somewhere! now dealing with this.

# (ignored) Extract python
# (ignored) Build_all python
# (ignored) Download ios
# (ignored) Extract ios
# (ignored) Build_all ios
# (ignored) Download kivy
# (ignored) Extract kivy
# (ignored) Build_all kivy
# Run 'make ios-deploy'
# Cwd /Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/ios-deploy
make: *** No rule to make target `ios-deploy'.  Stop.
# Command failed: make ios-deploy
# 
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
MBPRECVG:kweather victor$ 

Have deleted the ios-deploy folder several times and rebuilt but error not going away

@cbenhagen
Copy link
Contributor

Either you did not install buildozer master or you did not delete your .buildozer folder.

To install buildozer master run:
pip install --upgrade git+https://github.com/kivy/buildozer.git@master

@ghost
Copy link
Author

ghost commented May 4, 2016

I deleted the folder and installed the master like:
pip install https://github.com/kivy/buildozer/archive/master.zip
as stated above. I will try again.

@cbenhagen
Copy link
Contributor

You might have missed the --upgrade

@ghost
Copy link
Author

ghost commented May 4, 2016

MBPRECVG:kweather victor$ ls
bin     main.py     weather.ini
buildozer.spec  main.pyc    weather.kv
MBPRECVG:kweather victor$ buildozer --verbose ios debug
# Check configuration tokens
# Ensure build layout
# Create directory .buildozer/ios/platform
# Create directory .buildozer/ios/app
# Check configuration tokens
# Run 'security find-identity -v -p codesigning'
# Cwd None
  1) CDB6AFF07F7843B2F388218E45EC2FEC51156A8D "iPhone Developer: vjgaero@gmail.com (CAZ3DXG882)"
     1 valid identities found
# Preparing build
# Check requirements for ios
# Search for Xcode xcodebuild
#  -> found at /usr/bin/xcodebuild
# Search for Xcode xcode-select
#  -> found at /usr/bin/xcode-select
# Search for Git git
#  -> found at /usr/bin/git
# Search for Cython cython
#  -> found at /usr/local/bin/cython
# Search for pkg-config
#  -> found at /usr/local/Cellar/pkg-config/0.29/bin/pkg-config
# Search for autoconf
#  -> found at /usr/local/Cellar/autoconf/2.69/bin/autoconf
# Search for automake
#  -> found at /usr/local/Cellar/automake/1.15/bin/automake
# Search for libtool
#  -> found at /usr/bin/libtool
# Check availability of a iPhone SDK
# Run 'xcodebuild -showsdks | fgrep "iphoneos" |tail -n 1 | awk \'{print $2}\''
# Cwd None
9.3
#  -> found u'9.3\n'
# Check Xcode path
# Run 'xcode-select -print-path'
# Cwd None
/Applications/Xcode.app/Contents/Developer
#  -> found /Applications/Xcode.app/Contents/Developer

# Install platform
# Run 'git clone https://github.com/kivy/kivy-ios'
# Cwd /Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform
Cloning into 'kivy-ios'...
# Run 'git clone --branch 1.7.0 https://github.com/phonegap/ios-deploy'
# Cwd /Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform
Cloning into 'ios-deploy'...
Note: checking out '6d61b7ca7c0ff16caea4e87a91ee7535db888621'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

# Check application requirements
# Run './toolchain.py recipes --compact'
# Cwd /Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios
audiostream ffmpeg ffpyplayer freetype host_setuptools hostlibffi hostpython ios kivy libffi libjpeg moodstocks numpy openssl photolibrary pil pkgresources plyer pycrypto pymoodstocks pyobjus python sdl2 sdl2_image sdl2_mixer sdl2_ttf
# Remove directory and subdirectory /Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/applibs
# Create directory /Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/applibs
# Check garden requirements
# Compile platform
# Run './toolchain.py recipes --compact'
# Cwd /Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios
audiostream ffmpeg ffpyplayer freetype host_setuptools hostlibffi hostpython ios kivy libffi libjpeg moodstocks numpy openssl photolibrary pil pkgresources plyer pycrypto pymoodstocks pyobjus python sdl2 sdl2_image sdl2_mixer sdl2_ttf
# Run './toolchain.py build kivy'
# Cwd /Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios
Want to build ['kivy']
Loaded recipe kivy (depends of ['python', 'sdl2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'ios'], optional are [])
Loaded recipe python (depends of ['hostpython', 'libffi'], optional are ['openssl'])
Loaded recipe sdl2 (depends of [], optional are [])
Loaded recipe sdl2_image (depends of ['sdl2'], optional are [])
Loaded recipe sdl2_mixer (depends of ['sdl2'], optional are [])
Loaded recipe sdl2_ttf (depends of ['sdl2', 'freetype'], optional are [])
Loaded recipe ios (depends of ['python'], optional are [])
Loaded recipe hostpython (depends of ['hostlibffi'], optional are [])
Loaded recipe libffi (depends of [], optional are [])
Loaded recipe freetype (depends of [], optional are [])
Loaded recipe hostlibffi (depends of [], optional are [])
Build order is ['freetype', 'hostlibffi', 'libffi', 'sdl2', 'hostpython', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python', 'ios', 'kivy']
Include dir added: {arch.arch}/freetype
Include dir added: {arch.arch}/hostlibffi
Include dir added: {arch.arch}/libffi
Include dir added: common/sdl2
Global: hostpython located at /Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios/dist/hostpython/bin/python
Global: hostpgen located at /Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios/dist/hostpython/bin/pgen
Include dir added: common/sdl2_image
Include dir added: common/sdl2_mixer
Include dir added: common/sdl2_ttf
Download freetype
Downloading http://download.savannah.gnu.org/releases/freetype/freetype-2.5.5.tar.bz2
Error extracting the archive /Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios/.cache/freetype-freetype-2.5.5.tar.bz2
This is usually caused by a corrupt download. The file will be removed and re-downloaded on the next run.
Extract freetype
Extract freetype for i386
Traceback (most recent call last):
  File "./toolchain.py", line 1310, in <module>
    ToolchainCL()
  File "./toolchain.py", line 1081, in __init__
    getattr(self, args.command)()
  File "./toolchain.py", line 1105, in build
    build_recipes(args.recipe, ctx)
  File "./toolchain.py", line 974, in build_recipes
    recipe.execute()
  File "/Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios/toolchain.py", line 585, in execute
    self.extract()
  File "/Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios/toolchain.py", line 56, in _cache_execution
    f(self, *args, **kwargs)
  File "/Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios/toolchain.py", line 621, in extract
    self.extract_arch(arch.arch)
  File "/Users/victor/Documents/Projects/kivy-projects/KWeather/.buildozer/ios/platform/kivy-ios/toolchain.py", line 625, in extract_arch
    dest_dir = join(build_dir, self.archive_root)
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 68, in join
    if b.startswith('/'):
AttributeError: 'NoneType' object has no attribute 'startswith'
# Command failed: ./toolchain.py build kivy
# 
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
MBPRECVG:kweather victor$ 

@cbenhagen
Copy link
Contributor

This is usually caused by a corrupt download. The file will be removed and re-downloaded on the next run.

@ghost
Copy link
Author

ghost commented May 4, 2016

it says that every single time.

@cbenhagen
Copy link
Contributor

Can you download it manually? eg with:

wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.5.tar.bz2

@cbenhagen
Copy link
Contributor

Btw this has nothing to do with the original issue and I do not think this is really a bug. Let's move this discussion to #Kivy on irc.freenode.net

@ghost
Copy link
Author

ghost commented May 4, 2016

sure thing

@ghost
Copy link
Author

ghost commented May 4, 2016

  1. rebuilt freetype manually
    ./toolchain.py build freetype
  2. disabled bitcode in ios project
    buildozer ios xcode -> build settings
  3. made sure provisioning certs matched up in buildozer spec

fixed, thanks to cbenhagen.!! :)

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