Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Need more detailed info on how to use this #7

Open
github62 opened this issue Jan 5, 2018 · 3 comments
Open

Need more detailed info on how to use this #7

github62 opened this issue Jan 5, 2018 · 3 comments

Comments

@github62
Copy link

github62 commented Jan 5, 2018

I'm familiar with C/C++, Java, JNI, Android and still completely lost how to build this.

Are you assuming a Linux environment? I'm on Windows and don't understand what I'm supposed to do about this cerbero thing. Took me a long time to even realize the "external" folder points to a separate repo that I apparently need to download separately. Where do I go from there - do I need to copy that into the android-fluidsynth repo somewhere? Do I need to have gcc installed? Many questions...

@atsushieno
Copy link
Owner

First of all, building native libraries for Android is such a complicated task ;-)

Okay, things can be explained in depth, but here are some quick answers for you.

The build system assumes Linux or at least environment that "cerbero" build system works (it is for GNOME desktop which is for Linux). Since fluidsynth depends on glib which is part of GNOME desktop, it kind of makes sense to use cerbero.

Cerbero supports many environments including Android, and building native libraries for Android involves, cross compiling, its own toolchains (Android NDK), and more factors that makes it complicated.

external folder is for git submodules, which you would not have to do anything if you checked out the git repo with --recursive option (Okay, that may not be common to every git users).

There is a Makefile which will build some artifacts. It is supposed to take all care when you run "make" there.

@github62
Copy link
Author

github62 commented Jan 6, 2018

Thanks, some progress made. I understand what cerbero is for and can run it on Windows using MinGW.

Installing cerbero to a separarate directory and running "cerbero bootstrap" also succeeded.

However, I need to bootstrap cerbero in android-fluidsynth/external/cerbero, by calling "make prepare" as stated in your readme.

This gives me the following errors:

$ make prepare
cd external/cerbero && CERBERO_LOCAL_CONFIG=../../custom.cbc ./cerbero-uninstalled -c config/cross-android-armv7.cbc bootstrap
WARNING: Using configuration ../../custom.cbc
WARNING: Android NDK not found
WARNING: Android NDK not found
WARNING: No bootstrapper for the distro version android_gingerbread
WARNING: No bootstrapper for the distro version windows_10
install: wget-1.12-1-msys-1.0.13-bin.tar.lzma
mingw-get.exe: *** ERROR *** package wget-1.12-1-msys-1.0.13-bin.tar.lzma is already installed
install: wget-1.12-1-msys-1.0.13-lang.tar.lzma
mingw-get.exe: *** ERROR *** package wget-1.12-1-msys-1.0.13-lang.tar.lzma is already installed
install: wget-1.12-1-msys-1.0.13-doc.tar.lzma
mingw-get.exe: *** ERROR *** package wget-1.12-1-msys-1.0.13-doc.tar.lzma is already installed
install: wget-1.12-1-msys-1.0.13-lic.tar.lzma
mingw-get.exe: *** ERROR *** package wget-1.12-1-msys-1.0.13-lic.tar.lzma is already installed
install: flex-2.5.35-2-msys-1.0.13-bin.tar.lzma
mingw-get.exe: *** ERROR *** package flex-2.5.35-2-msys-1.0.13-bin.tar.lzma is already installed
install: flex-2.5.35-2-msys-1.0.13-lang.tar.lzma
mingw-get.exe: *** ERROR *** package flex-2.5.35-2-msys-1.0.13-lang.tar.lzma is already installed
install: flex-2.5.35-2-msys-1.0.13-doc.tar.lzma
mingw-get.exe: *** ERROR *** package flex-2.5.35-2-msys-1.0.13-doc.tar.lzma is already installed
install: flex-2.5.35-2-msys-1.0.13-lic.tar.lzma
mingw-get.exe: *** ERROR *** package flex-2.5.35-2-msys-1.0.13-lic.tar.lzma is already installed
install: bison-2.4.2-1-msys-1.0.13-bin.tar.lzma
mingw-get.exe: *** ERROR *** package bison-2.4.2-1-msys-1.0.13-bin.tar.lzma is already installed
install: bison-2.4.2-1-msys-1.0.13-rtm.tar.lzma
mingw-get.exe: *** ERROR *** package bison-2.4.2-1-msys-1.0.13-rtm.tar.lzma is already installed
install: bison-2.4.2-1-msys-1.0.13-lang.tar.lzma
mingw-get.exe: *** ERROR *** package bison-2.4.2-1-msys-1.0.13-lang.tar.lzma is already installed
install: bison-2.4.2-1-msys-1.0.13-doc.tar.lzma
mingw-get.exe: *** ERROR *** package bison-2.4.2-1-msys-1.0.13-doc.tar.lzma is already installed
install: bison-2.4.2-1-msys-1.0.13-lic.tar.lzma
mingw-get.exe: *** ERROR *** package bison-2.4.2-1-msys-1.0.13-lic.tar.lzma is already installed
install: perl-5.8.8-1-msys-1.0.17-bin.tar.lzma
mingw-get.exe: *** ERROR *** package perl-5.8.8-1-msys-1.0.17-bin.tar.lzma is already installed
install: perl-5.8.8-1-msys-1.0.17-doc.tar.lzma
mingw-get.exe: *** ERROR *** package perl-5.8.8-1-msys-1.0.17-doc.tar.lzma is already installed
install: perl-5.8.8-1-msys-1.0.17-html.tar.lzma
mingw-get.exe: *** ERROR *** package perl-5.8.8-1-msys-1.0.17-html.tar.lzma is already installed
install: perl-5.8.8-1-msys-1.0.17-man.tar.lzma
mingw-get.exe: *** ERROR *** package perl-5.8.8-1-msys-1.0.17-man.tar.lzma is already installed
install: perl-5.8.8-1-msys-1.0.17-lic.tar.lzma
mingw-get.exe: *** ERROR *** package perl-5.8.8-1-msys-1.0.17-lic.tar.lzma is already installed
Downloading http://gstreamer.freedesktop.org/data/cerbero/toolchain/windows/mingw-w64-gcc-4.7.3-windows-armv7.tar.xz
--2018-01-06 14:40:15-- http://gstreamer.freedesktop.org/data/cerbero/toolchain/windows/mingw-w64-gcc-4.7.3-windows-armv7.tar.xz
Resolving gstreamer.freedesktop.org... 131.252.210.176
Connecting to gstreamer.freedesktop.org|131.252.210.176|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://gstreamer.freedesktop.org/data/cerbero/toolchain/windows/mingw-w64-gcc-4.7.3-windows-armv7.tar.xz [following]
--2018-01-06 14:40:16-- https://gstreamer.freedesktop.org/data/cerbero/toolchain/windows/mingw-w64-gcc-4.7.3-windows-armv7.tar.xz
Connecting to gstreamer.freedesktop.org|131.252.210.176|:443... connected.
WARNING: cannot verify gstreamer.freedesktop.org's certificate, issued by /C=US/O=Let\'s Encrypt/CN=Let\'s Encrypt Authority X3': Unable to locally verify the issuer's authority. WARNING: certificate common name distributions.freedesktop.org' doesn't match requested host name `gstreamer.freedesktop.org'.
HTTP request sent, awaiting response... 404 Not Found
2018-01-06 14:40:16 ERROR 404: Not Found.

Traceback (most recent call last):
File ".\cerbero\main.py", line 105, in run_command
res = commands.run(command, self.config, self.args)
File ".\cerbero\commands_init_.py", line 78, in run
return _commands[command].run(config, args)
File ".\cerbero\commands\bootstrap.py", line 38, in run
bootstrapper.start()
File ".\cerbero\bootstrap\windows.py", line 66, in start
self.install_mingw()
File ".\cerbero\bootstrap\windows.py", line 88, in install_mingw
shell.download("%s/%s" % (MINGW_DOWNLOAD_SOURCE, tarball), tarfile, check_cert=False)
File ".\cerbero\utils\shell.py", line 253, in download
raise e
FatalError
***** Error running 'bootstrap' command:

usage: cerbero-uninstalled [-h] [-c CONFIG]
{add-recipe,rdeps,tag,genxcconfig,genlibfiles,check,list-packages,show-config,add-package,build,genvsprops,shell,run,cleanone,packageinfo,bundle-source,buildone,wipe,debug-packages,package,bootstrap,list,checkpackage,deps,gensdkshell,fetch-package,fetch}
...
make: *** [prepare] Error 1

@atsushieno
Copy link
Owner

I have no idea if cerbero as of the version that I checked out for android-fluidsynth supports your Windows environment. As for the error with related to missing Android NDK, you might want to check how cerbero detects Android NDK from your build environment. It is not done automagically. It looks for android-ndk-r15b at certain location that some specific environment variable indicates.

https://github.com/atsushieno/cerbero/blob/400c643e6807b93606141ff379e4447dbc254049/config/android.config

(cerbero in the original source tree was based on android-ndk-r13b and I made minimum changes to get it working with r15b. r16 may not work because it has some big changes in the header files that old cerbero might not work fine with them.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants