Synfig CMake Port

Need help to contribute to code? Want to help synfig with a patch? Discuss it here.
0u812
Posts: 2
Joined: Fri Apr 25, 2014 2:57 am

Synfig CMake Port

Postby 0u812 » Fri Apr 25, 2014 4:04 am

Hi All.

I understand there has been on ongoing interest in porting the Synfig build system to CMake (references: here and here). If there is still active interest in this, I wanted to share a CMake port which is based on a several-month-old "fork" of synfig:master (due to complications it's not technically a fork, but for practical purposes it is):

https://github.com/0u812/cynfig

Linux support is fairly complete, but is missing some features that were present in the autotools build, but the all of essential features are there. Both Synfig & Synfig Studio compile and run and can render stills and sequences of images. Cygwin is also supported. Attached is a screenshot showing the Linux Build side-by-side with the Cygwin build running inside a Windows 8.1 VM. You can even build parts of it with Visual Studio (the synfig library and executable, although you can't run it yet). I'm still working on bringing the CMake feature set closer to autotools, but I wanted to post here to get feedback about whether people would want to pull this into synfig:master at some point (after I bring it up to date with the latest changes in master).

screenshot-synfig64-splash-small.jpg


I really think that having a good platform-independent CMake build system will help attract new developers to Synfig and accelerate the project, which is one of the reasons I invested a fair amount of my own time in this port. Hopefully, other people agree, and would be interested in trying out the CMake build so any remaining bugs could be fixed. I will post some build instructions on the Github page soon.

Advertisement

User avatar
d.j.a.y
Site Admin
Posts: 1356
Joined: Fri Apr 27, 2012 4:35 am
Contact:

Re: Synfig CMake Port

Postby d.j.a.y » Fri Apr 25, 2014 7:30 am

Hello 0u812 and welcome here!

I did't test or review the work you have done, but i can say, from my point of view, that all initiative to deploy and develop synfig in particular, freesoftware in general, is warmly welcome !

Good luck for the last things you have to continue to...
If that solved, please edit initial title adding [SOLVED]

Code: Select all

for each doc in [wiki] ;; if not doc.lang.your ;; then translate(doc, lang.your) ;;

-< Synfig documentation Getting started >-

User avatar
Genete
Site Admin
Posts: 5155
Joined: Sat Dec 01, 2007 6:26 am
Location: Spain

Re: Synfig CMake Port

Postby Genete » Fri Apr 25, 2014 9:39 am

Hi 0u812!
Those news are awesome!. We would be very happy if you rebase your branch onto the master branch. That would allow us to test cmake on different distributions and operating systems and so validate your work.

I can see that you haven't forked synfig repository and that's not a good idea. It would make more complex to us to merge it to the normal workflow. Please try to fork synfig repository first and then add the commits on top of master over the fork. This way it would be easier to issue a pull request and to solve the merge from our side.

Fantastic work!
-G
Synfig needs your help!
Developers, packagers, bug testers, translators, artists, web developers, wiki writers... you can contribute! :D

0u812
Posts: 2
Joined: Fri Apr 25, 2014 2:57 am

Re: Synfig CMake Port

Postby 0u812 » Tue Apr 29, 2014 3:03 pm

Thanks for the positive responses, everybody! I'll fork the Synfig master branch and integrate my changes. In the meantime, I uploaded instructions for Fedora (tested with 20 but it should work with any recent version). I also plan on uploading instructions for at least Ubuntu, Cygwin and Visual Studio (partial build) in the near future. I haven't tested the CMake port on a Mac yet but I hope to do so as soon as I have some time on my hands.

User avatar
eldruin
Posts: 94
Joined: Tue Feb 16, 2010 11:08 pm
Location: Germany
Contact:

Re: Synfig CMake Port

Postby eldruin » Sat Dec 06, 2014 7:56 pm

Hi 0u812!
I hope you are still around here.
I would really like to change the build system to cmake. I agree with you that this could also lower the initial barrier and get more people to hack around.
If you are interested, I will have some free time during christmas :)
I added an issue for this here: http://www.synfig.org/issues/thebuggenie/synfig/issues/721

PS: edited, I didn't read the previous comments

User avatar
caryoscelus
Posts: 80
Joined: Wed Nov 11, 2015 9:10 am
Contact:

Re: Synfig CMake Port

Postby caryoscelus » Fri Nov 04, 2016 5:13 pm

Wasn't aware of this thread, but anyway i've just started another effort to port to cmake today: https://github.com/synfig/synfig/issues/279

Anyway, i'm starting from scratch because i suspect it'll be easier and i don't exactly like what i've seen from "cynfig" cmakelists.

eldruin, if you are still interested in port, any help is appreciated.

User avatar
caryoscelus
Posts: 80
Joined: Wed Nov 11, 2015 9:10 am
Contact:

Re: Synfig CMake Port

Postby caryoscelus » Mon Nov 07, 2016 8:58 am

Everything is buildable for me with CMake now, so i need some testers to make it portable.

CMake branch: https://github.com/caryoscelus/synfig/tree/cmake
Build instructions: https://github.com/caryoscelus/synfig/t ... installing
Issue for discussion: https://github.com/synfig/synfig/issues/279

User avatar
DaveJ
Posts: 314
Joined: Fri Jul 01, 2011 6:14 am
Location: Hungary

Re: Synfig CMake Port

Postby DaveJ » Sat Jan 28, 2017 3:01 pm

I'm currently trying to build the latest version of Synfig Studio from source using CMake on Manjaro 16.10 64bit KDE Linux.

The build of ETL and synfig-core go perfectly.

However the build of synfig-studio fails on building the images. Where I'm currently stuck is:

Code: Select all

$ cmake --build . -- build_images
Scanning dependencies of target build_images
synfig: error while loading shared libraries: libsynfig.so: cannot open shared object file: No such file or directory
make[3]: *** [images/CMakeFiles/build_images.dir/build.make:57: build_images] Error 127
make[2]: *** [CMakeFiles/Makefile2:217: images/CMakeFiles/build_images.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:224: images/CMakeFiles/build_images.dir/rule] Error 2
make: *** [Makefile:188: build_images] Error 2


Incidentally, the Synfig Studio AppImage is no good for me, as you need to have SELinux to use it, and Manjaro doesn't use this.

I can also no-longer build either synfig-core or synfig studio with autotools, as make complains of having no targets.

User avatar
caryoscelus
Posts: 80
Joined: Wed Nov 11, 2015 9:10 am
Contact:

Re: Synfig CMake Port

Postby caryoscelus » Sat Jan 28, 2017 3:21 pm

Judging by the error you give, something went wrong with synfig-core install step, so even if you'd use pre-built images it won't be of much help. Quiet likely, you need to run ldconfig (from root) after installing. Otherwise, we'll have to investigate deeper:

I suppose just running `synfig` gives the same linking error? Have you changed install path? Do you have any previous successful experience with building and installing CMake-based apps on your system? Do you have any previous synfig installation on your system at the moment?

Please upload output of "ldd `which synfig`" and install_manifest.txt from synfig-core build/ directory.

User avatar
caryoscelus
Posts: 80
Joined: Wed Nov 11, 2015 9:10 am
Contact:

Re: Synfig CMake Port

Postby caryoscelus » Sat Jan 28, 2017 3:27 pm

As for autotools build system, is your issue the same as here: https://github.com/synfig/synfig/issues/311?

Also, i can try building a generic binary tarball if you're interested in testing.

User avatar
DaveJ
Posts: 314
Joined: Fri Jul 01, 2011 6:14 am
Location: Hungary

Re: Synfig CMake Port

Postby DaveJ » Sat Jan 28, 2017 4:08 pm

Yes, the autotools error is the same as the one in the link.

I tried ldconfig as root when I was trying to install synfig, and that didn't help.

I needed to do some animation I needed to do this evening, so I deleted my local CMake install of 1.2 and installed 1.0.2 from the Manjaro repository, but I'll delete this and try installing 1.2 using CMake from scratch next week and send you the output you requested.

I'd like to help you get the CMake working on Manjaro if I can.

Many, many thanks for your help and all your work on Synfig - I have seen all your commits on the Synfig develop list and you've done some wonderful work for us all.

User avatar
caryoscelus
Posts: 80
Joined: Wed Nov 11, 2015 9:10 am
Contact:

Re: Synfig CMake Port

Postby caryoscelus » Sun Jan 29, 2017 12:59 pm

Another possible source of problem is missing dependencies, i think. So if you have libsynfig.so installed in the same place as it is referenced in ldd output for synfig binary, "ldd /path/to/libsynfig.so" might be more useful. That said, it sounds more strange (why would cmake finish linking if deps are missing?) than simply linker unable to find library. Maybe you should try setting LD_LIBRARY_PATH env variable (e.g. "LD_LIBRARY_PATH=/usr/local/lib synfig --version"). I'm not really specialist on these things since they just work for me, but that might be because i have /usr/local/lib in /etc/ld.so.conf.d/ by default.

You're welcome :)


Return to “Coding synfig”

Who is online

Users browsing this forum: No registered users and 2 guests