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
MAUI .NET 7 on create new Lua() System.DllNotFoundException: @rpath/liblua54.framework/liblua54 #521
Comments
`-------------------------------------
|
Create new MAUI .net 7 lib application Error `-------------------------------------
|
Try create clean one app without dll. Create clean app MAUI .net7 Is all ways file located in /Users/**/Projects///bin/Debug/net7.0-maccatalyst/maccatalyst-x64/ |
So I go to folder and found But this part not created.... -_-" Now is request... it's error in lib or in maui, or need some actions in vs 2022 for Mac. |
If copy /liblua54.framework/liblua54 |
See KernLua
It look like MAUI build think that is ios But, when i build on simulator IPad still that error. |
My faild, that is ditto copy from Version/A to simple, but MAUI still looking for Version/A |
Only one way to fix this by adding trigger to project.
This action after build application cope framework to correct directory. But need answer from creator of NLua and KernLua |
All in all i think error in linking KernLua on (net7.0-ios and net7.0-maccatalyst targeting) |
So, i create forks for all products after modding Makefile with adding path \external\lua\ios_build it's work correctly. Mb u can fix this? Now, the real problem (as i understand) that old standart of macos(or xamarin-macos) used common '/name.framework/name' path, but on new maccatalyst(or maui) it try to call So where making linking? In Xcode or in MSBuild? If XCode - so bab, couse all old library stop founding, couse this error. (Some libs dont need update with new os version if they selffull) But all other need wait update Makefile for buildup on prebuild action. (Like some cross platform libs from nuget (KeraLua, for example). If MsBuild make links, mb simple add somethink like supporting old libs. |
I am not sure why that's the case, since LuaLibraryName is hardcoded on DllImport https://github.com/NLua/KeraLua/blob/main/src/NativeMethods.cs#L27 It seems like a bug on .NET iOS runtime |
I guess I manage to fix changing Xcode project option |
@Jurashikku try 1.7.1 |
Will try tommorrow! And replay. |
Still try versions/a/
Why to test Create .net 7 library |
There are two fixes:
I think that is way when apple port to one OsCore and for correct work Xcode hardcoded by default LD_DYLIB_INSTALL_NAME to /Versions/A/ |
So loo forward of framework build what I see So i think that link lib is builded as Framework and compile with default version a parameter |
I guess is a bug on Xcode. I fixed forcing the right install_name value. |
After update, now droped exception
|
Try to bump to .NET 8, I've updated NLua/KeraLua to .NET 8. Just tested here with a Mac Catalyst application and is working fine. |
Throw exception on new Lua() from other .dll project
InnerException {System.TypeInitializationException: The type initializer for 'LuaUiEngine.UiEngine' threw an exception. ---> System.DllNotFoundException: @rpath/liblua54.framework/liblua54 at KeraLua.Lua..ctor(Boolean openLibs) at NLua.Lua..ctor(Boolean openLibs) at…} System.TypeInitializationException
Lib create on debug in /bin/net7.0-maccatalyst/maccatalyst-x64/liblua54
When create ConsoleApplication is used runtimes link. When try run Maui successful running on Windows.
MacOS return exception
Library not loaded: @rpath/liblua54.framework/Versions/A/liblua54 Referenced from: <552F469E-1D26-37B0-AD62-C325D8C5042E> /Users/USER/*/MauiLuaApp.app/Contents/MacOS/MauiLuaApp Reason: tried: '/Users/yurasultanov/LuaUiEngine/LuaUiEngine/MauiLuaApp/bin/Debug/net7.0-maccatalyst/maccatalyst-x64/MauiLuaApp.app/Contents/Frameworks/liblua54.framework/Versions/A/liblua54' (no such file), '/Users/yurasultanov/LuaUiEngine/LuaUiEngine/MauiLuaApp/bin/Debug/net7.0-maccatalyst/maccatalyst-x64/MauiLuaApp.app/Contents/Frameworks/liblua54.framework/Versions/A/liblua54' (no such file)
The text was updated successfully, but these errors were encountered: