timkurvers / valheim-macos

Build-your-own Valheim build for macOS
MIT License
270 stars 14 forks source link

Failed to build Valheim - System.DllNotFoundException #75

Closed ProfAronnax closed 10 months ago

ProfAronnax commented 10 months ago

Hi there, unfortunately i was not able to build the valheim client. Followoing the instructions i was not able utilizing brew to install the dotnet@7 version, but instead i was recomended to installe the current version 8 which seems to work.. Now i am stuck with executing the build.sh script.

Plattform M1 Max with 14.2.1 (23C71)

Logging '<masked>' into Steam3...
...
Unhandled exception. System.DllNotFoundException: Unable to load shared library 'IOKit.framework/IOKit' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable:
dlopen(/opt/homebrew/Cellar/dotnet/8.0.0/libexec/shared/Microsoft.NETCore.App/8.0.0/IOKit.framework/IOKit.dylib, 0x0001): tried: '/opt/homebrew/Cellar/dotnet/8.0.0/libexec/shared/Microsoft.NETCore.App/8.0.0/IOKit.framework/IOKit.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/dotnet/8.0.0/libexec/shared/Microsoft.NETCore.App/8.0.0/IOKit.framework/IOKit.dylib' (no such file), '/opt/homebrew/Cellar/dotnet/8.0.0/libexec/shared/Microsoft.NETCore.App/8.0.0/IOKit.framework/IOKit.dylib' (no such file)
dlopen(/Users/Leif/valheim-macos/vendor/depotdownloader-2.5.0/IOKit.framework/IOKit.dylib, 0x0001): tried: '/Users/Leif/valheim-macos/vendor/depotdownloader-2.5.0/IOKit.framework/IOKit.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/Leif/valheim-macos/vendor/depotdownloader-2.5.0/IOKit.framework/IOKit.dylib' (no such file), '/Users/Leif/valheim-macos/vendor/depotdownloader-2.5.0/IOKit.framework/IOKit.dylib' (no such file)
dlopen(IOKit.framework/IOKit.dylib, 0x0001): tried: 'IOKit.framework/IOKit.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSIOKit.framework/IOKit.dylib' (no such file), '/usr/lib/IOKit.framework/IOKit.dylib' (no such file, not in dyld cache), 'IOKit.framework/IOKit.dylib' (no such file)
dlopen(/opt/homebrew/Cellar/dotnet/8.0.0/libexec/shared/Microsoft.NETCore.App/8.0.0/IOKit.framework/IOKit, 0x0001): tried: '/opt/homebrew/Cellar/dotnet/8.0.0/libexec/shared/Microsoft.NETCore.App/8.0.0/IOKit.framework/IOKit' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/dotnet/8.0.0/libexec/shared/Microsoft.NETCore.App/8.0.0/IOKit.framework/IOKit' (no such file), '/opt/homebrew/Cellar/dotnet/8.0.0/libexec/shared/Microsoft.NETCore.App/8.0.0/IOKit.framework/IOKit' (no such file)
dlopen(/Users/Leif/valheim-macos/vendor/depotdownloader-2.5.0/IOKit.framework/IOKit, 0x0001): tried: '/Users/Leif/valheim-macos/vendor/depotdownloader-2.5.0/IOKit.framework/IOKit' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/Leif/valheim-macos/vendor/depotdownloader-2.5.0/IOKit.framework/IOKit' (no such file), '/Users/Leif/valheim-macos/vendor/depotdownloader-2.5.0/IOKit.framework/IOKit' (no such file)
dlopen(IOKit.framework/IOKit, 0x0001): tried: 'IOKit.framework/IOKit' (no such file), '/System/Volumes/Preboot/Cryptexes/OSIOKit.framework/IOKit' (no such file), '/usr/lib/IOKit.framework/IOKit' (no such file, not in dyld cache), 'IOKit.framework/IOKit' (no such file)

   at SteamKit2.Util.MacHelpers.IOKit.IOServiceMatching(String name)
   at SteamKit2.MacOSMachineInfoProvider.GetMachineGuid()
   at SteamKit2.HardwareUtils.GenerateMachineID(Object state)
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
   at SteamKit2.HardwareUtils.GetMachineID(IMachineInfoProvider machineInfoProvider)
   at SteamKit2.SteamUser.LogOn(LogOnDetails details)
   at DepotDownloader.Steam3Session.ConnectedCallback(ConnectedCallback connected) in D:\a\DepotDownloader\DepotDownloader\DepotDownloader\Steam3Session.cs:line 596
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()
./build.sh: line 88:  5087 Abort trap: 6           dotnet depotdownloader-$depotdownloaderversion/DepotDownloader.dll -app $appid -depot $depotid -manifest $manifestid -beta $branch -os linux -username "$username"

I hope you can give me some help to get it working, best regards Leif

ellkrauze commented 10 months ago

I got the same error message when installing dotnet with brew (because it installed the latest version 8 but not 7). Check your dotnet version, and install dotnet 7 if necessary. Please, see the following issue https://github.com/timkurvers/valheim-macos/issues/74#issuecomment-1868533052

timkurvers commented 10 months ago

@ProfAronnax Could you give the instructions in #76 a shot? It drops the dotnet requirement, which hopefully bypasses the issue you're running into altogether.

ProfAronnax commented 10 months ago

Hi @timkurvers, i will close this issue -> workaround described under: https://github.com/timkurvers/valheim-macos/pull/76#issue-2057853945