Comments (8)
You should set the files in i386
/amd64
to "copy if newer", so you end up with
bin\Debug\YourProject.exe
bin\Debug\ZeroMQ.dll
bin\Debug\i386\libzmq.so
bin\Debug\i386\libzmq.dll
bin\Debug\i386\libsodium.so
bin\Debug\i386\libsodium.dll
bin\Debug\amd64\libzmq.so
bin\Debug\amd64\libzmq.dll
bin\Debug\amd64\libsodium.so
bin\Debug\amd64\libsodium.dll
The Platform.LoadUnmanagedLibrary
looks first into the folders i386/amd64.
from clrzmq4.
Hi
When I use the nuget package on linux I get the following exception. For some reason it is looking in /var for the .so file. I am using this on OSX with Mono and find the same problem, though "copy if newer" and "always copy" do not resolve. Here is what I get when I put the lib...{dll&so} in the folder named here:
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'ZeroMQ.lib.zmq' threw an exception. ---> System.IO.FileNotFoundException: UnmanagedLibrary[libzmq] Unable to load library "libzmq" from "/var/folders/jm/vkm98mmn2pq6gj6ysc3b3xwm0000gn/T/libzmq.so". Inspect Trace output for details.
File name: '/var/folders/jm/vkm98mmn2pq6gj6ysc3b3xwm0000gn/T/libzmq.so' ---> System.DllNotFoundException: dlopen(/var/folders/jm/vkm98mmn2pq6gj6ysc3b3xwm0000gn/T/libzmq.so, 257): no suitable image found. Did find:
/var/folders/jm/vkm98mmn2pq6gj6ysc3b3xwm0000gn/T/libzmq.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x01 0x01 0x01 0x00
at ZeroMQ.lib.Platform+Posix.LoadUnmanagedLibrary (System.String libraryName) [0x00213] in /Users/tommy/Downloads/clrzmq4-master/lib/Platform.Posix.cs:123
at ZeroMQ.lib.zmq..cctor () [0x005b6] in /Users/tommy/Downloads/clrzmq4-master/lib/zmq.cs:40
--- End of inner exception stack trace ---
at ZeroMQ.ZContext..ctor () [0x00007] in /Users/tommy/Downloads/clrzmq4-master/ZContext.cs:55
at Examples.Program.Main (System.String[] args) [0x00008] in /Users/tommy/Projects/ZMQ_Example/ZMQ_Example/Program.cs:170
from clrzmq4.
YES...
I was installing Linux Mint
on my computer, and I noticed there is no more a libc.so
... There was just a /lib/x86_64-linux-gnu/libdl.so.2
...
I resolved it currently by making a hardlink
ln /lib/x86_64-linux-gnu/libdl.so.2 /lib/x86_64-linux-gnu/libdl.so
Now look, you're using OSX? You may need dylib
files... However I don't have OSX
from clrzmq4.
On MacOSX this should override using ZeroMQ.lib.Platform.MacOSX
instead of ZeroMQ.lib.Platform.Posix
...
How would you resolve your platform is MacOSX?
I'm currently doing so in ZeroMQ.lib.Platform.cs
:
switch (Environment.OSVersion.Platform) {
// ...
case PlatformID.MacOSX:
Kind = PlatformKind.Posix;
Name = PlatformName.MacOSX;
from clrzmq4.
Look: I had the idea of adding these lines to lib/Platform.cs
...
You need a git pull zeromq master
or git clone https://github.com/zeromq/clrzmq4 ZeroMQ
...
and rebuild the package to try
IsMonoMac = assemblies.Any(a => a.GetName().Name.Equals("MonoMac", StringComparison.InvariantCultureIgnoreCa
if (IsMonoMac) {
Kind = PlatformKind.Posix;
Name = PlatformName.MacOSX;
}
from clrzmq4.
On Linux and also for MacOSX systems, I've updated the code to properly load files from, for example
[0]: "/home/metadings/zguide/examples/C#/bin/Debug/amd64/libsodium.so.*"
[1]: "/home/metadings/zguide/examples/C#/bin/Debug/x64/libsodium.so.*"
[2]: "/home/metadings/zguide/examples/C#/bin/Debug/amd64/libsodium.so"
[3]: "/home/metadings/zguide/examples/C#/bin/Debug/x64/libsodium.so"
[4]: "/usr/lib/x86_64-linux-gnu/libfakeroot/libsodium.so.*"
[5]: "/usr/lib/i386-linux-gnu/mesa/libsodium.so.*"
[6]: "/lib/i386-linux-gnu/libsodium.so.*"
[7]: "/usr/lib/i386-linux-gnu/libsodium.so.*"
[8]: "/usr/local/lib/libsodium.so.*"
[9]: "/lib/x86_64-linux-gnu/libsodium.so.*"
[10]: "/usr/lib/x86_64-linux-gnu/libsodium.so.*"
[11]: "/usr/lib/x86_64-linux-gnu/mesa-egl/libsodium.so.*"
[12]: "/usr/lib/x86_64-linux-gnu/mesa/libsodium.so.*"
[13]: "/usr/lib/x86_64-linux-gnu/libfakeroot/libsodium.so"
[14]: "/usr/lib/i386-linux-gnu/mesa/libsodium.so"
[15]: "/lib/i386-linux-gnu/libsodium.so"
[16]: "/usr/lib/i386-linux-gnu/libsodium.so"
[17]: "/usr/local/lib/libsodium.so"
[18]: "/lib/x86_64-linux-gnu/libsodium.so"
[19]: "/usr/lib/x86_64-linux-gnu/libsodium.so"
[20]: "/usr/lib/x86_64-linux-gnu/mesa-egl/libsodium.so"
[21]: "/usr/lib/x86_64-linux-gnu/mesa/libsodium.so"
Please do a git pull zeromq master
to try the changes.
I do need new binaries for the i386
, amd64
folders. Would you like to make the so
file?
from clrzmq4.
I've made the update v4.1.0.20... Let's try.
from clrzmq4.
I'm going to close this issue, because I changed to lookup for the .so
on Linux in multiple folders.
Now I'm also using a method EnumerateLibLdConf
which enumerates ld.so.conf
;
with the directive include /etc/ld.so.conf.d/*.conf
, the method also looks into folders /lib/
, /usr/lib/
, /usr/local/lib/
etc.
from clrzmq4.
Related Issues (20)
- News on ZeroMQ/clrzmq4 - New Initial Release HOT 4
- NuGet v4.1.0.28 does not include i386 and amd64 libs HOT 10
- latest v4.1.0.30 not include libsodium.dll while create instance HOT 1
- How do you see the times for request/reply messages processed?
- Fails to create ZContext under .net Core 3.0 HOT 7
- Heartbeat incompatibility with jeromq using curve
- Shared library issues with DotNet Core 2.1 under Linux HOT 1
- Nuget package with version that supports netstandard2.0 HOT 4
- Cannot get Ironhouse ZGuideExample to work
- Crash in ZSocket.SendMessage()
- Windows KERNELBASE exception and growing delay HOT 1
- Subscriptions not delivered to late publisher
- Missing Server/Client sockets HOT 1
- Non-conformant nuget package folder layout
- Please, make release with libzmq v4.3.4 included HOT 2
- Better signature to send string from ROUTER to DEALER
- NullReferenceException from ZeroMQ.ZPollItems.PollIn in ROUTER<-->DEALER communication
- Bug in public virtual bool Send(IEnumerable<ZFrame> frames, ZSocketFlags flags, out ZError error) HOT 2
- Correct handling of timeout during polling
- Receive event when a subscriber is connected
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clrzmq4.