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

Inconsistent dependency graph behaviour #515

Closed
hottwaj opened this issue Dec 8, 2015 · 4 comments
Closed

Inconsistent dependency graph behaviour #515

hottwaj opened this issue Dec 8, 2015 · 4 comments

Comments

@hottwaj
Copy link
Contributor

hottwaj commented Dec 8, 2015

Seems to fail when there is no actual dependency issue? See a handful of test cases below...

e.g. here I start with bootstrap sdl2 and requirements sdl2,python2,kivy,audiostream

python -m pythonforandroid.toolchain create --bootstrap=sdl2 --requirements=sdl2,python2,kivy,audiostream --dist_name=sdl2_kivy

...snip...
[INFO]:    Bootstrap requires recipes ['sdl2']
[INFO]:    Loaded recipe sdl2 (depends on ['python2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf'], conflicts ['sdl', 'pygame', 'pygame_bootstrap_components'])
[INFO]:    Loaded recipe kivy (depends on [('sdl2', 'pygame'), 'pyjnius'])
[INFO]:    Loaded recipe audiostream (depends on ['python2', ('sdl', 'sdl2'), 'pyjnius'])
[INFO]:    Loaded recipe python2 (depends on ['hostpython2'], conflicts ['python3'])
[INFO]:    Loaded recipe sdl2_image (depends on [])
[INFO]:    Loaded recipe sdl2_mixer (depends on [])
[INFO]:    Loaded recipe sdl2_ttf (depends on [])
[INFO]:    Loaded recipe pyjnius (depends on ['python2', ('sdl2', 'sdl'), 'six'])
[INFO]:    Loaded recipe hostpython2 (depends on [], conflicts ['hostpython3'])
[INFO]:    Loaded recipe six (depends on ['python2'])
[WARNING]: Didn't find any valid dependency graphs, exiting.

However that set of packages should be valid?

If I remove "audiostream" graph checking succeeds and compilation begins.

If instead I remove "kivy" graph checking succeeds and compilation begins

If instead I change the order of requirements to this (i.e. swap order of sdl2 and python2):
python2,sdl2,kivy,audiostream

then I get:

[INFO]:    Bootstrap requires recipes ['sdl2']
[INFO]:    Loaded recipe python2 (depends on ['hostpython2'], conflicts ['python3'])
[INFO]:    Loaded recipe kivy (depends on [('sdl2', 'pygame'), 'pyjnius'])
[INFO]:    Loaded recipe audiostream (depends on ['python2', ('sdl', 'sdl2'), 'pyjnius'])
[INFO]:    Loaded recipe sdl2 (depends on ['python2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf'], conflicts ['sdl', 'pygame', 'pygame_bootstrap_components'])
[WARNING]: sdl2 conflicts with pygame, but both have been included or pulled into the requirements.
[WARNING]: Due to this conflict the build cannot continue, exiting.

However I have not selected pygame?

Or maybe there's something wrong with audiostream's dependencies (as noted above these are ['python2', ('sdl', 'sdl2'), 'pyjnius'])?

Thanks!

hottwaj added a commit to hottwaj/python-for-android that referenced this issue Dec 9, 2015
Old for removing redundant dependency graphs had a bug in it where graph[i] was compared against itself and then removed (as it appears equal to itself).  This caused kivy#515.  I've rearranged the loop in the function for removing redundant graphs to avoid this
inclement added a commit that referenced this issue Dec 10, 2015
@cocoa1231
Copy link

This is still happening with me. I just have a basic app with a box layout and a button and it won't compile. getting the error:
[WARNING]: Didn't find any valid dependency graphs, exiting.

Full output:

➜  /tmp buildozer android debug
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
/bin/sh: dpkg: command not found
# Search for Git (git)
#  -> found at /usr/bin/git
# Search for Cython (cython)
#  -> found at /usr/bin/cython3
# Search for Java compiler (javac)
#  -> found at /usr/lib/jvm/java-8-openjdk/bin/javac
# Search for Java keytool (keytool)
#  -> found at /usr/lib/jvm/java-8-openjdk/jre/bin/keytool
# Install platform
# Run 'pip install -q --user "appdirs" "colorama>=0.3.3" "sh>=1.10,<1.12.5" "jinja2" "six"'
# Cwd None
# Apache ANT found at /home/cocoa/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/cocoa/.buildozer/android/platform/android-sdk-20
# Android NDK found at /home/cocoa/.buildozer/android/platform/android-ndk-r9c
# Check application requirements
# Check garden requirements
# Compile platform
# Run '/usr/bin/python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=kivy,python3 --arch armeabi-v7a --copy-libs --color=always --storage-dir=/tmp/.buildozer/android/platform/build'
# Cwd /tmp/.buildozer/android/platform/python-for-android-master
[INFO]:    Will compile for the following archs: armeabi-v7a
[INFO]:    Found Android API target in $ANDROIDAPI
[INFO]:    Available Android APIs are (15, 19)
[INFO]:    Requested API target 19 is available, continuing.
[INFO]:    Found NDK dir in $ANDROIDNDK
[INFO]:    Got NDK version from $ANDROIDNDKVER
[INFO]:    Using Google NDK r9c
[INFO]:    Found virtualenv at /usr/bin/virtualenv
[INFO]:    ccache is missing, the build will not be optimized in the future.
[INFO]:    Found the following toolchain versions: ['4.6', '4.8', 'clang3.3']
[INFO]:    Picking the latest gcc toolchain, here 4.8
[INFO]:    No existing dists meet the given requirements!
[INFO]:    No dist exists that meets your requirements, so one will be built.
[ERROR]:   Didn't find any valid dependency graphs.
[ERROR]:   This means that some of your requirements pull in conflicting dependencies.
[ERROR]:   Exiting.
# Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=kivy,python3 --arch armeabi-v7a --copy-libs --color=always --storage-dir=/tmp/.buildozer/android/platform/build
# 
# 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
➜  /tmp /usr/bin/python -m pythonforandroid.toolchain create --dist_name=kes --bootstrap=sdl2 --requirements=python3 --arch x86 --copy-libs --color=always --storage-dir=/home/cocoa/KES/.buildozer/android/platform/build
[INFO]:    This python-for-android revamp is an experimental alpha release!
[INFO]:    It should work (mostly), but you may experience missing features or bugs.
/usr/lib/python3.6/re.py:212: FutureWarning: split() requires a non-empty pattern match.
  return _compile(pattern, flags).split(string, maxsplit)
[INFO]:    Will compile for the following archs: x86
[INFO]:    Found possible SDK dirs in buildozer dir: android-sdk-20
[INFO]:    Will attempt to use SDK at /home/cocoa/.buildozer/android/platform/android-sdk-20
[WARNING]: This SDK lookup is intended for debug only, if you use python-for-android much you should probably maintain your own SDK download.
[INFO]:    Android API target was not set manually, using the default of 15
[INFO]:    Available Android APIs are (15, 19)
[INFO]:    Requested API target 15 is available, continuing.
[INFO]:    Found possible NDK dirs in buildozer dir: android-ndk-r9c, android-ndk-r9c-linux-x86_64.tar.bz2
[INFO]:    Will attempt to use NDK at /home/cocoa/.buildozer/android/platform/android-ndk-r9c
[WARNING]: This NDK lookup is intended for debug only, if you use python-for-android much you should probably maintain your own NDK download.
[INFO]:    Got NDK version from $ANDROIDNDKVER
[INFO]:    Got Android NDK version from the NDK dir: it is r9c
[INFO]:    Using Google NDK r9c
[INFO]:    Found virtualenv at /usr/bin/virtualenv
[INFO]:    ccache is missing, the build will not be optimized in the future.
[INFO]:    Found the following toolchain versions: ['4.6', '4.8', 'clang3.3']
[INFO]:    Picking the latest gcc toolchain, here 4.8
[INFO]:    No existing dists meet the given requirements!
[INFO]:    No dist exists that meets your requirements, so one will be built.
[INFO]:    Bootstrap requires recipes ['sdl2', ('python2', 'python3crystax')]
[INFO]:    Loaded recipe sdl2 (depends on [('python2', 'python3crystax'), 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf'], conflicts ['sdl', 'pygame', 'pygame_bootstrap_components'])
[INFO]:    Loaded recipe python3 (depends on ['hostpython3'], conflicts ['python2'])
[INFO]:    Loaded recipe sdl2_image (depends on [])
[INFO]:    Loaded recipe sdl2_mixer (depends on [])
[INFO]:    Loaded recipe sdl2_ttf (depends on [])
[INFO]:    Loaded recipe hostpython3 (depends on [], conflicts ['hostpython2'])
[WARNING]: Didn't find any valid dependency graphs, exiting.
➜  /tmp 

@inclement
Copy link
Member

@cocoa1231 Your problem is unrelated - you have python3 in your requirements, but the only supported possibilities are python3crystax (which requires the CrystaX NDK, see the docs) or python2.

I recognise that this is quite unclear, I'll look at removing the python3 recipe.

@cocoa1231
Copy link

@inclement Thanks for replying. i tried removing python3 as a dependency, adding python2 as a dependency, still I'm getting the same error

@inclement
Copy link
Member

@cocoa1231 Please post the full logs and explanation of the problem at https://groups.google.com/forum/#!forum/kivy-users

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

3 participants