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

Many issues on OS X running ./distribute.sh -m "kivy" #36

Closed
r1chardj0n3s opened this issue May 21, 2012 · 17 comments
Closed

Many issues on OS X running ./distribute.sh -m "kivy" #36

r1chardj0n3s opened this issue May 21, 2012 · 17 comments

Comments

@r1chardj0n3s
Copy link
Contributor

distribute.sh has two issues on OS X:

  1. md5sum doesn't exist (though I made one so I could progress), and
  2. readlink has no option "-f" which means ROOT_PATH is "" which means all the PATHS are in "/".

I've now run into a problem that it can't find arm-linux-androideabi-gcc which I'll have to resolve before progressing.

@r1chardj0n3s
Copy link
Contributor Author

I think I found the gcc problem: the script has the path hard-coded:

# this must be something depending of the API level of Android
export PATH="$ANDROIDNDK/toolchains/arm-eabi-4.4.3/prebuilt/linux-x86/bin/:$ANDROIDNDK:$ANDROIDSDK/tools:$PATH"

This needs to be "toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin" on my system.

@r1chardj0n3s
Copy link
Contributor Author

More issues once I fix that path issue:

  Leaving ARM enviromnent
  ./distribute.sh: line 278: declare: -A: invalid option
  declare: usage: declare [-afFirtx] [-p] [name[=value] ...]

and then the script stops again because OS X does not have wget, only curl.

@r1chardj0n3s
Copy link
Contributor Author

(the replacement curl command is "curl -O -L $url")

@r1chardj0n3s
Copy link
Contributor Author

I can't find anything that documents what "declare -A" might do so I've altered it to "declare -a" (declare as array) which appears to be the intent.

@r1chardj0n3s
Copy link
Contributor Author

Now I've hit this problem:

Run prebuild
Call prebuild_pygame
./distribute.sh: line 447: prebuild_pygame: command not found
Call prebuild_android
./distribute.sh: line 447: prebuild_android: command not found
Call prebuild_kivy
Run build
Call build_pygame
./distribute.sh: line 457: build_pygame: command not found
Call build_android
./distribute.sh: line 457: build_android: command not found
Call build_kivy

build_pygame does exist in recipes/pygame/recipe.sh ... no idea why this breaks yet. The script continued on though and then died with stacks of cython errors, the start of which was:

Compiler found at /usr/local/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin//arm-linux-androideabi-gcc
/usr/local/src/python-for-android/recipes/kivy/recipe.sh: line 28: /usr/local/src/python-for-android/build/python-install/bin/python.host: No such file or directory

Error compiling Cython file:
------------------------------------------------------------
...
include "config.pxi"
^
------------------------------------------------------------

c_opengl.pxd:1:0: 'config.pxi' not found

There is no "build/python-install" directory.

@r1chardj0n3s
Copy link
Contributor Author

Ah, I'm figuring it out. It seems I need to build a bunch of dependencies first, possibly starting right back with ./distribute.sh -m "hostpython"

... still doesn't work though. When I try the above I end up with:

Biglink create /usr/local/src/python-for-android/build/libs/libpymodules.so library
Biglink arguments:
arm-linux-androideabi-gcc: no input files

@r1chardj0n3s
Copy link
Contributor Author

I'm afraid I've hit a dead-end now. No matter what combination of modules I try to build I end up with the build terminating with:

Biglink create /usr/local/src/python-for-android/build/libs/libpymodules.so library
Biglink arguments:
arm-linux-androideabi-gcc: no input files

@revolunet
Copy link

fighting with this too...

looks like md5sumcan ba aliases with md5 and then we just need to remove the tool detection on line 223

line 103: we have to use :
export PATH="$ANDROIDNDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin/:$ANDROIDNDK:$ANDROIDSDK/tools:$PATH"

but then, the declare -A is not recognised and i end with :

./distribute.sh: line 278: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
Read kivy recipe
Recipe kivy does not exit

Its very important to be able to compile from our environnement and not from VMs.

can anyone help ?

@ptq1
Copy link

ptq1 commented Jul 4, 2012

I am wading through similar problems using Mac Lion - its a real pain. I am fiddling with distribute.sh but am not confident in what best to do. Has anyone any ideas?

With thanks in anticipation...

@revolunet
Copy link

we're working on it. are you at europython ?

@ptq1
Copy link

ptq1 commented Jul 4, 2012

er europython?? - I am taking my very first steps with this and have
unfortunately hit a brick wall!

I am rather foolishly trying to write an Android app on my Mac laptop in
Python. I am beginning to wonder whether I should ditch this and simply
revert to a PC.

Any advice gratefully received,

Best

Philip.

On 4 July 2012 17:34, Julien Bouquillon <
[email protected]

wrote:

we're working on it. are you at europython ?


Reply to this email directly or view it on GitHub:
#36 (comment)

@revolunet
Copy link

yep. its not working yet on OSX but in a few days it should. you can also use this ubuntu VM which works great on virtualbox and has all you need inside : https://groups.google.com/forum/?fromgroups#!topic/python-android/UbFDWXhGtZI

@ptq1
Copy link

ptq1 commented Jul 4, 2012

Thanks very much for engaging - please let me know if/when you get it to
work.

Many thanks

Philip.

On 4 July 2012 17:48, Julien Bouquillon <
[email protected]

wrote:

yep. its not working yet on OSX but in a few days it should. you can also
use this ubuntu VM which works great on virtualbox and has all you need
inside :
https://groups.google.com/forum/?fromgroups#!topic/python-android/UbFDWXhGtZI


Reply to this email directly or view it on GitHub:
#36 (comment)

@revolunet
Copy link

here's where i'm finally stucked with the macosx branch; cant understand; any help appreciated.

ends with bad -rpath option...

ccache arm-linux-androideabi-gcc -mandroid  -fomit-frame-pointer --sysroot /Applications/android-ndk-r8/platforms/android-14/arch-arm -dynamiclib -Wl,-single_module  -Wl,-install_name,/Users/juju/Documents/projects/kivysrc/python-for-android/build/python-install/lib/libpython2.7.dylib -Wl,-compatibility_version,2.7 -Wl,-current_version,2.7 -o libpython2.7.dylib Modules/getbuildinfo.o Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o Parser/parser.o Parser/parsetok.o Parser/bitset.o Parser/metagrammar.o Parser/firstsets.o Parser/grammar.o Parser/pgen.o Parser/myreadline.o Parser/tokenizer.o Objects/abstract.o Objects/boolobject.o Objects/bufferobject.o Objects/bytes_methods.o Objects/bytearrayobject.o Objects/capsule.o Objects/cellobject.o Objects/classobject.o Objects/cobject.o Objects/codeobject.o Objects/complexobject.o Objects/descrobject.o Objects/enumobject.o Objects/exceptions.o Objects/genobject.o Objects/fileobject.o Objects/floatobject.o Objects/frameobject.o Objects/funcobject.o Objects/intobject.o Objects/iterobject.o Objects/listobject.o Objects/longobject.o Objects/dictobject.o Objects/memoryobject.o Objects/methodobject.o Objects/moduleobject.o Objects/object.o Objects/obmalloc.o Objects/rangeobject.o Objects/setobject.o Objects/sliceobject.o Objects/stringobject.o Objects/structseq.o Objects/tupleobject.o Objects/typeobject.o Objects/weakrefobject.o Objects/unicodeobject.o Objects/unicodectype.o Python/_warnings.o Python/Python-ast.o Python/asdl.o Python/ast.o Python/bltinmodule.o Python/ceval.o Python/compile.o Python/codecs.o Python/errors.o Python/frozen.o Python/frozenmain.o Python/future.o Python/getargs.o Python/getcompiler.o Python/getcopyright.o Python/getplatform.o Python/getversion.o Python/graminit.o Python/import.o Python/importdl.o Python/marshal.o Python/modsupport.o Python/mystrtoul.o Python/mysnprintf.o Python/peephole.o Python/pyarena.o Python/pyctype.o Python/pyfpe.o Python/pymath.o Python/pystate.o Python/pythonrun.o Python/structmember.o Python/symtable.o Python/sysmodule.o Python/traceback.o Python/getopt.o Python/pystrcmp.o Python/pystrtod.o Python/dtoa.o Python/formatter_unicode.o Python/formatter_string.o Python/dynload_shlib.o   Python/thread.o Modules/config.o Modules/getpath.o Modules/main.o Modules/gcmodule.o  Modules/threadmodule.o  Modules/signalmodule.o  Modules/posixmodule.o  Modules/errnomodule.o  Modules/pwdmodule.o  Modules/_sre.o  Modules/_codecsmodule.o  Modules/zipimport.o  Modules/symtablemodule.o  Modules/arraymodule.o  Modules/cmathmodule.o  Modules/mathmodule.o  Modules/_struct.o  Modules/timemodule.o  Modules/operator.o  Modules/_weakref.o  Modules/_randommodule.o  Modules/_collectionsmodule.o  Modules/itertoolsmodule.o  Modules/stropmodule.o  Modules/_functoolsmodule.o  Modules/_elementtree.o  Modules/datetimemodule.o  Modules/_bisectmodule.o  Modules/fcntlmodule.o  Modules/selectmodule.o  Modules/socketmodule.o  Modules/md5module.o Modules/md5.o  Modules/shamodule.o  Modules/sha256module.o  Modules/sha512module.o  Modules/binascii.o  Modules/parsermodule.o  Modules/cStringIO.o  Modules/cPickle.o  Modules/zlibmodule.o  Modules/xmlparse.o Modules/xmlrole.o Modules/xmltok.o Modules/pyexpat.o  Modules/xxsubtype.o -ldl    ; \

/usr/bin/install -c -m 644 ./Misc/python.man \
        /Users/juju/Documents/projects/kivysrc/python-for-android/build/python-install/share/man/man1/python2.7.1
/usr/bin/install -c -m 644 ./Include/Python-ast.h /Users/juju/Documents/projects/kivysrc/python-for-android/build/python-install/include/python2.7
/usr/bin/install -c -m 644 ./Include/Python.h /Users/juju/Documents/projects/kivysrc/python-for-android/build/python-install/include/python2.7
/usr/bin/install -c -m 644 ./Include/abstract.h /Users/juju/Documents/projects/kivysrc/python-for-android/build/python-install/include/python2.7
/usr/bin/install -c -m 644 ./Include/asdl.h /Users/juju/Documents/projects/kivysrc/python-for-android/build/python-install/include/python2.7
/usr/bin/install -c -m 644 ./Include/ast.h /Users/juju/Documents/projects/kivysrc/python-for-android/build/python-install/include/python2.7
/Applications/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin//../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: bad -rpath option

@tito
Copy link
Member

tito commented Aug 21, 2012

All of theses have been fixed, and it's already merged in master. Closing this issue.

@tito tito closed this as completed Aug 21, 2012
@ptq1
Copy link

ptq1 commented Aug 21, 2012

This is really good news - could you possibly provide a link to the fixes?

Thanks

On 21 August 2012 10:47, Mathieu Virbel [email protected] wrote:

All of theses have been fixed, and it's already merged in master. Closing
this issue.


Reply to this email directly or view it on GitHubhttps://github.com//issues/36#issuecomment-7896368.

@tito
Copy link
Member

tito commented Aug 21, 2012

No link to the fixes, it was part of the macosx branch plus additionnal fixes in master
Just pull the latest master, it will be ok.

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

4 participants