[On behalf of John Weiner, I forward his experience with installation of MEEP on Mac OS. John's kind contribution follows. -- Filip]
Dear Meep Users and Developers, I have been able to install meep-1.3 on two different iMacs (one in Washington DC( Sierra 10.12.5) and the other in Paris (Sierra 10.12.6) during the month of July 2017. This message recounts what I did. I hope it works for you, but even in these two very similar circumstances the tactics for a successful build was not exactly the same. I hope it proves useful to users who want to install meep on macOS. The point of departure was the “installation guide for Sierra based on HomeBrew" in meep-discuss, https://www.mail-archive.com/meep-discuss@ab-initio.mit.edu/msg05719.html I also used HomeBrew to install some of the prerequisite packages. 1. Install home-brew if you don’t already have it. You can get it googling for the home-brew web site. It is a package handler analogous to apt or apt-get in Ubuntu Linux. 2. Open a terminal session and, once home-brew is installed, brew doctor (analyses the system for potential conflicts and problems) brew update (update all the home-brew packages. 3. brew install libunistring, pkg-config, libffi, bdw-gc, readline, hdf5, openblas, fftw, gsl, automake, and autoconf. Some of these packages might be already on your system. 4. The Washington iMac seemed to require the installation of gettext as well the packages above, so you might as well install getttext. 5. Download from the gnu index site the tarball for guile-2.0.11. Any version later than this one generates errors in meep. Don’t install guile with home-brew. Even if you specify the guile-2.0 series, home-brew will install guile-2.0.14, which does not work with meep. 6. The build of guile-2.0.11 was the hardest part of this task. The overall method is the typical unix install procedure: after extracting the tarball with tar-xvd, cd to the guile-2.0.11 directory. You should find an executable configure file. The command is ./configure By default the installation will be in /usr/local. If you want it somewhere else, on the ./configure command line: prefix=/your/prefix. On the same ./configure command line set LDFLAGS and CPPFLAGS with all the relevant paths for the previously installed prerequisites so that the compiler and linker will be able to find the lib and include directories. Home-brew instalsl a symlink in /usr/local/opt for most (but not all) of the installed programs. You also should specify on the ./configure command line LIBFFI_CFLAGS for the include directory and LIBFFI_LIBS for the static and dynamic libraries where ffi can be found. For some reason ffi seems to require these additional environmental variables in order to find the latest version of ffi. 7. Take a deep breath and press return. If the configure script runs to completion, breath a sigh of relief and go on to make. If not, you can cat config.log|grep “some key word" to see what went wrong. 8. If you get to make, take another deep breath. You will see lots of warnings, but the make will only stop with errors. At first I got a lot of errors from “missing symbols”, but it was because I had forgotten to add an l flag (for dynamic libraries) to the LDFLAGS="-L/path/to/ffi. It should be LDFLAGS=-L/path/to/ffi -lffi”. 9. A persistant error was due to the stime.c file in …/libguile/stime.c that comes with the tarball. This is a documented bug in guile-2.0.11 and there is a patch somewhere that is supposed to work. However, I just downloaded and extracted the current version of guile (2.2.2) and copied the stime.c file to my …/guile-2.0.11/libguile directory and did the configure and make sequence again. That solved the problem for me. The make command can be run with make V=1 to see the details of what is going on at each step. For linker problems I found it useful to actually see what lib and include paths the linker was actually using and in what sequence. 10. The last step is sudo make install. I had not problems with this step if I was able to get that far. 11. A quick check that guile is working is to type at the prompt, guile —version. You should get the guile prompt with the version information. It should be 2.0.11. 12. Once the guile hurdle was overcome the rest was relatively straightforward. 13. From the meep ab initio site you can get the tarballs for h5utils, harminv, libctl, mob, and meep. You need to get the libpng-1.4.20 package from the download site. The configure, make, sudo make install went smoothly without a lot of LDFLAGS and CPPFLAGS specifications. 14. Finally I typed meep and got the prompt and the correct version. Then I went through the meep abi initio tutorial and everything worked as expected. When meep runs you get a “some stuff is deprecated” message at the end, but for now at least it does not interfere with meep’s functioning. So there it is…I hope it helps. John Weiner _______________________________________________ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss