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

Build for Apple Silicon (M1) -> sqlcipher.dll not found #39

Open
DanielTizon opened this issue Oct 1, 2021 · 10 comments
Open

Build for Apple Silicon (M1) -> sqlcipher.dll not found #39

DanielTizon opened this issue Oct 1, 2021 · 10 comments

Comments

@DanielTizon
Copy link

Hi,

I'm getting sqlcipher.dll not found error when I build my app in Unity Editor (2021.1.23f1), using scripting backend "Mono", and selecting Architecture "Intel 64-Bit + Apple Silicon".

If you select Architecture "Intel 64-Bit", it works. But new Apple Macs are going to use M1 chipsets, so it would be nice to be able to build for this architecture,

Thanks!

@netpyoung
Copy link
Owner

Thank you about your feedback.
I am also eager to supply that platform build. But I don't have mac machine for that.
I noticed someone is using github's workflow action for multi platform library. but I need to investing about that

@netpyoung
Copy link
Owner

@DanielTizon Hi I built library for apple silicon(arm) using github action.

But as I mensioned, I don't have that machine. so Could you test that bundle using this?

@DanielTizon
Copy link
Author

Yes, I will test it and tell you if it is working now,

Thanks!

@DanielTizon
Copy link
Author

@netpyoung I'm trying test it, I just replaced macOS folder of plugins folder, but I am getting this error message when building:

Plugin 'sqlcipher.bundle' is used from several locations:
 Assets/SqlCipher4Unity3D/Plugins/macOS/arm64/sqlcipher.bundle would be copied to <PluginPath>/sqlcipher.bundle
 Assets/SqlCipher4Unity3D/Plugins/macOS/x86_64/sqlcipher.bundle would be copied to <PluginPath>/sqlcipher.bundle
 Assets/SqlCipher4Unity3D/Plugins/macOS/lipo/sqlcipher.bundle would be copied to <PluginPath>/sqlcipher.bundle
Please fix plugin settings and try again.'

@netpyoung
Copy link
Owner

Well it seems problem to place duplicate bundle.
lipo/sqlcipher.buldle itself contains x86_64 and arm64 both.

So Would you replace put lipo/sqlcipher.bulde to macOS/sqlcipher.bundle then remove other bundles?

@DanielTizon
Copy link
Author

Hey netpyyoung,

I already tried it, and I am getting now this error:

Building /home/user/Downloads/game/mac/game.app/Contents/Frameworks/libmonobdwgc-2.0.dylib failed with output:
The properties of source file /home/user/Unity/Hub/Editor/2021.2.0f1/Editor/Data/PlaybackEngines/MacStandaloneSupport/Variations/macos_x64ARM64_player_nondevelopment_mono/UnityPlayer.app/Contents/Frameworks/libmonobdwgc-2.0.dylib could not be retrieved: No such file or directory

Building /home/user/Downloads/game/mac/game.app/Contents/Resources/unity default resources failed with output:
The properties of source file /home/user/Unity/Hub/Editor/2021.2.0f1/Editor/Data/PlaybackEngines/MacStandaloneSupport/Variations/macos_x64ARM64_player_nondevelopment_mono/UnityPlayer.app/Contents/Resources/unity default resources could not be retrieved: No such file or directory

Building /home/user/Downloads/game/mac/game.app/Contents/Frameworks/UnityPlayer.dylib failed with output:
System.ArgumentException: Copy() called on path that doesnt exist: /home/user/Unity/Hub/Editor/2021.2.0f1/Editor/Data/PlaybackEngines/MacStandaloneSupport/Variations/macos_x64ARM64_player_nondevelopment_mono/UnityPlayer.app/Contents/Frameworks/UnityPlayer.dylib
   at NiceIO.NPath.CopyWithDeterminedDestination(NPath destination, Func`2 fileFilter)
   at NiceIO.NPath.Copy(NPath dest, Func`2 fileFilter)
   at NiceIO.NPath.Copy(NPath dest)
   at MacOSCodeSignDylibCopy.Run(CSharpActionContext ctx, SignFlags signFlags)

@netpyoung
Copy link
Owner

well. It seems like Unity Editor on Silicon does not stable.
It looks like there are some issues on silicon

So In my opinion, It should be tested after they release suitable for handling this dylib.

@nevadza
Copy link

nevadza commented Jun 1, 2022

Hello @netpyoung ,

just to let you know that I tested your https://github.com/netpyoung/prebuilt-libsqlcipher/releases/download/v0.0.1/macos_ios_tvos.zip with Unity 2022.1.2f1 and it works! What I did:

  • I uninstalled SqlCipher4Unity3D from Unity Package Manager
  • I downloaded SqlCipher4Unity3D-1.3.0.unitypackage and opened it in my project
  • I removed content of SqlCipher4Unity3D/Plugins/macOS and copied there macOS/arm64 folder with sqlcipher.bundle from macos_ios_tvos.zip
  • I started the project and DllNotFoundException: sqlcipher assembly:<unknown assembly> type:<unknown type> member:(null) is gone and all works again

Would it be possible to bring this lib for Apple Silicon to the new release of SqlCipher4Unity3D so I can go back to UPM version?

Thank you very much!

@netpyoung
Copy link
Owner

@nevadzask thank you for reporting that.

I'm not sure libsqlcipher's version problem or caused by netpyoung/prebuilt-libsqlcipher#1 .

  • v0.0.1 used VERSION=v4.4.3 for sqlcipher but SqlCipher4Unity3D's release 1.3.0 used VERSION=v4.5.0.
  • v0.0.1 used CoreFoundation but PR instead used Foundation .

Would it be possible to bring this lib for Apple Silicon to the new release of SqlCipher4Unity3D so I can go back to UPM version?

well.... i used lipo command to compress all libs into one bundles. as I mentioned v0.0.1 used VERSION=v4.4.3 so It may cause some other issues.

@leith
Copy link

leith commented May 30, 2024

@netpyoung just following up on this one, it seems like 1.3.1 is now using the sqlcipher.bundle from prebuilt-libsqlcipher v0.0.6 which bundles in the lipo version of sqlcipher v4.5.5 - is this now resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants