symengine / symengine.py

Python wrappers for SymEngine
MIT License
167 stars 64 forks source link

Build issues #60

Closed Sumith1896 closed 8 years ago

Sumith1896 commented 8 years ago

Received a mail today saying the following. I am a bit busy with my end semesters, could somebody check on this? "I am having a lots of problem in installing symengine wrapper for python on a Mac, do you have a guide or something? I have correctly installed the library, or at lest i think, but not the wrapper, i attach the errors:

Giovannis-MacBook-Pro:symengine.py-master giovanniranuzzi$ sudo python setup.py install
Password:
//anaconda/lib/python2.7/site-packages/setuptools-20.2.2-py2.7.egg/setuptools/dist.py:285: UserWarning: Normalizing '0.1.0.dev' to '0.1.0.dev0'
running install
running build
SymEngine_DIR : /usr/local/lib/cmake/symengine
-- Python include path: //anaconda/include/python2.7
-- Python version: 2.7
-- Python install path: //anaconda/lib/python2.7/site-packages
-- Found CYTHON: cython
CMAKE_BUILD_TYPE : Release
CMAKE_CXX_FLAGS_RELEASE : -std=c++11 -Wall -Wextra -fPIC -O3 -march=native -ffast-math -funroll-loops -Wno-unused-parameter -D__extern_always_inline=inline
CMAKE_CXX_FLAGS_DEBUG : -std=c++11 -Wall -Wextra -fPIC -g -Wno-unused-parameter -ggdb
HAVE_SYMENGINE_MPFR : False
HAVE_SYMENGINE_MPC : False
HAVE_SYMENGINE_PIRANHA : False
HAVE_SYMENGINE_FLINT : False
Copying source of python wrappers into: /Users/giovanniranuzzi/Desktop/symengine.py-master
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/giovanniranuzzi/Desktop/symengine.py-master
[ 25%] Building CXX object symengine/lib/CMakeFiles/symengine_wrapper.dir/symengine_wrapper.cpp.o
/Users/giovanniranuzzi/Desktop/symengine.py-master/symengine/lib/symengine_wrapper.cpp:36461:49: error: non-const lvalue reference to type
      'SymEngine::MatrixBase' cannot bind to a value of unrelated type 'unsigned int'
  (*__pyx_v_self->__pyx_base.thisptr).submatrix(__pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, (*__pyx_v_result->__pyx_base.thisptr));
                                                ^~~~~~~~~
/usr/local/lib/cmake/symengine/../../../include/symengine/matrix.h:55:40: note: passing argument to parameter 'result' here
    virtual void submatrix(MatrixBase &result, unsigned row_start,
                                       ^
^[[A1 error generated.
make[2]: *** [symengine/lib/CMakeFiles/symengine_wrapper.dir/symengine_wrapper.cpp.o] Error 1
make[1]: *** [symengine/lib/CMakeFiles/symengine_wrapper.dir/all] Error 2
make: *** [all] Error 2
Traceback (most recent call last):
  File "setup.py", line 190, in <module>
    'install' : InstallWithCmake,
  File "//anaconda/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "//anaconda/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "//anaconda/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "setup.py", line 171, in run
    _install.run(self)
  File "//anaconda/lib/python2.7/site-packages/setuptools-20.2.2-py2.7.egg/setuptools/command/install.py", line 65, in run
  File "//anaconda/lib/python2.7/distutils/command/install.py", line 563, in run
    self.run_command('build')
  File "//anaconda/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "//anaconda/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "setup.py", line 110, in run
    self.cmake_build()
  File "setup.py", line 90, in cmake_build
    raise EnvironmentError("error building project")
EnvironmentError: error building project

probably, according with these(http://stackoverflow.com/questions/18565167/non-const-lvalue-references), is a problem of the complier, but i really don’t know haw to solve it, may you kingly help me please? Do you have any solution for these problem?"

isuruf commented 8 years ago

This is because of using the latest SymEngine master and Python wrappers don't support that version. There's a file called symengine_version.txt in the root folder with the SymEngine commit supported. This is documented in README.md

Pull request to make the wrappers work with latest SymEngine master is still a work in progress

Sumith1896 commented 8 years ago

Thanks @isuruf I have replied to him on the thread. This should be resolved then.

certik commented 8 years ago

I believe Travis tests this repo on a Mac, so things should work.

Sent from my mobile phone. On Apr 18, 2016 1:07 PM, "Sumith" notifications@github.com wrote:

Thanks @isuruf https://github.com/isuruf I have replied to him on the thread. This should be resolved then.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/symengine/symengine.py/issues/60#issuecomment-211534174

Ranuzzi commented 8 years ago

Thank you guys, so for what i have understood i should wait for the working version of the wrapper because is not possible find an old version of the library, right?Or maybe I can try to use the Tavis version but I don't know where I can find it.

isuruf commented 8 years ago

While the wrapper is updated you can use the SymEngine version mentioned at https://github.com/symengine/symengine.py/blob/master/symengine_version.txt

After cloning https://github.com/symengine/symengine, do git checkout b5c453f73152dc1b0ec3a39186e5137d48061655 and then install the symengine C++ library.

symengine.py should compile after that

Ranuzzi commented 8 years ago

Okok, now it is working, thank you