Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Bug Build failed for MacOS version of Unity Project with GOG SDK

Discussion in 'Editor & General Support' started by Phan-Phantz, Sep 12, 2022.

  1. Phan-Phantz

    Phan-Phantz

    Joined:
    Nov 11, 2015
    Posts:
    7
    1) We tried to build MacOS version of our Unity Game with GOG SDK Version : 1.144.1
    and the build failed with error in Unity 2021.3.2f1, 2021.3.8f1, and 2022.20b6 on MacOS Monterey 12.3.1 :

    Building /Users/<BuildFolder>/<OurGame>.app/Contents/PlugIns/Galaxy.bundle/Contents/MacOS/libGalaxyCSharpGlue.dylib failed with output:

    Failed because this command failed to write the following output files: /Users/<BuildFolder>/<OurGame>.app/Contents/PlugIns/Galaxy.bundle/Contents/_CodeSignature/CodeResources

    This is from the Editor log :

    System.Exception: Could not find executable at '/Users/<BuildFolder>/<OurGame>.app/Contents/PlugIns/Galaxy.bundle/Contents/MacOS/Galaxy' inside a bundle.


    From a Editor log message above, it shows that Unity could not find executable at <OurGame>.app/Contents/PlugIns/Galaxy.bundle/Contents/MacOS/Galaxy

    2) From previous errors, we got a workaround to build the game by renaming ‘libGalaxy.dylib’ and ‘libGalaxyCSharpGlue.dylib’ to ‘Galaxy’ and ‘GalaxyCSharpGlue’ with no extensions and can build successfully but then when we run the game, it produces this error log :

    DllNotFoundException: Unable to load DLL 'GalaxyCSharpGlue'. Tried the load the following dynamic libraries: Unable to load dynamic library 'GalaxyCSharpGlue' because of 'Failed to open the requested dynamic library (0x06000000) dlerror() = dlopen(GalaxyCSharpGlue, 0x0005): tried: 'GalaxyCSharpGlue' (no such file), '/usr/local/lib/GalaxyCSharpGlue' (no such file), '/usr/lib/GalaxyCSharpGlue' (no such file), '/Users/<BuildFolder>/GalaxyCSharpGlue' (no such file)

    3) It appears that ‘GalaxyCSharpGlue' needs to be in the directory that contains our game’s .app file. So, we tried moving GalaxyCSharpGlue to that directory then we encountered a different error:

    DllNotFoundException: Unable to load DLL 'GalaxyCSharpGlue'. Tried the load the following dynamic libraries: Unable to load dynamic library 'GalaxyCSharpGlue' because of 'Failed to open the requested dynamic library (0x06000000) dlerror() = dlopen(GalaxyCSharpGlue, 0x0005): tried: 'GalaxyCSharpGlue' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/GalaxyCSharpGlue' (no such file), '/usr/lib/GalaxyCSharpGlue' (no such file), '/Users/<BuildFolder>/GalaxyCSharpGlue' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))

    4) We tried renaming 'GalaxyCSharpGlue' back to 'GalaxyCSharpGlue.bundle' , 'GalaxyCSharpGlue,dylib', and ‘ 'libGalaxyCSharpGlue.dylib' but nothing work.