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

.NET 8 Update Issues On Linux #8103

Open
2 tasks done
AristurtleDev opened this issue Dec 6, 2023 · 4 comments
Open
2 tasks done

.NET 8 Update Issues On Linux #8103

AristurtleDev opened this issue Dec 6, 2023 · 4 comments
Labels
Linux MacOS Setup Related to setuping a MonoGame project for the first time

Comments

@AristurtleDev
Copy link
Contributor

Prerequisites

  • I have verified this issue is present in the develop branch
  • I have searched open and closed issues to ensure it has not already been reported.

MonoGame Version

.NET 8 Update

Which MonoGame platform are you using?

MonoGame Cross-Platform Desktop Application (mgdesktopgl)

Operating System

Linux (Ubuntu 22.04.3 LTS)

Description

Testing the current develop branch with .NET8 in LInux, the following issues were found and need to be corrected

  1. If attempting to build FX file before setting up wine, the error message states to install .NET6 and not .NET8
Setup instructions:
- Create 64 bit wine prefix
- Install d3dcompiler_47 using winetricks
- Install .NET 6
- Setup MGFXC_WINE_PATH environmental variable to point to a valid wine prefix
  1. The DOTNET_URL in the mgfxc_wine_setup.sh script incorrectly points to .NET6 SDK and not the .NET8SDK

DOTNET_URL="https://download.visualstudio.microsoft.com/download/pr/44d08222-aaa9-4d35-b24b-d0db03432ab7/52a4eb5922afd19e8e0d03e0dbbb41a0/dotnet-sdk-6.0.302-win-x64.zip"

It should point to https://download.visualstudio.microsoft.com/download/pr/2b2d6133-c4f9-46dd-9ab6-86443a7f5783/340054e2ac7de2bff9eea73ec9d4995a/dotnet-sdk-8.0.100-win-x64.zip

  1. Wine needs to be on a newer version; otherwise the following error is thrown. Currently tested successfully with Wine version 8
wine: Call from 0x7bc7c9e1 to unimplemented function KERNEL32.dll.GetProcessGroupAffinity, aborting
wine: Unhandled page fault on read access to 000000000000000C at address 00000000005C9834 (thread 002e), starting debugger...

this is something that will need to be noted in the documentation, not something we can do in the repo

Steps to Reproduce

  1. Setup .NET 8 SDK in Linux
  2. Setup wine according to documentation at https://monogame.net/articles/getting_started/1_setting_up_your_development_environment_unix.html#optional-setup-wine-for-effect-compilation
  3. Clone develop branch
  4. Run cake build script
  5. Use NuGets generated by cake build script to create new MonoGame DesktopGL Project targeting .NET8
  6. Ensure that the dotnet-mgcb tooling is setup using the NuGets built from the cake build script
  7. Attempt to build an .fx file

Minimal Example Repo

No response

Expected Behavior

.fx builds with no issue

Resulting Behavior

Effect file will not build due to incorrect .NET version installed by the setup script

Files

No response

@mrhelmut
Copy link
Contributor

mrhelmut commented Dec 16, 2023

Beside changing the link to the proper .NET 8 SDK, I wonder if we could enhance this script by integrating it into Tools/MonoGame.Content.Builder.Task (and automatically download the appropriate .NET SDK version) and if it's wiser to distribute d3dcompiler_47.dll ourselves rather than relying on downloading Firefox and extract it from there (I know that we're doing this because of licensing limitations of the Windows/DirectX SDK, and I don't know if there's a better solution to this).

EDIT: for the record, while the Windows SDK EULA allows that dll to be distributed with apps on Windows, distributing that dll on Linux or macOS isn't covered by the EULA. Downloading the Firefox Windows installer to snatch the dll from there is a trick around this EULA limitation.

We could keep a similar trick, but the one thing that kind of tickles me, is that we're relying on a third party app/link that we don't control and can't guarantee its safety or reliability over time.

@harry-cpp
Copy link
Member

and if it's wiser to distribute d3dcompiler_47.dll ourselves rather than relying on downloading Firefox and extract it from there (I know that we're doing this because of licensing limitations of the Windows/DirectX SDK, and I don't know if there's a better solution to this).

This is what winetricks does to fetch the dll, so I've just copied it over for us so we don't have a dependency on winetricks.

Beside changing the link to the proper .NET 8 SDK, I wonder if we could enhance this script by integrating it into Tools/MonoGame.Content.Builder.Task

It is touching files other than project related ones, so, we should avoid that unless we wanna start creating wine contexts in the obj folder itself.


The good news is that the script will not be needed once we have the vulkan version setup, as we will be switching to dxc, so for now just repairing the script to work should suffice.

Also mgfxc does give you instructions for setting stuff up without the helper script if its run and the wine context is not found.

@mrhelmut
Copy link
Contributor

Gotcha, we should be good with a link update then!

@mrhelmut mrhelmut added Linux MacOS Setup Related to setuping a MonoGame project for the first time labels Jan 19, 2024
@mrhelmut
Copy link
Contributor

Please refer to #8124 while this issue is being worked on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Linux MacOS Setup Related to setuping a MonoGame project for the first time
Projects
None yet
Development

No branches or pull requests

3 participants