Error failed to create toolchain

Hello. I am trying to get lambdanative running following the getting started page, but I can't compile for android even though compiling for linux works fine. I am on Ubuntu 18.04. I installed ...

Hello. I am trying to get lambdanative running following the getting started page, but I can’t compile for android even though compiling for linux works fine.
I am on Ubuntu 18.04.
I installed android studio; my sdk and ndk are in /home/user/Android/sdk and /home/user/Android/sdk/ndk-bundle, so I set the ANDROIDSDK and ANDROIDNDK in SETUP accordingly. I also made sure to install the correct android platform version (19 / 4.4)

Here’s the output when I run ./configure Calculator android —verbose && make

==> configured to build Calculator for android in normal verbose mode
== using source in /home/dreamer/Build/lambdanative/apps/Calculator
=== using profile Svipal [/home/dreamer/Build/lambdanative/PROFILE]..
=== configured to build Calculator version 1.0 for android on linux in normal mode

HOST_OS=linux
HOST_EXE=
HOST_ARCH=x86_64
HOST_TAG=linux-x86_64
HOST_NUM_CPUS=8
BUILD_NUM_CPUS=16
ERROR: Failed to create toolchain.
ERROR: failed on file /home/dreamer/.cache/lambdanative/android/ndk-bundle-arm-19-toolchain
BUILD FAILED
Makefile:2: recipe for target ‘all’ failed
make: *** [all] Error 1

I also tried with 21 and I get the same error.
This is my first time both using Scheme and compiling for android, so I have absolutely no idea what might be the matter.. I apologize if this is not the place to post this.

Tydus / howto-standalone-toolchain.md

HOWTO Cross compiling on Android

NDK (Native Develop Toolkit) is a toolchain from Android official, originally for users who writes native C/C++ code as JNI library. It’s not designed for compiling standalone programs (./a.out) and not compatible with automake/cmake etc.

What is Standalone Toolchain

«Standalone» refers to two meanings:

  1. The program is standalone (has nothing connect to NDK, and don’t need helper scripts to run it)
  2. The toolchain is made for building standalone programs and libs, and which can used by automake etc.

(Optional) Why NDK is hard to use

By default, NDK uses android flavor directory structure when it’s finding headers and libs, which is different from GNU flavor, so the compiler cannot find them. For Example:

Although we can manuall specify the path (someone wrote a program called «agcc» to handle this automatically, but still not good), it’s really annoying.

  1. Download Android NDK
    from https://developer.android.com/tools/sdk/ndk/index.html
  2. Extract the NDK
    tar xf android-ndk-r9d-*.tar.bz2 && cd android-ndk-r9d
  3. Make GNU Android Toolchain from NDK
    build/tools/make-standalone-toolchain.sh —toolchain=arm-linux-androideabi-4.8 —platform=android-19 —install-dir=../toolchain
  4. Delete the NDK (Yes, we don’t need it any more)
    cd .. && rm -rf android-ndk-r9d
  5. Test the native toolchain
    cd toolchain/bin
    echo «main()<>» | ./arm-linux-androideabi-gcc -x c —
    file a.out # a.out: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
  6. (Optional) Now you can use it as a standard GNU toolchain
    For example: ./configure —prefix=/opt/android —host=arm-linux-androideabi && make && make install

nikhilkilivayil commented Feb 5, 2016

I am getting this issue :
/home/umn/android/android-ndk-r7c/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: cannot find -lssl
collect2: ld returned 1 exit status

michaelsx commented Apr 13, 2016

Check if you have libssl-dev installed when using ubuntu reffering to this thread (even though it isn’t about android, but still about your issue).

usman313 commented May 1, 2016 •

I am getting this error each time I try to do any work on Android Studio 2.1 and everything in each activity become red. How can I resolve this issue??

ranshalit commented Feb 14, 2017

That’s amazing. Thank you very much. I don’t have to build now with «-static». Right ?

hannesa2 commented Dec 28, 2017 •

I downloaded android-ndk-r16b and after make-standalone-toolchain.sh the command
in step .5 echo «main()<>» | ./arm-linux-androideabi-gcc -x c — shows nothing.

Is this right, or did I something wrong ?

AxelNennker commented Apr 20, 2018

@hannesa2
echo «main()<>» | ./arm-linux-androideabi-gcc -x c — && file a.out

KrishnaCAmjuri commented Jun 2, 2018 •

Is this procedure valid for mac(unix) also?

unalkalkan commented Jun 3, 2018

Tried in Debian 9, works like a charm!

KrishnaCAmjuri commented Jun 4, 2018

This will only build the toolchain for one architecture that is «armv7-a». What about the other architectures? Can you please clarify?

bybilly commented Aug 14, 2018

I am having this issue:
»
expr: syntax error
expr: syntax error
./make-standalone-toolchain.sh: can’t open name: No such file or directory
./make-standalone-toolchain.sh: OPTIONS_abstract_Specify: not found
expr: syntax error
expr: syntax error
./make-standalone-toolchain.sh: can’t open name: No such file or directory
./make-standalone-toolchain.sh: OPTIONS_abstract_Specify: not found
expr: syntax error
expr: syntax error
./make-standalone-toolchain.sh: can’t open path: No such file or directory
./make-standalone-toolchain.sh: can’t open path: No such file or directory
./make-standalone-toolchain.sh: OPTIONS_default_.=: not found
expr: syntax error
expr: syntax error
./make-standalone-toolchain.sh: can’t open name: No such file or directory
./make-standalone-toolchain.sh: OPTIONS_abstract_Specify: not found
./make-standalone-toolchain.sh: OPTIONS_default_linux-armv7l=: not found
[and there’s more]
«

At the top it says «WARNING: The shell running this script isn’t bash. Although we try to avoid bashism in scripts, things can happen.»
At the bottom it says that «—toolchain» is an unknown option. Even if —help is the first parameter it says it is an unknown option.

Источник

Failed to create toolchain using Windows Subsystem on Linux #198

Comments

Valfather commented Jun 1, 2018

Hello. I am trying to get lambdanative running following the getting started page, but I can’t compile for android even though compiling for linux works fine.
I am on Ubuntu 18.04.
I installed android studio; my sdk and ndk are in /home/user/Android/sdk and /home/user/Android/sdk/ndk-bundle, so I set the ANDROIDSDK and ANDROIDNDK in SETUP accordingly. I also made sure to install the correct android platform version (19 / 4.4)

Here’s the output when I run ./configure Calculator android —verbose && make

==> configured to build Calculator for android in normal verbose mode
== using source in /home/dreamer/Build/lambdanative/apps/Calculator
=== using profile Svipal [/home/dreamer/Build/lambdanative/PROFILE]..
=== configured to build Calculator version 1.0 for android on linux in normal mode

HOST_OS=linux
HOST_EXE=
HOST_ARCH=x86_64
HOST_TAG=linux-x86_64
HOST_NUM_CPUS=8
BUILD_NUM_CPUS=16
ERROR: Failed to create toolchain.
ERROR: failed on file /home/dreamer/.cache/lambdanative/android/ndk-bundle-arm-19-toolchain
BUILD FAILED
Makefile:2: recipe for target ‘all’ failed
make: *** [all] Error 1

I also tried with 21 and I get the same error.
This is my first time both using Scheme and compiling for android, so I have absolutely no idea what might be the matter.. I apologize if this is not the place to post this.

The text was updated successfully, but these errors were encountered:

mgorges commented Jun 1, 2018

A few questions/comments:
a) Are you sure the sdk tools are complete, when installing them using Android studio and not downloading the SDK command line tools and NDK separately? — Specifically, do you have the «Android SDK Tools», «Android SDK Platform-tools», «Android SDK Builds-Tools» as well as the API 19 «SDK Platform» installed?
b) Are the paths pointing in the right direction?
c) The correct usage of verbose is ./configure Calculator android verbose , there are no two extra dashes before it.
d) What are your versions of the NDK and SDK?

Valfather commented Jun 2, 2018

Thanks for your answer.
a) Yes ! See this.

b) if you mean the paths in the SETUP, yes.

c) I didn’t know ! Strange that it didn’t warn me. It seems to work the same regardless.

d) A shown in the image above:
SDK Platform-tools 27.0.1
SDK tools 26.1.1
NDK 17.0.4754217

mgorges commented Jun 2, 2018

I can’t seem to reproduce this — I removed my entire android sdk/ndks, cleared the lambdanative cache and it seems to start to build gambc fine. Will need to look a bit more.

mgorges commented Jun 2, 2018

Actually I spoke too soon — I now get an issue:

os_base.c: In function ‘___alloc_mem_code’:
os_base.c:289:9: error: call to ‘mmap’ declared with attribute error: mmap is not available with _FILE_OFFSET_BITS=64 when using GCC until android-21. Either raise your minSdkVersion, disable _FILE_OFFSET_BITS=64, or switch to Clang.
void* ptr = mmap (0,
^
gmake[2]: *** [makefile:150: os_base.o] Fehler 1

However, this seems to be resolvable by making the ANDROIDAPI=21

mgorges commented Jun 2, 2018

Android NDK: Found platform level in ./project.properties. Setting APP_PLATFORM to android-21.
make[2]: Entering directory /home/mg/.lambdanative/tmp_build’ [armeabi-v7a] Compile thumb : payloadshared /home/mg/.lambdanative/tmp_build’

Can be resolved with something like this: /usr/lib64 # ln -s libncurses.so.5 libtinfo.so.5

Valfather commented Jun 6, 2018

Hey, thanks for digging.
I’m sorry I didn’t precise this but I’m running Ubuntu 18.04 on WSL with Xming for graphical display. I was hopeful it would work the same way as a normal Ubuntu install since I never had issues with it before, can compile other languages fine, Android Studio works without a hitch and the lambda native build for linux works fine as well.
But since I don’t get any of your errors, just the very terse output posted in the first message, I’m guessing it might be the reason .
I tried a few things : installing with sdkmanager instead of android studio, which made me realize I forgot to install java, but it wasn’t the problem. I still get the same output.

mgorges commented Jun 6, 2018

Thanks for the additional information — The fact that you are using Windows Subsystem on Linux might have something to do with it as I am now wondering that you are missing some other binary (as you did with Java, which the ndk-bundle-arm-19-toolchain assumes to be present? One possible thing might be cmake ?

I am wondering if we could make this part more verbose so it could tell you which one it is lacking?

Valfather commented Jun 6, 2018

I do have cmake installed. That would be great !

mgorges commented Nov 1, 2018

Revisiting this briefly, as I won’t have a WSL machine to test with — could this be a permission problem of the place where the toolchain creation is supposed to happen?

karliwalti commented Sep 1, 2020

Encountering the same problem both in a fresh Ubuntu 20.04 install and in WSL on windows 10:

karliwalti commented Sep 1, 2020

$ANDROIDNDK/build/tools/make-standalone-toolchain.sh is calling a python script. Therfore system needs to have python installed.

peterlew commented Sep 1, 2020

Thanks for finding this! I’ve added python as a required tool to the Getting Started page for android development.

mgorges commented Sep 1, 2020 •

Added as a requirement to targets/android/check-tools in 885a36d to enforce this.

Footer

© 2023 GitHub, Inc.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

Unable to build toolchain (Build failed in step ‘Retrieving needed toolchain components’ tarballs’) #1454

Comments

loglux commented Feb 4, 2021 •

/crosstool-ng$ ./bootstrap Running autoconf. Done. You may now run: ./configure vagrant@ubuntu-xenial:

/crosstool-ng$ ./configure —enable-local checking build system type. x86_64-pc-linux-gnu checking host system type. x86_64-pc-linux-gnu checking for a BSD-compatible install. /usr/bin/install -c checking for grep that handles long lines and -e. /bin/grep checking for egrep. /bin/grep -E checking for a sed that does not truncate output. /bin/sed checking whether sed understands -r -i -e. yes checking whether ln -s works. yes checking for gcc. gcc checking whether the C compiler works. yes checking for C compiler default output file name. a.out checking for suffix of executables. checking whether we are cross compiling. no checking for suffix of object files. o checking whether we are using the GNU C compiler. yes checking whether gcc accepts -g. yes checking for gcc option to accept ISO C89. none needed checking how to run the C preprocessor. gcc -E checking for ranlib. ranlib checking for gobjcopy. no checking for objcopy. objcopy checking for absolute path to objcopy. /usr/bin/objcopy checking for gobjdump. no checking for objdump. objdump checking for absolute path to objdump. /usr/bin/objdump checking for greadelf. no checking for readelf. readelf checking for absolute path to readelf. /usr/bin/readelf checking for gperf. gperf checking for absolute path to gperf. /usr/bin/gperf checking for bison. bison checking for flex. flex checking for makeinfo. makeinfo checking for cut. cut checking for stat. stat checking for readlink. readlink checking for wget. wget checking for tar. tar checking for gzip. gzip checking for bzip2. bzip2 checking for help2man. help2man checking for gpatch. no checking for patch. patch checking for absolute path to patch. /usr/bin/patch checking for bash >= 3.1. /bin/bash checking for GNU awk. /usr/bin/gawk checking for GNU make >= 3.80. /usr/bin/make checking whether /usr/bin/make sets $(MAKE). yes checking for make 3.81. no checking for GNU libtool >= 1.5.26. /usr/bin/libtool checking for GNU libtoolize >= 1.5.26. /usr/bin/libtoolize checking for GNU automake >= 1.10. /usr/bin/automake checking for xz. xz checking for cvs. no checking for svn. no checking for inline. inline checking for ANSI C header files. yes checking for sys/types.h. yes checking for sys/stat.h. yes checking for stdlib.h. yes checking for string.h. yes checking for memory.h. yes checking for strings.h. yes checking for inttypes.h. yes checking for stdint.h. yes checking for unistd.h. yes checking for stdlib.h. (cached) yes checking for GNU libc compatible malloc. yes checking for stdlib.h. (cached) yes checking for GNU libc compatible realloc. yes checking for size_t. yes checking for working alloca.h. yes checking for alloca. yes checking libintl.h usability. yes checking libintl.h presence. yes checking for libintl.h. yes checking whether gettext is declared. yes checking for library containing bindtextdomain. none required checking ncurses/ncurses.h usability. no checking ncurses/ncurses.h presence. no checking for ncurses/ncurses.h. no checking ncurses/curses.h usability. no checking ncurses/curses.h presence. no checking for ncurses/curses.h. no checking ncursesw/curses.h usability. no checking ncursesw/curses.h presence. no checking for ncursesw/curses.h. no checking ncurses.h usability. yes checking ncurses.h presence. yes checking for ncurses.h. yes checking for library containing initscr. -lncurses checking for library containing tgetent. none required configure: overiding all of —prefix and the likes, because —enable-local was set configure: creating ./config.status config.status: creating Makefile vagrant@ubuntu-xenial:

/crosstool-ng$ make SED ‘ct-ng’ SED ‘scripts/crosstool-NG.sh’ SED ‘scripts/saveSample.sh’ SED ‘scripts/showTuple.sh’ GEN ‘config/configure.in’ GEN ‘paths.mk’ GEN ‘paths.sh’ DEP ‘nconf.gui.dep’ DEP ‘nconf.dep’ DEP ‘lxdialog/yesno.dep’ DEP ‘lxdialog/util.dep’ DEP ‘lxdialog/textbox.dep’ DEP ‘lxdialog/menubox.dep’ DEP ‘lxdialog/inputbox.dep’ DEP ‘lxdialog/checklist.dep’ DEP ‘mconf.dep’ DEP ‘conf.dep’ BISON ‘zconf.tab.c’ GPERF ‘zconf.hash.c’ LEX ‘zconf.lex.c’ DEP ‘zconf.tab.dep’ CC ‘zconf.tab.o’ CC ‘conf.o’ LD ‘conf’ CC ‘lxdialog/checklist.o’ CC ‘lxdialog/inputbox.o’ CC ‘lxdialog/menubox.o’ CC ‘lxdialog/textbox.o’ CC ‘lxdialog/util.o’ CC ‘lxdialog/yesno.o’ CC ‘mconf.o’ LD ‘mconf’ CC ‘nconf.o’ CC ‘nconf.gui.o’ LD ‘nconf’ SED ‘docs/ct-ng.1’ GZIP ‘docs/ct-ng.1.gz’ vagrant@ubuntu-xenial:

/crosstool-ng$ make install GEN ‘config/configure.in’ GEN ‘paths.mk’ GEN ‘paths.sh’ vagrant@ubuntu-xenial:

/crosstool-ng$ ./ct-ng show-arm-cortex_a8-linux-gnueabi MKDIR config.gen IN config.gen/arch.in IN config.gen/kernel.in IN config.gen/cc.in IN config.gen/binutils.in IN config.gen/libc.in IN config.gen/debug.in [L..] arm-cortex_a8-linux-gnueabi OS : linux-4.3 Companion libs : gmp-6.0.0a mpfr-3.1.3 mpc-1.0.3 libelf-0.8.13 expat-2.1.0 ncurses-6.0 binutils : binutils-2.25.1 C compilers : gcc | 5.2.0 Languages : C,C++ C library : glibc-2.22 (threads: nptl) Tools : dmalloc-5.5.2 duma-2_5_15 gdb-7.10 ltrace-0.7.3 strace-4.10 vagrant@ubuntu-xenial:

/crosstool-ng$ ./ct-ng arm-cortex_a8-linux-gnueabi IN config.gen/arch.in IN config.gen/kernel.in IN config.gen/cc.in IN config.gen/binutils.in IN config.gen/libc.in CONF config/config.in # # configuration written to .config # *********************************************************** Initially reported by: Yann E. MORIN URL: http://ymorin.is-a-geek.org/ *********************************************************** Now configured for «arm-cortex_a8-linux-gnueabi» vagrant@ubuntu-xenial:

/crosstool-ng$ ./ct-ng menuconfig .config — Crosstool-NG Configuration ──────────────────────────────────────────────────────────────────────────────────────────── ┌───────────────────────────── Crosstool-NG Configuration ──────────────────────────────┐ │ Arrow keys navigate the menu. selects submenus —> (or empty submenus │ │ —-). Highlighted letters are hotkeys. Pressing includes, excludes, │ │ modularizes features. Press to exit, for Help, for Search. │ │ Legend: [*] built-in [ ] excluded module module capable │ │ ┌───────────────────────────────────────────────────────────────────────────────────┐ │ │ │ Paths and misc options —> │ │ │ │ Target options —> │ │ │ │ Toolchain options —> │ │ │ │ Operating System —> │ │ │ │ Binary utilities —> │ │ │ │ C-library —> │ │ │ │ C compiler —> │ │ │ │ Debug facilities —> │ │ │ │ Companion libraries —> │ │ │ │ Companion tools —> │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └───────────────────────────────────────────────────────────────────────────────────┘ │ ├───────────────────────────────────────────────────────────────────────────────────────┤ │ │ └───────────────────────────────────────────────────────────────────────────────────────┘ GEN ‘paths.sh’ vagrant@ubuntu-xenial:

/crosstool-ng$ ./ct-ng show-arm-cortex_a8-linux-gnueabi MKDIR config.gen IN config.gen/arch.in IN config.gen/kernel.in IN config.gen/cc.in IN config.gen/binutils.in IN config.gen/libc.in IN config.gen/debug.in [L..] arm-cortex_a8-linux-gnueabi OS : linux-4.3 Companion libs : gmp-6.0.0a mpfr-3.1.3 mpc-1.0.3 libelf-0.8.13 expat-2.1.0 ncurses-6.0 binutils : binutils-2.25.1 C compilers : gcc | 5.2.0 Languages : C,C++ C library : glibc-2.22 (threads: nptl) Tools : dmalloc-5.5.2 duma-2_5_15 gdb-7.10 ltrace-0.7.3 strace-4.10 vagrant@ubuntu-xenial:

/crosstool-ng$ ./ct-ng arm-cortex_a8-linux-gnueabi IN config.gen/arch.in IN config.gen/kernel.in IN config.gen/cc.in IN config.gen/binutils.in IN config.gen/libc.in CONF config/config.in # # configuration written to .config # *********************************************************** Initially reported by: Yann E. MORIN URL: http://ymorin.is-a-geek.org/ *********************************************************** Now configured for «arm-cortex_a8-linux-gnueabi» vagrant@ubuntu-xenial:

/crosstool-ng$ ./ct-ng menuconfig CONF config/config.in .config:149:warning: override: reassigning to symbol ARCH_32 .config:149:warning: override: ARCH_32 changes choice state *** End of the configuration. *** Execute ‘ct-ng build’ to start the build or try ‘ct-ng help’. vagrant@ubuntu-xenial:

/crosstool-ng$ ./ct-ng build [INFO ] Performing some trivial sanity checks [INFO ] Build started 20210204.121110 [INFO ] Building environment variables [WARN ] Directory ‘/home/vagrant/src’ does not exist. [WARN ] Will not save downloaded tarballs to local storage. [EXTRA] Preparing working directories [EXTRA] Installing user-supplied crosstool-NG configuration [EXTRA] ================================================================= [EXTRA] Dumping internal crosstool-NG configuration [EXTRA] Building a toolchain for: [EXTRA] build = x86_64-pc-linux-gnu [EXTRA] host = x86_64-pc-linux-gnu [EXTRA] target = arm-cortex_a8-linux-gnueabihf [EXTRA] Dumping internal crosstool-NG configuration: done in 0.19s (at 00:03) [INFO ] ================================================================= [INFO ] Retrieving needed toolchain components’ tarballs [EXTRA] Retrieving ‘linux-4.3’ [EXTRA] Retrieving ‘gmp-6.0.0a’ [EXTRA] Retrieving ‘mpfr-3.1.3’ [EXTRA] Retrieving ‘isl-0.14’ [EXTRA] Retrieving ‘mpc-1.0.3’ [EXTRA] Retrieving ‘libelf-0.8.13’ [ERROR] [ERROR] >> [ERROR] >> Build failed in step ‘Retrieving needed toolchain components’ tarballs’ [ERROR] >> called in step ‘(top-level)’ [ERROR] >> [ERROR] >> Error happened in: do_libelf_get[scripts/build/companion_libs/200-libelf.sh@741] [ERROR] >> called from: do_companion_libs_get[scripts/build/companion_libs.sh@15] [ERROR] >> called from: main[scripts/crosstool-NG.sh@591] [ERROR] >> [ERROR] >> For more info on this error, look at the file: ‘build.log’ [ERROR] >> There is a list of known issues, some with workarounds, in: [ERROR] >> ‘docs/B — Known issues.txt’ [ERROR] [ERROR] (elapsed: 0:12.62) [00:13] / ct-ng:152: recipe for target ‘build’ failed make: *** [build] Error 1 vagrant@ubuntu-xenial:

The text was updated successfully, but these errors were encountered:

Источник

Скомпилируйте Android ijkPlayer и проблемы

1. Процедура установки среды Linux

скачать:

  1. git

    yum install git
    
  2. yasm

    yum install yasm
    
  3. ndk

    Скачать NDK, рекомендовать NDK 14 или более

Переменная среда конфигурации

Настройка NDK, SDK (необходимо найти файлы заголовков и библиотечные файлы при компиляции), открыть/и т. Д./Профиль файл

vim /etc/profile

Добавить в конце файла
 Экспорт Android_SDK = ваш путь установки SDF
export ANDROID_NDK=/root/ndk/android-ndk-r14b  

Путь установки NDK будет иметь проблемы с более чем 14 версиями. Анализ проблемы является позже. Хотя его можно изменить, неясно, каковы ограничения внутри.

Сохранить, а затем выполнить переменные среды обновления источника /и т. Д. /Профиль

2. Скачать iJKPlayer

Создайте Android на официальном сайте GIT

git clone https://github.com/Bilibili/ijkplayer.git ijkplayer-android
cd ijkplayer-android
git checkout -B latest k0.8.8

./init-android.sh

cd android/contrib
./compile-ffmpeg.sh clean
./compile-ffmpeg.sh all

cd ..
./compile-ijk.sh all

GitHub загружается медленно, вы можете искать IJKPlayer в Code Cloud, а затем загрузить его. Вот адрес.

git clone https://gitee.com/mirrors/ijkplayer.git ijkplayer-android

Переключитесь на последнюю ветку:

git checkout -B latest k0.8.8

Не выполняйте ./init-ndroid.sh, если вашему игроку необходимо поддерживать RTP, TCP, RTSP и т. Д. (Конкретный Google), вам необходимо изменить файл конфигурации.

1、 У директоров конфигурации четыре файла

image-20200911113704739
Три модуля … Файл в начале- это файл конфигурации. Фактически, он определяется для некоторых переменных (как показано ниже), который используется для открытия или закрытия библиотеки поддержки., Я не понимаю Старый практический модуль-деф

image-20200911114002906

Среди них файл module.sh может быть понят как файл, указывающий на другие файлы. При компиляции файл скрипта не понятен о том, какой файл вы используете три файла конфигурации, поэтому команда Linux используется

ln -s module-default.sh module.sh

Давайте укажем ссылку Module.sh в файл module-default.sh, конечно

ln -s module-lite-hevc.sh module.sh
ln -s module-lite.sh module.sh
 Ссылка на другие файлы, в любом случае, файл скрипта выполняется файлом скрипта module.sh

2、 Если вы напрямую выполняете файл init-android.sh, исходный код ARMV5, ARMV7, ARM64, x86, x86_64 будет извлечен из GitHub.

#IJK_FFMPEG_UPSTREAM=https://github.com/Bilibili/FFmpeg.git
#IJK_FFMPEG_FORK=https://github.com/Bilibili/FFmpeg.git

IJK_FFMPEG_UPSTREAM=https://gitee.com/yuazhen/FFmpeg.git
IJK_FFMPEG_FORK=https://gitee.com/yuazhen/FFmpeg.git

IJK_FFMPEG_COMMIT=ff3.4--ijk0.8.7--20180103--001
IJK_FFMPEG_LOCAL_REPO=extra/ffmpeg

set -e
TOOLS=tools

git --version

echo "== pull ffmpeg base =="
sh $TOOLS/pull-repo-base.sh $IJK_FFMPEG_UPSTREAM $IJK_FFMPEG_LOCAL_REPO

function pull_fork()
{
    echo "== pull ffmpeg fork $1 =="
    sh $TOOLS/pull-repo-ref.sh $IJK_FFMPEG_FORK android/contrib/ffmpeg-$1 ${IJK_FFMPEG_LOCAL_REPO}
    cd android/contrib/ffmpeg-$1
    git checkout ${IJK_FFMPEG_COMMIT} -B ijkplayer
    cd -
}
 #ExeCeate Каждую архитектуру, здесь мне нужен только ARMV7A
#pull_fork "armv5"
pull_fork "armv7a"
#pull_fork "arm64"
#pull_fork "x86"
#pull_fork "x86_64"

./init-config.sh
./init-android-libyuv.sh
./init-android-soundtouch.sh

Поскольку код чертежа также получен на GitHub, путь загрузки источника загружен здесь

#IJK_FFMPEG_UPSTREAM=https://github.com/Bilibili/FFmpeg.git
#IJK_FFMPEG_FORK=https://github.com/Bilibili/FFmpeg.git

IJK_FFMPEG_UPSTREAM=https://gitee.com/yuazhen/FFmpeg.git
IJK_FFMPEG_FORK=https://gitee.com/yuazhen/FFmpeg.git

Init-android.sh также загрузит код библиотеки Libyuv SoundTouch. Эти две библиотеки не большие, поэтому вы можете выполнить адрес загрузки без изменения адреса загрузки.

./init-android.sh

После завершения введите каталог Android/Contrib

cd android/contrib

Далее, запустите библиотеку FFMPEG, которая компилируется и загружает, сначала очистите сначала

./compile-ffmpeg.sh clean

Поскольку загружается только ARMV7A, компиляция FFMPEG не может компилировать все, здесь только компилируйте ARMV7A (если вам нужно компилировать мультиархитектуру, прочитана позже)

./compile-ffmpeg.sh armv7a

(Это может быть составлено проблемой версии NDK здесь.

После выполнения это будет …/ijkplayer-android/contrib/build/ffmpeg-rmv7a/output каталог для генерации файлов заголовка FFMPEG и файлов библиотеки.

image-20200911140429954

Выше всего, что мне нужно скомпилировать iJKPlayer, и следующее — действительно компилировать iJKPlayer

Только ARMV7A загружается здесь, все скомпилированы только ARMV7A

Вернуться к предыдущему слою каталога

cd ..
./compile-ijk.sh armv7a

После успеха вы станете динамическим библиотечным файлом для iJKPlayer в каталоге/iJKPlayer/iJKPlayer-Android/IJKPlayer.

image-20200911141237983

image-20200911141313915

IJKPlayer-Example-это пример элементов

В -третьих, проблемы, столкнувшиеся в компиляции

1、You need the NDKr10e or later

При выполнении ./compile-ffmpeg.sh armv7a

Если версия NDK превышает 14, она будет сообщена:

image-20200911141645858

Ниже приведена причина анализа.

Откройте файл comfile-ffmpeg.sh, опустите часть, основной контент:

case "$FF_TARGET" in
    "")
        echo_archs armv7a
        sh tools/do-compile-ffmpeg.sh armv7a
    ;;
         #Здесь, здесь
    armv5|armv7a|arm64|x86|x86_64)
        echo_archs $FF_TARGET $FF_TARGET_EXTRA
        sh tools/do-compile-ffmpeg.sh $FF_TARGET $FF_TARGET_EXTRA
        echo_nextstep_help
    ;;
    .
    .
    .
    .
    *)
        echo_usage
        exit 1
    ;;
esac

Такое ощущение, что символ ARMV7A, соответствующий в нем, а затем выполнить

sh tools/do-compile-ffmpeg.sh $FF_TARGET $FF_TARGET_EXTRA

 Ff_target Это прохождение ARMV7A 
 Ff_target_extra не прошла здесь, для пустоты

 Просто выполнить
sh tools/do-compile-ffmpeg.sh armv7a

Перейдите, чтобы выполнить файл do-compile-ffmpeg.sh в текущем каталоге в текущем каталоге, принесите параметр ARMV7A;

image-20200911142324453

Начало содержания DO-Compile-ffmpeg.sh () ::

FF_ARCH=$1
FF_BUILD_OPT=$2
echo "FF_ARCH=$FF_ARCH"
echo "FF_BUILD_OPT=$FF_BUILD_OPT"
if [ -z "$FF_ARCH" ]; then
    echo "You must specific an architecture 'arm, armv7a, x86, ...'."
    echo ""
    exit 1
fi
.
.
 Установите различные переменные
.
.

#--------------------
echo ""
echo "--------------------"
echo "[*] make NDK standalone toolchain"
echo "--------------------"
. ./tools/do-detect-env.sh
.
.
.

Определите, пуст ли параметр FF_ARCH.

FF_ARCH здесь-это прохождение ARMV7A (вот чепуха), есть приказ ./tools/do-detect-env.sh;

Вышеуказанное — чепуха, поэтому вам не нужно его читать, детали являются только важным контентом ниже ниже

Выполнить его перед сценариемdo-detect-env.sh Проверка файла -среда и версия NDK

#! /usr/bin/env bash

set -e

UNAME_S=$(uname -s)
UNAME_SM=$(uname -sm)
echo "build on $UNAME_SM"

echo "ANDROID_NDK=$ANDROID_NDK"

if [ -z "$ANDROID_NDK" ]; then
    echo "You must define ANDROID_NDK before starting."
    echo "They must point to your NDK directories."
    echo ""
    exit 1
fi



# try to detect NDK version
export IJK_GCC_VER=4.9
export IJK_GCC_64_VER=4.9
export IJK_MAKE_TOOLCHAIN_FLAGS=
export IJK_MAKE_FLAG=
export IJK_NDK_REL=$(grep -o '^r[0-9]*.*' $ANDROID_NDK/RELEASE.TXT 2>/dev/null | sed 's/[[:space:]]*//g' | cut -b2-)
case "$IJK_NDK_REL" in
    10e*)
        # we don't use 4.4.3 because it doesn't handle threads correctly.
        if test -d ${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.8
        # if gcc 4.8 is present, it's there for all the archs (x86, mips, arm)
        then
            echo "NDKr$IJK_NDK_REL detected"

            case "$UNAME_S" in
                Darwin)
                    export IJK_MAKE_TOOLCHAIN_FLAGS="$IJK_MAKE_TOOLCHAIN_FLAGS --system=darwin-x86_64"
                ;;
                CYGWIN_NT-*)
                    export IJK_MAKE_TOOLCHAIN_FLAGS="$IJK_MAKE_TOOLCHAIN_FLAGS --system=windows-x86_64"
                ;;
            esac
        else
            echo "You need the NDKr10e or later"
            exit 1
        fi
    ;;
    *)
        IJK_NDK_REL=$(grep -o '^Pkg.Revision.*=[0-9]*.*' $ANDROID_NDK/source.properties 2>/dev/null | sed 's/[[:space:]]*//g' | cut -d "=" -f 2)
        echo "IJK_NDK_REL=$IJK_NDK_REL"
                   #Здесь, здесь
        case "$IJK_NDK_REL" in
            11*|12*|13*|14*)
                if test -d ${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.9
                then
                    echo "NDKr$IJK_NDK_REL detected"
                else
                    echo "You need the NDKr10e or later"
                    exit 1
                fi
            ;;
            *)
                echo "You need the NDKr10e or later"
                exit 1
            ;;
        esac
    ;;
esac


case "$UNAME_S" in
    Darwin)
        export IJK_MAKE_FLAG=-j`sysctl -n machdep.cpu.thread_count`
    ;;
    CYGWIN_NT-*)
        IJK_WIN_TEMP="$(cygpath -am /tmp)"
        export TEMPDIR=$IJK_WIN_TEMP/

        echo "Cygwin temp prefix=$IJK_WIN_TEMP/"
    ;;
esac

export IJK_NDK_REL=$(grep -o '^r[0-9]*.*' $ANDROID_NDK/RELEASE.TXT 2>/dev/null | sed 's/[[:space:]]*//g' | cut -b2-)

Используйте регулярное суждение NDK версии

Если версия NDK составляет 10e, выполните следующее

case "$IJK_NDK_REL" in
    10e*)

Если это другое, выполните

 case "$IJK_NDK_REL" in
                         11*| 12*| 13*| 14*) # Вот определить, является ли версия NDK 11, 12, 13, 14
           Если тест -d $ {android_ndk} /toolchains/arm-linux-androideabi-4.9 #проверить, существует ли соответствующая версия
           Только 11*| 12*| 13*| 14*Четыре версии здесь проверены, возможно, добавьте 17, чтобы попробовать
     
      11*|12*|13*|14*|17*)

После сохранения выполните ./compile-ffmpeg.sh armv7a, а затем сообщили:

image-20200911150506225

Поскольку платформа Android, используемая путем компиляции FFMPEG, дефолт до 9, платформа Minimum Arm составляет 14, поэтому добавьте ее в файл DO-Comfile-ffmpeg.sh

FF_ANDROID_PLATFORM = Android-24 #MY SDK версия здесь 24
.
.
.
#----- armv7a begin -----
if [ "$FF_ARCH" = "armv7a" ]; then
	 #Здесь, здесь
	FF_ANDROID_PLATFORM=android-24

    FF_BUILD_NAME=ffmpeg-armv7a
    FF_BUILD_NAME_OPENSSL=openssl-armv7a
    FF_BUILD_NAME_LIBSOXR=libsoxr-armv7a
    FF_SOURCE=$FF_BUILD_ROOT/$FF_BUILD_NAME

    FF_CROSS_PREFIX=arm-linux-androideabi
    FF_TOOLCHAIN_NAME=${FF_CROSS_PREFIX}-${FF_GCC_VER}

    FF_CFG_FLAGS="$FF_CFG_FLAGS --arch=arm --cpu=cortex-a8"
    FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-neon"
    FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-thumb"

    FF_EXTRA_CFLAGS="$FF_EXTRA_CFLAGS -march=armv7-a -mcpu=cortex-a8 -mfpu=vfpv3-d16 -mfloat-abi=softfp -mthumb"
    FF_EXTRA_LDFLAGS="$FF_EXTRA_LDFLAGS -Wl,--fix-cortex-a8"

    FF_ASSEMBLER_SUB_DIRS="arm"
 elif [ "$FF_ARCH" = "armv5" ]; then
.
.
.

После сохранения выполните ./compile-ffmpeg.sh armv7a

2、ERROR: Failed to create toolchain

При выполнении ./compile-ffmpeg.sh armv7a

Это потому, что некоторые из Linux System использует версию Python Python3 (я не пробовал Python2)

Вы можете использовать команду RPM, чтобы проверить версию Python

rpm -qa | grep python

image-20200911151733008

Выполните файл $ android_ndk/build/tools/make-standalone- toolchain.sh

File Make Standalone-toolchain.sh наконец-то запустит скрипт Python

