These are chat archives for symengine/symengine

22nd
Oct 2017
Shikhar Jaiswal
@ShikharJ
Oct 22 2017 15:50
Is there a way I can install the symengine-0.2.0 package without downgrading my current installation of symengine-0.3.0 using conda?
Isuru Fernando
@isuruf
Oct 22 2017 15:50
use a new environment
Shikhar Jaiswal
@ShikharJ
Oct 22 2017 16:00
But I'm still getting this error:
sudo gem install symengine -- -DSymEngine_DIR=home/shikhar/miniconda3/envs/myenvironment
[sudo] password for shikhar: 
Building native extensions with: '-DSymEngine_DIR=home/shikhar/miniconda3/envs/myenvironment'
This could take a while...
ERROR:  Error installing symengine:
    ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.3.0/gems/symengine-0.0.2/ext/symengine
/usr/bin/ruby2.3 -r ./siteconf20171022-26457-1kx5z63.rb extconf.rb -DSymEngine_DIR=home/shikhar/miniconda3/envs/myenvironment
-- The C compiler identification is GNU 7.2.0
-- The CXX compiler identification is GNU 7.2.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Ruby: /usr/bin/ruby2.3 (found version "2.3.0") 
-- Configuring done
-- Generating done
-- Build files have been written to: /var/lib/gems/2.3.0/gems/symengine-0.0.2/ext/symengine

current directory: /var/lib/gems/2.3.0/gems/symengine-0.0.2/ext/symengine
make "DESTDIR=" clean

current directory: /var/lib/gems/2.3.0/gems/symengine-0.0.2/ext/symengine
make "DESTDIR="
Scanning dependencies of target symengine_ruby
[ 14%] Building C object ext/symengine/CMakeFiles/symengine_ruby.dir/ruby_basic.c.o
In file included from /var/lib/gems/2.3.0/gems/symengine-0.0.2/ext/symengine/ruby_basic.h:5:0,
                 from /var/lib/gems/2.3.0/gems/symengine-0.0.2/ext/symengine/ruby_basic.c:1:
/usr/local/include/symengine/cwrapper.h:171:53: error: unknown type name ‘mpz_t’
 CWRAPPER_OUTPUT_TYPE integer_set_mpz(basic s, const mpz_t i);
                                                     ^~~~~
/usr/local/include/symengine/cwrapper.h:207:38: error: unknown type name ‘mpz_t’
 CWRAPPER_OUTPUT_TYPE integer_get_mpz(mpz_t a, const basic s);
                                      ^~~~~
/usr/local/include/symengine/cwrapper.h:218:39: error: unknown type name ‘mpq_t’
 CWRAPPER_OUTPUT_TYPE rational_get_mpq(mpq_t a, const basic s);
                                       ^~~~~
/usr/local/include/symengine/cwrapper.h:220:54: error: unknown type name ‘mpq_t’
 CWRAPPER_OUTPUT_TYPE rational_set_mpq(basic s, const mpq_t i);
                                                      ^~~~~
/usr/local/include/symengine/cwrapper.h:229:53: error: unknown type name ‘mpq_t’
 CWRAPPER_OUTPUT_TYPE complex_set_mpq(basic s, const mpq_t re, const mpq_t im);
                                                     ^~~~~
/usr/local/include/symengine/cwrapper.h:229:69: error: unknown type name ‘mpq_t’
 CWRAPPER_OUTPUT_TYPE complex_set_mpq(basic s, const mpq_t re, const mpq_t im);
                                                                     ^~~~~
/var/lib/gems/2.3.0/gems/symengine-0.0.2/ext/symengine/ruby_basic.c: In function ‘cbasic_add’:
/var/lib/gems/2.3.0/gems/symengine-0.0.2/ext/symengine/ruby_basic.c:50:45: warning: passing argument 3 of ‘cbasic_binary_op’ from incompatible pointer type [-Wincompatible-pointer-types]
     return cbasic_binary_op(self, operand2, basic_add);
                                             ^~~~~~~~~
/var/lib/gems/2.3.0/gems/symengine-0.0.2/ext/symengine/ruby_basic.c:18:7: note: expected ‘void (*)(basic_struct *, const basic_struct *, const basic_struct *) {aka void (*)(struct CRCPBasic_C *, const struct CRCPBasic_C *, const struct CRCPBasic_C *)}’ but argument is of type ‘CWRAPPER_OUTPUT_TYPE (*)(basic_struct *, const basic_struct *, const basic_struct *) {aka enum <anonymous> (*)(struct CRCPBasic_C *, const struct CRCPBasic_C *, const struct CRCPBasic_C *)}’
 ......
Isuru Fernando
@isuruf
Oct 22 2017 16:01
-DSymEngine_DIR=home/shikhar/miniconda3/envs/myenvironment -> -DSymEngine_DIR=/home/shikhar/miniconda3/envs/myenvironment
Shikhar Jaiswal
@ShikharJ
Oct 22 2017 16:09
irb
irb(main):001:0> require 'symengine'
LoadError: libsymengine.so: cannot open shared object file: No such file or directory - /var/lib/gems/2.3.0/gems/symengine-0.0.2/lib/symengine/symengine.so
    from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /var/lib/gems/2.3.0/gems/symengine-0.0.2/lib/symengine.rb:1:in `<top (required)>'
    from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `require'
    from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `rescue in require'
    from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
    from (irb):1
    from /usr/bin/irb:11:in `<main>'
irb(main):002:0> exit
Can you also tell why this is happening?
Isuru Fernando
@isuruf
Oct 22 2017 16:09
Is there a file called /var/lib/gems/2.3.0/gems/symengine-0.0.2/lib/symengine/symengine.so?
Shikhar Jaiswal
@ShikharJ
Oct 22 2017 16:11
Yes
Isuru Fernando
@isuruf
Oct 22 2017 16:11
output of ldd /var/lib/gems/2.3.0/gems/symengine-0.0.2/lib/symengine/symengine.so?
Shikhar Jaiswal
@ShikharJ
Oct 22 2017 16:13
linux-vdso.so.1 =>  (0x00007ffdbb3fc000)
    libsymengine.so => not found
    libruby-2.3.so.2.3 => /usr/lib/x86_64-linux-gnu/libruby-2.3.so.2.3 (0x00007f98e5e0b000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f98e5a2b000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f98e580c000)
    libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f98e558c000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f98e5388000)
    libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f98e5150000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f98e4dfa000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f98e648f000)
Isuru Fernando
@isuruf
Oct 22 2017 16:13
Do export LD_LIBRARY_PATH=/home/shikhar/miniconda3/envs/myenvironment/lib:$LD_LIBRARY_PAT
Shikhar Jaiswal
@ShikharJ
Oct 22 2017 16:18
Thanks that worked.
Shikhar Jaiswal
@ShikharJ
Oct 22 2017 16:26
@isuruf I there also a way that I can link the same to the IPython Notebook? While the interpreter in my machine works totally fine. The ipython notebook errors out similarly as above.
Isuru Fernando
@isuruf
Oct 22 2017 16:27
start the ipython notebook from a terminal after running the command above
Shikhar Jaiswal
@ShikharJ
Oct 22 2017 16:30
:+1:
Isuru Fernando
@isuruf
Oct 22 2017 16:31
What's the issue with symengine 0.3.0 and symengine.rb ?
Shikhar Jaiswal
@ShikharJ
Oct 22 2017 16:34
I was getting the very first error above, and you had suggested using 0.2.0.
Isuru Fernando
@isuruf
Oct 22 2017 16:39
Fixed here, symengine/symengine#1349