Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Build on Linux Support #44

Open
asalvo opened this issue Aug 5, 2021 · 5 comments
Open

Build on Linux Support #44

asalvo opened this issue Aug 5, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@asalvo
Copy link

asalvo commented Aug 5, 2021

I'm using GitHub Actions (Linux agent) and the Game-CI docker image (Linux based) to build a Unity app that has Unity JSB. I am targeting Stand Alone Windows x64 and Stand Alone OSX during the build.

During the build, I am getting the following exception for the windows target

QuickJS.Native.JSApi..cctor () (at Assets/jsb/Source/Native/JSApi.cs:877)
Rethrow as TypeInitializationException: The type initializer for 'QuickJS.Native.JSApi' threw an exception.
QuickJS.Unity.JSScriptableObject.ReleaseJSValues () (at Assets/jsb/Source/Unity/JSScriptableObject.cs:71)
QuickJS.Unity.JSScriptableObject.OnDisable () (at Assets/jsb/Source/Unity/JSScriptableObject.cs:395)
UnityEditor.EditorApplication:Exit(Int32)
UnityBuilderAction.Reporting.StdOutReporter:ExitWithResult(BuildResult) (at Assets/Editor/Editor/UnityBuilderAction/Reporting/StdOutReporter.cs:31)
UnityBuilderAction.Builder:BuildProject() (at Assets/Editor/Editor/UnityBuilderAction/Builder.cs:77)

exception when the target is OSX

DllNotFoundException: quickjs
  at (wrapper managed-to-native) QuickJS.Native.JSApi.JSB_ATOM_Proxy()
  at QuickJS.Native.JSApi..cctor () [0x00059] in /github/workspace/projects/ProjectName/Assets/jsb/Source/Native/JSApi.cs:877 
Rethrow as TypeInitializationException: The type initializer for 'QuickJS.Native.JSApi' threw an exception.
  at QuickJS.Unity.JSScriptableObject.ReleaseJSValues () [0x00010] in /github/workspace/projects/ProjectName/Assets/jsb/Source/Unity/JSScriptableObject.cs:71 
  at QuickJS.Unity.JSScriptableObject.OnDisable () [0x00007] in /github/workspace/projects/ProjectName/Assets/jsb/Source/Unity/JSScriptableObject.cs:395 
UnityEditor.EditorApplication:Exit(Int32)
UnityBuilderAction.Reporting.StdOutReporter:ExitWithResult(BuildResult) (at Assets/Editor/Editor/UnityBuilderAction/Reporting/StdOutReporter.cs:31)
UnityBuilderAction.Builder:BuildProject() (at Assets/Editor/Editor/UnityBuilderAction/Builder.cs:77)

I'm assuming that this is because there is no QuickJS native dependency for Linux. Would it be possible for you to build and include a Linux version of Quick JS?

@ialex32x ialex32x added the enhancement New feature or request label Aug 6, 2021
@ialex32x
Copy link
Owner

ialex32x commented Aug 6, 2021

OK, I'll build and check it later this weekend.

@ialex32x
Copy link
Owner

ialex32x commented Aug 8, 2021

Hi asalo, I'd tried to run dotnetcore sample in Ubuntu 20.04 LTS with no exception. So the linux build of quickjs library is OK. I think it's a bug of the building process in Unity, I'll keep trying to fix it.

@ialex32x
Copy link
Owner

ialex32x commented Aug 8, 2021

Is it possible that this error is caused by the different glibc version of linux os? It seems that glibc 2.29+ is required for the current build of quickjs.

@ialex32x
Copy link
Owner

ialex32x commented Aug 9, 2021

I think this issue is caused by the different version of glibc, because I used the ubuntu-latest to build quickjs in Github Actions. I've rebuilt it by ubuntu 18.04 LTS (which contains glibc 2.27 by default).

@asalvo
Copy link
Author

asalvo commented Aug 11, 2021

If glibc 2.29 or later is required then that would explain the problem. While the Github Action runner I am using is running Unbuntu 20.04 LTS and has glibc 2.29, the Game-CI provided docker image is based on Unbuntu 18.04 and only has glibc 2.27. It appears that the recommended solution for getting glibc 2.29 on Unbutu 18.04 is to upgrade to 20.04 ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants