1
votes

I installed IJulia package for sublime. When I start sublime, I got ZMQ shared library not found....

I try to find ZMQ from Julia:

julia> using ZMQ

julia> println(ZMQ.zmq)
C:\Users\Nick\.julia\v0.3\WinRPM\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin\libzmq.DLL

I open Package settings - IJulia - user, modified the path in this line:

    "zmq_shared_library": "~/.julia/v0.3/WinRPM/deps/usr/x86_64-w64-mingw32/sys-root/mingw/bin/libzmq.dll",

Restart sublime, I got this:

Unable to find an entry point ... libstdc++-6.dll

What's should I do?

Environment:

Windows 7, 64-bit
Julia v"0.3.8"
Sublime text 3

Update - kernel died

I found that there's an issue here:

https://github.com/quinnj/Sublime-IJulia/issues/64

To quote:

tildebyte commented on 28 Feb

Answering my own question: libstdc++-6.dll exists in 2 places: Sublime Text 3 Beta\Data\Packages\IJulia\windeps and .julia\v0.3\WinRPM\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin. i.e., the version shipping with the plugin doesn't match the one libzmq is linked against. I fixed it by copying down ZMQ's libstdc DLL from mingw\bin into the plugin's windeps dir. So, yes, I concur: @M-Marz libzmq is probably mismatched to the plugin OR he's got another libzmq somewhere in the path, which ST is finding first.

So I tried to copy the libstdc++-6.dll from .julia\v0.3\WinRPM\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin to Sublime Text 3 Beta\Data\Packages\IJulia\windeps.

Sublime stops complain ZMQ library not found or cannot found entry point; however, when I try Ctrl-shift-p, open ijulia, I got ***kernel died***.

I searched my system, found that there's several libstdc++-6.dll for several individual applications: Julia, Evernote, VLC ...

How could I figure out what's wrong?


Update - "kernel died" Solved

I found the same problem here:

https://github.com/quinnj/Sublime-IJulia/issues/60

Thanks to @GregPlowman:

Finally, after much playing around, I managed to get Sublime-IJulia working on Windows.

Seems some file paths are processed differently. (Maybe some by Windows directly, others by Julia with some parsing?).

In any case, care needs to be taken with file paths on Windows:

absolute or relative
quoting entire pathname (especially important if path name has spaces)
path separators ( forward or back slash / vs \ )

I played around with many combinations and got really confused. However I think the Julia executable path should be absolute, quoted (if spaces in path name) and use backslashes. ZMQ and kernel pathnames can be relative, should be unquoted, and use forward slash separator.

Here's the Windows extract from Sublime user settings file that worked for me:

"windows": { "zmq_shared_library": "~/.julia/v0.3/ZMQ/deps/usr/lib/libzmq.dll",
"commands": [ { "command_name": "default", "julia": "\"C:\Program Files\Julia-0.3.5\bin\julia.exe\"", "julia_args": "", "ijulia_kernel": "~/.julia/v0.3/IJulia/src/kernel.jl" } ] }

Note that to quote path name use \", and to use backslash path separator use \.

Cheers, Greg

Lesson learnt

When an opensourse software goes wrong, the first place to find solution is the issues from github. Thanks to @tidlebyte and @GregPlowman. (Both of them fired the issue, and found solution themselves.)

1
I think you could cut the solutions from your question and create an answer. Good job!mmagnuski
@Impon_de_Rable I did. Thanks for your reminding.Nick

1 Answers

2
votes

Brief answer:

Solution to ZMQ Library Not Found

Step 1:

(1) Copy everything from IJulia package settings - default to package settings - user.

(2) Find ZMQ lib path

julia> using ZMQ

julia> ZMQ.zmq
"C:\\Users\\Nick\\.julia\\v0.3\\WinRPM\\deps\\usr\\x86_64-w64-mingw32\\sys-root\\mingw\\bin\\libzmq.DLL"

(3) Modify the zmq_shared_library path according to (2).

Step 2: Copy libstdc++-6.dll from C:\\Users\\Nick\\.julia\\v0.3\\WinRPM\\deps\\usr\\x86_64-w64-mingw32\\sys-root\\mingw\\bin\\ to C:\Users\Nick\AppData\Roaming\Sublime Text 3\Packages\IJulia\windeps. (Yes, overwrite.)


Solution to Kernel Died

Modify the path in IJulia package settings - user

"windows": {
    "zmq_shared_library": "C:/Users/Nick/.julia/v0.3/WinRPM/deps/usr/x86_64-w64-mingw32/sys-root/mingw/bin/libzmq.DLL",
    "commands": [
        {
            "command_name": "default",
            // "julia": "julia-readline.exe",
            "julia": "\"C:\\application\\Julia-0.3.8\\bin\\julia.exe\"",
            "julia_args": "",
            "ijulia_kernel": "~/.julia/v0.3/IJulia/src/kernel.jl"
        }
    ]
}

Pay special attention to the quotes on path. Especially \" for quote the whole path.

Again, thanks to @tidlebyte and @GregPlowman for their early exploration and solution. If anybody got stuck on any of above steps, please let me know.