On Thu, Jun 9, 2011 at 11:46 PM, Russell E. Owen <[email protected]> wrote:
> What would it take to automatically detect which flavor of fortran to > use to build numpy on linux? > You want to figure out which compiler was used to build BLAS/LAPACK/ATLAS and check that the numpy build uses the same, right? Assuming you only care about g77/gfortran, you can try this (from http://docs.scipy.org/doc/numpy/user/install.html): """ How to check the ABI of blas/lapack/atlas ----------------------------------------- One relatively simple and reliable way to check for the compiler used to build a library is to use ldd on the library. If libg2c.so is a dependency, this means that g77 has been used. If libgfortran.so is a a dependency, gfortran has been used. If both are dependencies, this means both have been used, which is almost always a very bad idea. """ You could do something similar for other compilers if needed. It would help to know exactly what problem you are trying to solve. > The unit tests are clever enough to detect a mis-build (though > surprisingly that is not done as part of the build process), so surely > it can be done. > The test suite takes some time to run. It would be very annoying if it ran by default on every rebuild. It's easy to write a build script that builds numpy, then runs the tests, if that's what you need. Cheers, Ralf > Even if there is no interest in putting this into numpy's setup.py, we > have a need for it for our own system. Any suggestions on how to do this > robustly would be much appreciated. > > -- Russell > >
_______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
