Skip to content

Build error on Mac: no archive symbol table (run ranlib) #1012

Closed
@artwyman

Description

@artwyman

I'm trying to package a Kivy hello world app on Mac., and it's failing during the NDK build indicating that several SDL2 libraries are invalid: no archive symbol table (run ranlib).

I installed python-for-android 0.4 via pip. I'm on Mac OS 10.11.6, using NDK r11c with GCC 4.9. Here's the command I'm running:

p4a apk --private . --package=org.example.HelloKivy --name "Hello Kivy" --version 0.1 --bootstrap=sdl2 --requirements=python2,kivy --sdk_dir $ANDROID_HOME --ndk_dir $ANDROID_NDK_HOME --android_api 16 --ndk_ver "r11c" --debug

And the full errors:

/Users/atwyman/Library/Android/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: error: SDL2_ttf: no archive symbol table (run ranlib)
/Users/atwyman/Library/Android/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: error: SDL2_image: no archive symbol table (run ranlib)
/Users/atwyman/Library/Android/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: error: SDL2_mixer: no archive symbol table (run ranlib)
/Users/atwyman/Library/Android/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: error: SDL2: no archive symbol table (run ranlib)
collect2: error: ld returned 1 exit status

Googling similar issues suggested this might be a case of the local version of ar being used rather than the NDK version. I tried overriding via environment variables in various combinations, working up to the full set listed here: http://stackoverflow.com/questions/13751560/android-ndk-no-archive-symbol-table

Setting those variables for the a full clean package breaks the local parts of the Python build. Setting them on a retry (which skips the already-done steps) or in the ndk-build script results in the same error.

Any clue what's going on? Am I wrong to assume that python-for-android is expected to work on Mac vs. Linux?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions