Using the build scripts on OSX Lion

Hi!
Zelgadis has published the scripts he is using to create the packages for OSX. I’ve decided to give them a try on OSX Lion and post here the results of it.

First I updated Lion to its later version (10.7.3) and installed Xcode (4.3.1)
Then I downloaded the scripts from the github repo here: github.com/morevnaproject/synfig-osx
And finally run the scripts in order.

Link-prep: No issues
Macport-Builds: I had this message:

[code]iMac-de-Carlos:morevnaproject-synfig-osx-e1e7fe4 carlos$ sudo sh 2-macports-build
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 767k 100 767k 0 0 186k 0 0:00:04 0:00:04 --:–:-- 232k
-n extracting MacPorts sources …
done.
Compiling and updating MacPorts…
checking build system type… i386-apple-darwin11.3.0
checking host system type… i386-apple-darwin11.3.0
checking target system type… i386-apple-darwin11.3.0
checking MacPorts version… 2.0.3
checking for sw_vers… /usr/bin/sw_vers
checking for defaults… /usr/bin/defaults
checking for xcode-select… /usr/bin/xcode-select
checking Mac OS X version… 10.7.3
checking Xcode location… xcode-select: Error: No Xcode folder is set. Run xcode-select -switch <xcode_folder_path> to set the path to the Xcode folder.

checking Xcode version… 4.3.1
checking for gcc… no
checking for cc… no
checking for cl.exe… no
configure: error: in /Users/carlos/src/macports/MacPorts-2.0.3': configure: error: no acceptable C compiler found in $PATH Seeconfig.log’ for more details
2-macports-build: line 61: make: command not found
2-macports-build: line 62: make: command not found
sudo: make: command not found
Now selfupdating MacPorts. Please wait …
2-macports-build: line 79: port: command not found

Yor MacPorts installation is now ready to build SynfigStudio for Mac OS X.
iMac-de-Carlos:morevnaproject-synfig-osx-e1e7fe4 carlos$
[/code]

More later…

So I did the suggested action format he Error:

iMac-de-Carlos:morevnaproject-synfig-osx-e1e7fe4 carlos$ sudo xcode-select -switch /Applications/Xcode.app Password:
and repeated the command:

[code]iMac-de-Carlos:morevnaproject-synfig-osx-e1e7fe4 carlos$ sudo sh 2-macports-build
Compiling and updating MacPorts…
checking build system type… i386-apple-darwin11.3.0
checking host system type… i386-apple-darwin11.3.0
checking target system type… i386-apple-darwin11.3.0
checking MacPorts version… 2.0.3
checking for sw_vers… /usr/bin/sw_vers
checking for defaults… /usr/bin/defaults
checking for xcode-select… /usr/bin/xcode-select
checking Mac OS X version… 10.7.3
checking Xcode location… /Applications/Xcode.app/Contents/Developer
checking for gcc… no
checking for cc… no
checking for cl.exe… no
configure: error: in /Users/carlos/src/macports/MacPorts-2.0.3': configure: error: no acceptable C compiler found in $PATH Seeconfig.log’ for more details
2-macports-build: line 61: make: command not found
2-macports-build: line 62: make: command not found
sudo: make: command not found
Now selfupdating MacPorts. Please wait …
2-macports-build: line 79: port: command not found

Yor MacPorts installation is now ready to build SynfigStudio for Mac OS X.
iMac-de-Carlos:morevnaproject-synfig-osx-e1e7fe4 carlos$ gcc
-bash: gcc: command not found[/code]
So gcc was not installed.
To install gcc I needed to install the Developers Tools (I used the 3.1.1 version)

More later…

Ok, Developer Tools gave me some troubles to install, so I decided to search why gcc wasn’t installed. I found this:
superuser.com/questions/313107/d … delete-gcc
So I started Xcode->Preferences->Download and selected “Command line tools” under Components tab:

iMac-de-Carlos:morevnaproject-synfig-osx-e1e7fe4 carlos$ gcc i686-apple-darwin11-llvm-gcc-4.2: no input files iMac-de-Carlos:morevnaproject-synfig-osx-e1e7fe4 carlos$

good.

I’ve repeated the script. Passed the first errors. It finished suscessfully.

[code]Congratulations, you have successfully upgraded the MacPorts system.

DEBUG: Setting MacPorts sources ownership to root

The ports tree has been updated. To upgrade your installed ports, you should run
port upgrade outdated

Yor MacPorts installation is now ready to build SynfigStudio for Mac OS X.
iMac-de-Carlos:morevnaproject-synfig-osx-e1e7fe4 carlos$[/code]

So I’ll go for the next step.
More later…

Ok, after a while (long while) it started to build synfig and later synfigstudio.
Synfig failed to build:

:info:build In file included from layer_duplicate.cpp:42: :info:build ./canvas.h:144:22: error: no function named 'optimize_layers' with type 'void (synfig::Time, synfig::Context, Canvas::Handle, bool)' was found in the specified scope :info:build friend void synfig::optimize_layers(Time, Context, Canvas::Handle, bool seen_motion_blur); :info:build ^ :info:build 7 warnings and 1 error generated.
It is using the clang compiler so I guess that the clang fixes from htood would fix this.

And now, I think I should release a tar ball with the changes and then ask the macport maintainer to update the synfig port.

So it is time to start working on the next release.

-G

Great investigation work Genete! :smiley:

Hi ulrik!
How do we ask to update the synfig ports after we upload the tar balls? Is there other way than use the tar balls from macports? I would like to use one tar ball specifically created for the build.

-G

I wish I had the knowledge for things like this but unfortunately I am only a mediocre computer user that have a crush for animation :blush: