Skip to content
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

Build on ARM64 Architectures #95

Closed
abraunegg opened this issue Aug 1, 2018 · 13 comments
Closed

Build on ARM64 Architectures #95

abraunegg opened this issue Aug 1, 2018 · 13 comments
Assignees
Labels
Milestone

Comments

@abraunegg
Copy link
Owner

Placeholder to track upstream development of ARM64 LDC compiler so that 'onedrive' can be built and tested on ARM64 architectures

LDC Tracker Issues:

@abraunegg abraunegg self-assigned this Aug 1, 2018
@joakim-noah
Copy link

Should work now with LDC 1.11, let me know if you have any problems.

@abraunegg
Copy link
Owner Author

@joakim-noah
Looking at the LDC packages, I don't see a specific ARM64 prebuilt package. Can you advise?

@joakim-noah
Copy link

We haven't put one out, other than the Android Termux package: what OS are you looking to build for?

@abraunegg
Copy link
Owner Author

Essentially want to build the 'onedrive' client under ARM64 (mainly using Debian as the test platform for that) via automated CI testing using Travis CI. The ARM64 build would occur under qemu, emulating the AMR64 CPU as it does for the armhf builds.

@joakim-noah
Copy link

I don't see any binary builds in your releases here, do you put some up elsewhere? It'd be easier for you to cross-compile, if you have a C cross-compiler ready.

@abraunegg
Copy link
Owner Author

I dont provide binary builds of the application.

If you look through here: https://github.com/abraunegg/onedrive/blob/master/.travis-ci.sh

You can see how the build is done to test building on various platforms

@joakim-noah
Copy link

I see, you want to test that your D project will work on AArch64 by downloading a linux/AArch64 build of ldc and then running it in a Qemu AArch64 chroot. We could probably put out a linux/AArch64 build of ldc too, I'll look into it.

@abraunegg
Copy link
Owner Author

Thanks - that would be greatly appreciated.

@joakim-noah
Copy link

A Linux/AArch64 build of LDC 1.11 is now up, let me know if you have any problems.

@abraunegg
Copy link
Owner Author

@joakim-noah
Thanks - will start working on getting the build scripts up-to-date & working for the ARM64 build

@abraunegg abraunegg added In Progress Currently being worked on and removed Compiler Issue labels Aug 28, 2018
@abraunegg abraunegg added Fixed and removed In Progress Currently being worked on labels Sep 14, 2018
@abraunegg
Copy link
Owner Author

Travis CI build result using ldc2-1.11.0-linux-aarch64.tar.xz:

