These are chat archives for symengine/symengine

1st
Sep 2016
Spencer Lyon
@sglyon
Sep 01 2016 14:11
Hey @isuruf are you around?
Isuru Fernando
@isuruf
Sep 01 2016 14:12
yes
Spencer Lyon
@sglyon
Sep 01 2016 14:12
Excellent. I figured out how to make the conda installed libsymengine work for OSX.
I also wanted to ask if the conda symengine can also work for windows?
Isuru Fernando
@isuruf
Sep 01 2016 14:12
Ah great. What was the reason for it not working before
Spencer Lyon
@sglyon
Sep 01 2016 14:13
I think before there was an issue with the dylib, but this time the lib was ok.
Isuru Fernando
@isuruf
Sep 01 2016 14:13
I'm not sure. conda symengine for windows was compiled with MSVC15. I don't know whether that'll be compatible with the MinGW version julia is using
Spencer Lyon
@sglyon
Sep 01 2016 14:13
I don’t have a windows machine so I can’t check, but if all 3 OSs work via conda that would be great!
the change I had to make to get the conda libsymengine to work for OSX is here: https://github.com/symengine/SymEngine.jl/pull/34#issuecomment-244089664
Isuru Fernando
@isuruf
Sep 01 2016 14:14
Yes, build.jl would be a lot simpler
Last line should be changed to @BinDeps.install Dict([(:symengine, :libsymengine)])
That would also make it work
Spencer Lyon
@sglyon
Sep 01 2016 14:16
That actually didn’t work for me
Isuru Fernando
@isuruf
Sep 01 2016 14:18
Let me check whether conda binaries work on Windows. Then we can use that for all OSs, and remove building from source
Spencer Lyon
@sglyon
Sep 01 2016 14:19
that would be great
I’m going submit aPR against your branch for the OS X related fixes
Isuru Fernando
@isuruf
Sep 01 2016 14:20
If conda binaries work on Windows, I'll probably close that PR and start again.
Spencer Lyon
@sglyon
Sep 01 2016 14:20
Ahh too late PR submitted
ok good luck. I hope windows works also so SymEngine.jl will be easy to install on all platforms!
Isuru Fernando
@isuruf
Sep 01 2016 14:43
Conda.jl doesn't seem to like custom channels on Windows
Spencer Lyon
@sglyon
Sep 01 2016 14:44
Hmm. that’s odd.
Spencer Lyon
@sglyon
Sep 01 2016 14:45
The link is broken
Isuru Fernando
@isuruf
Sep 01 2016 14:46
Edited
Spencer Lyon
@sglyon
Sep 01 2016 14:51
Great thanks. What’s the issue caused by that line?
Isuru Fernando
@isuruf
Sep 01 2016 14:53
startswith is the problem. If gmp was from defaults the package name would be gmp, instead it is conda-forge::gmp
Spencer Lyon
@sglyon
Sep 01 2016 14:53
Ahh I see. Why is that only an issue on Windows?
Spencer Lyon
@sglyon
Sep 01 2016 14:54
lol ok
Good sleuthing
Isuru Fernando
@isuruf
Sep 01 2016 15:01
Now it builds, but deps.jl is empty and there are load errors
Spencer Lyon
@sglyon
Sep 01 2016 15:08
Hmm. building should create a deps.jl file
Isuru Fernando
@isuruf
Sep 01 2016 15:08
it does, but there's no load function called in it
Spencer Lyon
@sglyon
Sep 01 2016 15:09
So the @checked_lib libsymengine “path” line isn’t there?
Isuru Fernando
@isuruf
Sep 01 2016 15:09
yes, it isn't there
Isuru Fernando
@isuruf
Sep 01 2016 15:18
If I manually add that line, it works
Spencer Lyon
@sglyon
Sep 01 2016 15:18
That’s very strange. I wonder why it didn’t add it.
Isuru Fernando
@isuruf
Sep 01 2016 15:35
I removed the package and installed again and it works
Spencer Lyon
@sglyon
Sep 01 2016 15:36
Oh ok great. So all the OSs install with conda now?
Isuru Fernando
@isuruf
Sep 01 2016 15:36
yes
Spencer Lyon
@sglyon
Sep 01 2016 15:36
:tada:
Isuru Fernando
@isuruf
Sep 01 2016 16:05
@spencerlyon2, are you there?
Spencer Lyon
@sglyon
Sep 01 2016 16:05
Yep, but I have to leave fairly soon
Isuru Fernando
@isuruf
Sep 01 2016 16:06

Okay. Let me know if

using BinDeps
using Compat
using Conda
@BinDeps.setup

libsymengine = library_dependency("symengine", aliases=["libsymengine", "symengine"])

prefix = joinpath(BinDeps.depsdir(libsymengine), "usr")

Conda.add_channel("conda-forge")
Conda.add_channel("symengine")
provides(Conda.Manager, "symengine==0.2.0", [libsymengine])

@BinDeps.install Dict([(:libsymengine, :libsymengine)])

works on OS X

Also can you check whether your PR is needed where you changed :libsymengine to libsymengine
Spencer Lyon
@sglyon
Sep 01 2016 16:07
yep, will do
I think I’m seeing what you just saw on windows
SymEngine|deps2⚡ ⇒ cat deps/deps.jl
# This is an auto-generated file; do not edit

# Pre-hooks

# Macro to load a library
macro checked_lib(libname, path)
    ((VERSION >= v"0.4.0-dev+3844" ? Base.Libdl.dlopen_e : Base.dlopen_e)(path) == C_NULL) && error("Unable to load \n\n$libname ($path)\n\nPlease re-run Pkg.build(package), and restart Julia.")
    quote const $(esc(libname)) = $path end
end

# Load dependencies

# Load-hooks
Isuru Fernando
@isuruf
Sep 01 2016 16:11
I had to remove the folder and start fresh
Spencer Lyon
@sglyon
Sep 01 2016 16:11
ok
which folder?
Isuru Fernando
@isuruf
Sep 01 2016 16:13
~/.julia/v0.4/SymEngine
using BinDeps
using Compat
using Conda
@BinDeps.setup

libsymengine = library_dependency("libsymengine", aliases=["libsymengine", "symengine"])

prefix = joinpath(BinDeps.depsdir(libsymengine), "usr")

Conda.add_channel("conda-forge")
Conda.add_channel("symengine")
provides(Conda.Manager, "symengine==0.2.0", [libsymengine])

@BinDeps.install Dict([(:libsymengine, :libsymengine)])
Can you try above?
Spencer Lyon
@sglyon
Sep 01 2016 18:11
Hey sorry @isuruf I had to leave. I will try to come back to this again tonight
Isuru Fernando
@isuruf
Sep 01 2016 18:12
No problem. I've sent a new PR and it works on OS X on travis. So it will probably work for you as well.
Spencer Lyon
@sglyon
Sep 01 2016 19:00
Excellent. The new PR seems to work really well
Isuru Fernando
@isuruf
Sep 01 2016 19:22
Thanks for having a look. Can you add a review to the PR? Did you check in your computer?
Spencer Lyon
@sglyon
Sep 01 2016 19:24
Yep, just tried it. Works perfectly
Isuru Fernando
@isuruf
Sep 01 2016 19:29
What's the process of registering a package in Julia? I was thinking about tagging master and pushing a release
Spencer Lyon
@sglyon
Sep 01 2016 19:29
That would be awesome. Are you on Julia 0.4?
Isuru Fernando
@isuruf
Sep 01 2016 19:29
yes
Spencer Lyon
@sglyon
Sep 01 2016 19:29
You need to do the following:
  • Pkg.update()
  • Pkg.register(“SymEngine”)
  • Pkg.tag(“SymEngine”, :minor) (the :minor puts you at version 0.1.0)
  • Pkg.publish()
It is likely that the last step will fail, if so let me know
There are a lot of places where I’ve seen that step go wrong
ON the other hand, I’m happy to register it for you if you’d like.
This message was deleted
Isuru Fernando
@isuruf
Sep 01 2016 19:31
Pkg.register tagged it to 0.1.0 and the 3rd step tagged it to 0.2.0
Spencer Lyon
@sglyon
Sep 01 2016 19:32
oh sorry. It should be easy enough to revert that if you’d like
Isuru Fernando
@isuruf
Sep 01 2016 19:32
How do I revert that?
Spencer Lyon
@sglyon
Sep 01 2016 19:32
You’ll want to go to the repo to remove the git tag (git tag -d v0.2.0)
Then go to ~/.julia/v0.4/METADATA.jl and remove the commit that tagged SymEngine at v0.2.0 (I usually do a git reset --hard PREVIOUS_SHA1)
That should be it
Then you can try Pkg.publish()
Isuru Fernando
@isuruf
Sep 01 2016 19:45
JuliaLang/METADATA.jl#6216
Thanks for the help
Spencer Lyon
@sglyon
Sep 01 2016 19:50
Great work. Looking forward to using it