Page 1 of 1

Inkscape tiling problems and solution

PostPosted: Feb 11th, '12, 20:22
by Max
There is a well-known bug in Inkscape, where when trying to fill an object with a pattern (using another object) you get artifacts.
Our bug: https://bugs.mageia.org/show_bug.cgi?id=4484
Inkscape's bug: https://bugs.launchpad.net/inkscape/+bug/165780
The fix for this bug will appear only in Inkscape 0.49, and that means Mga2 at best (0.49 still isn't stable).
So, in an effort to find a somewhat speedier fix, I am going to try to download and build a snapshot of the Inkscape code, one of the more recent developer's versions.

Re: Inkscape tiling problems and solution

PostPosted: Feb 11th, '12, 20:43
by doktor5000
Probably the easiest way to do this would be to download ftp://ftp.mandrivauser.de/mirrors/Mageia/distrib/cauldron/SRPMS/core/release/inkscape-0.48.2-6.mga2.src.rpm and install all the needed dependecies via
Code: Select all
urpmi --buildrequires inkscape-0.48.2-6.mga2.src.rpm

You also need to install bzr package (short form for bazaar, the version control system which is used by launchpad projects)
Then get a checkout of the inkscape code via:
Code: Select all
bzr branch lp:inkscape

Then you should be able to compile it like so:
Code: Select all
cd inkscape && ./autogen.sh && ./configure --with-python --with-perl && make

If it finishes without errors, as root make install will install it to /usr/local.

Re: Inkscape tiling problems and solution

PostPosted: Feb 11th, '12, 22:01
by Max
I was missing glib-gettextize, intltool and libtool, but easily installed them.
But ./configure failed because I require libpng >= 1.2 even though I have libpng 1.2.46 installed.
I tried installing libpng-devel and libpng-static-devel but it still failed.
I think this may be because I am on a 64 bit system, and the libpng packages are only available for i586. The source is available for 64 architecture, but I'm not sure I would know what to do with that (I'm not a C guy), nor whether it is necessary.

Re: Inkscape tiling problems and solution

PostPosted: Feb 11th, '12, 23:52
by doktor5000
Max wrote:I think this may be because I am on a 64 bit system, and the libpng packages are only available for i586.

Something is wrong at your box, works fine here. Also libpng is available for both x86_64 and i586:
Code: Select all
$ urpmf -f -m --name png | grep devel
Core Release:lib64pnglite-devel-0.1.17-2.mga1.x86_64
Core Release:lib64png-devel-1.2.44-3.mga1.x86_64
Core Release:lib64png-static-devel-1.2.44-3.mga1.x86_64
Core Release:lib64glpng-devel-1.45-4.mga1.x86_64
Core Updates:lib64glpng-devel-1.45-5.2.mga1.x86_64
Core Updates:lib64png-devel-1.2.46-1.mga1.x86_64
Core Updates:lib64png-static-devel-1.2.46-1.mga1.x86_64
Core 32bit Release:libpng-devel-1.2.44-3.mga1.i586
Core 32bit Release:libglpng-devel-1.45-4.mga1.i586
Core 32bit Release:libpnglite-devel-0.1.17-2.mga1.i586
Core 32bit Release:libpng-static-devel-1.2.44-3.mga1.i586
Core 32bit Updates:libglpng-devel-1.45-5.2.mga1.i586
Core 32bit Updates:libpng-devel-1.2.46-1.mga1.i586
Core 32bit Updates:libpng-static-devel-1.2.46-1.mga1.i586


Please show the output of rpm -qa | grep png and also show the configure output.

Re: Inkscape tiling problems and solution

