exelix11 / SysDVR

Stream switch games to your PC via USB or network
GNU General Public License v2.0
1.52k stars 88 forks source link

[Bug] Android Build: dotnet no longer builds native library #321

Closed docquantum closed 3 weeks ago

docquantum commented 3 weeks ago

Describe the bug While attempting to run buildbinaries.sh on the current master branch (72b9ba2b884f8a215fa8ee4fa3a274cce08a1c6a), the build step fails at the mv SysDVR-Client.so step on line 110. It seems that the native so library is no longer being built.

To Reproduce Attempt to build android client library using buildbinaries.sh on current master branch.

Expected behavior SysDVR-Client.so would be built allowing the script to copy it to the android app folder.

Setup information

Additional context

Build output from master:

docquantum@QuantumCore-V1:~/SysDVR/Client/Platform/Android$ ./buildbinaries.sh 
checking resources...
Checking dependencies...
Building client...
MSBuild version 17.8.5+b5265ef37 for .NET
  Determining projects to restore...
/home/docquantum/SysDVR/Client/Client.csproj : warning NU1903: Package 'System.Text.Json' 8.0.4 has a known high severity vulnerability, https://github.com/advisories/GHSA-8g4q-xg66-9fp4
  Restored /home/docquantum/SysDVR/Client/Client.csproj (in 209 ms).
/home/docquantum/SysDVR/Client/Client.csproj : warning NU1903: Package 'System.Text.Json' 8.0.4 has a known high severity vulnerability, https://github.com/advisories/GHSA-8g4q-xg66-9fp4
  Client -> /home/docquantum/SysDVR/Client/bin/Release/net8.0/linux-bionic-arm64/SysDVR-Client.dll
  Client -> /home/docquantum/SysDVR/Client/bin/Release/net8.0/linux-bionic-arm64/publish/
mv: cannot stat 'bin/Release/net8.0/linux-bionic-arm64/publish/SysDVR-Client.so': No such file or directory

Build output from v6.1.1

docquantum@QuantumCore-V1:~/SysDVR/Client/Platform/Android$ ./buildbinaries.sh 
checking resources...
Checking dependencies...
Building client...
MSBuild version 17.8.5+b5265ef37 for .NET
  Determining projects to restore...
/home/docquantum/SysDVR/Client/Client.csproj : warning NU1903: Package 'System.Text.Json' 7.0.3 has a known high severity vulnerability, https://github.com/advisories/GHSA-hh2w-p6rv-4g7w
  Restored /home/docquantum/SysDVR/Client/Client.csproj (in 3.15 sec).
/home/docquantum/SysDVR/Client/Client.csproj : warning NU1903: Package 'System.Text.Json' 7.0.3 has a known high severity vulnerability, https://github.com/advisories/GHSA-hh2w-p6rv-4g7w
  6e13849
  Client -> /home/docquantum/SysDVR/Client/bin/Release/net8.0/linux-bionic-arm64/SysDVR-Client.dll
  Generating native code
  Client -> /home/docquantum/SysDVR/Client/bin/Release/net8.0/linux-bionic-arm64/publish/

It seems as though something has changed which now changes how the android build is performed. I might look into this later as my initial goal here was to build the android app with Android TV compatibility.

exelix11 commented 3 weeks ago

Should be fixed now. The build aot directive went missing from the csproj during last refactor.

Note that you can't build for Andorid TV as of dotnet 8 because the issue there is that most android TVs use 32-bit android while dotnet 8 only builds for 64-bit. I plan to solve this as soon as dotnet 9 gets into the final release stage since that should be able to build for bionic-32, i did not see this documented yet but i've seen that now there are the needed AOT runtime nuget packages so it might work.

Aside that for a 32-bit build you will need to build 32-bit targets for the native libs we compile and find build feeds for the binary ones we use like ffmpeg.

I'll look into the other issue in a bit.

CSSdshchur commented 3 weeks ago

Ah, good to know, I'm sure I would have found out eventually. I guess I'll await the dotnet9 release then. I just thought it would be nice to stream to a tv directly so people at home can see switch gameplay from a Lite.