Running inside chrooted QEMU arm64 environment
Linux travis-job-1498ffcb-8a44-4ca0-a6c9-a545bb95c499 4.4.0-101-generic #124~14.04.1-Ubuntu SMP Fri Nov 10 19:05:36 UTC 2017 aarch64 GNU/Linux
rm -f onedrive onedrive.o onedrive.service onedrive@.service
echo v2.1.2-9-gc68d7be >version
/home/travis/build/abraunegg/onedrive/dlang-arm64/bin/ldmd2 -g -ofonedrive -O -L-lcurl -L-lsqlite3 -L-ldl -J. src/config.d src/itemdb.d src/log.d src/main.d src/monitor.d src/onedrive.d src/qxor.d src/selective.d src/sqlite.d src/sync.d src/upload.d src/util.d src/progress.d
/usr/bin/ld: onedrive.o(.debug_info+0x57): R_AARCH64_ABS64 used with TLS symbol _D4util10deviceNameAya
/usr/bin/ld: onedrive.o(.debug_info+0x81d): R_AARCH64_ABS64 used with TLS symbol _D6upload12fragmentSizel
/usr/bin/ld: onedrive.o(.debug_info+0x83e): R_AARCH64_ABS64 used with TLS symbol _D4sync17thresholdFileSizel
/usr/bin/ld: onedrive.o(.debug_info+0x858): R_AARCH64_ABS64 used with TLS symbol _D4sync14noRemoteDeleteb
/usr/bin/ld: onedrive.o(.debug_info+0x99a): R_AARCH64_ABS64 used with TLS symbol _D3log8usernameAya
/usr/bin/ld: onedrive.o(.debug_info+0x9d4): R_AARCH64_ABS64 used with TLS symbol _D3log11logFilePathAya
/usr/bin/ld: onedrive.o(.debug_info+0x9ee): R_AARCH64_ABS64 used with TLS symbol _D3log7verboseb
/usr/bin/ld: onedrive.o(.debug_info+0xad0): R_AARCH64_ABS64 used with TLS symbol _D3std10functional__T7memoizeS_DQBe5regex__T9regexImplTAyaZQpFNfQjAxaZSQCrQBn8internal2ir__T5RegexTaZQjVii8ZQDjFQCfQBxZ4memoASQEuQEt__TQEkS_DQFjQEf__TQEcTQDvZQEkQDwVii8ZQFsFQEoQEgZ5Value
/usr/bin/ld: onedrive.o(.debug_info+0xed7): R_AARCH64_ABS64 used with TLS symbol _D3std10functional__T7memoizeS_DQBe5regex__T9regexImplTAyaZQpFNfQjAxaZSQCrQBn8internal2ir__T5RegexTaZQjVii8ZQDjFQCfQBxZ11initializedAm
/usr/bin/ld: onedrive.o(.debug_info+0xf11): R_AARCH64_ABS64 used with TLS symbol _D3std5regex8internal2ir__T11wordMatcherZQoFNcNdZ7matcherSQCeQCdQCaQBu11CharMatcher
/usr/bin/ld: onedrive.o(.debug_info+0xf46): R_AARCH64_ABS64 used with TLS symbol _D3std5regex__T9matchOnceTSQzQx8internal2ir__T5RegexTaZQjTAaZQBuFNeQjKxSQCsQCrQBvQBp__TQBpTaZQBvZ8cacheKeySQEbQEa__TQDxTQDqTQCoZQEjFNeQCyKxQCqZ3Key
/usr/bin/ld: onedrive.o(.debug_info+0xfaa): R_AARCH64_ABS64 used with TLS symbol _D3std5regex__T9matchOnceTSQzQx8internal2ir__T5RegexTaZQjTAaZQBuFNeQjKxSQCsQCrQBvQBp__TQBpTaZQBvZ5cacheCQDyQDxQDbQCv__T7MatcherTaZQl
/usr/bin/ld: onedrive.o(.debug_info+0xfea): R_AARCH64_ABS64 used with TLS symbol _D3std5regex8internal2ir__T14defaultFactoryTaZQtFNdNfKxSQCcQCbQByQBs__T5RegexTaZQjZ19backtrackingFactoryCQDzQDyQDvQDp__T14MatcherFactoryTaZQt
/usr/bin/ld: onedrive.o(.debug_info+0x1005): R_AARCH64_ABS64 used with TLS symbol _D3std5regex8internal2ir__T14defaultFactoryTaZQtFNdNfKxSQCcQCbQByQBs__T5RegexTaZQjZ15thompsonFactoryCQDvQDuQDrQDl__T14MatcherFactoryTaZQt
/usr/bin/ld: onedrive.o(.debug_info+0x10dd): R_AARCH64_ABS64 used with TLS symbol _D3std5regex__T9matchOnceTSQzQx8internal2ir__T5RegexTaZQjTAaZQBuFNeQjxSQCrQCqQBuQBo__TQBoTaZQBuZ8cacheKeySQEaQDz__TQDwTQDpTQCnZQEiFNeQCxxQCpZ3Key
/usr/bin/ld: onedrive.o(.debug_info+0x1121): R_AARCH64_ABS64 used with TLS symbol _D3std5regex__T9matchOnceTSQzQx8internal2ir__T5RegexTaZQjTAaZQBuFNeQjxSQCrQCqQBuQBo__TQBoTaZQBuZ5cacheCQDxQDwQDaQCu__T7MatcherTaZQl
/usr/bin/ld: onedrive.o(.debug_info+0x113c): R_AARCH64_ABS64 used with TLS symbol _D3std5regex__T9matchOnceTSQzQx8internal2ir__T5RegexTaZQjTAyaZQBvFNeQkKxSQCtQCsQBwQBq__TQBqTaZQBwZ8cacheKeySQEcQEb__TQDyTQDrTQCpZQEkFNeQCzKxQCqZ3Key
/usr/bin/ld: onedrive.o(.debug_info+0x1180): R_AARCH64_ABS64 used with TLS symbol _D3std5regex__T9matchOnceTSQzQx8internal2ir__T5RegexTaZQjTAyaZQBvFNeQkKxSQCtQCsQBwQBq__TQBqTaZQBwZ5cacheCQDzQDyQDcQCw__T7MatcherTaZQl
sed "s|@PREFIX@|/usr/local|g" systemd.units/onedrive.service.in > onedrive.service
sed "s|@PREFIX@|/usr/local|g" systemd.units/onedrive@.service.in > onedrive@.service
qemu: Unsupported syscall: 278
onedrive v2.1.2-9-gc68d7be

Some debug output is generated due to some sort of TLS items, however I think this is a quirk of running under QEMU as an emulated ARM64 processor. Need to validate build on a ARM64 physical system.

Awaiting merge of PR

@joakim-noah
Is there a test ARM64 physical system which you have access to, which I can test the ARM64 build against?

@joakim-noah
Copy link

I believe the debug TLS issue is with LLVM, I've seen that on actual hardware too, might be fixed in the upcoming 7.0 release. You can use the free Shippable CI to test linux/AArch64, LDC is using it. You can iterate on an Android smartphone first, if you have a relatively recent one with a 64-bit kernel.

abraunegg added a commit that referenced this issue Oct 3, 2018
* Update to build on ARM64 
* Update documentation regarding building on ARM64 platforms
@abraunegg abraunegg added this to the 2.1.3 milestone Oct 3, 2018
@lock
Copy link

lock bot commented Jan 5, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Jan 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants