-
Notifications
You must be signed in to change notification settings - Fork 616
Build for Linux ARM32 (armhf) and ARM64 (aarch64) #1382
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
ae77476
Build for armhf
mattleibow 104b629
Add to yaml
mattleibow 789d05a
diff
mattleibow e4ec30d
gonna be a few tries
mattleibow 54d9fec
we need to go faster
mattleibow bf65662
Slap a new one on
mattleibow a7f2d3e
This?
mattleibow e0f0346
I think I got it...
mattleibow 43c1e61
Nope!
mattleibow 0cecbd8
try everything
mattleibow d7ecf46
Add arm to the nugets
mattleibow e73698a
aarch64
mattleibow e1fd947
Add arm64 to the nuspec
mattleibow 546c36b
Update scripts/azure-templates-bootstrapper.yml
mattleibow a90d688
readelf
mattleibow 388f7b6
things
mattleibow d7981a9
maybe
mattleibow 84e9d1b
oopsie
mattleibow 5811891
cvcx
mattleibow f92a8d3
asdf
mattleibow 260aa8b
dsfasdf
mattleibow 2fbc17f
alt
mattleibow 8b1add9
dfasdfasd
mattleibow 1817310
vvv
mattleibow c14db64
deps
mattleibow 703d6d1
sadfasdf
mattleibow cf0c14a
sdfasdf
mattleibow 0d7143c
sfdasf
mattleibow dd717c1
dasdf
mattleibow cd3eb29
sadfd
mattleibow ec5fc28
dsdf
mattleibow 7ece7bf
sadfasdf
mattleibow 64fa40c
sadfsadfsadf
mattleibow 201f609
dsfadf
mattleibow 9b97057
sadfasdf
mattleibow 59a2ae6
sdfasdf
mattleibow e183573
sadfasdf
mattleibow 8473d5f
asdfasd
mattleibow 92e0511
asdfasdf
mattleibow 30408de
asdfasdfasdfdsfasdfdf
mattleibow add4a3a
asdasdf
mattleibow 6df1c51
sadfasdf
mattleibow 9a77b52
asdfsadfasdf
mattleibow 1ac1413
saddfasdf
mattleibow 46ba09f
dafasdf
mattleibow 50c1231
minitest
mattleibow 1a25cbb
ssadf
mattleibow b35d6ff
uodates
mattleibow File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| DirectoryPath ROOT_PATH = MakeAbsolute(Directory("../..")); | ||
| DirectoryPath OUTPUT_PATH = MakeAbsolute(ROOT_PATH.Combine("output/native")); | ||
|
|
||
| #load "../../cake/shared.cake" | ||
|
|
||
| var BUILD_VARIANT = Argument("variant", EnvironmentVariable("BUILD_VARIANT") ?? "linux"); | ||
| OUTPUT_PATH = OUTPUT_PATH.Combine(BUILD_VARIANT); | ||
|
|
||
| Task("libSkiaSharp") | ||
| .WithCriteria(IsRunningOnLinux()) | ||
| .Does(() => | ||
| { | ||
| // RunCake("../linux/build.cake", "libSkiaSharp", new Dictionary<string, string> { | ||
| // { "variant", BUILD_VARIANT }, | ||
| // { "arch", "arm" }, | ||
| // }); | ||
|
|
||
| var sysroot = "/usr/arm-linux-gnueabihf"; | ||
| var target = "armv7a-linux-gnueabihf"; | ||
| var includes = | ||
| "'-I/usr/arm-linux-gnueabihf/include', " + | ||
| "'-I/usr/arm-linux-gnueabihf/include/c++/4.8.5', " + | ||
| "'-I/usr/arm-linux-gnueabihf/include/c++/4.8.5/arm-linux-gnueabihf'"; | ||
| RunCake("../linux/build.cake", "libSkiaSharp", new Dictionary<string, string> { | ||
| { "variant", BUILD_VARIANT }, | ||
| { "arch", "arm" }, | ||
| { "gnArgs", | ||
| $"extra_asmflags+=[ '--sysroot={sysroot}', '--target={target}', '-mfloat-abi=hard', '-march=armv7-a', '-mfpu=neon', '-mthumb', {includes} ] " + | ||
| $"extra_cflags+=[ '--sysroot={sysroot}', '--target={target}', '-mfloat-abi=hard', '-march=armv7-a', '-mfpu=neon', '-mthumb', {includes} ] " + | ||
| $"extra_ldflags+=[ '--sysroot={sysroot}', '--target={target}' , '-mfloat-abi=hard', '-march=armv7-a', '-mfpu=neon', '-mthumb'] " | ||
| }, | ||
| }); | ||
|
|
||
| RunProcess("ldd", OUTPUT_PATH.CombineWithFilePath($"x64/libSkiaSharp.so").FullPath, out var stdout); | ||
|
|
||
| if (stdout.Any(o => o.Contains("fontconfig"))) | ||
| throw new Exception("libSkiaSharp.so contained a dependency on fontconfig."); | ||
| }); | ||
|
|
||
| Task("libHarfBuzzSharp") | ||
| .WithCriteria(IsRunningOnLinux()) | ||
| .Does(() => | ||
| { | ||
| RunCake("../linux/build.cake", "libHarfBuzzSharp", new Dictionary<string, string> { | ||
| { "variant", BUILD_VARIANT }, | ||
| }); | ||
|
|
||
| RunProcess("ldd", OUTPUT_PATH.CombineWithFilePath($"x64/libHarfBuzzSharp.so").FullPath, out var stdout); | ||
|
|
||
| if (stdout.Any(o => o.Contains("fontconfig"))) | ||
| throw new Exception("libHarfBuzzSharp.so contained a dependency on fontconfig."); | ||
| }); | ||
|
|
||
| Task("Default") | ||
| .IsDependentOn("libSkiaSharp") | ||
| .IsDependentOn("libHarfBuzzSharp"); | ||
|
|
||
| RunTarget(TARGET); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| FROM amd64/ubuntu:16.04 | ||
|
|
||
| RUN apt-get update \ | ||
| && apt-get install -y apt-transport-https curl wget \ | ||
| && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \ | ||
| && echo "deb https://download.mono-project.com/repo/ubuntu stable-xenial/snapshots/6.4.0 main" | tee /etc/apt/sources.list.d/mono-official-stable.list \ | ||
| && curl -L https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \ | ||
| && echo "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-10 main" | tee /etc/apt/sources.list.d/llvm.list \ | ||
| && apt-get update \ | ||
| && apt-get install -y mono-complete msbuild python git libfontconfig1-dev clang-10 make \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| RUN apt-get update | ||
| RUN apt-get install -y libstdc++-4.8-dev-armhf-cross libgcc-4.8-dev-armhf-cross binutils-arm-linux-gnueabihf | ||
|
|
||
| # ARG FONTCONFIG_VERSION=2.12.6-0ubuntu2 | ||
| # RUN (mkdir -p /skia-utils \ | ||
| # && cd /skia-utils \ | ||
| # && wget -O libfontconfig1-dev_armhf.deb http://ftp.nl.debian.org/debian/pool/main/f/fontconfig/libfontconfig1-dev_${FONTCONFIG_VERSION}_armhf.deb \ | ||
| # && ar vx libfontconfig1-dev_armhf.deb \ | ||
| # && tar -xJvf data.tar.xz) | ||
|
|
||
| # ARG LIBJPEG_VERSION=2.12.6-0ubuntu2 | ||
| # RUN (mkdir -p /skia-utils \ | ||
| # && cd /skia-utils \ | ||
| # && wget -O libfontconfig1-dev_armhf.deb http://ftp.nl.debian.org/debian/pool/main/f/fontconfig/libfontconfig1-dev_${LIBJPEG_VERSION}_armhf.deb \ | ||
| # && ar vx libfontconfig1-dev_armhf.deb \ | ||
| # && tar -xJvf data.tar.xz) | ||
|
|
||
| ENV CC=clang-10 CXX=clang++-10 | ||
|
|
||
| WORKDIR /work |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| FROM amd64/ubuntu:16.04 | ||
|
|
||
| ARG MONO_VERSION=6.4.0 | ||
|
|
||
| RUN apt-get update \ | ||
| && apt-get install -y apt-transport-https curl wget python \ | ||
| && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \ | ||
| && echo "deb https://download.mono-project.com/repo/ubuntu stable-xenial/snapshots/${MONO_VERSION} main" | tee /etc/apt/sources.list.d/mono-official-stable.list \ | ||
| && apt-get update \ | ||
| && apt-get install -y mono-devel | ||
|
|
||
| ARG TOOLCHAIN_VERSION=9.2-2019.12 | ||
| ARG TOOLCHAIN_URL=https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-a/${TOOLCHAIN_VERSION}/binrel/gcc-arm-${TOOLCHAIN_VERSION}-x86_64-arm-none-linux-gnueabihf.tar.xz | ||
|
|
||
| RUN (mkdir -p /skia-utils/toolchain \ | ||
| && cd /skia-utils/toolchain \ | ||
| && wget -O toolchain.tar.xz ${TOOLCHAIN_URL}) | ||
|
|
||
| RUN (mkdir -p /skia-utils/toolchain \ | ||
| && cd /skia-utils/toolchain \ | ||
| && tar -xJvf toolchain.tar.xz) | ||
|
|
||
| RUN mv /skia-utils/toolchain/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf /opt/arm-none-linux-gnueabihf | ||
|
|
||
| RUN apt-get install -y git | ||
|
|
||
| ENV PATH="${PATH}:/opt/arm-none-linux-gnueabihf/bin" | ||
|
|
||
| ARG FONTCONFIG_VERSION=2.11.0-6.7+b1 | ||
|
|
||
| RUN (mkdir -p /skia-utils/libfontconfig1-dev \ | ||
| && cd /skia-utils/libfontconfig1-dev \ | ||
| && wget -O libfontconfig1-dev_armhf.deb http://ftp.nl.debian.org/debian/pool/main/f/fontconfig/libfontconfig1-dev_${FONTCONFIG_VERSION}_armhf.deb \ | ||
| && ar vx libfontconfig1-dev_armhf.deb \ | ||
| && tar -xJvf data.tar.xz) | ||
|
|
||
| RUN (cd /skia-utils/libfontconfig1-dev \ | ||
| && cp -R usr/lib/arm-linux-gnueabihf/* /opt/arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/lib/ \ | ||
| && cp -R usr/include/* /opt/arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/include/ ) | ||
|
|
||
| RUN (mkdir -p /skia-utils/libfontconfig1 \ | ||
| && cd /skia-utils/libfontconfig1 \ | ||
| && wget -O libfontconfig1_armhf.deb http://ftp.nl.debian.org/debian/pool/main/f/fontconfig/libfontconfig1_${FONTCONFIG_VERSION}_armhf.deb \ | ||
| && ar vx libfontconfig1_armhf.deb \ | ||
| && tar -xJvf data.tar.xz) | ||
|
|
||
| RUN (cd /skia-utils/libfontconfig1 \ | ||
| && cp -R usr/lib/arm-linux-gnueabihf/* /opt/arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/lib/ ) | ||
|
|
||
| ENV CC=arm-none-linux-gnueabihf-gcc \ | ||
| CXX=arm-none-linux-gnueabihf-g++ \ | ||
| AR=arm-none-linux-gnueabihf-gcc-ar | ||
|
|
||
| WORKDIR /work |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -249,6 +249,14 @@ stages: | |
| docker: scripts/Docker/ubuntu16/amd64 | ||
| target: externals-linux | ||
| additionalArgs: --buildarch=x64 | ||
| - template: azure-templates-bootstrapper.yml # Build Native Linux|armhf (Linux) | ||
| parameters: | ||
| name: native_linux_armhf_linux | ||
| displayName: Build Native Linux|armhf (Linux) | ||
| vmImage: $(VM_IMAGE_LINUX) | ||
| docker: scripts/Docker/ubuntu16/armhf | ||
| target: externals-linux | ||
| additionalArgs: --buildarch=arm --gnArgs="extra_cflags+=[ '-Wno-psabi' ]" | ||
|
||
| - template: azure-templates-bootstrapper.yml # Build Native Linux [No Dependencies] (Linux) | ||
| parameters: | ||
| name: native_linux_nodependencies_linux | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script is not complete nor does it work.
Seems libjpeg-turbo is having some issues: