How to build on Ubuntu 16.04

How do I build from source on Ubuntu 16.04.

I have compiled code a few times for different packages, not an expert but I’m OK. I can’t for the life of me figure out how to build this.

I have compiled ETL and installed it into my own prefix. I have specified my ETL location in the PATH before configuring synfig, but I just can’t get it to work.

In short, will someone hold my hand please.

P.S. Synfig is always crashing on me so I want to see if building from source will resolve.

PATH is for executables. For includes, it depends on build system and compiler you use. A quick search suggest researching CMAKE_SYSTEM_PREFIX_PATH for CMake and/or trying CPATH for gcc. I didn’t try it though.

Alternative would be to install into /usr/local; if you want to avoid calling build system from root, you can create required directories yourself and add write permissions for your user.

Another alternative would be building in chroot.

Hi,

you just need to use the building script supplied in the package.
From the commandline
$ DEBUG=1 autobuild/synfigstudio-linux-build.sh

After you should setup an IDE like described here:
wiki.synfig.org/Dev:IDE_Linux

Thanks for the replies. Yes, I thought it was as simple as using the build script but there is no such script in my download, in fact there is no autobuilds folder.

I donwloded the source for 1.2.1 stable from the Synfig web page.

I have set up and lxc container and am currently building it in that. I have let everything install to the default path.

I wanted to avoid this and install everything into my own folder on another drive, which is what I do for other things that I compile like ffmpeg, x264 etc. I use gcc and I specify includes with --extra-cflags and libs with --extra-ldflags. For synfig, the docs say to use CFLAGS= and LDFLAGS= but I can’t seem to get it to work, I am certain it is me being dumb.

There is also no autobuilds scripts in the stable release (1.2.1) source code download, so I couldn’t go down that route.

I will post back if my build is succesfull for anyone interested.

Please use source zip from Github instead of separated packages on SourceForge.
You will find autobuild folder inside with all the building scripts.

Project page: github.com/synfig/synfig
Direct link for 1.2.1 source: github.com/synfig/synfig/archive/v1.2.1.zip

Consider to use git to retrieve updated source as well :wink:

Thanks for the pointer on using git. I have downloaded source code from git before, so I am familiar(ish) with it. Is it worth pointing out to the Synfig guys that the link to sourceforge doesn’t have the autobuilds scripts ? (I’m not complaining, just trying to be helpful).

Meanwhile, I have actually compiled it succesfully, in an lxc container, using the source code from source forge. I took some pointers from another post on how to build on Ubuntu 8.10 which explains to use “sudo ldconfig” to relink newly installed libraries.

I worked my way through the usuall ‘configure/make/make install’ routine for each package, installed missing dependencies as each build failed, and installing ‘imagemagick’ when the synfigstudio build could not find ‘convert’.

I ssh into my lxc conatiner, forwarding X, and got a working synfig studio. (Haven’t fully tested it yet, I will test more over the weekend).

One question : Is the source code for 1.2.1 likely to change at all, or is that now frozen as the stable build ? Also, do I gain anything from using the autobuild scripts or is it perfectly OK for me to build like I just have ? (Not an expert at building code but I like to learn).

Thanks.

One of autotools ideas is that user doesn’t have to install anything extra to build, even autotools. Which is why “source package” generated by autotools typically will only have configure sh script (which accounts for terrible configuring performance among other things).

1.2.1 is a release. It has a tag in git. So no, it won’t be changing. Whatever comes from changes would have different version number.

I have zero idea about those .sh scripts that call autobuild cause i never used them. As for autotools “scripts”, you mostly need them if you want to change something in build system (e.g. add a source to compile).

Note that you can also use CMake to build (until someone breaks it).

The autobuild scripts permit to install all the required dependencies and does all the configure stuff.
It just needs to be run once, next builds can be done through ide once the projects are properly set up.
First compilation can be quite long, next ones are fast.

OK, I understand. Thanks for the explanation. I am not a programmer and have no plans to change any code and don’t need to set up an IDE.

The reason I wanted to build from source was to see if it was any more stable than the appimage. Unfortunately the answer is no. I am begining to wonder if it is my system, as opposed to synfig studio itself, but I really wouldn’t know where to start looking into this.

I have built 1.2.1 from source, it runs, but it is just as unstable. Also, it has missing icons and the debug (when I run from a terminal) shows that a lot of the icons can’t be found in my current them. I have tried all the different icon themes, even Adwaita, and the problem persists. Not a show stopper in itself.

When I say it is unstable, I mean it just randomly crashes on me. I can’t use it for more than 15 to 20 minutes without it crashing. I can’t replicate the issue, the crash seems truly random, unrelated to any particular function of the synfig studio. My current workaround is to have it autobackup every 1 minute, at least I don’t lose too much.

I am running Ubuntu Mate 16.04, I wonder if I should try another flavour/desktop ? I could easily install xubuntu, or gnome onto another partition, not an issue. Do you have a feel for how stable 1.2.1 is ? Would you be able to take a look at any of my log files and offer any advice ? (Again, not complaining here, just trying to figure this out).

Thanks.

Generally synfig uses its own icons, so i’m not sure why would theme interfere…

Synfig is well known for crashing.

Just logs aren’t likely to be helpful. What can be helpful is backtrace if you have debug symbols installed. But even then, if your crash is “random” and not reproduceable it’s unlikely someone will be able to fix it.

Pretty much like any synfig release :smiley: I wouldn’t say so called “stable” (currently 1.2.x) versions are much more stable than “testing” (currently 1.3.x). Generally there isn’t that much development going on… latest serious problem with master was unability to save files (github.com/synfig/synfig/issues/441).

The icons are built with Synfig itself during SynfigStudio compilation itself.
So it needs Synfig to be built and reachable.
Maybe you miss the proper zlib lib (see in my signature “No icons with appimage ?”) :wink:

Thanks again for the reply. I will take a look at the icon issue at some point.

The main thing I have taken from this is “synfig is well known for crashing”. I am going to continue using it and see how I get on, I accept it is free and open source and that’s why I always remain calm over things like this, but it’s just such a shame that it crashes so frequently for me.

I’ve installed Debian (gnome) on another parition and tried it out there. Couldn’t build 1.2.1 or the latest master branch as there is no installation candiidate for ‘libjasper-dev’. Same on Ubuntu 17.10. So it looks like I will not be able to build this after all.

I have just compiled the latest 1.3.4 from git, using the autobuild script. Everything seemed to build correctly and I can ssh into my lxc container, forward X and run synfigstudio.

I had a look at your icons link in your signature. I don’t think my error is the same, I have the vast majority of icons, just some are missing. The error in the console is

(synfigstudio:12914): Gtk-WARNING **: Error loading theme icon ‘go-up’ for stock: Icon ‘go-up’ not present in theme Adwaita

I get this error for the following icons

edit-cut
edit-copy
edit-paste
list-add
document-properties
go-next
go-previous
application-exit
help-contents
window-close
process-stop

and a few others …

Thing is, the icons with those names do exist.

Any thoughts ?

If other Gtk3 applications work normally. i can only think of it being connected to container/ssh/x/gtk relations.

Ahh, never thought of that ! I am thinking of my main system icons being used for client side decoration, but off course I am in a container !

I have now built inside a VM and the icons are all present as expected, so you are right in that it has something to do with being run inside a container. Strange thing is, when I change the icon theme in my main desktop, the error message explains that icons can’t be found within that theme, suggesting that the error is within my main desktop and not the container.

I have now installed ‘adwaita-icon-theme-full’ in my container and viola!, no more icon errors and everything looks fine icon wise.

So a quick recap on how I now compile synfig in Ubuntu 16.04

  1. Download the source code from git, either the latest stable (currently 1.2.1) or the latest development.
  2. Use the autobuild script to compile and install synfig and its dependencies.
  3. Synfig is installed into a ‘synfig’ folder in my home directory.
  4. Make sure ‘adwaita-icon-theme-full’ is installed.

Thanks for all the help.

Update in order to build on Ubuntu 18.04

The autobuild script will complain about missing libjasper-dev

This lib is not anymore distributed with Ubuntu but can be found and added manually from Xenial Security updates

libjasper1 page | Direct Link to the current .deb
libjasper-dev page |Direct Link to the current .deb

You will have to install them (libjasper1, then libjasper-dev) before to execute autobuild

sudo dpkg -i libjasper1_1.900.1-debian1-2.4ubuntu1.1_amd64.deb
sudo dpkg -i libjasper-dev_1.900.1-debian1-2.4ubuntu1.1_amd64.deb

Have fun :mrgreen:

P.S.: We should think about to migrate to OpenJPEG
en.wikipedia.org/wiki/OpenJPEG