You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i try to run SoftPlc on Macbook Pro M1, i am getting below error. i have already move files from native folder to net6.0 folder.
if you have any suggestion it would be great.
PS /Users/xxxxx/VisualStudioProjects/_Custom/SoftPlc/SoftPlc> dotnet run bin\Debug\net6.0\SoftPlc.dll --plcPort=102 --urls="http://localhost:8080/"
Initializing plc service...
Unhandled exception. System.DllNotFoundException: Unable to load shared library 'snap7' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libsnap7, 0x0001): tried: 'libsnap7' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibsnap7' (no such file), '/usr/lib/libsnap7' (no such file, not in dyld cache), 'libsnap7' (no such file), '/usr/local/lib/libsnap7' (no such file), '/usr/lib/libsnap7' (no such file, not in dyld cache)
at SoftPlc.S7Server.Srv_Create()
at SoftPlc.S7Server..ctor() in /Users/xxxxx/VisualStudioProjects/_Custom/SoftPlc/SoftPlc/Snap7/snap7.net.cs:line 1918
at SoftPlc.Services.PlcService..ctor(IConfiguration configuration) in /Users/xxxxx/VisualStudioProjects/_Custom/SoftPlc/SoftPlc/Services/PlcService.cs:line 23
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(Type serviceType) at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func`2 valueFactory)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
at Program.
$(String[] args) in /Users/xxxxx/VisualStudioProjects/_Custom/SoftPlc/SoftPlc/Program.cs:line 48
The text was updated successfully, but these errors were encountered:
"The related native library should be copied into your destination build path." I did that. But error is about low level addressing issue, so compatibility issue with m1 processor. because i have limited time to complete project, i purchased a windows pc for now.
i also tried docker on mac, but again i get compatibility related errors. so i gave up and switched to windows pc. but compiling for m1 processors, should be good.
All right.
I always had a bunch of such simulated plc running as a docker on a raspberry pi, so that might be an alternative.
I will look for this compatibility fix and update the project. Sadly, I don't have the chance to quickly rebuild on this architecture, so it might take a while.
Hello fbarresi,
when i try to run SoftPlc on Macbook Pro M1, i am getting below error. i have already move files from native folder to net6.0 folder.
if you have any suggestion it would be great.
PS /Users/xxxxx/VisualStudioProjects/_Custom/SoftPlc/SoftPlc> dotnet run bin\Debug\net6.0\SoftPlc.dll --plcPort=102 --urls="http://localhost:8080/"
$(String[] args) in /Users/xxxxx/VisualStudioProjects/_Custom/SoftPlc/SoftPlc/Program.cs:line 48Initializing plc service...
Unhandled exception. System.DllNotFoundException: Unable to load shared library 'snap7' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libsnap7, 0x0001): tried: 'libsnap7' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibsnap7' (no such file), '/usr/lib/libsnap7' (no such file, not in dyld cache), 'libsnap7' (no such file), '/usr/local/lib/libsnap7' (no such file), '/usr/lib/libsnap7' (no such file, not in dyld cache)
at SoftPlc.S7Server.Srv_Create()
at SoftPlc.S7Server..ctor() in /Users/xxxxx/VisualStudioProjects/_Custom/SoftPlc/SoftPlc/Snap7/snap7.net.cs:line 1918
at SoftPlc.Services.PlcService..ctor(IConfiguration configuration) in /Users/xxxxx/VisualStudioProjects/_Custom/SoftPlc/SoftPlc/Services/PlcService.cs:line 23
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span
1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor
2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor
2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(Type serviceType) at System.Collections.Concurrent.ConcurrentDictionary
2.GetOrAdd(TKey key, Func`2 valueFactory)at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
at Program.
The text was updated successfully, but these errors were encountered: