These are chat archives for symengine/symengine

19th
Nov 2014
Chris Swierczewski
@cswiercz
Nov 19 2014 23:04
Has anyone tried compiling csympy in OSX? My guess is that I need to install a non-XCode c++ compiler.
Aaron Meurer
@asmeurer
Nov 19 2014 23:04
Which version of OS X?
Chris Swierczewski
@cswiercz
Nov 19 2014 23:05
10.10.1 "Yosemite"
Aaron Meurer
@asmeurer
Nov 19 2014 23:05
It doesn't work unless Ondřej has fixed things
Chris Swierczewski
@cswiercz
Nov 19 2014 23:06
Is that a common philosophy? :)
I'm excited to see the progress on csympy. Thanks to all the contributors for making it possible!
Aaron Meurer
@asmeurer
Nov 19 2014 23:07
I'm sure if you are will to help @certik out he can get it working.
He doesn't have OS X to test on
CSymPy uses C++11 so it's kind of non portable
I just tried building now and got a ton of error like
/Users/aaronmeurer/Documents/python/sympy/csympy/src/rational.h:230:36: error: a space is required between consecutive right angle brackets
      (use '> >')
        const Ptr<RCP<const Integer>> &den);
                                   ^~
                                   > >
Chris Swierczewski
@cswiercz
Nov 19 2014 23:10
Yeah, I've seen a couple of those. The very first error thrown during compile was:
[  4%] Building CXX object src/CMakeFiles/csympy.dir/basic.cpp.o
In file included from /Users/cswiercz/csympy/src/basic.cpp:1:
In file included from /Users/cswiercz/csympy/src/basic.h:20:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/atomic:539:2: error: <atomic> is not implemented
#error <atomic> is not implemented
 ^
So it looks like OSX's compiler might be to blame...
Aaron Meurer
@asmeurer
Nov 19 2014 23:11
the code ought to be portable
I don't know enough about Cmake to know how to make it use gcc
Chris Swierczewski
@cswiercz
Nov 19 2014 23:13
I've installed cmake. However, I might be onto something. When I run
[cswiercz@jude csympy] CXX=clang++ cmake -DWITH_PYTHON=yes .
cmake tells me that the compiler is still set to c++. I'll see if I can get that working first.
Chris Swierczewski
@cswiercz
Nov 19 2014 23:22
Darn. So after deleting all of the CMake autogenerated files and setting CXX to both clang and clang++ I still get some similar errors.
Anyway, thanks for the response, @asmeurer .
Aaron Meurer
@asmeurer
Nov 19 2014 23:28
clang is the default compiler
I want to know how to set it to gcc
but you have to use a different gcc from the one that comes with Xcode, as that's just a wrapper to clang
like homebrew's gcc
you can tell you're using clang if you get the colorful error messages
Chris Swierczewski
@cswiercz
Nov 19 2014 23:30
It's definitely using clang. My guess is that you would provide the full path to homebrew gcc when setting the CXX environment variable in the cmake command.
Aaron Meurer
@asmeurer
Nov 19 2014 23:30
I tried that
well not the full path, but that shouldn't matter
oh here we go
I guess I needed to clean stuff
so the gcc error is
This message was deleted
/var/folders/yc/8wpl9rlx47qgzxqpcf003k280000gn/T//ccGnmqnK.s:631:no such instruction: `vzeroupper'
Chris Swierczewski
@cswiercz
Nov 19 2014 23:31
Yeah. It took me a while to figure that out. make clean doesn't delete all of the cmake temp output.
Aaron Meurer
@asmeurer
Nov 19 2014 23:32
You can use git clean -df and git clean -Xdf
Chris Swierczewski
@cswiercz
Nov 19 2014 23:32
Ha ha. I forgot about that one. Thanks.
Aaron Meurer
@asmeurer
Nov 19 2014 23:32
although one of those should not be necessary
the .gitignore needs to be updated
Chris Swierczewski
@cswiercz
Nov 19 2014 23:33
Wow. There were many more temp files than I thought. Trying the clang / clang++ compile again...
Darn. Same errors, many "consecutive right brackets". I remember reading something about how C++ compilers can't tell the difference between bit shifting and nested template, hence the error.
Aaron Meurer
@asmeurer
Nov 19 2014 23:38
I guess you can try fixing them.
There was some ther error too
*Other
there's also another error buried in there
/Users/aaronmeurer/Documents/python/sympy/csympy/src/basic.h:93:20: error: expected '('
    Basic() : hash_{0}
                   ^
/Users/aaronmeurer/Documents/python/sympy/csympy/src/basic.h:93:22: error: expected ';' after expression
    Basic() : hash_{0}
                     ^
                     ;
anyway, I'm heading out. Please report back if you get any progress. And bug @certik about the issues
Chris Swierczewski
@cswiercz
Nov 19 2014 23:43
Thanks again!
ls
oops