Recently, Wesley Wand has drawn my attention to issues with compiling
MPB and Meep on cygwin of latest version. He noticed that the above
recipe does not longer work.
The latest Setup.exe version is 2.761 and the latest Cygwin version is
1.7.9-1.
To make things simpler, you can install the following cygwin packages as
shown below:
Accessibility: Default
Admin: Default
Archive: Install hdf5: HDF5 Hierarchal Data Format /version 1.8.8-1/,
libhfd5-devel: HDF5 Hierarchal Data Format (development) /version
1.8.8-1/, libhfd5_7: HDF5 Hierarchal Data Format (runtime) /version 1.8.8-1/
Audio: Default
Base: Default
Database: Default
Devel: Install all
Doc: Default
Editors: Default
Games: Default
Gnome: Default
Graphics: Default
Interpreters: Install guile: the GNU extension language and Scheme
interpreter -- executables /version 1.8.7-2/
KDE: Default
Libs: Install all
Mail: Default
Math: Install: lapack: Comprehensive FORTRAN library for linear algebra
operations /version 3.2.2-2/, liblapack-devel: Development libs for
LAPACK /version 3.2.2-2/, liblapack0: Comprehensive FORTRAN library for
linear algebra operations /version 3.2.2-2/
Net: Default
Perl: Default
Publishing: Default
Python: Default
Security: Default
Shells: Default
System: Default
Text: Default
Utils: Default
Web: Default
X11: Default
I. If you want to compile Meep, MPB and Harminv.
The actual Cygwin version includes GNU compiler versions 3.4.4 and
4.5.3. To compile MEEP, MPB and Harminv, we need to use the GCC version
3.4.4. Add the following lines at the end of you .bash_profile file to
choose GCC version 3.4.4 and fortan compiler version 3.4.4.
LDFLAGS=-L/usr/local/lib export LDFLAGS
CPPFLAGS=-I/usr/local/include export CPPFLAGS
PATH=/usr/local/bin:$PATH export PATH
LD_LIBRARY_PATH=/usr/local/lib export LD_LIBRARY_PATH
CC=gcc-3 export CC
F77=g77 export F77
CXX=c++-3 export CXX
1. Build and install FFTW
1.1 download http://www.fftw.org/fftw-2.1.5.tar.gz
1.2 gzip -d fftw-2.1.5.tar.gz
1.3 tar -xvf fftw-2.1.5.tar
1.4 cd fftw-2.1.5
1.5 ./configure --prefix=/usr/local
1.6 make
1.7 make install
2. libctl
2.1 Download it from http://ab-initio.mit.edu/libctl/libctl-3.1.tar.gz
2.2 gzip -d libctl-3.1.tar.gz
2.3 tar -xvf libctl-3.1.tar
2.4 cd libctl-3.1
2.5 ./configure --prefix=/usr/local
2.6 make
2.7 make install
3. MPB
3.1 download it from http://ab-initio.mit.edu/mpb/mpb-1.4.2.tar.gz
3.2 gzip -d mpb-1.4.2.tar.gz
3.3 tar -xvf mpb-1.4.2.tar
3.4 cd mpb-1.4.2
3.5 ./configure --prefix=/usr/local CPPFLAGS="-DH5_USE_16_API=1"
3.6 make
3.7 make install
4. Harminv
4.1 download it from http://ab-initio.mit.edu/harminv/harminv-1.3.1.tar.gz
4.2 gzip -d harminv-1.3.1.tar.gz
4.3 tar -xvf harminv-1.3.1.tar
4.4 cd harminv-1.3.1
4.5 ./configure --prefix=/usr/local
4.6 make
4.7 make install
Run following commands in the cygwin terminal
ln -s /usr/lib/gcc/i686-pc-cygwin/3.4.4/libg2c.la
/usr/lib/gcc/i686-pc-cygwin/libg2c.la
ln -s /usr/lib/gcc/i686-pc-cygwin/3.4.4/libg2c.a
/usr/lib/gcc/i686-pc-cygwin/libg2c.a
5. MEEP
5.1 download it from http://ab-initio.mit.edu/meep/meep-1.1.1.tar.gz
5.2 gzip -d meep-1.1.1.tar.gz
5.3 tar -xvf meep-1.1.1.tar
5.4 cd meep-1.1.1
5.5 ./configure --prefix=/usr/local F77="gfortran"
5.6 make
5.7 make install
6. Build and install h5utils (optional, you need them if you want to
convert .h5 files created with Meep and MPB)
6.1 Download http://ab-initio.mit.edu/h5utils/h5utils-1.12.1.tar.gz
6.2 gzip -d h5utils-1.12.1.tar.gz
6.3 tar -xvf h5utils-1.12.1.tar
6.4 cd h5utils-1.12.1
6.5 ./configure --prefix=/usr/local
6.6 make
6.7 make install
II. If you want to install MPB only
You can add the following lines at the end of your .bash_profile file to
choose GCC version 4.5.3 and fortran compiler version 4.5.3.
LDFLAGS=-L/usr/local/lib export LDFLAGS
CPPFLAGS=-I/usr/local/include export CPPFLAGS
PATH=/usr/local/bin:$PATH export PATH
LD_LIBRARY_PATH=/usr/local/lib export LD_LIBRARY_PATH
CC=gcc-4 export CC
F77=gfortran export F77
CXX=c++-4 export CXX
Then build and install all packages as described above.
P.S.
Moreover, if you need MPB only, then you can add the following lines
into your bash_profile file
LDFLAGS=-L/usr/local/lib export LDFLAGS
CPPFLAGS=-I/usr/local/include export CPPFLAGS
PATH=/usr/local/bin:$PATH export PATH
LD_LIBRARY_PATH=/usr/local/lib export LD_LIBRARY_PATH
Configure Harminv as
./configure --prefix=/usr/local F77="gfortran"
Configure MPB as
./configure --prefix=/usr/local CPPFLAGS="-DH5_USE_16_API=1" F77="gfortran"
Best regards
_______________________________________________
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss