# Error configuring under macOS Monterey

**URL:** <https://forums.synfig.org/t/error-configuring-under-macos-monterey/13535>\
**Category:** Building synfig\
**Tags:** cmake, morevna-builds\
**Created:** [November 1, 2022, 9:55pm UTC](https://forums.synfig.org/t/error-configuring-under-macos-monterey/13535 "2022-11-01T21:55:45Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![pablogil](https://forums.synfig.org/user_avatar/forums.synfig.org/pablogil/32/6743_2.png) [@pablogil](https://forums.synfig.org/u/pablogil)\
**Post date:** [November 1, 2022, 9:55pm UTC](https://forums.synfig.org/t/error-configuring-under-macos-monterey/13535/1 "2022-11-01T21:55:46Z")

</div>

Hi,

I’m trying to compile Synfig under macOS Monterey and I get this error when running “2-build-production.sh”:

```auto
Going to configure...
running autoreconf...
Done! Please run ./configure now.
~/GitHub/synfig/_production/ETL
checking whether make supports nested variables... yes
checking build system type... x86_64-apple-darwin21.6.0
checking host system type... x86_64-apple-darwin21.6.0
checking target system type... x86_64-apple-darwin21.6.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /Users/me/GitHub/synfig/ETL/config/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports the include directive... yes (GNU style)
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking whether the compiler supports GNU C++... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking for g++ option to enable C++11 features... (cached) none needed
checking dependency style of g++... (cached) gcc3
checking for gcc... gcc
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking whether the compiler supports GNU C++... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking for g++ option to enable C++11 features... (cached) none needed
checking dependency style of g++... (cached) gcc3
checking how to run the C++ preprocessor... g++ -E
checking for ranlib... ranlib
checking whether g++ supports C++11 features by default... no
checking whether g++ supports C++11 features with -std=c++11... yes
checking for compiler warning flags to use... -W -Wall
checking for optimization flags... -O2
checking for debug flags... -DNDEBUG
checking for profiling... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for main in -luser32... no
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for windows.h... no
checking for QueryPerformanceCounter... no
checking for gettimeofday... yes
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for glibmm-2.4 >= 2.24.2... no
configure: error: ** You need to install glibmm-2.4 version 2.24.2 or higher.

```

I have install and reinstalled manually glib and glibmm and they both are at 2.74.0 but autoconf says the version is lower than 2.24.2…

Any idea how to solve this problem?

Thanks

---

<div class="post-metadata">

**Author:** ![BobSynfig](https://forums.synfig.org/user_avatar/forums.synfig.org/bobsynfig/32/175_2.png) [@BobSynfig](https://forums.synfig.org/u/BobSynfig)\
**Post date:** [November 1, 2022, 11:57pm UTC](https://forums.synfig.org/t/error-configuring-under-macos-monterey/13535/2 "2022-11-01T23:57:47Z")

</div>

Hi,  
the check for version is done here: [synfig/configure.ac at master · synfig/synfig · GitHub](https://github.com/synfig/synfig/blob/master/ETL/configure.ac)

According [pkgs.org](http://pkgs.org), it seems versions 2.74.0 are part of glibmm-2.68 and not glibmm-2.4 (2.4 stops at 2.66.0)  
See [https://pkgs.org/download/libglibmm-2.4-dev](https://pkgs.org/download/libglibmm-2.4-dev) and  
[https://pkgs.org/download/libglibmm-2.68-dev](https://pkgs.org/download/libglibmm-2.68-dev)

On the site of homebrew, the last version is 2.74  
[https://formulae.brew.sh/formula/glibmm](https://formulae.brew.sh/formula/glibmm) (aka **glibmm@2.74** )

Try to uninstall the last version and install instead the 2.66 or even 2.64  
[https://formulae.brew.sh/formula/glibmm@2.66](https://formulae.brew.sh/formula/glibmm@2.66) brew install glibmm@2.66  
[https://formulae.brew.sh/formula/glibmm@2.64](https://formulae.brew.sh/formula/glibmm@2.64) brew install glibmm@2.64

See also here for PKG\_CONFIG: [glib - glibmm-2.4 install not detected on OS X - Stack Overflow](https://stackoverflow.com/questions/64735044/glibmm-2-4-install-not-detected-on-os-x)

Good luck 🙂

---

<div class="post-metadata">

**Author:** ![pablogil](https://forums.synfig.org/user_avatar/forums.synfig.org/pablogil/32/6743_2.png) [@pablogil](https://forums.synfig.org/u/pablogil)\
**Post date:** [November 2, 2022, 8:38am UTC](https://forums.synfig.org/t/error-configuring-under-macos-monterey/13535/3 "2022-11-02T08:38:19Z")

</div>

Thanks for your help,

But it still doesn’t work: I follow your instructions and now I have just glibmm@2.66 installed (v2.64 does not exists in homebrew) and checked the Stack Overflow post about “glibmm2.4 install not detected on OS X” but it didn’t work.

I usually feel lost about Homebrew, packages and stuff but this looks smelly to me:

 ![1](https://forums.synfig.org/uploads/default/original/2X/5/5689257388738d5ef88cbebb757561660fc5705f.png)  
 ![2](https://forums.synfig.org/uploads/default/original/2X/5/52b202b239e60d8498abee66d959d2cc652995d9.png)  
Why do they point to v2.4 inside if they are supposed to be newer versions?

Thanks again

---

<div class="post-metadata">

**Author:** ![BobSynfig](https://forums.synfig.org/user_avatar/forums.synfig.org/bobsynfig/32/175_2.png) [@BobSynfig](https://forums.synfig.org/u/BobSynfig)\
**Post date:** [November 2, 2022, 9:23am UTC](https://forums.synfig.org/t/error-configuring-under-macos-monterey/13535/4 "2022-11-02T09:23:19Z")

</div>

My bad for 2.64, I saw “Formerly known as: **glibmm@2.64** ” in the page of 2.66.

For the versioning, the main package is known as glibmm-2.4 and they can have different versions, like Windows 7 was in fact Windows NT 6.1 internally…

If you did the `export PKG_CONFIG_PATH` like said in SO, don’t forget to open a new console or restart your computer to load it.

You could try to build in a virtual machine or use the [GitHub - morevnaproject/morevna-builds](https://github.com/morevnaproject/morevna-builds) system

---

<div class="post-metadata">

**Author:** ![pablogil](https://forums.synfig.org/user_avatar/forums.synfig.org/pablogil/32/6743_2.png) [@pablogil](https://forums.synfig.org/u/pablogil)\
**Post date:** [November 18, 2022, 10:52pm UTC](https://forums.synfig.org/t/error-configuring-under-macos-monterey/13535/5 "2022-11-18T22:52:42Z")

</div>

I was finally able to fix this issue by running `./2-build-cmake.sh`, it again aborted about glibmm but in this case it gave me this other comment:

```auto
...
-- Checking for module 'glibmm-2.4'
-- Package 'gobject-2.0' requires 'libffi >= 3.0.0' but version of libffi is 2.1
...

```

So I googled it and reached [here](https://github.com/mesonbuild/meson/issues/2273#issuecomment-420412230) where I got a simple solution:

```auto
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"

```

with that line `./2-build-production.sh` went perfectly without the glibmm error… I’m not an expert but it looks like the problem wasn’t with glibmm itself but one of its dependencies, libffi. 🤔 😊

---

<div class="post-metadata">

**Author:** ![BobSynfig](https://forums.synfig.org/user_avatar/forums.synfig.org/bobsynfig/32/175_2.png) [@BobSynfig](https://forums.synfig.org/u/BobSynfig)\
**Post date:** [November 18, 2022, 11:04pm UTC](https://forums.synfig.org/t/error-configuring-under-macos-monterey/13535/6 "2022-11-18T23:04:33Z")

</div>

@ice0  
Maybe libffi should be added to the required packages in [1-setup-osx-brew.sh](https://github.com/synfig/synfig/blob/master/1-setup-osx-brew.sh)  
Current version that will be installed is [3.4.4](https://formulae.brew.sh/formula/libffi)

---

<div class="post-metadata">

**Author:** ![ice0](https://forums.synfig.org/user_avatar/forums.synfig.org/ice0/32/4612_2.png) [@ice0](https://forums.synfig.org/u/ice0)\
**Post date:** [November 19, 2022, 1:02am UTC](https://forums.synfig.org/t/error-configuring-under-macos-monterey/13535/7 "2022-11-19T01:02:06Z")

</div>

@pablogil

For macOS, the recommended way to build Synfig is to use cmake.  
Can you try these commands inside your Synfig folder?

```auto
mkdir build-cmake && cd build-cmake && cmake ..
make -j8

```

@BobSynfig  
libffi is a dependency for gtk3, this is the reason why I didn’t add it.

---

<div class="post-metadata">

**Author:** ![pablogil](https://forums.synfig.org/user_avatar/forums.synfig.org/pablogil/32/6743_2.png) [@pablogil](https://forums.synfig.org/u/pablogil)\
**Post date:** [November 19, 2022, 9:19am UTC](https://forums.synfig.org/t/error-configuring-under-macos-monterey/13535/8 "2022-11-19T09:19:45Z")

</div>

Thanks,

I didn’t know Cmake option was preferred under macOS… it maybe could be added on the docs as they are the ones that me (and other) follow to compile Synfig.

Anyway, after the commented change, Autotools works under macOS.

I have just tried Cmake option and it worked as well. 😊

Does `3-package-osx-dmg.sh` works for creating the SynfigStudio.app as well with Cmake?

Thanks

---

<div class="post-metadata">

**Author:** ![pablogil](https://forums.synfig.org/user_avatar/forums.synfig.org/pablogil/32/6743_2.png) [@pablogil](https://forums.synfig.org/u/pablogil)\
**Post date:** [January 19, 2023, 9:55am UTC](https://forums.synfig.org/t/error-configuring-under-macos-monterey/13535/9 "2023-01-19T09:55:29Z")

</div>

Just as an annotation for readers or people interested on building under macOS:

- the recommended way to build Synfig is to use **cmake**
- but if you want to package Synfig (that is, get a distributable .app file) you need to do it with **autotools**

Am I right @ice0?

Cheers

---

<div class="post-metadata">

**Author:** ![BobSynfig](https://forums.synfig.org/user_avatar/forums.synfig.org/bobsynfig/32/175_2.png) [@BobSynfig](https://forums.synfig.org/u/BobSynfig)\
**Post date:** [January 19, 2023, 10:21am UTC](https://forums.synfig.org/t/error-configuring-under-macos-monterey/13535/10 "2023-01-19T10:21:58Z")

</div>

Yes, it is this.  
cmake for development on local computer.  
autotools when building for distribution, using [morevna-builds](https://github.com/morevnaproject/morevna-builds/)

---

<div class="post-metadata">

**Author:** ![ice0](https://forums.synfig.org/user_avatar/forums.synfig.org/ice0/32/4612_2.png) [@ice0](https://forums.synfig.org/u/ice0)\
**Post date:** [January 19, 2023, 10:56am UTC](https://forums.synfig.org/t/error-configuring-under-macos-monterey/13535/11 "2023-01-19T10:56:56Z")

</div>

Yes, you are right guys!
