# MacOS support for SNAC

**URL:** <https://community.geodynamics.org/t/macos-support-for-snac/4380>\
**Category:** General\
**Tags:** installation\
**Created:** [December 9, 2025, 9:18pm UTC](https://community.geodynamics.org/t/macos-support-for-snac/4380 "2025-12-09T21:18:06Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![eitanrapa](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/eitanrapa/32/2947_2.png) [@eitanrapa](https://community.geodynamics.org/u/eitanrapa)\
**Post date:** [December 9, 2025, 9:18pm UTC](https://community.geodynamics.org/t/macos-support-for-snac/4380/1 "2025-12-09T21:18:06Z")

</div>

Hello, I am trying to install SNAC on a MacOS device but it seems that the Clang compiler is running into problems when running make. In particular, I think a lot of files are missing #include \<stdlib.h\> that Clang is strict on requiring at compilation. Additionally, there are some .so files that Clang refuses to link. Any help would be appreciated!

---

<div class="post-metadata">

**Author:** ![bangerth](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/bangerth/32/52_2.png) [@bangerth](https://community.geodynamics.org/u/bangerth)\
**Post date:** [December 9, 2025, 10:30pm UTC](https://community.geodynamics.org/t/macos-support-for-snac/4380/2 "2025-12-09T22:30:28Z")

</div>

@eitanrapa I’m not entirely sure who on this forum can help with SNAC questions. But to your two issues:

- It would of course be great if you could write a patch for [GitHub - geodynamics/snac: SNAC (StGermaiN Analysis of Continua) is an updated Lagrangian explicit finite difference code for modeling a finitely deforming elasto-visco-plastic solid in 3D.](https://github.com/geodynamics/snac) in which you add the missing `<stdlib.h>` header includes. I see that both @echoi2 and @gassmoeller have merged patches, and I imagine a patch that adds necessary header includes would be pretty uncontroversial.
- Regarding the link issues, can you post the error messages? It’s hard to diagnose problems without knowing what the actual problems are 🙂

Best  
WB

---

<div class="post-metadata">

**Author:** ![eitanrapa](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/eitanrapa/32/2947_2.png) [@eitanrapa](https://community.geodynamics.org/u/eitanrapa)\
**Post date:** [December 9, 2025, 10:43pm UTC](https://community.geodynamics.org/t/macos-support-for-snac/4380/3 "2025-12-09T22:43:50Z")

</div>

Hi WB,

Thank you for your response. I can definitely write a patch with the header includes. For the linking issue, this is my error:

ld: unsupported mach-o filetype (only MH\_OBJECT and MH\_DYLIB can be linked) in ‘/Users/erapaportbruck/Documents/GitHub/snac/build/lib/SnacTemperaturemodule.so’

clang: error: linker command failed with exit code 1 (use -v to see invocation)

---

<div class="post-metadata">

**Author:** ![bangerth](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/bangerth/32/52_2.png) [@bangerth](https://community.geodynamics.org/u/bangerth)\
**Post date:** [December 9, 2025, 11:04pm UTC](https://community.geodynamics.org/t/macos-support-for-snac/4380/4 "2025-12-09T23:04:30Z")

</div>

@eitanrapa I must admit that I don’t know what the error message is trying to say. I _believe_ that on Mac OS X, shared libraries are generally named `.dylib` instead of `.so`. It is possible that the makefiles for SNAC were simply never meant to be used on Mac and have only ever been tested on Linux – i.e., they hard-code things that are Linux-specific, including file endings. The files in the repository have not been touched in 17 years, so that actually sounds quite likely to me. But then I wouldn’t know for sure. You might have to work yourself through the Makefiles of SNAC to find the place where the `.so` library is built ☹

The “right” solution would of course be to replace the hand-written configuration and build system by something more modern – specifically by something that uses CMake. For someone who knows CMake, I suspect that wouldn’t be an incredible amount of work (perhaps 1-2 days), but the number of people who are proficient with CMake is not huge, and so that might be quite a lot of work for you. (That’s the kind of thing for which AI might actually be quite good at, though, given that there are many many existing examples out there – who knows.)

Best  
WB

---

<div class="post-metadata">

**Author:** ![echoi2](https://avatars.discourse-cdn.com/v4/letter/e/3be4f8/32.png) [@echoi2](https://community.geodynamics.org/u/echoi2)\
**Post date:** [December 10, 2025, 3:46am UTC](https://community.geodynamics.org/t/macos-support-for-snac/4380/5 "2025-12-10T03:46:44Z")

</div>

@eitanrapa SNAC is not maintained anymore… If you have a burning reason to run SNAC on your mac, how about taking the Docker route? A Docker file has been recently added.

---

<div class="post-metadata">

**Author:** ![eitanrapa](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/eitanrapa/32/2947_2.png) [@eitanrapa](https://community.geodynamics.org/u/eitanrapa)\
**Post date:** [December 10, 2025, 5:01am UTC](https://community.geodynamics.org/t/macos-support-for-snac/4380/6 "2025-12-10T05:01:03Z")

</div>

@echoi2 Thank you for your response. I will try the Docker route, and if that doesn’t work I can just try installing it on a Linux machine.

@bangerth I do have some experience with another C builder (mm), but since SNAC is no longer maintained perhaps it is not worth fixing.

---

<div class="post-metadata">

**Author:** ![echoi2](https://avatars.discourse-cdn.com/v4/letter/e/3be4f8/32.png) [@echoi2](https://community.geodynamics.org/u/echoi2)\
**Post date:** [December 10, 2025, 12:10pm UTC](https://community.geodynamics.org/t/macos-support-for-snac/4380/7 "2025-12-10T12:10:54Z")

</div>

@eitanrapa, you’re welcome and good luck!

BTW, I presume what you would like to try is a certain functionality of SNAC, not SNAC itself. If that’s the case, you might want to take a look at [GitHub - GeoFLAC/DynEarthSol: Dynamic Earth Solver, a standard finite element transplant of geoflac for unstructured meshes with P1 elements in 2D and 3D](https://github.com/GeoFlac/DynEarthSol). DynEarthSol implements the same solution algorithm with SNAC and provides the same set of rheologies.

---

<div class="post-metadata">

**Author:** ![eitanrapa](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/eitanrapa/32/2947_2.png) [@eitanrapa](https://community.geodynamics.org/u/eitanrapa)\
**Post date:** [December 10, 2025, 3:59pm UTC](https://community.geodynamics.org/t/macos-support-for-snac/4380/8 "2025-12-10T15:59:08Z")

</div>

Hi @echoi2, I wasn’t aware of that code, thank you for recommending it. I see that DynEarthSol is a finite element code instead of a finite difference code like SNAC. I am interested in modeling how faults initiate and evolve naturally from constitutive laws without prescribing geometry, and so my main motivation for trying SNAC is that in my understanding, the finite difference aspect helps avoid the remeshing problems I might encounter with an FEM. I really appreciate your opinion! And thanks for developing these tools for us.

---

<div class="post-metadata">

**Author:** ![echoi2](https://avatars.discourse-cdn.com/v4/letter/e/3be4f8/32.png) [@echoi2](https://community.geodynamics.org/u/echoi2)\
**Post date:** [December 10, 2025, 4:45pm UTC](https://community.geodynamics.org/t/macos-support-for-snac/4380/9 "2025-12-10T16:45:51Z")

</div>

Good to know more about what you would like to work on!

> how faults initiate and evolve naturally from constitutive laws without prescribing geometry

The family of FLAC-based codes including SNAC and DynEarthSol have been extensively used for this type of problem. Please feel free to leave a problem description on the DynEarthSol’s GitHub issue tracker and ask for further guidance to get started with it.

As you pointed out, DynEarthSol still needs remeshing. But in that regard, so does SNAC: It’s technically finite difference but essentially Lagrangian finite element.

Finally, you would want to check out ASPECT as well. The strain weakening rheology it has might be suitable for your problem about fault initiation and evolution.

---

<div class="post-metadata">

**Author:** ![eitanrapa](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/eitanrapa/32/2947_2.png) [@eitanrapa](https://community.geodynamics.org/u/eitanrapa)\
**Post date:** [December 10, 2025, 5:57pm UTC](https://community.geodynamics.org/t/macos-support-for-snac/4380/10 "2025-12-10T17:57:45Z")

</div>

Great! That makes sense. Thanks again.
