New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scipy fails to build without -D__ACCELERATE__ #966

Closed
remram44 opened this Issue Jan 14, 2015 · 17 comments

Comments

Projects
None yet
5 participants
@remram44
Contributor

remram44 commented Jan 14, 2015

On my Mac, scipy fails to build unless I set -D__ACCELERATE__:

  error: Command "gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -m64
  -mmacosx-version-min=10.9 -isysroot
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
  -Iscipy/sparse/linalg/eigen/arpack/ARPACK/SRC
  -I/Users/remirampin/Documents/programming/uvcdat/aa/install/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include
  -c
  /Users/remirampin/Documents/programming/uvcdat/aa/build/SCIPY/scipy/_build_utils/src/wrap_accelerate_c.c
  -o
  build/temp.macosx-10.4-x86_64-2.7/Users/remirampin/Documents/programming/uvcdat/aa/build/SCIPY/scipy/_build_utils/src/wrap_accelerate_c.o"
  failed with exit status 1

If I use CFLAGS=-D__ACCELERATE__ make then it builds.

Anybody else seeing this?

@remram44 remram44 added the Build label Jan 14, 2015

@williams13

This comment has been minimized.

Contributor

williams13 commented Jan 14, 2015

I am on a Mac 10.8.x and I have not had to do this. What OS X version are you on?

@remram44

This comment has been minimized.

Contributor

remram44 commented Jan 14, 2015

I'm using 10.10.1 and macports's gcc (4.9.2). This seems to be a common issue according to Google (see this and this) and not specific to SciPy.

Apparently macports patches the scipy package (see here), description:

Subject: [PATCH] BUG: bundle cblas.h in Accelerate ABI wrappers to enable
 compilation with gcc

Apple's Accelerate/Accelerate.h uses clang extensions apparently not
available on gcc, and cannot be used with gcc. The path to the system
cblas.h is apparently not easily found, so we bundle it instead.

SciPy issue: scipy/scipy#4383
Homebrew issue: Homebrew/homebrew-python#110

@remram44

This comment has been minimized.

Contributor

remram44 commented Jan 14, 2015

Looks like the patch was actually committed to SciPy only two days ago (7dc0eee5)

@williams13

This comment has been minimized.

Contributor

williams13 commented Jan 14, 2015

This will help with the 10.10 build…for sure.

@aashish24

This comment has been minimized.

Contributor

aashish24 commented Jan 14, 2015

Will update it post 2.1.0

@remram44

This comment has been minimized.

Contributor

remram44 commented Mar 24, 2015

Still running into this (building 2.2.0 rc 46ffdce).

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Mar 24, 2015

@remram44 still on 10.8? do you know if the patch you were refering to earlier is in our version of scipy? Should we update the scipy version to some other tag?

@remram44

This comment has been minimized.

Contributor

remram44 commented Mar 24, 2015

I'm using OSX 10.10. I'm not sure about the scipy release cycles, but this will probably be scipy 0.16.0...

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Mar 24, 2015

@remram44 I hate to ask you this, but could you download a tar file from scipy master, stick in "build" edit CMake/scipy_pkg.cmake to update the md5 (or take it out) and run build again to see if it fixes your issue. Thanks

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Mar 25, 2015

@remram44 on my mac 10.8 this is what I get:

xcodebuild -version
Xcode 5.1.1
Build version 5B1008

and

gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin12.6.0
Thread model: posix

and

gfortran --version
GNU Fortran (GCC) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

and

ll /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
total 0
drwxr-xr-x@ 5 doutriaux1  admin   170B Sep  4  2013 MacOSX10.8.sdk
drwxr-xr-x@ 5 doutriaux1  admin   170B Feb 17  2014 MacOSX10.9.sdk

what do you have?

@remram44

This comment has been minimized.

Contributor

remram44 commented Mar 25, 2015

$ /usr/bin/xcodebuild -version
Xcode 6.2
Build version 6C131e
$ /usr/bin/gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.1.0
Thread model: posix
$ /opt/local/bin/gfortran --version
GNU Fortran (MacPorts gcc49 4.9.2_1) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
$ ll /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
total 0
drwxr-xr-x  5 root  wheel   170B Oct  4 03:28 MacOSX10.10.sdk
drwxr-xr-x  5 root  wheel   170B Aug 27  2014 MacOSX10.9.sdk
@remram44

This comment has been minimized.

Contributor

remram44 commented Mar 25, 2015

Not directly related: are we missing a dep from scipy on Cython?

[edit: only needed if building from scipy's repository, not released source tarball]

@remram44

This comment has been minimized.

Contributor

remram44 commented Mar 25, 2015

scipy master (actually 6fc2aa0) does fix it.

It would seem that removing /opt/local (macports) from PATH fixes this as well (but then I need to find e.g. gfortran from somewhere else).

/opt/local in PATH spicy results
no master success
no 15.1 success
yes 15.1 fail (accelerate)
yes master success
@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Mar 25, 2015

@remram44 yes we know and I think it is documented somewhere that all these parallele distribution (homebrew, macport, fink, etc...) do mess up our build because they have their own duplicate libraries. "eventually" (whenever we get time) cmake will be able to pick up and use all external dependencies on the system, that should solve this. Ok so for now I suggest we we update scipy to what's in master, I will push a branch and test on all my systems. When it's ready do you mind testing as well? Thanks.

@remram44

This comment has been minimized.

Contributor

remram44 commented Mar 25, 2015

Ok note that if building from a Git checkout, you will need Cython

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Mar 25, 2015

thanks @remram44 I will update the dependencies as well then.

@remram44

This comment has been minimized.

Contributor

remram44 commented Apr 3, 2015

(PR: #1165)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment