Error configuring under macOS Monterey

Hi,

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

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

Hi,
the check for version is done here: synfig/configure.ac at master · synfig/synfig · GitHub

According 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 and
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 (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 brew install glibmm@2.66
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

Good luck :slight_smile:

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:



Why do they point to v2.4 inside if they are supposed to be newer versions?

Thanks again

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 system

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:

...
-- 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 where I got a simple solution:

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. :thinking: :blush:

@ice0
Maybe libffi should be added to the required packages in 1-setup-osx-brew.sh
Current version that will be installed is 3.4.4

@pablogil

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

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.

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

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

Thanks