<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.wiki.synfig.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=G3power</id>
		<title>Synfig Studio :: Documentation - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://www.wiki.synfig.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=G3power"/>
		<link rel="alternate" type="text/html" href="https://www.wiki.synfig.org/Special:Contributions/G3power"/>
		<updated>2026-04-27T17:36:46Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.26.3</generator>

	<entry>
		<id>https://www.wiki.synfig.org/index.php?title=Dev:Building_On_Mac_OS_X&amp;diff=11900</id>
		<title>Dev:Building On Mac OS X</title>
		<link rel="alternate" type="text/html" href="https://www.wiki.synfig.org/index.php?title=Dev:Building_On_Mac_OS_X&amp;diff=11900"/>
				<updated>2010-04-15T20:14:04Z</updated>
		
		<summary type="html">&lt;p&gt;G3power: /* Boot strapping */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--Categories--&amp;gt;&lt;br /&gt;
{{Category|Building}}&lt;br /&gt;
&lt;br /&gt;
There is currently no up-to-date build of Synfig for Mac OS X.&lt;br /&gt;
&lt;br /&gt;
== Build environment ==&lt;br /&gt;
&lt;br /&gt;
Since these instructions assume one is using MacPorts, make sure the following environment variables are set accordingly:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
export PATH=&amp;quot;/opt/local/bin:$PATH&amp;quot;&lt;br /&gt;
export ACLOCAL_FLAGS=&amp;quot;-I /opt/local/share/aclocal&amp;quot;&lt;br /&gt;
export PKG_CONFIG_PATH=&amp;quot;/opt/local/lib/pkgconfig&amp;quot;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There seem to be two ways of building GTK applications for OS X:&lt;br /&gt;
&lt;br /&gt;
== Using the native GTK port ==&lt;br /&gt;
&lt;br /&gt;
In order to build Synfig natively on Mac OS X using the native GTK port (as opposed to using X11), you will require the following:&lt;br /&gt;
&lt;br /&gt;
* Mac OS X developer tools (i.e. [http://developer.apple.com/tools/xcode/ XCode])&lt;br /&gt;
* git (&amp;quot;git-core&amp;quot; port on macports)&lt;br /&gt;
* subversion (&amp;quot;subversion&amp;quot; port on macports)&lt;br /&gt;
* jhbuild&lt;br /&gt;
* libxml++&lt;br /&gt;
* [http://developer.imendio.com/projects/gtk-macosx Imendio's GTK port]'s &amp;quot;.jhbuildrc&amp;quot; file&lt;br /&gt;
* Subversion checkout of &amp;quot;etl&amp;quot;, &amp;quot;synfig-core&amp;quot;, and &amp;quot;synfig-studio&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Boot strapping ===&lt;br /&gt;
&lt;br /&gt;
First of all make sure you have a Terminal window open. This will be used in order to perform all the steps necessary to compile synfig.&lt;br /&gt;
&lt;br /&gt;
You might also want to compile as a different user, as one tool used, &amp;quot;jhbuild&amp;quot;, requires files to be placed in the current user's home directory. This can be done by typing the following into the terminal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
su &amp;lt;other username&amp;gt;&lt;br /&gt;
&amp;lt;type in other username's password&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I shall assume you only have XCode and MacPorts installed. In order to get subversion and git, you should be able to type the following into the terminal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo port install git-core&lt;br /&gt;
sudo port install subversion&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Assuming MacPorts installed subversion and git correctly, you'll now need to grab and compile a copy of jhbuild from the gnome repository, which can be done like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
svn co http://svn.gnome.org/svn/jhbuild/trunk jhbuild&lt;br /&gt;
cd jhbuild &amp;amp;&amp;amp; make -f Makefile.plain install&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will also need the .jhbuildrc file from Imendio. It is also a good idea to ensure your PATH contains your &amp;quot;~/bin&amp;quot; directory and &amp;quot;/opt/gtk/bin&amp;quot;, the latter being important when you start to build everything else. Finally, make sure that &amp;quot;/opt/gtk/&amp;quot; exists and is owned by your build user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
curl http://developer.imendio.com/svn/gtk-osx-build/jhbuildrc-gtk-osx &amp;gt; ~/.jhbuildrc&lt;br /&gt;
export PATH=&amp;quot;/opt/gtk/bin:~/bin:$PATH&amp;quot;&lt;br /&gt;
sudo mkdir -p /opt/gtk &amp;amp;&amp;amp; sudo chown &amp;lt;username&amp;gt;:&amp;lt;groupname&amp;gt; /opt/gtk&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: The jhbuildrc file may have been moved. If the above location fails, try:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
curl http://people.imendio.com/richard/gtk-osx-build/jhbuildrc-gtk-osx &amp;gt; ~/.jhbuildrc&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can type in the following to build the bootstrap environment:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
jhbuild bootstrap&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compiling GTK and other dependencies ===&lt;br /&gt;
&lt;br /&gt;
Assuming jhbuild has finished building all of the bootstrap lib's and such, you will not have to tell it to build &amp;quot;gtkmm&amp;quot;, which is the C++ interface to GTK.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
jhbuild build gtkmm&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note(SS): You may get an error asking for gtk-doc:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
You must have gtk-doc installed to compile GLib.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you do, stop the build and install gtk-doc with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
jhbuild build gtk-doc&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, re-issue the build command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
jhbuild build gtkmm&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will also build GTK and all of its dependencies. However it falls short of providing another dependency which Synfig requires, which is libxml++. This can be grabbed and built as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
curl -L http://ftp.gnome.org/pub/GNOME/sources/libxml++/2.19/libxml++-2.19.2.tar.gz &amp;gt; libxml++-2.19.2.tar.gz&lt;br /&gt;
tar -xzf libxml++-2.19.2.tar.gz&lt;br /&gt;
cd libxml++-2.19.2 &amp;amp;&amp;amp; ./configure --prefix=/opt/gtk &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optionally you might also want to grab and build [http://www.openexr.com/ OpenEXR]. This should of course be a simple configure, make, make install job like libxml++.&lt;br /&gt;
&lt;br /&gt;
=== Synfig itself ===&lt;br /&gt;
&lt;br /&gt;
You should now be able to follow the {{l|Build instructions}} to compile ETL, synfig-core, and synfig-studio. The only thing different you should do is add &amp;quot;--prefix=/opt/gtk --exec-prefix=/opt/gtk&amp;quot; to the &amp;quot;./configure&amp;quot; options when building each package.&lt;br /&gt;
&lt;br /&gt;
Assuming you manage to build it correctly, you should now be able to type the following in order for Synfig to pop up on your desktop:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
synfigstudio&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note though that this isn't the end of the story: we still need to package everything up into an .app so that the more sane of us can run Synfig without having to resort to opening a terminal.&lt;br /&gt;
&lt;br /&gt;
'''TODO''': Describe how to properly package everything into an .app.&lt;br /&gt;
&lt;br /&gt;
=== Issues === &lt;br /&gt;
&lt;br /&gt;
There are currently numerous issues with Synfig with Imendio's GTK port. Watch out for:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;strike&amp;gt;Window focus can sometimes be lost. If this happens, just select a window from another Mac OS X app and then select the Synfig window again.&amp;lt;/strike&amp;gt;&lt;br /&gt;
* &amp;lt;strike&amp;gt;Menus do not function correctly.&amp;lt;/strike&amp;gt;&lt;br /&gt;
* &amp;lt;strike&amp;gt;The file browser doesn't work, so you have to load files from startup.&amp;lt;/strike&amp;gt;&lt;br /&gt;
* Sometimes mouse focus on windows is lost. To solve this, try moving the affected window. Failing that, you should still be able to use the keyboard to navigate.&lt;br /&gt;
* No input devices are enumerated by GTK.&lt;br /&gt;
* XCode project files exist, but they are currently broken. Thus we just use the terminal to compile everything.&lt;br /&gt;
* Because we made the prefix &amp;quot;/opt/gtk&amp;quot;, synfig will go looking for interface images there, which obviously won't quite work right if we want to package everything into an .app.&lt;br /&gt;
&lt;br /&gt;
{{l|Image:Picture1kd1.jpg|Obligatory screen shot}}&lt;br /&gt;
&lt;br /&gt;
== Using X11 ==&lt;br /&gt;
&lt;br /&gt;
In order to compile synfig for X11, you will need to install gtkmm and libxml++ via MacPorts (or Fink). This can be done as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo port install gtkmm libxmlxx2&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will also install all the other dependencies (such as X11), so it make take some time to compile.&lt;br /&gt;
&lt;br /&gt;
You need to set PKG_CONFIG_PATH so that the ETL and synfig-core header files and libraries can be found:&lt;br /&gt;
&lt;br /&gt;
 export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
For some unknown reason compiling ETL, synfig-core and synfig-studio doesn't work properly when using MacPorts auto* tools. However, it does work with the bootstrap toolset used to compile Imendio's native GTK port.  So it is suggested that you follow the {{l|Building_On_Mac_OS_X#Boot_strapping|Boot strapping}} section up to and including the 'jhbuild bootstrap' line and make sure &amp;quot;/opt/gtk/bin&amp;quot; is first in your $PATH in order to properly compile etl,  synfig-core and synfig-studio.&lt;br /&gt;
&lt;br /&gt;
You should now be able to follow the {{l|Build instructions}} to compile ETL, synfig-core, and synfig-studio. The only thing different you should do is add &amp;quot;--prefix=/opt/local --exec-prefix=/opt/local&amp;quot; to the &amp;quot;./configure&amp;quot; options when building each package.&lt;br /&gt;
&lt;br /&gt;
Assuming you manage to build it correctly, you should now be able to type the following in order for Synfig to pop up on your desktop:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
synfigstudio&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note though that this isn't the end of the story: we still need to package everything up into an .app so that the more sane of us can run Synfig without having to resort to opening a terminal.&lt;br /&gt;
&lt;br /&gt;
'''TODO''': Describe how to properly package everything into an .app.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== no &amp;quot;awk&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
If you get an error during building MacPorts ports complaining that a program called &amp;quot;awk&amp;quot; cannot be found, then you should install the 'gawk' port like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo port install gawk&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;no command found&amp;quot; when running jhbuild ===&lt;br /&gt;
&lt;br /&gt;
When using jhbuild, you might get an error back like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ jhbuild glibmm&lt;br /&gt;
jhbuild glibmm: no command found&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is because you need to specify the &amp;quot;build&amp;quot; command when building a package, like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
jhbuild build glibmm&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== problem building &amp;quot;doxygen&amp;quot; via jhbuild ===&lt;br /&gt;
&lt;br /&gt;
When building doxygen, you may get an error during the build process mentioning &amp;quot;lipo&amp;quot; failed to find a file. To fix this, you should go into the shell (option 4) when prompted, and enter the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
./configure --prefix /opt/gtk --platform macosx-c++ --install /usr/bin/install&lt;br /&gt;
make &amp;amp;&amp;amp; exit&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then when prompted again, choose &amp;quot;ignore error and continue to build&amp;quot; (option 2).&lt;br /&gt;
&lt;br /&gt;
=== problems with external libraries ===&lt;br /&gt;
&lt;br /&gt;
If your build doesn't find external graphics libraries (such as libpng), but you know they're installed, you may need to set some additional environment variables, like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;export CPPFLAGS=-I/opt/local/include&lt;br /&gt;
export LDFLAGS=-L/opt/local/lib&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you're using native GTK+, change &amp;quot;/opt/local&amp;quot; to &amp;quot;/opt/gtk&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== other problems building via jhbuild ===&lt;br /&gt;
&lt;br /&gt;
Solving other issues with building packages in jhbuild is beyond the scope of this document as all of the packages are still under development by their respective authors.&lt;/div&gt;</summary>
		<author><name>G3power</name></author>	</entry>

	</feed>