Skip to content

Build for Linux ARM32 (armhf) and ARM64 (aarch64) #1382

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 48 commits into from
Jul 7, 2020
Merged

Conversation

mattleibow
Copy link
Contributor

@mattleibow mattleibow commented Jul 3, 2020

Description of Change

Add a new Linux architecture: armhf

This is build on Ubuntu 16.04 using the ARM prebuilt toolchain: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads

Using GCC because of: #1382 (comment)

Test Binaries

Built using Clang:

Built using GCC:

Test NuGet

All the packages are on the preview feed as v2.80.0-pr.1382.31: https://aka.ms/skiasharp-eap/index.json

Bugs Fixed

@@ -0,0 +1,58 @@
DirectoryPath ROOT_PATH = MakeAbsolute(Directory("../.."));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vmImage: $(VM_IMAGE_LINUX)
docker: scripts/Docker/ubuntu16/armhf
target: externals-linux
additionalArgs: --buildarch=arm --gnArgs="extra_cflags+=[ '-Wno-psabi' ]"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattleibow mattleibow marked this pull request as draft July 3, 2020 21:49
displayName: Build Native Linux|arm64 (Linux)
vmImage: $(VM_IMAGE_LINUX)
docker: scripts/Docker/ubuntu16/gcc-cross
dockerArgs: --build-arg TOOLCHAIN_ARCH=aarch64-none-linux-gnu --build-arg FONTCONFIG_ARCH=arm64
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arm64 or aarch64 images are built using --build-arg

@mattleibow mattleibow mentioned this pull request Jul 4, 2020
5 tasks
@mattleibow mattleibow changed the title Build for Linux ARM32 (armhf) Build for Linux ARM32 (armhf) and ARM64 (aarch64) Jul 4, 2020
Co-authored-by: jp2masa <jp2masa@users.noreply.github.com>
@jmacato
Copy link

jmacato commented Jul 4, 2020

@mattleibow the Linux ARM64 bins are almost working, though my app had this error:

Unhandled exception. System.EntryPointNotFoundException: Unable to find an entry point named 'sk_paint_set_text_encoding' in shared library 'libSkiaSharp'.
   at SkiaSharp.SkiaApi.sk_paint_set_text_encoding(IntPtr param0, SKTextEncoding param1)
   at Avalonia.Skia.FormattedTextImpl..ctor(String text, Typeface typeface, Double fontSize, TextAlignment textAlignment, TextWrapping wrapping, Size constraint, IReadOnlyList`1 spans)
   at Avalonia.Skia.PlatformRenderInterface.CreateFormattedText(String text, Typeface typeface, Double fontSize, TextAlignment textAlignment, TextWrapping wrapping, Size constraint, IReadOnlyList`1 spans)
   at Avalonia.Media.FormattedText.get_PlatformImpl()
   at Avalonia.Media.FormattedText.get_Bounds()

@Gillibald should we perhaps update SkiaSharp in Avalonia?

@Gillibald
Copy link
Contributor

@jmacato This is targeting the next release. We should be able to update.

@jmacato
Copy link

jmacato commented Jul 4, 2020

@Gillibald awesome :)) well... guess i cant test stuff out without us updating

@Gillibald
Copy link
Contributor

The new version is a 1:1 replacement just bump the version number. We can just create a PR that does that and you could use the CI build.

@jmacato
Copy link

jmacato commented Jul 4, 2020

@Gillibald yeah please do, so we can check other issues here just in case

@mattleibow
Copy link
Contributor Author

@jmacato what happens if you bump the version of SkiaSharp in your project to the latest preview on NuGet. Unless Avalonia is p/invoking directly, it should work. The versions should be API compatible as I made no breaks in the .NET API.

@jmacato
Copy link

jmacato commented Jul 4, 2020

@mattleibow i'll try the preview releases first

@Gillibald
Copy link
Contributor

I am in the process of creating a PR that changes Avalonia to use the preview. Then you just have to copy the ARM bits manually.

@jmacato
Copy link

jmacato commented Jul 4, 2020

@Gillibald alright i'll wait for that instead :D

@mattleibow
Copy link
Contributor Author

CI just failed on the emscripten lols. Why now? Who knows. Maybe a rebuild will fix it?

@mattleibow
Copy link
Contributor Author

Hopefully #1387 will fix it...

@dinonovak
Copy link

any change to build this for v2.80.2 ?

@mattleibow
Copy link
Contributor Author

This is already out on the SkiaSharp.NativeAssets.Linux packages

@dinonovak
Copy link

dinonovak commented Oct 26, 2020

Found it , sorry for confusion.

@mattleibow
Copy link
Contributor Author

No prob. Let me know if there are any problems by opening a new issue. Have fun drawing!

@aicynide
Copy link

Not working in android

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants