These are chat archives for symengine/symengine

18th
Jun 2015
Ondřej Čertík
@certik
Jun 18 2015 02:59
@isuruf Oto replied in the cmake list. He has some interesting points. I wonder if this truly fixes everything or not.

@abinashmeher999 try downloading FindPackageHandleStandardArgs.cmake from cmake 2.8, they probably use some syntax that requires a newer cmake. However, it is already there, so I am confused. I.e. in our cmake, we have lines like these:

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GMP DEFAULT_MSG GMP_LIBRARIES
    GMP_INCLUDE_DIRS)

And it works on Travis, so I don't think you need to include this package.

Isuru Fernando
@isuruf
Jun 18 2015 04:51

@abinashmeher999, FindRuby.cmake includes that package with the assumption that it is in the same directory.

include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)

Try the way @certik mentioned

include(FindPackageHandleStandardArgs)
Isuru Fernando
@isuruf
Jun 18 2015 04:57
@certik, I tried to install symengine headers in a folder symengine. To include it from another library you have to do symengine/basic.h. How do we get the same behaviour for test file so that they use symengine/basic.h? If you change to symengine/basic.h in test files, it is not found
Abinash Meher
@abinashmeher999
Jun 18 2015 09:40
@isuruf I should remove the new FindPackageHandleStandardArgs.cmake. So should I try what @certik said with or without the FindPackageHandleStandardArgs.cmake from cmake 2.8? I will try both till then.
Abinash Meher
@abinashmeher999
Jun 18 2015 12:27
So I tried with both the new and the old versions of the file, with and without them. Without them the command cmake -DWITH_RUBY=yes . says that it couldn't find the file FindPackageHandleStandardArgs. I tried the way @certik mentioned. In that case, it couldn't find the file again. I also tried replacing CMAKE_CURRENT_LIST_DIR with CMAKE_MODULE_PATH, but none of them worked. You already know the error the new version showed. the old one shows
abinashmeher999@JARVIS:~/gsoc/symengine$ cmake -DWITH_RUBY=yes .
CMake Error at cmake/FindPackageHandleStandardArgs.cmake:70 (MESSAGE):
  REQUIRED_VARS (missing: VERSION_VAR)
Call Stack (most recent call first):
  cmake/FindRuby.cmake:273 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:243 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/abinashmeher999/gsoc/symengine/CMakeFiles/CMakeOutput.log".
Isuru Fernando
@isuruf
Jun 18 2015 12:37
Can you post your FindRuby.cmake?
Isuru Fernando
@isuruf
Jun 18 2015 12:40
Abinash Meher
@abinashmeher999
Jun 18 2015 12:43
Did that
This is the result
abinashmeher999@JARVIS:~/gsoc/symengine$ cmake -DWITH_RUBY=yes .
CMake Error at cmake/FindRuby.cmake:251 (include):
  include could not find load file:

    FindPackageHandleStandardArgs.cmake
Call Stack (most recent call first):
  CMakeLists.txt:243 (find_package)


-- Python version: 2.7
-- Python install path: /usr/lib/python2.7/dist-packages
-- Found CYTHON: /usr/bin/cython


