I wanted to run an example using C# and MPI.NET (https://github.com/mpidotnet/MPI.NET).
I found some sources on StackOverflow that I should install open-mpi via homebrew. I did this.
I also have Mono installed, and after building the project with msbuild, I try to run Hello.exe with the following command:
mpiexec -np 2 mono Hello.exe
I get the exception System.DllNotFoundException: msmpi.dll assembly, which is straightforward. The problem is I don't know where to find this DLL, or whether some other mistake might be causing it.
Related
I get many error messages if I install the Xamarin.Firebase.iOS.CloudMessaging 3.1.2 nuget package.
Error: linker command failed with exit code 1 (use -v to see invocation)
Error MT5210: Native linking failed, undefined symbol: _FIRLogBasic. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
Error MT5211: Native linking failed, undefined Objective-C class:
FIROptions. The symbol '_OBJC_CLASS_$_FIROptions' could not be found
in any of the libraries or frameworks linked with your application.
Error MT5211: Native linking failed, undefined Objective-C class:
GULAppEnvironmentUtil. The symbol
'_OBJC_CLASS_$_GULAppEnvironmentUtil' could not be found in any of the
libraries or frameworks linked with your application.
Error MT5201: Native linking failed. Please review the build log and
the user flags provided to gcc: -ObjC
Error MT5202: Native linking failed. Please review the build log.
I tried uninstalling and reinstalling the nuget package but I still get the same errors.
I use Visual Studio Community for Mac 8.1.5 (build 9).
I need Xamarin.Firebase.iOS.CloudMessaging because I follow this tutorial: https://www.robbiecode.com/setup-push-notifications-with-firebase-in-xamarin-forms-for-ios/
What is wrong with my project? What can I do?
The following two projects are in my solution:
InapppurchaseTest.iOS, MonoGame.Framework.iOS (develop)
Well, this is a well-known issue with Firebase and Xamarin, what basically happens here is the old bin and obj files while interacting with the new data override some existing files that are needed by iOS to synthesize the IPA while deployment and hence ends up throwing linking RELATED errors, follow the below steps and it will clear this mess.
Clean bin and obj
Delete the builds in the following path of your MAC machine - ~/Library/Caches/Xamarin/mtbs/builds/ProjNAME where 'ProjName' is the name of the project you are currently working on
Once you are done with both the above steps add the Xamarin.Firebase.iOS.CloudMessaging package and change linker setting to Don't Link (this is for the time being)
After installing these packages see to it that you build your project dependency wise which means PCL'S and .Net standards first then the native iOS project.
Clean bin and obj again if it does not work for the first build...
This should solve your issues in case it does not repeat the above procedure.
EDIT
If you check the GitHub comment by SotoiGhost here, it says adding the below line anywhere in your project should solve this issue...
var foo = Firebase.Core.Configuration.SharedInstance;
Feel free to get back in case of issues
Good luck!
I'm trying to write a timer-triggered Azure Function that downloads a bunch of data and processes it into a SQLite database. I've written code that does this and runs fine on my own machine. But, the same code in Azure yields a DllNotFoundException, complaining that the system can't load "e_sqlite3."
Here is the full error message (for the inner exception):
Exception while executing function: FnordFunction
Microsoft.Azure.WebJobs.Host.FunctionInvocationException : Exception
while executing function: FnordFunction --->
System.TypeInitializationException : The type initializer for
'SQLite.SQLiteConnection' threw an exception. --->
System.DllNotFoundException : Unable to load DLL 'e_sqlite3': The
specified module could not be found. (Exception from HRESULT:
0x8007007E)
at
SQLitePCL.SQLite3Provider_e_sqlite3.NativeMethods.sqlite3_libversion_number()
at
SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number()
at SQLitePCL.raw.SetProvider(ISQLite3Provider imp)
at SQLitePCL.Batteries_V2.Init()
at SQLite.SQLiteConnection..cctor()
End of inner exception
Here are the steps to reproduce:
In Visual Studio 2017, I created an Azure Function project using the latest template.
I added my code files to the project, and edited the "Run" method to call the code.
Using NuGet, I added sqlite-net-pcl, and some other libraries I need. (I've also tried this with EntityFrameworkCore, using SQLite; that didn't work either).
Build
Publish
Run. Failure.
The problem might be that my code is wrong--but it works fine when I just make a console .exe.
The problem might be that VS2017 is not bundling the correct dll for SQLite when it builds. I'm not sure how to fix that. I've seen from other searches that the same error message pops up when the platform target is set to "Any CPU," but changing that to x86 or x64 does not fix the problem.
The problem might be that the SQLite libraries I have tried won't run in the Azure Functions sandbox. If so, are there any simple SQLite libraries that will run in the sandbox?
Thanks in advance...
The problem is that when running in a Function App, native binaries can't be automatically loaded from your bin folder, so it's not finding the DLL.
One way to solve this is to drop it in your D:\home\site\tools folder (e.g. using Kudu Console), as that folder is automatically place on the PATH.
Hey guys I am trying to make an .NETCore app that draw some text on image and that is gonna be able to run on linux os.
I tried CoreCompat Drawing library, ImageSharp, ImageMagick and I couldnt get even one of them work on linux.
I develop the apps on Windows, everything works perfectly so I go and publish it for linux, I do a dotnet publish -r linux-arm, copy the publish folder onto my linux "server" and run it*(Same setup works for most of the .Netcore apps I did so far)*, but it throws almost the same exception for all of the libraries I tried, for example:
Unhandled Exception: System.TypeInitializationException: The type
initializer for 'NativeMagickSettings' threw an exception. --->
System.DllNotFoundException: Unable to load DLL
'Magick.NET-Q8-x64.Native.dll': The specified module could not be
found.
That's with ImageMagick.Net for example. just replace the dll name and you got error for other libraries aswell.
And I am clueless I google some tips but noone of them worked. My question is if anyone has experience with this exception or if you know about some working image drawing library, please tell me its name :D
If I stay with imageMagick, I was working with this https://github.com/dlemstra/Magick.NET/blob/master/Documentation/CrossPlatform.md
Package reference is correct, but it can't find any Magick.NET-Q8-x64.Native.dll.so
ldd Magick.NET-Q8-x64.Native.dll.so
Also tried to:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/ImageMagick/libraries
But without any results. So please if you have any clue what can I do or if you know about image library I can use on linux please say so, thanks :)
I'm really enjoying the dotnet core possibilities, but there are certain problems on Linux platform.
I was working with P/Invoke stuff. It's fine on Windows, but when I tried to call function from libcon Linux - I've got a problem:
Unhandled Exception: System.DllNotFoundException: Unable to load DLL
'/usr/lib/x86_64-linux-gnu/libc.so': The specified module could not be
found. (Exception from HRESULT: 0x8007007E)
I've tried two ways (source code http://pastebin.com/HDTnrM0a):
[DllImport("/usr/lib/x86_64-linux-gnu/libc.so")]
and just [DllImport("libc.so")]
Bot don't work and gave the same error. I've searched the certain file and it DOES EXIST:
root#ubuntu-512mb-ams2-01:/home/projects/pinvoke1# find / -name "libc.so"
/usr/lib/x86_64-linux-gnu/libc.so
PS, proof of using both variants:
You need to remove ".so" from the DllImport line
[DllImport("libc")]
(The answer was shared in the comments by Jeroen but reflecting it here in the answer section so this question can be marked as answered)
I have developed a GTK# application that makes use of webkit-sharp to edit email templates. This application works in Linux but when it is run in Windows it does not work. I am using the webkit-sharp.dll from Linux in Windows. The error that I am getting is:
System.TypeInitializationException: The type initializer for 'WebKit.WebView' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'webkit-1.0': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at WebKit.Download.webkit_download_get_type()
at GtkSharp.WebkitSharp.ObjectManager.Initialize()
at WebKit.WebView..cctor()
--- End of inner exception stack trace ---
at WebKit.WebView..ctor()
at MainWindow..ctor()
I am guessing that webkit-sharp.dll only wraps the native libraries for WebKit. I do not know where to get "webkit-1.0". Is there a webkit-sharp.dll that is specific to Windows for GTK#?
I did exactly that. I guess the webkit windows dll does not use gtk as rendering engine.
What I did was install the libwebkit dll provided by the suse mingw32 port and all of its dependencies.
You can see a full list of dependencies here
At the time of doing it(1 year ago more or less) the rendering was not perfect, but it may have improved.
I'm also having this problem...
Not tried this, but at http://www.webkit.org/building/checkout.html
The site suggests:
Download webkit support libraries
Run the update-webkit script
Build webkit from source
I think this requires cygwin installed.
I'm just paraphrasing the site - not tried this yet.
Have you tried running the Hello World example app to make sure everything is set up correctly in your Windows environment?
http://mono-project.com/Mono_Basics
You can also try some of the other example programs to make sure they function without error.
http://www.mono-project.com/GtkSharpBeginnersGuide
Seems like a common installation issue requires the addition of an environment variable in windows to get the assemblies loaded correctly:
http://www.mono-project.com/FAQ:_General#Installation_Problems