game-ci / unity-builder

Build Unity projects for different platforms
https://github.com/marketplace/actions/unity-builder
MIT License
849 stars 250 forks source link

nographics breaks build #174

Closed louis030195 closed 3 years ago

louis030195 commented 3 years ago

Bug description

Unity 2019.4.11.f1 WebGL, Android, Linux, Windows. both unity-builder v1.5 and 2.0-alpha-1 which introduced mandatory nographics breaks my build which worked before without nographics (I tried to set nographics in custom param before when build was fine and it was actually breaking the build too).

ALSA lib confmisc.c:767:(parse_card) cannot find card '0' ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default FMOD failed to initialize the output device.: "Error initializing output device. " (60) (Filename: ./Modules/Audio/Public/AudioManager.cpp Line: 1489)

Forced to initialize FMOD to to the device driver's system output rate 48000, this may impact performance and/or give inconsistent experiences compared to selected sample rate 48000 (Filename: ./Modules/Audio/Public/AudioManager.cpp Line: 1425)

ALSA lib confmisc.c:767:(parse_card) cannot find card '0' ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default FMOD failed to initialize the output device.: "Error initializing output device. " (60) (Filename: ./Modules/Audio/Public/AudioManager.cpp Line: 1489)

FMOD initialized on nosound output PlayerPrefs - Creating folder: /github/home/.config/unity3d/niwrad PlayerPrefs - Creating folder: /github/home/.config/unity3d/niwrad/niwrad Unable to load player prefs [Subsystems] No new subsystems found in resolved package list. [Package Manager] Done registering packages in 0.56s seconds Targeting platform: WebGL Refreshing native plugins compatible for Editor in 74.56 ms, found 0 plugins. Preloading 0 native plugins for Editor in 0.00 ms. Initialize engine version: 2019.4.11f1 (2d9804dddde7) [Subsystems] Discovering subsystems at path /opt/unity/Editor/Data/Resources/UnitySubsystems [Subsystems] Discovering subsystems at path /github/workspace/Assets Forcing GfxDevice: Null NullGfxDevice: Version: NULL 1.0 [1.0] Renderer: Null Device Vendor: Unity Technologies Segmentation fault (core dumped) Build failed, with exit code 139

https://github.com/louis030195/niwrad/runs/1370864071?check_suite_focus=true

How to reproduce

I have no clue, it can be related to my dependencies which need graphics some says ?

manifest.json:

{
  "dependencies": {
    "com.unity.2d.sprite": "1.0.0",
    "com.unity.2d.tilemap": "1.0.0",
    "com.unity.ads": "3.4.9",
    "com.unity.ext.nunit": "1.0.0",
    "com.unity.ide.rider": "2.0.7",
    "com.unity.ide.visualstudio": "2.0.2",
    "com.unity.ide.vscode": "1.2.2",
    "com.unity.inputsystem": "1.0.0",
    "com.unity.test-framework": "1.1.16",
    "com.unity.textmeshpro": "2.1.1",
    "com.unity.timeline": "1.2.17",
    "com.unity.ugui": "1.0.0",
    "com.unity.modules.ai": "1.0.0",
    "com.unity.modules.androidjni": "1.0.0",
    "com.unity.modules.animation": "1.0.0",
    "com.unity.modules.assetbundle": "1.0.0",
    "com.unity.modules.audio": "1.0.0",
    "com.unity.modules.cloth": "1.0.0",
    "com.unity.modules.director": "1.0.0",
    "com.unity.modules.imageconversion": "1.0.0",
    "com.unity.modules.imgui": "1.0.0",
    "com.unity.modules.jsonserialize": "1.0.0",
    "com.unity.modules.particlesystem": "1.0.0",
    "com.unity.modules.physics": "1.0.0",
    "com.unity.modules.physics2d": "1.0.0",
    "com.unity.modules.screencapture": "1.0.0",
    "com.unity.modules.terrain": "1.0.0",
    "com.unity.modules.terrainphysics": "1.0.0",
    "com.unity.modules.tilemap": "1.0.0",
    "com.unity.modules.ui": "1.0.0",
    "com.unity.modules.uielements": "1.0.0",
    "com.unity.modules.umbra": "1.0.0",
    "com.unity.modules.unityanalytics": "1.0.0",
    "com.unity.modules.unitywebrequest": "1.0.0",
    "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
    "com.unity.modules.unitywebrequestaudio": "1.0.0",
    "com.unity.modules.unitywebrequesttexture": "1.0.0",
    "com.unity.modules.unitywebrequestwww": "1.0.0",
    "com.unity.modules.vehicles": "1.0.0",
    "com.unity.modules.video": "1.0.0",
    "com.unity.modules.vr": "1.0.0",
    "com.unity.modules.wind": "1.0.0",
    "com.unity.modules.xr": "1.0.0"
  }
}

Others:

Expected behavior

On unity-builder 1.2 WebGL, Windows and Linux were building properly (no -nographics), Android was failing (NDK stuff). I expect it to build.

Additional details

My csharp project builder https://github.com/louis030195/niwrad/blob/master/Assets/Scripts/Editor/ProjectBuilder.cs

webbertakken commented 3 years ago

This is a known bug with Unity itself. Any version after 2019.3 doesn't work on Linux. They don't know when they will support it.

The -nographics flag is a workaround that we didn't prefer, but it's the only way it works.

If you're using global illumination or other techniques that require graphics processing during build time, you're out of luck at the moment.

webbertakken commented 3 years ago

See also See also unity-actions#66 and unity-actions#70.

webbertakken commented 3 years ago

Closing this as I don't think there's anything we can do except add windows and macos based images in the docker repo.