PLATFORM_NUMBER=${PLATFORM#android-}
if [ -n "$PLATFORM_NUMBER" ]; then
  PLATFORM_ARG="--api $PLATFORM_NUMBER"
else
  PLATFORM_ARG=""
fi
 #   
#run python `dirname $0`/make_standalone_toolchain.py 
#    --arch $ARCH $PLATFORM_ARG --stl $STL $INSTALL_ARG $FORCE_ARG
	
 #AFTER Отредактировано
python3 `dirname $0`/make_standalone_toolchain.py 
    --arch $ARCH $PLATFORM_ARG --stl $STL $INSTALL_ARG $FORCE_ARG
	
fail_panic "Failed to create toolchain."

if [ -n "$INSTALL_DIR" ]; then
    dump "Toolchain installed to $INSTALL_DIR."
else
    dump "Package installed to $PACKAGE_DIR."
fi

Если это Python3, сообщается об ошибке, потому что команда Python не может запустить файл Python (.py), поэтому измените Prun Python на Python на

Python3 (Python2 никогда не пробовал)

3,./Compile-IJK.SH ARMV7A ошибка

image-20200911153625596

В последний критический момент, используя NDK 14B для компиляции IJKPlayer, я не сработал, я чувствовал, что его не вытащили, и это было так неудобно в середине. Наконец, можно было изменить версию NDK на 17 (то есть , NDK 14 использовался при составлении FFMPEG, компилируйте iJKPlayer обратно для использования NDK 17), конкретная причина не проверяется, он будет использоваться, он будет использоваться

В -четвертых, компилируйте мультиархитектуру

Например, вам нужно компилировать ARMV7A и ARM64

Прежде всего, init-android.sh должен загрузить исходный код соответствующей архитектуры

function pull_fork()
{
    echo "== pull ffmpeg fork $1 =="
    sh $TOOLS/pull-repo-ref.sh $IJK_FFMPEG_FORK android/contrib/ffmpeg-$1 ${IJK_FFMPEG_LOCAL_REPO}
    cd android/contrib/ffmpeg-$1
    git checkout ${IJK_FFMPEG_COMMIT} -B ijkplayer
    cd -
}

#pull_fork "armv5"
 // Скачать ARMV7A и ARM64
pull_fork "armv7a"
pull_fork "arm64"
#pull_fork "x86"
#pull_fork "x86_64"

./init-config.sh
./init-android-libyuv.sh
./init-android-soundtouch.sh

Затем измените файл compile-ffmpeg.sh.

.
.
.
#FF_ACT_ARCHS_32="armv5 armv7a x86"
#FF_ACT_ARCHS_64="armv5 armv7a arm64 x86 x86_64"

 #Shere 32 в 64, и теперь это обычно 64 -бит
FF_ACT_ARCHS_32="armv7a"
FF_ACT_ARCHS_64="armv7a arm64"
FF_ACT_ARCHS_ALL=$FF_ACT_ARCHS_64
.
.
.

Что используется при выполнении сценария

./compile-ffmpeg.sh all

Точно так же, затем измените файл compile-jk.sh ACT_ABI_64 только сохраняет ARMV7A и ARM64

.
.
.
REQUEST_TARGET=$1
REQUEST_SUB_CMD=$2
#ACT_ABI_32="armv5 armv7a x86"
#ACT_ABI_64="armv5 armv7a arm64 x86 x86_64"

ACT_ABI_32="armv7a"
ACT_ABI_64="armv7a arm64"
ACT_ABI_ALL=$ACT_ABI_64
UNAME_S=$(uname -s)
.
.
.

Что используется при выполнении сценария

./compile-ijk.sh all

При запуске build-openssl-libraries.sh я сталкиваюсь со следующими проблемами:

Предупреждение при запуске ./Configure dist в строке 48:

The library could not be configured for supporting multi-threaded
applications as the compiler options required on this system are not known.
See file INSTALL for details if you need multi-threading.

The options 'shared', 'pic' and 'dynamic-engine' aren't supported on this
platform, so we will pretend you gave the option 'no-pic', which also disables
'shared' and 'dynamic-engine'.  If you know how to implement shared libraries
or position independent code, please let us know (but please first make sure
you have tried with a current version of OpenSSL).

Ошибка при запуске build / tools / make-standalone-toolchain.sh @line 75:

HOST_OS=darwin
HOST_EXE=
HOST_ARCH=x86_64
HOST_TAG=darwin-x86_64
HOST_NUM_CPUS=4
BUILD_NUM_CPUS=8
ERROR: Failed to create toolchain.

Из-за этой ошибки последующая компиляция файлов .c завершается с ошибкой, сообщая, что stdlib.h не найден.

Пожалуйста, помогите мне узнать, как я могу его успешно собрать … На Android мне нужна многопоточная поддержка.

  • Каковы последствия игнорирования двух предупреждений ./Configure
  • Как добиться успеха в Make Toolchain?

Я работаю на macOS Sierra 10.12.6. Это часть построения SQLCipher.

2 ответа

Я обновил сценарий сборки для создания OpenSSL с использованием Android NDK r15c для SQLCipher для Android здесь. Не могли бы вы попробовать?


1

Nick Parker
7 Ноя 2017 в 16:58

Два предупреждения исчезли, когда я изменил строку «./Configure dist» на «./Configure android».

Проблема с инструментальной цепочкой make возникла из-за того, что параметры передавали android-9, в то время как NDK15 поддерживает только android-14. Как кто-то предположил, это было обнаружено путем включения —verbose для команды make-toolchain.

Теперь скрипт компилирует все файлы .c, но при связывании возникают проблемы (apps / openssl.o: openssl.c: function main: error: undefined ссылка на ‘stpcpy’). Похоже, снова какая-то проблема с Configure или NDK config ..

Пишу как ответ для всех, кто может столкнуться с той же проблемой.


0

Arundale Ramanathan
2 Ноя 2017 в 14:40

Frank Gould

unread,

Sep 18, 2016, 9:30:29 PM9/18/16

to Kivy users support

I have been pounding on this buidozer problem for days now and cannot find or figure out how to successfully build my kivy app.  My command to build is:  ‘

buildozer android_new debug deploy run’ and it generates the following error:

[INFO]:    -> running gcc -dumpmachine

(‘path is’, ‘/Users/fgould/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86/bin/:/Users/fgould/.buildozer/android/platform/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/:/Users/fgould/.buildozer/android/platform/android-ndk-r9c:/Users/fgould/.buildozer/android/platform/android-sdk-21/tools:/Users/fgould/.buildozer/android/platform/apache-ant-1.9.4/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/apache-ant/bin:/Users/fgould/.buildozer/android/platform/android-sdk-21:/Users/fgould/.buildozer/android/platform/android-sdk-21/tools:/Users/fgould/.buildozer/android/platform/android-sdk-21/platform-tools’)

[INFO]:    -> running cp /Users/fgould/ViewPix/Slideshow/.buildozer/android/platform/python-for-android-master/pythonforandroid/recipes/python2/Setup.loca…(and 25 more)           

[INFO]:    -> running sed -i s#^SSL=.*#SSL=/Users/fgould/ViewPix/Slideshow/.buildozer/android/platform/build/build/other_builds/openssl/armeabi-v7a/openss…(and 22 more)

Traceback (most recent call last):                                                                                                                                                   

  File «/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py», line 162, in _run_module_as_main

    «__main__», fname, loader, pkg_name)

  File «/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py», line 72, in _run_code

    exec code in run_globals

  File «/Users/fgould/ViewPix/Slideshow/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py», line 798, in <module>

    main()

  File «/Users/fgould/ViewPix/Slideshow/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py», line 795, in main

    ToolchainCL()

  File «/Users/fgould/ViewPix/Slideshow/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py», line 470, in __init__

    getattr(self, args.subparser_name.replace(‘-‘, ‘_’))(args)

  File «/Users/fgould/ViewPix/Slideshow/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py», line 146, in wrapper_func

    build_dist_from_args(ctx, dist, args)

  File «/Users/fgould/ViewPix/Slideshow/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py», line 189, in build_dist_from_args

    build_recipes(build_order, python_modules, ctx)

  File «pythonforandroid/build.py», line 561, in build_recipes

  File «/Users/fgould/ViewPix/Slideshow/.buildozer/android/platform/python-for-android-master/pythonforandroid/recipes/python2/__init__.py», line 44, in build_arch

    self.do_python_build(arch)

  File «/Users/fgould/ViewPix/Slideshow/.buildozer/android/platform/python-for-android-master/pythonforandroid/recipes/python2/__init__.py», line 100, in do_python_build

    shprint(sh.sed, ‘-i’, ‘s#^SSL=.*#SSL={}#’.format(openssl_build_dir), setuplocal)

  File «pythonforandroid/logger.py», line 173, in shprint

  File «/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sh.py», line 565, in next

    self.wait()

  File «/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sh.py», line 500, in wait

    self.handle_command_exit_code(exit_code)

  File «/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sh.py», line 516, in handle_command_exit_code

    raise exc(self.ran, self.process.stdout, self.process.stderr)

sh.ErrorReturnCode_1: 

  RAN: ‘/usr/bin/sed -i s#^SSL=.*#SSL=/Users/fgould/ViewPix/Slideshow/.buildozer/android/platform/build/build/other_builds/openssl/armeabi-v7a/openssl# Modules/Setup.local’

  STDOUT:

sed: 1: «Modules/Setup.local»: invalid command code M

  STDERR:

# Command failed: python -m pythonforandroid.toolchain create —dist_name=slideshow —bootstrap=sdl2 —requirements=kivy,openssl,pyopenssl —arch armeabi-v7a —copy-libs —local-recipes /Users/fgould/ViewPix/Slideshow/.buildozer/android/platform/python-for-android/recipes —color=always —storage-dir=/Users/fgould/ViewPix/Slideshow/.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

I have log_level = 2 to generate the above and truncated just before the error occurred.  I don’t see anything but warnings above this error message.  I’ve searched online and could not find a solution.  All help appreciated.

Alexander Taylor

unread,

Sep 18, 2016, 11:44:20 PM9/18/16

to Kivy users support

I think there might be a problem with a recent-ish SSL patch, although I don’t think I’ve seen this exact result before. I’ll take a look at it sometime soonish if possible.

Frank Gould

unread,

Sep 20, 2016, 3:34:56 PM9/20/16

to Kivy users support

Hello Alexander, THANKS for your response. Anything you can do to help will be greatly appreciated. I have tried all I can find to solve this compile issue including rebuilding my dev environment. Please let me know if there is anything I can do to help solve this. I am dead in the water with my apk now. ;-(

Frank Gould

unread,

Sep 25, 2016, 10:48:17 PM9/25/16

to Kivy users support

My 7 year old Rottweiler died this morning and now I’m wondering if my Kivy app is dead too.  Is there anyone who can help me resolve this compile error?  Please let me know.

NumesSanguis

unread,

Sep 26, 2016, 6:41:09 PM9/26/16

to Kivy users support

Frank Gould

unread,

Oct 1, 2016, 6:53:04 PM10/1/16

to Kivy users support

Thanks for the suggestion.  I appreciate any suggestions or where I might have missed something.  I updated buildozer.spec with

p4a.local_recipes = %(source.dir)s/.buildozer/android/platform/python-for-android/recipes

1. After the app compiles with ‘buildozer android debug…’, installs, and runs, it crashes with the following error:

E/dalvikvm( 2326): dlopen(«/data/app-lib/com.masterpics.slideshow-1/libpython2.7.so») failed: dlopen failed: cannot locate symbol «pow» referenced by «libpython2.7.so»…

2. During the app compile with ‘buildozer android_new debug…’, the compile script crashes with the following error:

[INFO]:    -> running sed -i s#^SSL=.*#SSL=/Users/fgould/ViewPix/Slideshow/.buildozer/android/platform/build/build/other_builds/openssl/armeabi-v7a/openssl# Modules/Setup.local

Frank Gould

unread,

Oct 5, 2016, 5:25:52 PM10/5/16

to Kivy users support

I deleted .buildozer and tried the compile. Below is the results I got:

Traceback (most recent call last):

  File «/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py», line 162, in _run_module_as_main

    «__main__», fname, loader, pkg_name)

  File «/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py», line 72, in _run_code

    exec code in run_globals

  File «/Users/fgould/ViewPix/Slideshow/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py», line 807, in <module>

    main()

  File «/Users/fgould/ViewPix/Slideshow/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py», line 804, in main

    ToolchainCL()

  File «/Users/fgould/ViewPix/Slideshow/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py», line 479, in __init__

    getattr(self, args.subparser_name.replace(‘-‘, ‘_’))(args)

  File «/Users/fgould/ViewPix/Slideshow/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py», line 146, in wrapper_func

    build_dist_from_args(ctx, dist, args)

  File «/Users/fgould/ViewPix/Slideshow/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py», line 189, in build_dist_from_args

    build_recipes(build_order, python_modules, ctx)

  File «pythonforandroid/build.py», line 540, in build_recipes

  File «pythonforandroid/recipe.py», line 342, in download_if_necessary

  File «pythonforandroid/recipe.py», line 381, in download

  File «pythonforandroid/recipe.py», line 148, in download_file

  File «/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py», line 273, in retrieve

    block = fp.read(bs)

  File «/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py», line 380, in read

    data = self._sock.recv(left)

  File «/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py», line 714, in recv

    return self.read(buflen)

  File «/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py», line 608, in read

    v = self._sslobj.read(len or 1024)

socket.error: [Errno 54] Connection reset by peer

# Command failed: python -m pythonforandroid.toolchain create —dist_name=slideshow —bootstrap=sdl2 —requirements=kivy,openssl,pyopenssl —arch armeabi-v7a —copy-libs —local-recipes /Users/fgould/ViewPix/Slideshow/.buildozer/android/platform/python-for-android/recipes —color=always —storage-dir=/Users/fgould/ViewPix/Slideshow/.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

Frank Gould

unread,

Oct 6, 2016, 6:07:49 PM10/6/16

to Kivy users support

I searched my buildozer log for toolchain and found «[WARNING]: Missing executable: libtoolize is not installed.» Searched for a solution to that and found: 

Building python2 for armeabi fails due to space character in storage_dir (OS X) #622

I am not sure how to fix this problem and if it will solve the problem I originally reported.

Frank Gould

unread,

Oct 6, 2016, 8:29:29 PM10/6/16

to Kivy users support

Hello Alexander, I am still trying to get my compile to work but get the same toolchain create error. I’ve tried several times to delete my .buildozer folder in both the app and home folders in hopes to fix this warning:  Missing executable: libtoolize is not installed. I found in __init__.py where it is checking for the module installed but don’t know what to do to install libtoolize.  Any suggestions would be greatly appreciated. Thanks. 

Joey daniel darko

unread,

Oct 6, 2016, 10:25:04 PM10/6/16

to Kivy users support


sudo apt-get install build-essential libtool

try this,

Frank Gould

unread,

Oct 7, 2016, 4:10:22 PM10/7/16

to Kivy users support

Thanks Joey! The install suggestion turned out to be the following for my mac:

curl OL http://ftpmirror.gnu.org/libtool/libtool2.4.2.tar.gz

tar xzf libtool2.4.2.tar.gz

cd libtool2.4.2

./configure && make && sudo make install

Frank Gould

unread,

Oct 7, 2016, 6:00:26 PM10/7/16

to Kivy users support

I successfully installed the libtool module and the warning is not displaying. I still get the same results ‘Command failed: python -m pythonforandroid.toolchain create’ when I run buildozer, as listed below. I tried commenting out the ‘__init__.py», line 100, in do_python_build’ but ended up with the same ‘Command failed’ results. Any other ideas? I’ve searched everywhere I can for a solution but am not making progress. Any help greatly appreciated.

On Sunday, September 18, 2016 at 2:30:29 PM UTC-4, Frank Gould wrote:

Michael OBrien

unread,

Nov 30, 2016, 4:22:03 AM11/30/16

to Kivy users support

Derek

unread,

Sep 7, 2017, 1:06:29 AM9/7/17

to Kivy users support

Did this ever get fixed? Was it caused my kivy gardens?

Posts: 13

Joined: Mar 2020

Reputation:
0

Hi,

I’m facing a issue when I’m trying to build Leia. The problem is with the part make in pcre folder:

make for this folder /home/jan/kodi/tools/depends/target/pcre

checking for gcc…  
checking whether the C compiler works… no
configure: error: in `/home/jan/kodi/tools/depends/target/pcre/arm-linux-androideabi-21-debug’:
configure: error: C compiler cannot create executables

Log from this part of make:
https://pasteio.com/x6JJVrQbbbM0

Log from config.log
https://pasteio.com/x2AURFwmz9Qj

But when I change from Leia to master everything works. 

Work with:
git clone https://github.com/xbmc/xbmc kodi

Does NOT work with:
git clone -b Leia https://github.com/xbmc/xbmc kodi

Everything is same, only different git clone. 

Commands used for Leia
https://pasteio.com/xN5T7whx8qmY

Commands used for master
https://pasteio.com/xkC3AYevqQ1C

I’ve tried to figure it out for several hours, but with no luck Sad

Posts: 1,010

Joined: Sep 2014

Reputation:
102

asavah



Posting Freak
Posts: 1,010


2020-04-30, 18:43
(This post was last modified: 2020-04-30, 18:45 by asavah.)

>Everything is same, only different git clone. 

Nope, pay more attention to the actual docs in Leia branch.

The configure command for depends for Leia branch is different.
https://github.com/xbmc/xbmc/blob/Leia/d…Android.md
You are missing —with-toolchain part

Posts: 13

Joined: Mar 2020

Reputation:
0

(2020-04-30, 18:43)asavah Wrote: >Everything is same, only different git clone. 

Nope, pay more attention to the actual docs in Leia branch.

The configure command for depends for Leia branch is different.
https://github.com/xbmc/xbmc/blob/Leia/d…Android.md
You are missing —with-toolchain part

Thank you, did not know, that the procedure is different for each build. 

I’ve made some progress, but now I’m stuck with toolchain create:

[email protected]:~/android-tools/android-ndk-r18/build/tools$ ./make-standalone-toolchain.sh —install-dir=$HOME/android-tools/arm-linux-androideabi-vanilla/android-21 —platform=android-21 —toolchain=arm-linux-androideabi —verbose
HOST_OS=linux
HOST_EXE=
HOST_ARCH=x86_64
HOST_TAG=linux-x86_64
HOST_NUM_CPUS=4
BUILD_NUM_CPUS=8
Auto-config: —arch=arm
## COMMAND: python ./make_standalone_toolchain.py —arch arm —api 21 —stl gnustl —install-dir=/home/jan/android-tools/arm-linux-androideabi-vanilla/android-21
./ndk-common.sh: line 122: python: command not found
ERROR: Failed to create toolchain.

Same with sudo

Any suggestion? 
Thank you

Posts: 13

Joined: Mar 2020

Reputation:
0

Problem solved… I’ve been missing python on Ubuntu Smile

Posts: 13

Joined: Mar 2020

Reputation:
0

So another errors Sad

in folder 
~/kodi/tools/depends/target/pcre
make has 9 errors

use of undeclared identifier 
and 
cannot initialize return object of type ‘lconv *’ with an rvalue of type ‘const struct lconv *

https://pasteio.com/xJo7Efs8ZAsd

Понравилась статья? Поделить с друзьями:
  • Error failed to create bootfiles bfsvc error 0xc1 errorcode c1
  • Error failed to create bootfiles bfsvc error 0x57 параметр задан неверно
  • Error failed to copy win32 loader linux
  • Error failed to copy kali linux
  • Error failed to contact the origin