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

Bump binutils to 17.0.6-7.2.1 #8806

Merged
merged 15 commits into from
Apr 2, 2024
Merged

Bump binutils to 17.0.6-7.2.1 #8806

merged 15 commits into from
Apr 2, 2024

Conversation

grendello
Copy link
Contributor

@grendello grendello commented Mar 13, 2024

Context: https://github.com/xamarin/xamarin-android-binutils/releases/tag/L_17.0.6-7.1.1
Context: https://github.com/xamarin/xamarin-android-binutils/releases/tag/L_17.0.6-7.1.2
Context: https://github.com/xamarin/xamarin-android-binutils/releases/tag/L_17.0.6-7.2.1
Changes: dotnet/android-native-tools@L_17.0.6-7.1.0...L_17.0.6-7.1.1
Changes: dotnet/android-native-tools@L_17.0.6-7.1.1...L_17.0.6-7.1.2
Changes: dotnet/android-native-tools@L_17.0.6-7.1.2...L_17.0.6-7.2.0
Changes: dotnet/android-native-tools@L_17.0.6-7.2.0...L_17.0.6-7.2.1

This release makes changes to how we build and run the as.exe wrapper, so that it can be
verified by API Scan without any issues. Otherwise it is identical to the previous release, using
the same version of LLVM.

Context: https://github.com/xamarin/xamarin-android-binutils/releases/tag/L_17.0.6-7.1.1
Changes: dotnet/android-native-tools@L_17.0.6-7.1.0...L_17.0.6-7.1.1

This release is identical to the previous one, version wise, with the
difference being a handful of new build and link flags, as required by
API Scan.

* [ci] Build and sign in a DevDiv pipeline by @pjcollins in dotnet/android-native-tools#7
* [ci] Migrate to the 1ES template by @pjcollins in dotnet/android-native-tools#8
* [ci] Improve binskim scan performance by @pjcollins in dotnet/android-native-tools#11
* [ci] Improve triggers and support test signing by @pjcollins in dotnet/android-native-tools#12
* [ci] Fix unsigned artifact uploading by @pjcollins in dotnet/android-native-tools#13
* [ci] Disable automatic GitHub action trigger by @pjcollins in dotnet/android-native-tools#16
* [ci] Build on performance build pools by @pjcollins in dotnet/android-native-tools#15
* Build `as.exe` on windows by @grendello in dotnet/android-native-tools#10
* [ci] Add API Scan job by @pjcollins in dotnet/android-native-tools#9
@pjcollins
Copy link
Member

Seeing a lot of AOT related failures on this:

(_AndroidAotCompilation target) ->
/Users/runner/work/1/s/bin/Release/dotnet/packs/Microsoft.Android.Sdk.Darwin/34.99.0-ci.pr.gh8806.210/targets/Microsoft.Android.Sdk.Aot.targets(109,5): error : Precompiling failed for /Users/runner/work/1/a/TestRelease/03-13_18.11.42/temp/BuildHasNoWarningsTrueTrueFalseapk/obj/Release/android-arm/linked/_Microsoft.Android.Resource.Designer.dll with exit code 1. [/Users/runner/work/1/a/TestRelease/03-13_18.11.42/temp/BuildHasNoWarningsTrueTrueFalseapk/UnnamedProject.csproj]
/Users/runner/work/1/s/bin/Release/dotnet/packs/Microsoft.Android.Sdk.Darwin/34.99.0-ci.pr.gh8806.210/targets/Microsoft.Android.Sdk.Aot.targets(109,5): error : libc++abi: terminating due to uncaught exception of type cxxopts::exceptions::no_such_option: Option 'm' does not exist [/Users/runner/work/1/a/TestRelease/03-13_18.11.42/temp/BuildHasNoWarningsTrueTrueFalseapk/UnnamedProject.csproj]

@grendello
Copy link
Contributor Author

It is the new wrapper command-line arguments handling, I must have missed an option. I'll fix it tomorrow

grendello added a commit to dotnet/android-native-tools that referenced this pull request Mar 14, 2024
Context: #10
Context: 9d342d5
Context: dotnet/android#8806 (comment)

Revert the portion of 9d342d5 which modified the way command-line
arguments are parsed.  The `cxxopt` C++ library that was used turns out
not to support some GNU-style options (e.g. `-mfpu=vpf3`) which breaks
the MonoAOT compiler that uses them.

Instead, copy `getopt.c` (BSD 2-clause + MIT/X11 licenses) and
`getopt.h` (Public Domain license) implementations from the MinGW
project and use `getopt` across all platforms.

Additionally, fix generation of the artifact package by making sure that
all the executable files are, in fact, executable by setting the correct
permissions.
@grendello
Copy link
Contributor Author

dotnet/android-native-tools#19 fixes things locally for me (tested only on Unix), once it's green and merged I'll make a new release of binutils and update this PR.

jonpryor pushed a commit to dotnet/android-native-tools that referenced this pull request Mar 14, 2024
Context: #10
Context: 9d342d5
Context: dotnet/android#8806 (comment)

Revert the portion of 9d342d5 which modified the way command-line
arguments are parsed.  The `cxxopt` C++ library that was used turns out
not to support some GNU-style options (e.g. `-mfpu=vpf3`) which breaks
the MonoAOT compiler that uses them.

Instead, copy `getopt.c` (BSD 2-clause + MIT/X11 licenses) and
`getopt.h` (Public Domain license) implementations from the MinGW
project and use `getopt` across all platforms.

Additionally, fix generation of the artifact package by making sure that
all the executable files are, in fact, executable by setting the correct
permissions.
@grendello grendello changed the title Bump binutils to 17.0.6-7.1.1 Bump binutils to 17.0.6-7.1.2 Mar 14, 2024
grendello and others added 10 commits March 15, 2024 22:21
* main:
  [Xamarin.Android.Build.Tasks] Make all assemblies RID-specific (#8478)
  Localized file check-in by OneLocBuild Task (#8813)
  [Xamarin.Android.Build.Tasks] %(AndroidAsset.AssetPack) Support (#8631)
  [runtime] Remove the last vestiges of desktop builds (#8810)
  [ci] Don't auto-retry APK test suites. (#8811)
  [Microsoft.Android.Templates] Update EN l10n template strings (#8808)
  Bump to xamarin/Java.Interop/main@651de42 (#8809)
…8795)

Context: #8788 (comment)
Context: 1aa0ea7

The [`java.lang.StackTraceElement(String, String, String, int)`][0]
constructor requires that the `declaringClass` and `methodName`
parameters never be `null`.  Failure to do so results in a
`NullPointerException`:

	I DOTNET  : JavaProxyThrowable: translation threw an exception: Java.Lang.NullPointerException: Declaring class is null
	I DOTNET  :    at Java.Interop.JniEnvironment.InstanceMethods.CallNonvirtualVoidMethod(JniObjectReference instance, JniObjectReference type, JniMethodInfo method, JniArgumentValue* args)
	I DOTNET  :    at Java.Interop.JniPeerMembers.JniInstanceMethods.FinishCreateInstance(String constructorSignature, IJavaPeerable self, JniArgumentValue* parameter s)
	I DOTNET  :    at Java.Lang.StackTraceElement..ctor(String declaringClass, String methodName, String fileName, Int32 lineNumber)
	I DOTNET  :    at Android.Runtime.JavaProxyThrowable.TranslateStackTrace()
	I DOTNET  :    at Android.Runtime.JavaProxyThrowable.Create(Exception innerException)
	I DOTNET  :   --- End of managed Java.Lang.NullPointerException stack trace ---
	I DOTNET  : java.lang.NullPointerException: Declaring class is null
	I DOTNET  :      at java.util.Objects.requireNonNull(Objects.java:228)
	I DOTNET  :      at java.lang.StackTraceElement.<init>(StackTraceElement.java:71)
	I DOTNET  :      at crc6431345fe65afe8d98.AvaloniaMainActivity_1.n_onCreate(Native Method)

Update `JavaProxyThrowable.TranslateStackTrace()` (1aa0ea7) so that
if `StackFrame.GetMethod()` returns `null`, we fallback to:

 1. Trying to extract class name and method name from
    [`StackFrame.ToString()`][1]:

        MainActivity.OnCreate() + 0x37 at offset 55 in file:line:column <filename unknown>:0:0

 2. If (1) fails, pass `Unknown` for `declaringClass` and `methodName`.

Additionally, the `lineNumber` parameter is now set to `-2` if we
think a stack frame points to native code.

[0]: https://developer.android.com/reference/java/lang/StackTraceElement#StackTraceElement(java.lang.String,%20java.lang.String,%20java.lang.String,%20int)
[1]: https://github.com/xamarin/xamarin-android/pull/8758/files#r1504920023
* main:
  LEGO: Merge pull request 8818
  Bump to dotnet/installer@b40c44502d 9.0.100-preview.3.24165.20 (#8817)
  Bump com.android.tools:r8 from 8.2.47 to 8.3.37 (#8816)
  [Mono.Android] Prevent NullPointerException in TranslateStackTrace (#8795)
  Localized file check-in by OneLocBuild Task (#8815)
* main:
  [ci] Use managed identity for ApiScan (#8823)
  [Xamarin.Android.Build.Tasks] DTBs should not rm generator output (#8706)
  [Xamarin.Android.Build.Tasks] Bump to NuGet 6.7.1 (#8833)
  $(AndroidPackVersionSuffix)=preview.4; net9 is 34.99.0.preview.4 (#8831)
  Localized file check-in by OneLocBuild Task (#8824)
  [Xamarin.Android.Build.Tasks] Enable POM verification features. (#8649)
  [runtime] Optionally disable inlining (#8798)
  Fix assembly count when satellite assemblies are present (#8790)
  [One .NET] new "greenfield" projects are trimmed by default (#8805)
  Localized file check-in by OneLocBuild Task (#8819)
  LEGO: Merge pull request 8820
* main:
  [LayoutBindings] Fix '[Preserve]' is obsolete warnings (#8529)
  LEGO: Merge pull request 8837
* main:
  Localized file check-in by OneLocBuild Task (#8844)
@grendello grendello added the do-not-merge PR should not be merged. label Mar 29, 2024
* main:
  Bump to dotnet/installer@dc43d363d2 9.0.100-preview.4.24175.5 (#8828)
  [Xamarin.Android.Build.Tasks] Update to newer ILRepack which supports debug files. (#8839)
  Bump 'NuGet.*' and 'Newtonsoft.Json' NuGet versions. (#8825)
@grendello grendello changed the title Bump binutils to 17.0.6-7.1.2 Bump binutils to 17.0.6-7.2.1 Apr 2, 2024
@grendello grendello removed the do-not-merge PR should not be merged. label Apr 2, 2024
@grendello grendello merged commit 0db28d3 into main Apr 2, 2024
48 checks passed
@grendello grendello deleted the dev/grendel/bump-binutils branch April 2, 2024 14:28
grendello added a commit that referenced this pull request Apr 3, 2024
* main:
  Switch 64-bit hashes to xxhash3 (#8721)
  Bump to xamarin/monodroid@fefc158ef3 (#8850)
  Bump binutils to 17.0.6-7.2.1 (#8806)
grendello added a commit that referenced this pull request Apr 3, 2024
* main:
  Switch 64-bit hashes to xxhash3 (#8721)
  Bump to xamarin/monodroid@fefc158ef3 (#8850)
  Bump binutils to 17.0.6-7.2.1 (#8806)
grendello added a commit that referenced this pull request Apr 11, 2024
Context: https://github.com/xamarin/xamarin-android-binutils/releases/tag/L_17.0.6-7.1.1
Context: https://github.com/xamarin/xamarin-android-binutils/releases/tag/L_17.0.6-7.1.2
Context: https://github.com/xamarin/xamarin-android-binutils/releases/tag/L_17.0.6-7.2.1
Changes: dotnet/android-native-tools@L_17.0.6-7.1.0...L_17.0.6-7.1.1
Changes: dotnet/android-native-tools@L_17.0.6-7.1.1...L_17.0.6-7.1.2
Changes: dotnet/android-native-tools@L_17.0.6-7.1.2...L_17.0.6-7.2.0
Changes: dotnet/android-native-tools@L_17.0.6-7.2.0...L_17.0.6-7.2.1

This release makes changes to how we build and run the `as.exe` wrapper, so that it can be
verified by API Scan without any issues.  Otherwise it is identical to the previous release, using
the same version of LLVM.

* [ci] Build and sign in a DevDiv pipeline by @pjcollins in dotnet/android-native-tools#7
* [ci] Migrate to the 1ES template by @pjcollins in dotnet/android-native-tools#8
* [ci] Improve binskim scan performance by @pjcollins in dotnet/android-native-tools#11
* [ci] Improve triggers and support test signing by @pjcollins in dotnet/android-native-tools#12
* [ci] Fix unsigned artifact uploading by @pjcollins in dotnet/android-native-tools#13
* [ci] Disable automatic GitHub action trigger by @pjcollins in dotnet/android-native-tools#16
* [ci] Build on performance build pools by @pjcollins in dotnet/android-native-tools#15
* Build `as.exe` on windows by @grendello in dotnet/android-native-tools#10
* [ci] Add API Scan job by @pjcollins in dotnet/android-native-tools#9
*  Fix `as.exe` crash on Windows by @grendello in dotnet/android-native-tools#20
* [ci] Use managed identity for API Scan by @pjcollins in dotnet/android-native-tools#21
* Back to wide strings on Windows + magic encantations by @grendello in dotnet/android-native-tools#22
@github-actions github-actions bot locked and limited conversation to collaborators May 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants