I want to be able to use the command line version of inkscape (http://inkscape.org/) in my rails app on heroku for some image manipulation. No, imagemagick, etc. won't do.
So I started working on my own buildpack with inkscape as an included binary.
To do this I installed vulcan, downloaded inkscape source, and tried to build like this:
curl -L -O http://downloads.sourceforge.net/inkscape/inkscape-0.48.4.tar.gz
tar -xzvf inkscape-0.48.4.tar.gz
cd inkscape-0.48.4
vulcan build -v -c './configure && make && make install'
Now, if life was simple, this would 'Just Work', but instead it errors out because the version of 'intltool' is too old.
./configure: line 5371: intltool-update: command not found
checking for intltool >= 0.22... found
configure: error: Your intltool is too old. You need intltool 0.22 or later.
Ok, fine, so I go to try and build that binary with vulcan to include as a --deps. Now that fails because I need a perl module XML::Parser. How the heck am I going to get this perl module installed?
I poke around and I get a bit closer, I get XML::Parser installed using cpanminus:
vulcan build -v -c 'curl -LO http://xrl.us/cpanm && chmod +x cpanm && ./cpanm -v XML::Parser && ./configure && make && make install'
this gets me XML::Parser installed to /app/perl5, but then how do I get the intltool configure to find it there?
Very frustrating. Many yaks shaved. Any advice?
UPDATED
I got intltool to build, and to be recognized by the inkscape configure
script, here was what finally worked:
vulcan build -p /tmp/intltool -v -c 'curl --silent -L http://cpanmin.us | perl - -l ~/perl5 App::cpanminus local::lib && eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib` && cpanm -n XML::Parser && ./configure --prefix=/tmp/intltool && make && make install'
After that, gettext was the next dependency, and that one I also got to build:
wget ftp://ftp.gnu.org/gnu/gettext/gettext-0.18.2.1.tar.gz
tar -xzvf gettext-0.18.2.1.tar.gz
cd gettext-0.18.2.1.tar.gz
vulcan build -p /tmp/gettext -v -c './configure --prefix=/tmp/gettext && make && make install'
Now when I go to build inkscape, things seem to truck along - I even figured out the right syntax for multiple --deps
but then stall at using this gettext binary. Here is the compile command I am trying:
vulcan build -p /tmp/inkscape -v -c './configure --prefix=/tmp/inkscape && make && make install' --deps=intltool-build.herokuapp.com/output/1a0ef36b-f134-497d-b970-06896d90f936 gettext-build.herokuapp.com/output/9b9853c0-dfcc-47c8-9d8b-f48e1453026d
But when configure gets to checking the gettext executables, it is claiming the libgettextsrc-0.18.2.so
is not found, but I have looked in the binary, and it is there, in the correct lib directory
Here is the error (you can see configure finding the intltool binaries correctly, and some of the gettext binaries then failing on using xgettext
):
checking for intltool >= 0.22... 0.50.2 found
checking for intltool-update... /tmp/d20130529-2-9gtra6/deps/bin/intltool-update
checking for intltool-merge... /tmp/d20130529-2-9gtra6/deps/bin/intltool-merge
checking for intltool-extract... /tmp/d20130529-2-9gtra6/deps/bin/intltool-extract
checking for xgettext... /tmp/d20130529-2-9gtra6/deps/bin/xgettext
checking for msgmerge... /tmp/d20130529-2-9gtra6/deps/bin/msgmerge
checking for msgfmt... /tmp/d20130529-2-9gtra6/deps/bin/msgfmt
checking for gmsgfmt... /tmp/d20130529-2-9gtra6/deps/bin/msgfmt
/tmp/d20130529-2-9gtra6/deps/bin/xgettext: error while loading shared libraries: libgettextsrc-0.18.2.so: cannot open shared object file: No such file or directory
/tmp/d20130529-2-9gtra6/deps/bin/msgmerge: error while loading shared libraries: libgettextsrc-0.18.2.so: cannot open shared object file: No such file or directory
/tmp/d20130529-2-9gtra6/deps/bin/msgfmt: error while loading shared libraries: libgettextsrc-0.18.2.so: cannot open shared object file: No such file or directory
configure: error: GNU gettext tools not found; required for intltool
Perhaps my progress will help someone else using vulcan for this kind of fun. Any ideas on what is up with the gettext binary? Perhaps someone has gotten this working on heroku/vulcan already?