PostPosted: Feb 12th, '12, 01:35
by Max
Silly me. I was looking for libpng not lib64png.
Got passed that, found out I need libgc which is actually lib64gc (the devel package of course). And then lib64freetype6-devel and lib64cms-devel and finally this:
Code: Select all
configure: error: Package requirements (glib-2.0 >= 2.24  gtk+-2.0 >= 2.20  libxml-2.0 >= 2.6.11  libxslt >= 1.0.15  cairo >= 1.10  sigc++-2.0 >= 2.0.12    gthread-2.0 >= 2.0 libpng >= 1.2 gsl  glibmm-2.4 giomm-2.4  gdkmm-2.4  gtkmm-2.4 >= 2.10.0) were not met:

No package 'gtk+-2.0' found
No package 'libxslt' found
No package 'cairo' found
No package 'sigc++-2.0' found
No package 'gsl' found
No package 'glibmm-2.4' found
No package 'giomm-2.4' found
No package 'gdkmm-2.4' found
No package 'gtkmm-2.4' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables INKSCAPE_CFLAGS
and INKSCAPE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

It's late and I'm going to sleep. I'l install the necessary devel packages tomorrow.

Re: Inkscape tiling problems and solution

PostPosted: Feb 12th, '12, 02:52
by doktor5000
You said that you already had the necessary buildrequires, why are so much missing?
urpmi --buildrequires would have installed them all in one go ...

Re: Inkscape tiling problems and solution

PostPosted: Feb 12th, '12, 09:25
by Max
Once again I have outsmarted myself. I thought that --buildrequires installs the packages needed to run the program, not build it. :oops:
I ran urpmi --buildrequires and installed a little over 300 MB of packages.
I ran autogen and ./configure again and that worked great. But make ended with errors:
Code: Select all
....
....
....
VER_PREFIX="0.48+devel";\
VER_BZRREV=" r`bzr revno`"; \
if test ! -z "`bzr status -S -V .`"; then \
    VER_CUSTOM=" custom"; \
fi; \
VERSION="$VER_PREFIX$VER_BZRREV$VER_CUSTOM"; \
echo "namespace Inkscape { " \
     "char const *version_string = \"$VERSION\"; " \
     "}" > inkscape-version.new.cpp; \
if cmp -s inkscape-version.new.cpp inkscape-version.cpp; then \
     rm inkscape-version.new.cpp; \
else \
     mv inkscape-version.new.cpp inkscape-version.cpp; \
fi; \
echo $VERSION
0.48+devel r10958
  CXX    inkscape-version.o
  AR     libinkversion.a
  CXX    main.o
  CXXLD  inkscape
libtool: link: cannot find the library `/usr/lib64/libXt.la' or unhandled argument `/usr/lib64/libXt.la'
make[3]: *** [inkscape] Error 1
make[3]: Leaving directory `/home/max/Desktop/Inkscape/inkscape/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/max/Desktop/Inkscape/inkscape/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/max/Desktop/Inkscape/inkscape'
make: *** [all] Error 2
[max@localhost inkscape]$

Re: Inkscape tiling problems and solution

PostPosted: Feb 12th, '12, 10:35
by Max
Installed lib64xt-devel, retried and it compiled without errors.
Installed as su, and it's running. The version reports it to be: .48+devel r10958.
However, when trying to do a pattern fill it segfaulted and crashed.
There doesn't seem to be a debug flag to run with, but I got this:
Code: Select all
[max@localhost inkscape]$ inkscape

** (inkscape:11479): WARNING **: Inkscape currently only supports color-interpolation-filters = sRGB
Segmentation fault
[max@localhost inkscape]$

This bug already exists in Inkscape: https://bugs.launchpad.net/inkscape/+bug/429050

Re: Inkscape tiling problems and solution

PostPosted: Feb 12th, '12, 16:19
by doktor5000
FWIW, you comment there is not really useful, as there is no full backtrace, so it doesn't provide any information to the developers, as the report was already confirmed.
For reference take a look at https://wiki.mageia.org/en/Debugging_software_crashes

Re: Inkscape tiling problems and solution

PostPosted: Feb 12th, '12, 18:43
by Max
I didn't have that error in 0.48.1... I guess I should have mentioned that.