Help testing make in MacOS Monterrey

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:

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

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

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

It should end with something like:

 ------------------------------------------------------ 
 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.

1 Like

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

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.

1 Like

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. They might also need to re-install gfortran via homebrew.

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?

1 Like