Dear list,
I've updated to Yosemite (clean install) and am having problems building scipy from source (python setup.py build) The complete build log is at: $gfortran --version GNU Fortran (GCC) 4.2.3 $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.54) (based on LLVM 3.5svn) Target: x86_64-apple-darwin14.0.0 Thread model: posix $echo FFLAGS -ff2c gfortran was from http://cran.r-project.org/bin/macosx/tools/. Is anyone able to give me any tips as to what I'm doing wrong? cheers, Andrew -- _____________________________________
Dr. Andrew Nelson _____________________________________ _______________________________________________ SciPy-User mailing list [hidden email] http://mail.scipy.org/mailman/listinfo/scipy-user |
Hi,
On Mon, Nov 10, 2014 at 11:29 PM, Andrew Nelson <[hidden email]> wrote: > Dear list, > I've updated to Yosemite (clean install) and am having problems building > scipy from source (python setup.py build) > > The complete build log is at: > https://gist.github.com/andyfaff/5a433d0585e8dae1dfc2 > > $gfortran --version > GNU Fortran (GCC) 4.2.3 > $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.54) (based on LLVM 3.5svn) > Target: x86_64-apple-darwin14.0.0 > Thread model: posix > $echo FFLAGS > -ff2c > > gfortran was from http://cran.r-project.org/bin/macosx/tools/. > > Is anyone able to give me any tips as to what I'm doing wrong? I think you may have to use clang - see : http://www.scipy.org/scipylib/building/macosx.html#os-x-10-7-lion-and-10-8-mountain-lion $ export CC=clang $ export CXX=clang++ $ export FFLAGS=-ff2c Does that work? Cheers, Matthew _______________________________________________ SciPy-User mailing list [hidden email] http://mail.scipy.org/mailman/listinfo/scipy-user |
It may not have been clear in my original post, I was using clang and clang++. On 13 November 2014 14:51, Matthew Brett <[hidden email]> wrote: Hi, _____________________________________
Dr. Andrew Nelson _____________________________________ _______________________________________________ SciPy-User mailing list [hidden email] http://mail.scipy.org/mailman/listinfo/scipy-user |
In reply to this post by Andrew Nelson
Have you tried the latest official "unofficial" gfortran binaries?
https://gcc.gnu.org/wiki/GFortranBinaries#MacOS Sturla Andrew Nelson <[hidden email]> wrote: > Dear list, > I've updated to Yosemite (clean install) and am having problems building > scipy from source (python setup.py build) > > The complete build log is at: > <a > href="https://gist.github.com/andyfaff/5a433d0585e8dae1dfc2">https://gist.github.com/andyfaff/5a433d0585e8dae1dfc2</a> > > $gfortran --version > GNU Fortran (GCC) 4.2.3 > $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.54) (based on LLVM 3.5svn) > Target: x86_64-apple-darwin14.0.0 > Thread model: posix > $echo FFLAGS > -ff2c > > gfortran was from <a > href="http://cran.r-project.org/bin/macosx/tools/.">http://cran.r-project.org/bin/macosx/tools/.</a> > > Is anyone able to give me any tips as to what I'm doing wrong? > > cheers, > Andrew > > -- > _____________________________________ > Dr. Andrew Nelson > > _____________________________________ > > _______________________________________________ > SciPy-User mailing list > [hidden email] > <a > href="http://mail.scipy.org/mailman/listinfo/scipy-user">http://mail.scipy.org/mailman/listinfo/scipy-user</a> _______________________________________________ SciPy-User mailing list [hidden email] http://mail.scipy.org/mailman/listinfo/scipy-user |
On Wed, Nov 12, 2014 at 9:40 PM, Sturla Molden <[hidden email]> wrote:
> Have you tried the latest official "unofficial" gfortran binaries? > > https://gcc.gnu.org/wiki/GFortranBinaries#MacOS > > > Sturla > > > Andrew Nelson <[hidden email]> wrote: >> Dear list, >> I've updated to Yosemite (clean install) and am having problems building >> scipy from source (python setup.py build) >> >> The complete build log is at: >> <a >> href="https://gist.github.com/andyfaff/5a433d0585e8dae1dfc2">https://gist.github.com/andyfaff/5a433d0585e8dae1dfc2</a> >> >> $gfortran --version >> GNU Fortran (GCC) 4.2.3 >> $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.54) (based on LLVM 3.5svn) >> Target: x86_64-apple-darwin14.0.0 >> Thread model: posix >> $echo FFLAGS >> -ff2c >> >> gfortran was from <a >> href="http://cran.r-project.org/bin/macosx/tools/.">http://cran.r-project.org/bin/macosx/tools/.</a> >> >> Is anyone able to give me any tips as to what I'm doing wrong? >> >> cheers, >> Andrew Scipy builds OK for me with the cran gfortran, current trunk, numpy 1.9.1 via pip install, and $ export CC=clang $ export CXX=clang++ $ export FFLAGS=-ff2c Can you give more detail about your system? Numpy, scipy version? Cheers, Matthew _______________________________________________ SciPy-User mailing list [hidden email] http://mail.scipy.org/mailman/listinfo/scipy-user |
Matthew Brett <[hidden email]> wrote:
> Scipy builds OK for me with the cran gfortran, current trunk, numpy > 1.9.1 via pip install, and > > $ export CC=clang > $ export CXX=clang++ > $ export FFLAGS=-ff2c The last flag is interesting. It instructs gfortran to use g77 ABI. But SciPy is supposed to have ABI wrappers for g77 ABI in Accelerate. If it is still needed it means that the ABI wrappers don't do what they are supposed to do. The ABI wrapper code in SciPy is so convoluted (and confused?) that it would not surprise me. If so, we should create ABI wrappers in the same way as libVecFort. Sturla _______________________________________________ SciPy-User mailing list [hidden email] http://mail.scipy.org/mailman/listinfo/scipy-user |
In reply to this post by Matthew Brett
I'm trying to build scipy trunk. numpy was installed into a virtualenv with 'pip install numpy'. Python is : Python 2.7.8 (v2.7.8:ee879c0ffa11, Jun 29 2014, 21:07:35) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
>>> np.version.full_version '1.9.1' >>> np.version.git_revision 'd44b9c61499f8bc5a9fc94286cd52f05e15e003f' OSX 10.10. (development)$ clang --version Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn) Target: x86_64-apple-darwin14.0.0 Thread model: posix (development)$ clang++ --version Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn) Target: x86_64-apple-darwin14.0.0
Thread model: posix _______________________________________________ SciPy-User mailing list [hidden email] http://mail.scipy.org/mailman/listinfo/scipy-user |
On Thu, Nov 13, 2014 at 12:08 AM, Andrew Nelson <[hidden email]> wrote:
>> >> Scipy builds OK for me with the cran gfortran, current trunk, numpy >> 1.9.1 via pip install, and >> >> $ export CC=clang >> $ export CXX=clang++ >> $ export FFLAGS=-ff2c >> >> Can you give more detail about your system? Numpy, scipy version? >> >> Cheers, >> >> Matthew >> > > I'm trying to build scipy trunk. numpy was installed into a virtualenv with > 'pip install numpy'. Python is : > > Python 2.7.8 (v2.7.8:ee879c0ffa11, Jun 29 2014, 21:07:35) > [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin > >>>> np.version.full_version > > '1.9.1' > >>>> np.version.git_revision > > 'd44b9c61499f8bc5a9fc94286cd52f05e15e003f' > > OSX 10.10. > > (development)$ clang --version > > Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn) > > Target: x86_64-apple-darwin14.0.0 > > Thread model: posix > > (development)$ clang++ --version > > Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn) > > Target: x86_64-apple-darwin14.0.0 > > Thread model: posix That's strange, I have the exact same configuration. You used the same build environment variables too? Matthew _______________________________________________ SciPy-User mailing list [hidden email] http://mail.scipy.org/mailman/listinfo/scipy-user |
In reply to this post by Sturla Molden-3
On 13 November 2014 16:40, Sturla Molden <[hidden email]> wrote:
Have you tried the latest official "unofficial" gfortran binaries? This finally worked for me. I downloaded the gfortran 4.9.0 from a link on that page that Sturla provided. I had the CC=clang, CXX=clang++ environment variables (no FFLAGS set), and the build worked. Thanks Sturla for that suggestion. I can't help feeling that the build process is a little fragile if one has to find the exact gfortran compiler that works for given C compiler/OS combination. cheers, Andrew. _______________________________________________ SciPy-User mailing list [hidden email] http://mail.scipy.org/mailman/listinfo/scipy-user |
Hi,
On Thu, Nov 13, 2014 at 2:41 PM, Andrew Nelson <[hidden email]> wrote: > On 13 November 2014 16:40, Sturla Molden <[hidden email]> wrote: >> >> Have you tried the latest official "unofficial" gfortran binaries? >> >> https://gcc.gnu.org/wiki/GFortranBinaries#MacOS >> > > This finally worked for me. I downloaded the gfortran 4.9.0 from a link on > that page that Sturla provided. I had the CC=clang, CXX=clang++ environment > variables (no FFLAGS set), and the build worked. > > Thanks Sturla for that suggestion. I can't help feeling that the build > process is a little fragile if one has to find the exact gfortran compiler > that works for given C compiler/OS combination. Did you use the FFLAGS variable set with the cran Fortran compiler? Cheers, Matthew _______________________________________________ SciPy-User mailing list [hidden email] http://mail.scipy.org/mailman/listinfo/scipy-user |
Yes. On 14/11/2014 9:45 AM, "Matthew Brett" <[hidden email]> wrote:
Hi, _______________________________________________ SciPy-User mailing list [hidden email] http://mail.scipy.org/mailman/listinfo/scipy-user |
In reply to this post by Andrew Nelson
Andrew Nelson <[hidden email]> wrote:
> This finally worked for me. I downloaded the gfortran 4.9.0 from a link on > that page that Sturla provided. I had the CC=clang, CXX=clang++ environment > variables (no FFLAGS set), and the build worked. Run the test suite a s well. Personally I use gfortran 4.8.2 from the same source. It seems to work reliably and I trust the gfortran team to build a binary with the right configurations. The purpose of of the ABI wrappers in scipy/_build_utils is to avoid building with FFLAGS=-ff2c with gfortran on OS X, so Matthew Brett's suggestion to keep this flag made me worried. > Thanks Sturla for that suggestion. I can't help feeling that the build > process is a little fragile if one has to find the exact gfortran compiler > that works for given C compiler/OS combination. Building SciPy on OS X has always been a bit fragile, at least without Intel's Fortran compiler and MKL. But downloading an official/unoffcial gfortran binary installer from the gfortran wiki does not seem to be that fragile. Using an old gfortran build from the R project seems more on the fragile side, though. Sturla _______________________________________________ SciPy-User mailing list [hidden email] http://mail.scipy.org/mailman/listinfo/scipy-user |
Hi,
On Thu, Nov 13, 2014 at 8:01 PM, Sturla Molden <[hidden email]> wrote: > Andrew Nelson <[hidden email]> wrote: > >> This finally worked for me. I downloaded the gfortran 4.9.0 from a link on >> that page that Sturla provided. I had the CC=clang, CXX=clang++ environment >> variables (no FFLAGS set), and the build worked. > > Run the test suite a s well. > > Personally I use gfortran 4.8.2 from the same source. It seems to work > reliably and I trust the gfortran team to build a binary with the right > configurations. > > The purpose of of the ABI wrappers in scipy/_build_utils is to avoid > building with FFLAGS=-ff2c with gfortran on OS X, so Matthew Brett's > suggestion to keep this flag made me worried. It certainly used to be necessary building on 10.9, but for a different error : https://github.com/scipy/scipy/issues/3194 Actually, now I try and build on 10.9 with cran gfortran, I also get this error, I believe same as OP: /usr/local/bin/gfortran -Wall -g -arch i686 -arch x86_64 -Wall -g -undefined dynamic_lookup -bundle build/temp.macosx-10.6-intel-2.7/scipy/integrate/_odepackmodule.o -Lbuild/temp.macosx-10.6-intel-2.7 -lodepack -lmach -lgfortran -o build/lib.macosx-10.6-intel-2.7/scipy/integrate/_odepack.so -Wl,-framework -Wl,Accelerate ld: warning: can't find atom for N_GSYM stabs ls0001:G(0,24)=s1900rowns:(0,25)=ar(0,6);0;208;(0,9),0,13376;ccmax:(0,9),13376,64;el0:(0,9),13440,64;h:(0,9),13504,64;hmin:(0,9),13568,64;hmxi:(0,9),13632,64;hu:(0,9),13696,64;rc:(0,9),13760,64;tn:(0,9),13824,64;uround:(0,9),13888,64;illin:(0,6),13952,32;init:(0,6),13984,32;lyh:(0,6),14016,32;lewt:(0,6),14048,32;lacor:(0,6),14080,32;lsavf:(0,6),14112,32;lwm:(0,6),14144,32;liwm:(0,6),14176,32;mxstep:(0,6),14208,32;mxhnil:(0,6),14240,32;nhnil:(0,6),14272,32;ntrep:(0,6),14304,32;nslast:(0,6),14336,32;nyh:(0,6),14368,32;iowns:(0,26)=ar(0,6);0;5;(0,6),14400,192;icf:(0,6),14592,32;ierpj:(0,6),14624,32;iersl:(0,6),14656,32;jcur:(0,6),14688,32;jstart:(0,6),14720,32;kflag:(0,6),14752,32;l:(0,6),14784,32;meth:(0,6),14816,32;miter:(0,6),14848,32;maxord:(0,6),14880,32;maxcor:(0,6),14912,32;msbp:(0,6),14944,32;mxncf:(0,6),14976,32;n:(0,6),15008,32;nq:(0,6),15040,32;nst:(0,6),15072,32;nfe:(0,6),15104,32;nje:(0,6),15136,32;nqu:(0,6),15168,32;; in build/temp.macosx-10.6-intel-2.7/libodepack.a(lsoda.o) I get this whether I use `export FFLAGS=-ff2c` or not, so maybe it is an incompatibility of the old gfortran with recent clang. >> Thanks Sturla for that suggestion. I can't help feeling that the build >> process is a little fragile if one has to find the exact gfortran compiler >> that works for given C compiler/OS combination. > > Building SciPy on OS X has always been a bit fragile, at least without > Intel's Fortran compiler and MKL. > > But downloading an official/unoffcial gfortran binary installer from the > gfortran wiki does not seem to be that fragile. Using an old gfortran build > from the R project seems more on the fragile side, though. The cran fortran is the standard recommendation because it compiles both 32 and 64 bit binaries, if given the correct -arch flags; I don't think that's true with the official gfortran binary (it just builds 64-bit or 32-bit but not both). Not many of us are using 32-bit on Macs these days though: https://www.adium.im/sparkle/#cpu64bit Cheers, Matthew _______________________________________________ SciPy-User mailing list [hidden email] http://mail.scipy.org/mailman/listinfo/scipy-user |
Matthew Brett <[hidden email]> wrote:
> It certainly used to be necessary building on 10.9, but for a > different error : https://github.com/scipy/scipy/issues/3194 Obviously not, as the error is reported when compiling with this flag. The error here is a missing mmintrin.h when compiling with Apple's llvm-gcc-4.2. Sturla _______________________________________________ SciPy-User mailing list [hidden email] http://mail.scipy.org/mailman/listinfo/scipy-user |
In reply to this post by Andrew Nelson
On Tue, Nov 11, 2014 at 7:29 AM, Andrew Nelson <[hidden email]> wrote:
I can reproduce the issue on 10.6, where I used to be able to build numpy/scipy before with the exact same configuration (10.6, gfortran from ATT, official gcc-4.2 compilers from Apple). I reduced the issue to be related to 32 bits only, and when built against numpy 1.9.1. I don't have the issue when building scipy against 1.8.1. This suggests some incompatibilities in compilation options that have changed in numpy between 1.8.1 and 1.9.1. David P.S: one should not use -ff2c flags.
_______________________________________________ SciPy-User mailing list [hidden email] http://mail.scipy.org/mailman/listinfo/scipy-user |
On Tue, Nov 18, 2014 at 11:44 AM, David Cournapeau <[hidden email]> wrote:
Indeed, the problem is the added '-g' flag between 1.8.1 and 1.9.1. That flag is invalid for gcc 4.2.x on darwin, we should instead use -gdwarf-2: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34719 David _______________________________________________ SciPy-User mailing list [hidden email] http://mail.scipy.org/mailman/listinfo/scipy-user |
In reply to this post by David Cournapeau
On 18/11/14 12:44, David Cournapeau wrote:
> P.S: one should not use -ff2c flags. If it is needed your ABI wrappers are to blame ;-) Sturla _______________________________________________ SciPy-User mailing list [hidden email] http://mail.scipy.org/mailman/listinfo/scipy-user |
In reply to this post by Matthew Brett
On 14/11/14 08:55, Matthew Brett wrote:
> The cran fortran is the standard recommendation because it compiles > both 32 and 64 bit binaries, if given the correct -arch flags; I don't > think that's true with the official gfortran binary I just checked this, it actually builds both. If I pass -m32 or -arch i386 it creates a 32-bit binary. If I pass -m64 or -arch x86_64 it creates a 64-bit binary. The default is 64 bit. I really think we should start to recommend the gfortran wiki binaries: - It is easy to download and install (.dmg installer) - It is a recent gfortran (currently 4.9.0 and 4.8.2). - It is configured and built by the gfortran team. - It can build SciPy and the test suite passes. - It is configured to be compatible with Apple's Xcode command line utils (including clang and clang++). - It builds 32-bit and 64-bit binaries. https://gcc.gnu.org/wiki/GFortranBinaries Sturla _______________________________________________ SciPy-User mailing list [hidden email] http://mail.scipy.org/mailman/listinfo/scipy-user |
Hi,
On Wed, Nov 19, 2014 at 7:11 PM, Sturla Molden <[hidden email]> wrote: > On 14/11/14 08:55, Matthew Brett wrote: > >> The cran fortran is the standard recommendation because it compiles >> both 32 and 64 bit binaries, if given the correct -arch flags; I don't >> think that's true with the official gfortran binary > > I just checked this, it actually builds both. > > If I pass -m32 or -arch i386 it creates a 32-bit binary. > > If I pass -m64 or -arch x86_64 it creates a 64-bit binary. > > The default is 64 bit. > > > I really think we should start to recommend the gfortran wiki binaries: > > - It is easy to download and install (.dmg installer) > > - It is a recent gfortran (currently 4.9.0 and 4.8.2). > > - It is configured and built by the gfortran team. > > - It can build SciPy and the test suite passes. > > - It is configured to be compatible with Apple's Xcode command line > utils (including clang and clang++). > > - It builds 32-bit and 64-bit binaries. > > https://gcc.gnu.org/wiki/GFortranBinaries Sorry, the point I was trying to make is that the CRAN gfortran builds fat binaries (containing both i386 and x86_64), matching the (dual arch) Python.org and system Python architectures. Of course you can do that with the gcc gfortran, but only by doing a complicated two pass compile (that was how I was building the ATLAS binaries), Cheers, Matthew _______________________________________________ SciPy-User mailing list [hidden email] http://mail.scipy.org/mailman/listinfo/scipy-user |
On 20/11/14 07:39, Matthew Brett wrote:
> Sorry, the point I was trying to make is that the CRAN gfortran builds > fat binaries (containing both i386 and x86_64), matching the (dual > arch) Python.org and system Python architectures. I see. But it is still a very old gfortran. Modern Fortran code will e.g. use ISO C bindings (Fortran 2003) for interfacing with C and the IEEE environment (Fortran 2008) for consistent floating point arithmetics. It would be sad if an old CRAN gfortran prevents future additions to SciPy from using these rather essential Fortran tools. Sturla _______________________________________________ SciPy-User mailing list [hidden email] http://mail.scipy.org/mailman/listinfo/scipy-user |
Free forum by Nabble | Edit this page |