Configuration results
---------------------
C++ compiler: /usr/bin/c++
Build type: Debug
C++ compiler flags: -std=c++0x -Wall -Wextra -fPIC -g -Wno-unused-parameter -ggdb
Installation prefix: /usr/local
WITH_SYMENGINE_ASSERT: yes
WITH_SYMENGINE_RCP: yes
WITH_SYMENGINE_THREAD_SAFE: no
GMP_INCLUDE_DIRS: /usr/include
GMP_LIBRARIES: /usr/lib/x86_64-linux-gnu/libgmpxx.so;/usr/lib/x86_64-linux-gnu/libgmp.so
WITH_BFD: yes
BFD_INCLUDE_DIRS: /usr/include
BFD_LIBRARIES: /usr/lib/libbfd.so
LINKH_INCLUDE_DIRS: /usr/include
EXECINFO_INCLUDE_DIRS: /usr/include
WITH_PYTHON: yes
Python library: /usr/lib/x86_64-linux-gnu/libpython2.7.so
Python include path: /usr/include/python2.7
Python install path: /usr/lib/python2.7/dist-packages
Cython path: /usr/bin/cython
WITH_RUBY: yes
RUBY_INCLUDE_DIRS: /home/abinashmeher999/.rvm/rubies/ruby-2.2.0/include/ruby-2.2.0;/home/abinashmeher999/.rvm/rubies/ruby-2.2.0/include/ruby-2.2.0/x86_64-linux
RUBY_LIBRARY: /home/abinashmeher999/.rvm/rubies/ruby-2.2.0/lib/libruby.so
WITH_ECM: no
WITH_PRIMESIEVE: no
WITH_ARB: no
WITH_MPFR: no
WITH_PIRANHA: no
WITH_BOOST: no
WITH_PTHREAD: no
WITH_MPC: no
WITH_TCMALLOC: no
WITH_OPENMP: no
Copying source of python wrappers into: /home/abinashmeher999/gsoc/symengine
-- Configuring incomplete, errors occurred!
See also "/home/abinashmeher999/gsoc/symengine/CMakeFiles/CMakeOutput.log".
Oops my mistake
I didn't remove .cmake
It works now
Isuru Fernando
@isuruf
Jun 18 2015 12:50
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) this line does not use cmake installation's FindPackageHandleStandardArgs but rather searches it in the project, which was fine when the project was cmake.
Abinash Meher
@abinashmeher999
Jun 18 2015 12:52
I see. Thanks for the help! :smiley:
Isuru Fernando
@isuruf
Jun 18 2015 15:10
@sushant-hiray @certik, did you have the time to test my cmake branch of sage on OSX 10.10?
Isuru Fernando
@isuruf
Jun 18 2015 16:27
@certik, Travis-ci has a docker based solution which is supposed to be faster and provides less queue time, but sudo is not allowed.
To make it work on travis, we've got to add libecm-dev to apt whitelist and then when installing libraries like Arb, we have to install them into a folder without root access.
What do you think?
Isuru Fernando
@isuruf
Jun 18 2015 16:54
Good news
clang tests work fine in OS X.
For gcc, we need to define uint and ulong or use full form
Ondřej Čertík
@certik
Jun 18 2015 17:08
@isuruf can you post the link to the failed gcc build on os x?
I am glad we test it.
Ondřej Čertík
@certik
Jun 18 2015 17:09
Yes, if docker is faster, we should use it. We can use anaconda to install into non-root I think. We should create binary packages for all our dependencies anyway.
(for conda probably)
@isuruf can you post instructions how to test your cmake branch? I can do that if it doesn't take too long.
Isuru Fernando
@isuruf
Jun 18 2015 17:13
If you have already built sage it won't take too much time.
Checkout to my branch.
Place ​cmake source from http://www.cmake.org/files/v3.2/cmake-3.2.1.tar.gz into upstream folder.
sage -i cmake to build it
sage -i -c cmake to build and test it
Ondřej Čertík
@certik
Jun 18 2015 17:15
which branch should I checkout?
Isuru Fernando
@isuruf
Jun 18 2015 17:15
cmake branch
Isuru Fernando
@isuruf
Jun 18 2015 17:26

for uint I could use something like

#ifdef __GNUC__ && __APPLE__
           typedef unsigned int uint
           typedef unsigned long ulong
#endif

but that's not really portable.

Ondřej Čertík
@certik
Jun 18 2015 17:27
I would never use unit and ulong, but rather type it out in the long form. I vaguely remember already fixing these, but I guess it crept in again.
Isuru Fernando
@isuruf
Jun 18 2015 17:28
Yes, we fixed those earlier, but there are usages in Polynomial
Isuru Fernando
@isuruf
Jun 18 2015 17:43
Fixed them
Ondřej Čertík
@certik
Jun 18 2015 21:08
@isuruf I won't be able to check this till Monday, sorry about that. I had too much stuff to finish today.