# Help testing make in MacOS Monterrey

**URL:** https://fortran-lang.discourse.group/t/help-testing-make-in-macos-monterrey/4220
**Category:** Uncategorized
**Created:** [August 25, 2022, 11:29am UTC](https://fortran-lang.discourse.group/t/help-testing-make-in-macos-monterrey/4220 "2022-08-25T11:29:11Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![lmiq](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/lmiq/32/555_2.png) [@lmiq](https://fortran-lang.discourse.group/u/lmiq)
#### Post date: [August 25, 2022, 11:29am UTC](https://fortran-lang.discourse.group/t/help-testing-make-in-macos-monterrey/4220/1 "2022-08-25T11:29:11Z")

</div>

A user of a package I develop (Packmol) is getting segmentation fault errors when trying to build the package in a MacOS Monterrey.

I do not have access to one of these machines, so I would be very glad if someone could test the build procedure (it is very simple) to see if there is a systemic problem there.

She is getting this error:

```auto
Error: "make: *** [sizes.o] Segmentation fault: 11"

```

The procedure to build the package is, assuming gfortran is installed:

```auto
git clone https://github.com/m3g/packmol --depth=1
cd packmol
make

```

It should end with something like:

```auto
 ------------------------------------------------------ 
 Compiling packmol with /usr/bin/gfortran 
 Flags: -O3 --fast-math -march=native -funroll-loops 
 ------------------------------------------------------ 
 ------------------------------------------------------ 
 Packmol succesfully built.
 ------------------------------------------------------ 

```

This package is downloaded by many people every day, so I find that error strange, but I’m not sure if it is a problem related to the new Mac architectures or something more specific of this user.

Thank you in advance.

---

<div class="post-metadata">

### Author: ![nicholaswogan](https://avatars.discourse-cdn.com/v4/letter/n/f1d935/32.png) [@nicholaswogan](https://fortran-lang.discourse.group/u/nicholaswogan)
#### Post date: [August 25, 2022, 2:02pm UTC](https://fortran-lang.discourse.group/t/help-testing-make-in-macos-monterrey/4220/2 "2022-08-25T14:02:37Z")

</div>

Does the package contain nested functions? Where one function is contained in another?

---

<div class="post-metadata">

### Author: ![lmiq](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/lmiq/32/555_2.png) [@lmiq](https://fortran-lang.discourse.group/u/lmiq)
#### Post date: [August 25, 2022, 2:05pm UTC](https://fortran-lang.discourse.group/t/help-testing-make-in-macos-monterrey/4220/3 "2022-08-25T14:05:11Z")

</div>

No, not really. (this is a \>10 yr old package with thousands of users, nobody reported that error yet).

My Makefile is probably somewhat fragile (@ivanpribec pointed that it fails if the make is run in parallel for instance). But I believe the error is something very specific to the user environment in case.

---

<div class="post-metadata">

### Author: ![nicholaswogan](https://avatars.discourse-cdn.com/v4/letter/n/f1d935/32.png) [@nicholaswogan](https://fortran-lang.discourse.group/u/nicholaswogan)
#### Post date: [August 25, 2022, 4:23pm UTC](https://fortran-lang.discourse.group/t/help-testing-make-in-macos-monterrey/4220/4 "2022-08-25T16:23:56Z")

</div>

In general, when someone updates their MacOS from e.g. Big Sur to Monterrey (or between other versions), they are likely to have a few development things break. I’ve experienced this.

My solution has been to just to completely reinstall the dev tool. So if they installed `make` via the command line tools, then they should [re-install the command line tools.](https://apple.stackexchange.com/questions/93573/how-to-reinstall-xcode-command-line-tools) They might also need to re-install gfortran via homebrew.

---

<div class="post-metadata">

### Author: ![shahmoradi](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/shahmoradi/32/3151_2.png) [@shahmoradi](https://fortran-lang.discourse.group/u/shahmoradi)
#### Post date: [August 26, 2022, 2:01am UTC](https://fortran-lang.discourse.group/t/help-testing-make-in-macos-monterrey/4220/5 "2022-08-26T02:01:41Z")

</div>

I tested it on an Intel macOS (not M1) with gfortran-10. It built fine. But I had to modify the makefile as it has the path to gfortran hardcoded, which did not on my system.  
Older versions of gfortran are known to cause segfault on Apple M1. I think gfortran 12 resolved them, but I have had any chance to test it yet. What’s the user’s gfortran version?
