These are chat archives for symengine/symengine

16th
Jan 2019
Shekhar Prasad Rajak
@Shekharrajak
Jan 16 05:52

Hi,

I am very much interested to understand the symengine.rb codebase. I found this wiki page very useful and understood the Ruby C extension properly. But still didn't get the CMake concepts used in the symengine.rb , any ways there is no cmake commands, we are running during the development .

Please let me know how cmake and CMakeLists.txt is used in the symengine.rb . I will appreciate sharing of any useful links. Thanks!

Isuru Fernando
@isuruf
Jan 16 05:57
extconf.rb calls cmake to build the extension
Shekhar Prasad Rajak
@Shekharrajak
Jan 16 06:03
Thanks @isuruf , I mostly found the tutorial for Ruby C extension using mkmf gem. In symengine.rb , rbconfig is used.If you have any tutorial link for it, please share . I have gone through this sciruby blog post and trying to understand how it is developed.
Isuru Fernando
@isuruf
Jan 16 06:06
I don't have a link for it. For symengine.rb, we decided on on using cmake because symengine C++ library was developed using cmake and therefore we can use existing cmake files for managing dependencies. mkmf is good for projects without lots of dependencies
Shekhar Prasad Rajak
@Shekharrajak
Jan 16 06:13
Thanks @isuruf ! I also tried to debug my changes using gdb, I found that it is already there in bin/gdb.sh. Can you please let me know how to use it for extension ?
Isuru Fernando
@isuruf
Jan 16 06:15
I've no idea what that script does, but you can run gdb as usual
run gdb ruby and then in the gdb shell do run irb
Shekhar Prasad Rajak
@Shekharrajak
Jan 16 06:21
Thanks a lot @isuruf ! It will help to understand the symengine.rb and usage of rbconfig in Ruby C extension.