-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
symengine.rb does not work with static libruby, requires shared object but does not enforce requirement #28
Comments
Thanks @MohawkJohn for trying it! Any ideas what might be causing this? |
Only thing I can come up with is that it's not correctly linking libruby. For example, see this bug: brianmario/mysql2#657 Unfortunately, when I do I've also tried removing my system ruby — so only rbenv versions remain — and it doesn't appear to help. I do notice that symengine.rb's Okay, that may have put me onto something: rbenv/ruby-build#35 Testing my hypothesis now. |
@abinashmeher999, @isuruf, any ideas? |
@MohawkJohn, can you reinstall with this line uncommented https://github.com/symengine/symengine.rb/blob/master/cmake/FindRuby.cmake#L54 and then post the build log? |
Okay! I found the problem. symengine.rb requires that libruby be a shared object, which rb-env/ruby-build doesn't produce by default. So two things need to be done:
|
@MohawkJohn do most Ruby libraries link the static |
Honestly, I'm unsure. My intuition tells me you need the shared object, but I can't say why in this case. |
@MohawkJohn Thanks for reporting this! I use rbenv too but as far as I remember I didn't have to do anything like |
Oops my mistake. I had been using rvm not rbenv. I got a little confused. |
I tried with
I tried setting CFLAGS, but it doesn't seem to pick it up.
|
I just did a fresh install of symengine and symengine.rb on an Ubuntu VM. My Ruby is 2.3.0 in rbenv (user install). There are no errors when I build/install the gem, which is cloned from github (HEAD).
Unfortunately, when I attempt to load symengine in pry, I get the following error:
I tried building the gem manually, using cmake, and checked that the Ruby paths were correct in the cmake config. They are — they point to the rbenv ruby-2.3.0 headers.
UPDATE: I get the same error when attempting to use Ruby 2.2.4.
The text was updated successfully, but these errors were encountered: