2 Compilation instructions for ATLAS with cygwin under Windows 7
4 First make sure you have the cygwin packages gcc-g77 and
5 gcc4-fortran installed.
7 [ notes in Windows 7 issues ]
9 - There are some commands relating to a "manifest" below. This is a patch to
10 the build process for Win7. The issue is that Windows 7 automatically tries
11 to elevate the privelege of anything with "install" or "update" in its title,
12 but this does not work from Cygwin. The manifest tells Win7 not to do the
13 heuristic privelege elevation. This has been fixed in the 3.9 versions of
14 ATLAS, by renaming the program in question. These instructions are for 3.8.
16 - If you get "vfork: resource temporarily
17 unavailable" at some point during the build, you may have to rerun
18 make. It may have to do with reaching cygwin's maximum number of
19 processes.
22 [end notes on Windows 7 issues]
24 # get the last stable version of ATLAS library (3.8.3)
25 cd ../tools
26 wget http://sourceforge.net/projects/math-atlas/files/Stable/3.8.3/atlas3.8.3.tar.gz/download
27 tar -xvzf atlas3.8.3.tar.gz
29 # build the library
30 cd ATLAS
31 mkdir cygwin_build
32 cd cygwin_build
34 ../configure -b 32 --prefix=`pwd`
36 [note: you may get some errors about "no rule to make target IRunArchInfo_winnt"
37 or something like that. These appear not to be fatal. I'm not sure if they
38 mean that the resulting configure process failed. If you get errors about
39 cannot find g77 or f77 or gfortran, make sure the packages gcc-g77 and
40 gcc4-fortran are installed].
43 # The following is a patch for an interaction with Windows 7.
44 # It won't hurt if you're not on Windows 7.
45 mkdir bin
46 cd bin
47 cat > xatlas_install.exe.manifest <<EOF
48 <?xml version="1.0" encoding="utf-8"?>
49 <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
50 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
51 <security>
52 <requestedPrivileges>
53 <requestedExecutionLevel level="asInvoker" />
54 </requestedPrivileges>
55 </security>
56 </trustInfo>
57 </assembly>
58 EOF
59 cd ..
60 # end patch.
62 make
64 # optionally check and benchmark the built library
65 make check
66 make time
68 # create .dll file
69 mkdir install
70 # in the next command, got some errors like:
71 # cannot access `/home/dpovey/UBM-ASR/branches/v1.0/tools/ATLAS/cygwin_build/install/lib/libptf77blas.a': No such file or directory
72 # ignoring these for now.
73 make install DESTDIR=`pwd`/install
74 cd install
75 cd lib
77 echo "EXPORTS" > lib_atlas.def
78 cat ../include/cblas.h ../include/clapack.h | \
79 perl -ane 'm:(catlas_|cblas_|clapack_)\w+: && print "$&=$&\n";' \
80 | sort | uniq >> lib_atlas.def
82 #gcc-3 -mno-cygwin -shared -o lib_atlas.dll -Wl,--out-implib=lib_atlas.lib \
83 # lib_atlas.def \
84 # liblapack.a libcblas.a libf77blas.a libatlas.a \
85 # -Wl,--enable-auto-import
87 gcc-3 -mno-cygwin -shared -o lib_atlas.dll \
88 lib_atlas.def \
89 liblapack.a libcblas.a libf77blas.a libatlas.a \
90 -Wl,--enable-auto-import
92 # we have to use VS's lib.exe tool, not gcc, to make lib_atlas.lib,
93 # or it won't work in release mode.
94 # see http://groups.google.com/group/gnu.gcc.help/browse_thread/thread/c6840ea01e4d163a?pli=1
95 # If your path or VS version is not as below, you will have to change the
96 # command.
97 "/cygdrive/c/Program Files/Microsoft Visual Studio 10.0/VC/bin/lib.exe" \
98 /DEF:lib_atlas.def /MACHINE:ix86 /OUT:lib_atlas.lib
101 #The output of this process that you will need for Windows are the files
102 # [somewhere]/ATLAS/cygwin_build/install/lib/lib_atlas.{lib,dll}