homebrew build on Mac unnecessarily downloads Cython?

97 views
Skip to first unread message

Kyle Niemeyer

unread,
Jun 18, 2015, 4:40:16 PM6/18/15
to canter...@googlegroups.com
I just tried to install Cantera using homebrew, with the --HEAD option to ensure I got the latest version. However, for some reason homebrew downloads Cython, rather than using the resource already installed on my system via pip.

Also, the Python tests fail after building (I get a "Python quit unexpectedly" message during the tests), but I don't think this is connected, because brewing the 2.2.0 release version also downloads Cython (unnecessarily), but the tests work fine.

Strangely, if I build and test my local version of Cantera (synced to the Github version), the build and tests both go fine. The only differences I could think of are that it's using the installed Cython, and also using my homebrew'ed GCC.

Kyle

Kyle Niemeyer

unread,
Jun 18, 2015, 5:10:00 PM6/18/15
to canter...@googlegroups.com
OK—if I force Homebrew to use my GCC (v5.1.0) by doing:
export HOMEBREW_CC=gcc-5
export HOMEBREW_CXX=g++-5
brew install cantera
--HEAD --with-graph-viz
then it builds and tests just fine.

I do get a message about open-mpi:
Warning: homebrew/science/cantera dependency open-mpi was built with a different C++ standard
library
(libc++ from clang). This may cause problems at runtime.
since homebrew uses clang by default.

So, apparently something in the HEAD version of cantera doesn't like clang. I'm using the most recent version of the OS X Command Line Tools, Version 6.3.

Any thoughts?

Ray Speth

unread,
Jun 18, 2015, 5:38:54 PM6/18/15
to canter...@googlegroups.com
Kyle,

The behavior with regards to Cython is a result of changes made to the formula by the Homebrew-science maintainers so that their binary packaging ("bottling") process would work. It doesn't check for an existing copy of Cython, but perhaps that's something they would accept a pull request for.

I can confirm the failure in the Python test suite when installing with "homebrew install --HEAD". However, if I build directly using SCons, also using Clang, it works just fine, so the problem isn't even just the different compiler. It looks like it has to dereferencing a null pointer to m_thermo in ReactorBase::contents, which most compilers apparently let slide. I should have a fix for this shortly -- the only difficulty is testing a bug that I can only reproduce when using Homebrew.

The MPI warning is bizarre, since Cantera doesn't depend on MPI (and no such dependency is listed in the Homebrew formula, at least directly).

Regards,
Ray

Ray Speth

unread,
Jun 18, 2015, 6:16:39 PM6/18/15
to canter...@googlegroups.com
Kyle,

The crash in the Python test suite should be fixed in commit be24e9daf1.

Regards,
Ray

On Thursday, June 18, 2015 at 5:10:00 PM UTC-4, Kyle Niemeyer wrote:

Kyle Niemeyer

unread,
Jun 18, 2015, 6:33:54 PM6/18/15
to canter...@googlegroups.com
I can confirm that the new HEAD install works fine with the default homebrew compilers. Thanks Ray! 

I'll take a look at the Cantera formula and see how the unnecessary Cython download can be avoided.

I think that the open-mpi warning has to do with sundials, which I build using open-mpi due to the current warning that failures were observed using MPICH2. After reinstalling just now, I did not see the warning since everything is using clang.

Kyle
Reply all
Reply to author
Forward
0 new messages