-
Notifications
You must be signed in to change notification settings - Fork 564
[build] Add OSS Azure Pipeline Linux Build #4160
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
Conversation
|
I believe packaging is still busted in the same way as our current |
|
/azp run Xamarin.Android-OSS |
|
No pipelines are associated with this pull request. |
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.DebianCommon.cs
Show resolved
Hide resolved
|
Looks like we've got artifacts again 🎉. Could someone (maybe @grendello 😄) take a quick look at these packages to make sure they're functional? |
Woohoo! 😃 Thanks for working on this. 👍
I just downloaded the linux packages to an Ubuntu 18.04 system, extracted the .tar.xz file (btw, what's the difference between this one and the .tar.bz2 archive?), and tried to build XA's HelloWorld sample with it, like this: ... which unfortunately fails with: This looks exactly like the problem which I reported as #4100 a few weeks ago. Luckily it was already fixed (with 3ae6f25), but apparently your branch does not yet include that fix. Therefore I'm hopeful that the problem will be gone once you rebase your branch on current master. Could you please try that? |
After some further investigation, I actually found a difference, and it's even related to the problems I saw:
Just retried this with the .tar.bz2 instead of the .tar.xz archive, and this indeed seems to work. So, thanks again for the great work!
Apparently my problems were unrelated to #4100 after all, but rebasing will not hurt either :) |
After I got this working on 18.04, I was curious to see whether the Azure build would also work on Ubuntu 16.04. When trying this, I again got the same error as before ( I first double-checked that libzip.so is actually there and then looked at its dependencies: So, this now really looks like #4100: The libzip.so that is included in the XA build depends on libcrypto.so.1.1, but Ubuntu 16.04 only provides libcrypto.so.1.0.0. I am confident that this error will go away once the branch is rebased on current master 😊 (and I'll be happy to verify this once you do the rebase ...) |
|
@janusw seems that on the Ubuntu 16.04 still no success, |
|
Hmm, we should be building a merge commit and therefore the artifacts from last Friday should have contained the fixes mentioned above. We also probably don't need both tar files so I will try to clean that up. Let me try to get another build running today after rebasing and see if that clears things up. |
These items are already included in LinuxDebianCommon. The i386 versions also no longer appear to exist?
We shouldn't set all CI related xaprepare flags when building locally. We also shouldn't be passing `-a` when the "PR" build CI flags are set.
Should hopefully fix the following Linux packaging error:
dh_clideps: Error: Missing shlibs entry: libmono-btls-shared.so or libmono-btls-shared for: System.dll!
Yes, this one seems to work now, even on Ubuntu 16.04 (using the .tar.bz2 package). Nice work! I hope this PR can be merged to master (looks like you have an approval already).
Thanks for the explanation. So, if this one is missing the .so files, does that mean they are also missing in the .deb file? (I will try the deb package tonight.) |
|
One more comment here: I tried to use xabuild on Ubuntu to build a project that is based on .NET Standard 2.1: This fails with: However it works with msbuild on Linux (and also e.g. with Visual Studio on MacOS). I have Ubuntu 16.04 with dotnet-sdk-3.1 and mono 6.4.0. I can work around it by downgrading to .NET Standard 2.0. Is this a problem with the XA build, or am I just using it incorrectly? Note that I have simply unpacked the tarball to my home folder and run it from there. |
|
@janusw thanks for your time and testing on this, much appreciated!
These
We don't recommend using Finally as a note, I'm considering removing the upload of the |
You're very welcome. I highly appreciate the work you're doing here as well. It's great to see that XA is working on Linux again. By now I have verified that the .deb package installs cleanly on Ubuntu 16.04 and 18.04 and makes it possible to build an apk file of the HelloWorld sample via msbuild: So, IMHO the Linux build works very well and is definitely ready for master.
This is a NET standard project that is included in a cross-platform solution, where it's referenced by an Android and an iOS project. Here I was actually trying to compile the NET standard project by itself (for starters). I'll try tomorrow whether I can get this working with msbuild. |
|
The test failures here look unrelated, the two failures are caused by 1. a NuGet restore (which looks like a potential test parallelization edge case), and 2. the somewhat rare |
Actually I just noticed that the installation on 16.04 was not fully clean: Apparently the installation as such went through, but the configuration was canceled due to this dependency problem. The HelloWorld compiles fine nonetheless. Could you comment on what the configuration process is doing exactly? Is this an actual problem or can one just ignore the error message? |
|
I can also confirm that I can build apps successfully. |
Which OS are you on? I have also managed to build a full-fledged app by now, not just the simple HelloWorld example. The only thing I noticed is that I cannot use .NET Standard 2.1 on Linux, but I assume this is unrelated to XA. May be due to my Mono version (6.4)? I'll try a newer one soon.
Which IDE? MonoDevelop? |
In particular I see the following errors when running Can anyone tell me where this limitation comes from? Is this due to Xamarin.Android or Mono? |
In fact these errors went away once I upgraded Mono from 6.4 to 6.8. The Mono release notes actually claim support for .NET Standard 2.1 already in 6.4. Either this is plain wrong, or there is at least still a bug there :( In any case, 6.8.0 works nicely and the problem was not related to XA after all. 🎉 |
From my tests so far, I would conclude that the XA .deb package is fully working on Ubuntu 16.04, despite the warnings about different libc version. If this is the case, I would suggest to remove the dependency on libc in the .deb package, if possible. Even though one can install the .deb, the dependency problem seriously screws up apt. It's kind of hard to install further packages, because apt always complains about unmet dependencies and wants to uninstall xamarin.android to resolve that :( |
@janusw Is this an issue only with 16.04? I imagine this is a result of us building on 18.04, but I am not entirely sure. If this only occurs on 16.04 I think it's likely not something that we will try to resolve unfortunately as the OS version itself is pretty close to being in it's last year of support. |
Yes, 16.04 only.
Yes, it is definitely due to the difference in libc version between 16.04 and 18.04.
It's actually not a big issue. Everything seems to work fine on 16.04. The only problem is that the package manager thinks that XA requires libc version 2.27 (with which is was built), although it seems to work with 2.23 as well (for all I know). So maybe one could just remove the dependency on libc from the .deb package altogether, which should not be too hard, I think. It seems one can even fix up the dependencies of a package afterwards: https://coderwall.com/p/hes3ha/change-the-dependencies-of-a-deb-package |
I understand if this is not a priority for you right now, and I'm perfectly fine with merging this PR without fixing the .deb dependencies. But note that this not only affects Ubuntu 16.04, but also Debian itself (stretch has libc 2.24 and will be supported until 2022) and other Debian-based systems. So fixing this might affect quite a few possible users. For me personally this is not a big deal, since I will probably move to 18.04 and/or building XA myself soon. |
|
@janusw Jetbrains Rider 2019.2.2 on Xubuntu 18.04 |
@lordofffarm this is just the open source parts of Xamarin.Android as far as I can see. So it probably does not include the required tasks/targets needed to setup the debugger etc on android. Having. debug build of this package would not help in that case. |
@dellis1972 Thanks for the reply. |
|
@lordofffarm the packages you've linked from Jenkins do not contain debug tasks/targets either, so I'm not exactly sure how this was working for you before. |
|
@pjcollins Thanks for your work, man. |
|
Ok, I got debugging to work now. |
Great, sounds like everybody's happy 😃 so hopefully this can be merged ... |
|
I think we're waiting on a final review or two here but it should hopefully land soon. |
Yes, this is the reason. It could be solved by explicitly specifying the accepted/supported |
|
LGTM :) @pjcollins I'm going to merge and ignore the |
Introduces a new
azure-pipelines-oss.yamlfile which contains one jobfor building on Linux. The pipeline definition which tracks this yaml
file can be found at:
https://dev.azure.com/xamarin/public/_build?definitionId=48&_a=summary
A few build system tweaks have also been applied to improve "partial"
build scenarios, and to allow us to build on the hosted Ubuntu agents.
xapreparehas been updated to generate the correct make rules whenpartial JIT, HOST, and AOT ABIs are enabled. Previously, xaprepare would
would enable all ABIs in
rules.mkand disregard the value of thecorresponding MSBuild properties. This has been fixed to allow for
partial build support. Our unix builds will no longer attempt to cross
compile Windows binaries by default as a result of this change.
make jenkinshas been updated to improve the local build experiencewhen
PREPARE_CI*flags are not set. We only need to ensure the-aargument is passed to
xapreparewhenmake jenkinsis invoked locally,we don't need to otherwise alter the behavior of
xaprepare.Linux package dependencies have been updated, and auto provisioning has
been fixed to automatically answer yes to installation prompts.
Finally,
xapreparehas been updated to delete dependencies fromandroid-archivesafter they are extracted intoandroid-toolchainwhen running on an Azure Pipelines Hosted agent. This was done to avoid
disk space limitations on these hosted environments.
Fixes: #2009
Fixes: #4116