Coder Social home page Coder Social logo

Comments (3)

metadings avatar metadings commented on June 5, 2024

AHA... that sounds interesting... I am running an ubuntu GNU/Linux machine on a x64_86 processor...
CLRZMQ4 is actually implemented using GNU/C libdl.so.

CLRZMQ4 is currently looking ... into libdl.so (Platform will use Platform.Posix, because there is PlatformName.Posix)... for function pointers to dlopen, dlclose, dlerror and the like...

So you basically need to implement, for example a PlatformName.Example and a class Platform.Example, looking like

public static partial class Platform {

    public static class Example {

        public const string LibraryFileExtension = ".so";
        private const string KernelLib = "libdl";

        public static UnmanagedLibrary LoadUnmanagedLibrary(string libraryName) // ...
        public static SafeLibraryHandle OpenHandle(string filename) // ...
        public static IntPtr LoadProcedure(SafeLibraryHandle handle, string functionName) // ...
        public static bool ReleaseHandle(IntPtr handle) // ...
        public static Exception GetLastLibraryError() // ...

Finally you need to add a detection in Platform, to enable your PlatformName.Example, class Platform.Example:

static Platform() {
    // ...
    Version osVersion;
    switch (Environment.OSVersion.Platform) {
        case PlatformID.Win32Windows: // ...
            Kind = PlatformKind.Win32;
            Name = PlatformName.Windows;
            break;
        case PlatformID.Unix:
            Kind = PlatformKind.Posix;
            Name = PlatformName.Posix;
            break;
        default: // ...
    }
    // do some detection of your Platform and set the Name:
    //  Kind = PlatformKind.Posix;
    //  Name = PlatformName.Example;
    // ...

    SetupPlatformImplementation(typeof(Platform));
}

So you have a real Debian GNU/Linux... You need to look further :)

from clrzmq4.

metadings avatar metadings commented on June 5, 2024

I had the same problem... I installed Linux Mint instead of ubuntu. Now looking for a libld.so or libdl.so doesn't work... because there is a /lib/x86_64-linux-gnu/libdl.so.2 or the like....

I was used to have a workaround, simply by hardlinking ln libdl.so libdl.so.2.

Now I've made an update for the Platform and Platform.Posix class, to read the ld.so.conf and to read include /etc/ld.so.conf.d/*.conf. In Platform.Posix.EnumerateLibLdConf.

Please, do a git pull zeromq master to try the changes.

from clrzmq4.

metadings avatar metadings commented on June 5, 2024

I'm going to close the issue. Package is live on nuget.org.

from clrzmq4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.