ExoPlayerXamarin icon indicating copy to clipboard operation
ExoPlayerXamarin copied to clipboard

Unable to build Android with AOT + LLVM

Open akravch opened this issue 4 years ago • 0 comments

🐛 Bug Report

Expected behavior

The project builds successfully.

Reproduction steps

  1. Clone the repo with the sample: https://github.com/akravch/ExoPlayerSample
  2. Build it in Release configuration (Release is identical to Debug except having LLVM enabled)
  3. error XA3001: Could not AOT the assembly: ExoPlayer.Hls.dll

Configuration

Version: 2.11.8 Microsoft Visual Studio Professional 2019 Xamarin.Android Reference Assemblies and MSBuild support. Mono: b4a3858 Java.Interop: xamarin/java.interop/d16-10@f39db25 ProGuard: Guardsquare/proguard/v7.0.1@912d149 SQLite: xamarin/sqlite/3.35.4@85460d3 Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-10@c5732a0

Platform:

  • [ ] :iphone: iOS
  • [x] :robot: Android
  • [ ] :checkered_flag: WPF
  • [ ] :earth_americas: UWP
  • [ ] :apple: MacOS
  • [ ] :tv: tvOS
  • [ ] :monkey: Xamarin.Forms

Notes

Any usage of HlsMasterPlaylist breaks the compilation with the following error in build log:

1>  [aot-compiler stderr] Basic Block in function 'Com_Google_Android_Exoplayer2_Source_Hls_Playlist_HlsMasterPlaylist__ctor_string_System_Collections_Generic_IList_1_string_System_Collections_Generic_IList_1_Com_Google_Android_Exoplayer2_Source_Hls_Playlist_HlsMasterPlaylist_Variant_System_Collections_Generic_IList_1_Com_Google_Android_Exoplayer2_Source_Hls_Playlist_HlsMasterPlaylist_Rendition_System_Collections_Generic_IList_1_Com_Google_Android_Exoplayer2_Source_Hls_Playlist_HlsMasterPlaylist_Rendition_System_Collections_Generic_IList_1_Com_Google_Android_Exoplayer2_Source_Hls_Playlist_HlsMasterPlaylist_Rendition_System_Collections_Generic_IList_1_Com_Google_Android_Exoplayer2_Source_Hls_Playlist_HlsMasterPlaylist_Rendition_Com_Google_Android_Exoplayer2_Format_System_Collections_Generic_IList_1_Com_Google_Android_Exoplayer2_Format_bool_System_Collections_Generic_IDictionary_2_string_string_System_Collections_Generic_IList_1_Com_Google_Android_Exoplayer2_Drm_DrmInitData' does not have terminator!
1>  [aot-compiler stderr] label %NOTINITED_BB35
1>  [aot-compiler stderr] LLVM ERROR: Broken module found, compilation aborted!
1>  [aot-compiler stderr] AOT of image C:\Users\alexanderkr\source\ExoPlayerSample\ExoPlayerSample\obj\Release\110\android\assets\shrunk\ExoPlayer.Hls.dll failed.
1>  [aot-compiler stdout] Mono Ahead of Time compiler - compiling assembly C:\Users\alexanderkr\source\ExoPlayerSample\ExoPlayerSample\obj\Release\110\android\assets\shrunk\ExoPlayer.Hls.dll
1>  [aot-compiler stdout] AOTID 016C94E8-312E-5D39-04E5-74845966C817
1>  [aot-compiler stdout] Executing opt: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\Android\opt" -f -O2 -disable-tail-calls -place-safepoints -spp-all-backedges -o "obj\Release\110\aot\arm64-v8a\ExoPlayer.Hls.dll\temp.opt.bc" "obj\Release\110\aot\arm64-v8a\ExoPlayer.Hls.dll\temp.bc"
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1961,3): error XA3001: Could not AOT the assembly: ExoPlayer.Hls.dll

Full build log

akravch avatar Sep 07 '21 09:09 akravch