NanoComp / meep

free finite-difference time-domain (FDTD) software for electromagnetic simulations
GNU General Public License v2.0
1.23k stars 623 forks source link

Installation for M1 Mac #2495

Closed aditya-sengupta closed 1 year ago

aditya-sengupta commented 1 year ago

I'm running into issues with both ways of installing for MacOS with an M1 chip. With conda, I get "the following packages are not available from current channels: pymeep". From source, I can install harminv and libctl as expected, but mpb doesn't seem to have a --without-guile flag like libctl did, and my version of Guile (from homebrew) doesn't seem to be linking correctly: I get

checking for guile... yes
checking for guile-config... guile-config
error: ("/opt/homebrew/opt/pkg-config/bin/pkg-config" "--libs" "guile-3.0") exited with non-zero error code 127
error: ("/opt/homebrew/opt/pkg-config/bin/pkg-config" "--cflags" "guile-3.0") exited with non-zero error code 127
checking if linking to guile works... no
configure: error: guile-config is broken

The documentation suggests installing guile-devel or guile-dev for this, but I can't find where to get those on the Guile documentation or anywhere else online. I'd appreciate any guidance!

Yaraslaut commented 1 year ago

Hi, some time ago I submited a PR (https://github.com/NanoComp/meep/pull/2241 ) that allows to compile meep wthiout guile, since I've been struggling myself with guile so you can see from the code is that for compilation of mpb without guile you need to specify --without-libctl flag

aditya-sengupta commented 1 year ago

This worked, thank you! For anyone else looking at this, I also had to rebuild libctl with the --enable-shared flag.