Few fixes for Android CI Pipeline (#906)

This commit is contained in:
Tom M 2021-06-11 22:56:22 +02:00 committed by GitHub
parent de478947bf
commit 2321868124
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,7 +42,7 @@ variables:
SNDFILE_VERSION: '1.0.31' SNDFILE_VERSION: '1.0.31'
INSTPATCH_VERSION: '1.1.6' INSTPATCH_VERSION: '1.1.6'
VORBIS_VERSION: '1.3.7' VORBIS_VERSION: '1.3.7'
OGG_VERSION: '1.3.4' OGG_VERSION: '1.3.5'
OPUS_VERSION: '1.3.1' OPUS_VERSION: '1.3.1'
# flac 1.3.3 is completely broken: pkgconfig is incorrectly installed, compilation failure, etc.; use recent master instead # flac 1.3.3 is completely broken: pkgconfig is incorrectly installed, compilation failure, etc.; use recent master instead
FLAC_VERSION: '27c615706cedd252a206dd77e3910dfa395dcc49' FLAC_VERSION: '27c615706cedd252a206dd77e3910dfa395dcc49'
@ -58,12 +58,16 @@ variables:
# All the built binaries, libs and their headers will be installed here # All the built binaries, libs and their headers will be installed here
PREFIX: '$(DEV)/opt/android' PREFIX: '$(DEV)/opt/android'
# Prevent installing to lib64/
# This becomes important, if you would build on e.g. openSUSE
LIBPATH0: '$(PREFIX)/lib'
# The path of standalone NDK toolchain # The path of standalone NDK toolchain
# Refer to https://developer.android.com/ndk/guides/standalone_toolchain.html # Refer to https://developer.android.com/ndk/guides/standalone_toolchain.html
NDK_TOOLCHAIN: '$(NDK)/toolchains/llvm/prebuilt/linux-x86_64/' NDK_TOOLCHAIN: '$(NDK)/toolchains/llvm/prebuilt/linux-x86_64/'
# Don't mix up .pc files from your host and build target # Don't mix up .pc files from your host and build target
PKG_CONFIG_PATH: '$(PREFIX)/lib/pkgconfig' PKG_CONFIG_PATH: '$(LIBPATH0)/pkgconfig'
# setting PKG_CONFIG_PATH alone does not seem to be enough to avoid mixing up with the host, also set PKG_CONFIG_LIBDIR # setting PKG_CONFIG_PATH alone does not seem to be enough to avoid mixing up with the host, also set PKG_CONFIG_LIBDIR
PKG_CONFIG_LIBDIR: '$(PKG_CONFIG_PATH)' PKG_CONFIG_LIBDIR: '$(PKG_CONFIG_PATH)'
@ -77,7 +81,7 @@ variables:
# Tell configure what flags Android requires. # Tell configure what flags Android requires.
# Turn Wimplicit-function-declaration into errors. Else autotools will be fooled when checking for available functions (that in fact are NOT available) and compilation will fail later on. # Turn Wimplicit-function-declaration into errors. Else autotools will be fooled when checking for available functions (that in fact are NOT available) and compilation will fail later on.
# Also disable clangs integrated assembler, as the hand written assembly of libffi is not recognized by it, cf. https://crbug.com/801303 # Also disable clangs integrated assembler, as the hand written assembly of libffi is not recognized by it, cf. https://crbug.com/801303
CFLAGS: "-fPIE -fPIC -I$(PREFIX)/include --sysroot=$(NDK_TOOLCHAIN)/sysroot -I$(NDK_TOOLCHAIN)/sysroot/usr/include -Werror=implicit-function-declaration -fno-integrated-as" CFLAGS: "-fPIE -fPIC -I$(PREFIX)/include --sysroot=$(NDK_TOOLCHAIN)/sysroot -I$(NDK_TOOLCHAIN)/sysroot/usr/include -Werror=implicit-function-declaration"
CXXFLAGS: $(CFLAGS) CXXFLAGS: $(CFLAGS)
CPPFLAGS: $(CXXFLAGS) CPPFLAGS: $(CXXFLAGS)
@ -93,29 +97,29 @@ jobs:
ANDROID_ABI_CMAKE: 'armeabi-v7a' ANDROID_ABI_CMAKE: 'armeabi-v7a'
ANDROID_TARGET_ABI: "eabi" ANDROID_TARGET_ABI: "eabi"
# the --target to be used by autotools # the --target to be used by autotools
#AUTOTOOLS_TARGET: "$(ARCH)-linux-android$(ANDROID_TARGET_ABI)" AUTOTOOLS_TARGET: "$(ARCH)-linux-android$(ANDROID_TARGET_ABI)"
AUTOTOOLS_TARGET: "$(ARCH)-none-linux-$(ANDROID_TARGET_ABI)" #AUTOTOOLS_TARGET: "$(ARCH)-none-linux-$(ANDROID_TARGET_ABI)"
AARCH64: AARCH64:
ARCH: 'aarch64' ARCH: 'aarch64'
ANDROID_ARCH: 'aarch64' ANDROID_ARCH: 'aarch64'
ANDROID_ABI_CMAKE: 'arm64-v8a' ANDROID_ABI_CMAKE: 'arm64-v8a'
ANDROID_TARGET_ABI: ANDROID_TARGET_ABI:
#AUTOTOOLS_TARGET: "$(ARCH)-none-linux-android" AUTOTOOLS_TARGET: "$(ARCH)-none-linux-android"
AUTOTOOLS_TARGET: "$(ARCH)-none-linux" #AUTOTOOLS_TARGET: "$(ARCH)-none-linux"
i686: i686:
ARCH: 'i686' ARCH: 'i686'
ANDROID_ARCH: 'i686' ANDROID_ARCH: 'i686'
ANDROID_ABI_CMAKE: 'x86' ANDROID_ABI_CMAKE: 'x86'
ANDROID_TARGET_ABI: ANDROID_TARGET_ABI:
#AUTOTOOLS_TARGET: "$(ARCH)-pc-linux-android" AUTOTOOLS_TARGET: "$(ARCH)-pc-linux-android"
AUTOTOOLS_TARGET: "$(ARCH)-pc-linux" #AUTOTOOLS_TARGET: "$(ARCH)-pc-linux"
x86_64: x86_64:
ARCH: 'x86_64' ARCH: 'x86_64'
ANDROID_ARCH: 'x86_64' ANDROID_ARCH: 'x86_64'
ANDROID_ABI_CMAKE: 'x86_64' ANDROID_ABI_CMAKE: 'x86_64'
ANDROID_TARGET_ABI: ANDROID_TARGET_ABI:
#AUTOTOOLS_TARGET: "$(ARCH)-pc-linux-android" AUTOTOOLS_TARGET: "$(ARCH)-pc-linux-android"
AUTOTOOLS_TARGET: "$(ARCH)-pc-linux" #AUTOTOOLS_TARGET: "$(ARCH)-pc-linux"
pool: pool:
vmImage: 'ubuntu-20.04' vmImage: 'ubuntu-20.04'
@ -167,7 +171,7 @@ jobs:
- task: Cache@2 - task: Cache@2
inputs: inputs:
key: '$(ARCH) | $(DEV)/*.tar.gz | cacheVersion2' key: '$(ARCH) | $(DEV)/*.tar.gz | cacheVersion3'
path: '$(PREFIX)' path: '$(PREFIX)'
cacheHitVar: 'CACHE_RESTORED' cacheHitVar: 'CACHE_RESTORED'
displayName: 'Cache fluidsynth dependency libraries' displayName: 'Cache fluidsynth dependency libraries'
@ -208,7 +212,6 @@ jobs:
export PATH=$PATH:${PREFIX}/bin:${PREFIX}/lib:${PREFIX}/include:${NDK_TOOLCHAIN}/bin export PATH=$PATH:${PREFIX}/bin:${PREFIX}/lib:${PREFIX}/include:${NDK_TOOLCHAIN}/bin
echo "##vso[task.setvariable variable=PATH]$PATH" echo "##vso[task.setvariable variable=PATH]$PATH"
LIBPATH0=$(PREFIX)/lib
LIBPATH1=$(NDK_TOOLCHAIN)/sysroot/usr/lib LIBPATH1=$(NDK_TOOLCHAIN)/sysroot/usr/lib
LIBPATH2=$(NDK_TOOLCHAIN)/sysroot/usr/lib/$(ARCH)-linux-android$(ANDROID_TARGET_ABI)/$(ANDROID_API) LIBPATH2=$(NDK_TOOLCHAIN)/sysroot/usr/lib/$(ARCH)-linux-android$(ANDROID_TARGET_ABI)/$(ANDROID_API)
LIBPATH3=$(NDK_TOOLCHAIN)/sysroot/usr/lib/$(ARCH)-linux-android$(ANDROID_TARGET_ABI) LIBPATH3=$(NDK_TOOLCHAIN)/sysroot/usr/lib/$(ARCH)-linux-android$(ANDROID_TARGET_ABI)
@ -241,9 +244,10 @@ jobs:
./configure \ ./configure \
--host=${AUTOTOOLS_TARGET} \ --host=${AUTOTOOLS_TARGET} \
--prefix=${PREFIX} \ --prefix=${PREFIX} \
--libdir=${LIBPATH0} \
--disable-rpath \ --disable-rpath \
--disable-static \ --enable-static \
--enable-shared \ --disable-shared \
--with-pic \ --with-pic \
--disable-maintainer-mode \ --disable-maintainer-mode \
--disable-silent-rules \ --disable-silent-rules \
@ -266,7 +270,7 @@ jobs:
# install headers into the conventional ${PREFIX}/include rather than ${PREFIX}/lib/libffi-3.2.1/include. # install headers into the conventional ${PREFIX}/include rather than ${PREFIX}/lib/libffi-3.2.1/include.
#sed -e '/^includesdir/ s/$(libdir).*$/$(includedir)/' -i include/Makefile.in #sed -e '/^includesdir/ s/$(libdir).*$/$(includedir)/' -i include/Makefile.in
#sed -e '/^includedir/ s/=.*$/=@includedir@/' -e 's/^Cflags: -I${includedir}/Cflags:/' -i libffi.pc.in #sed -e '/^includedir/ s/=.*$/=@includedir@/' -e 's/^Cflags: -I${includedir}/Cflags:/' -i libffi.pc.in
./configure --host=${AUTOTOOLS_TARGET} --prefix=${PREFIX} --enable-shared --disable-static ./configure --host=${AUTOTOOLS_TARGET} --prefix=${PREFIX} --libdir=${LIBPATH0} --enable-static --disable-shared
make -j$((`nproc`+1)) make -j$((`nproc`+1))
make install make install
popd popd
@ -377,14 +381,15 @@ jobs:
./configure \ ./configure \
--host=${AUTOTOOLS_TARGET} \ --host=${AUTOTOOLS_TARGET} \
--prefix=${PREFIX} \ --prefix=${PREFIX} \
--libdir=${LIBPATH0} \
--disable-rpath \ --disable-rpath \
--disable-libasprintf \ --disable-libasprintf \
--disable-java \ --disable-java \
--disable-native-java \ --disable-native-java \
--disable-openmp \ --disable-openmp \
--disable-curses \ --disable-curses \
--disable-static \ --enable-static \
--enable-shared \ --disable-shared \
--with-pic \ --with-pic \
--disable-maintainer-mode \ --disable-maintainer-mode \
--disable-silent-rules \ --disable-silent-rules \
@ -440,6 +445,7 @@ jobs:
./configure \ ./configure \
--host=${ANDROID_TARGET} \ --host=${ANDROID_TARGET} \
--prefix=${PREFIX} \ --prefix=${PREFIX} \
--libdir=${LIBPATH0} \
--disable-dependency-tracking \ --disable-dependency-tracking \
--cache-file=android.cache \ --cache-file=android.cache \
--enable-included-printf \ --enable-included-printf \
@ -616,8 +622,6 @@ jobs:
- script: | - script: |
set -ex set -ex
ls libFLAC.so ls libFLAC.so
ls libcharset.so
ls libffi.so
ls libfluidsynth-assetloader.so ls libfluidsynth-assetloader.so
ls libfluidsynth.so ls libfluidsynth.so
ls libgio-2.0.so ls libgio-2.0.so
@ -625,9 +629,7 @@ jobs:
ls libgmodule-2.0.so ls libgmodule-2.0.so
ls libgobject-2.0.so ls libgobject-2.0.so
ls libgthread-2.0.so ls libgthread-2.0.so
ls libiconv.so
ls libinstpatch-1.0.so ls libinstpatch-1.0.so
ls libintl.so
ls liboboe.so ls liboboe.so
ls libogg.so ls libogg.so
ls libopus.so ls libopus.so