FaceRecognitionDotNet icon indicating copy to clipboard operation
FaceRecognitionDotNet copied to clipboard

Mac os 11 "libDlibDotNetNativeDnn.dylib" cannot be opened because the developer can not be verified

Open khinklenj opened this issue 3 years ago • 8 comments

Hi I am getting the following error Mac os 11 "libDlibDotNetNativeDnn.dylib" cannot be opened because the developer can not be verified when running the following code on Visual Studio 2019 mac

Then I get the error Unable to load shared library 'DlibDotNetNativeDnn' or one of its dependencies

private FaceRecognition fr; dir = AppDomain.CurrentDomain.BaseDirectory;

fr = FaceRecognition.Create(dir)

Thank you Keith

khinklenj avatar Jun 10 '21 00:06 khinklenj

I get the same error, building the FaceDetection sample on my M1 MacBook pro running 11.2.

Unhandled exception. System.TypeInitializationException: The type initializer for 'DlibDotNet.NativeMethods' threw an exception.
 ---> System.DllNotFoundException: Unable to load shared library 'DlibDotNetNativeDnn' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libDlibDotNetNativeDnn, 1): image not found
   at DlibDotNet.NativeMethods.LossMetric_anet_type_create()
   at DlibDotNet.NativeMethods..cctor() in DlibDotNet.dll:token 0x6000a1a+0x2a
   --- End of inner exception stack trace ---
   at DlibDotNet.NativeMethods.get_frontal_face_detector()
   at DlibDotNet.Dlib.GetFrontalFaceDetector() in DlibDotNet.dll:token 0x6000076+0x0
   at FaceRecognitionDotNet.FaceRecognition..ctor(String directory) in FaceRecognitionDotNet.dll:token 0x6000028+0x92
   at FaceDetection.Program.<>c__DisplayClass1_0.<Main>b__0() in /Users/markotway/LocalCloud/Development/FaceDetection/Program.cs:line 76
   at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args) in Microsoft.Extensions.CommandLineUtils.dll:token 0x6000040+0x335
   at FaceDetection.Program.Main(String[] args) in /Users/markotway/LocalCloud/Development/FaceDetection/Program.cs:line 95

Webreaper avatar Jun 18 '21 19:06 Webreaper

@Webreaper if you find a solution please let me know, I am pulling my hair trying to solve this and I dont have much to spare lol

khinklenj avatar Jun 18 '21 21:06 khinklenj

@Webreaper You can use otool -L DlibDotNetNativeDnn.dylib and it should show missing dependencies.

However, I don't have M1 Mac machine and I may not reproduce your issue.

takuya-takeuchi avatar Jun 20 '21 15:06 takuya-takeuchi

Here is what I got when I run the command

libDlibDotNetNativeDnn.dylib: @rpath/libDlibDotNetNativeDnn.dylib (compatibility version 0.0.0, current version 0.0.0) /opt/X11/lib/libSM.6.dylib (compatibility version 7.0.0, current version 7.1.0) /opt/X11/lib/libICE.6.dylib (compatibility version 10.0.0, current version 10.0.0) /opt/X11/lib/libX11.6.dylib (compatibility version 10.0.0, current version 10.0.0) /opt/X11/lib/libXext.6.dylib (compatibility version 11.0.0, current version 11.0.0) /usr/local/opt/giflib/lib/libgif.dylib (compatibility version 0.0.0, current version 7.2.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libsqlite3.dylib (compatibility version 9.0.0, current version 321.1.0) /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 904.4.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.60.1)

I dont know what I am missing

khinklenj avatar Jun 21 '21 23:06 khinklenj

@Webreaper were you able to make any progress on your end.

khinklenj avatar Jun 28 '21 22:06 khinklenj

No, I gave up and didn't continue investigating. Looking at alternative face-detection libs.

Webreaper avatar Jun 29 '21 07:06 Webreaper

Have you ever find a solution about this issue? I have the same issue. I couldn't find a solution.

tugbargn avatar Feb 24 '23 14:02 tugbargn

I have no M1 mac. I can't go through issue. But M1 mac support x86_64 by using Rosseta. So it may work after install Rosetta.

takuya-takeuchi avatar Feb 25 '23 11:02 takuya-takeuchi