Author Topic: Inkscape  (Read 18112 times)

Armagon

  • Full Member
  • ***
  • Posts: 106
    • View Profile
    • http://
Inkscape
« Reply #15 on: February 26, 2006, 04:12:28 pm »
Quote
Er... for those of us who are non-techies and would just like to draw with this application, is there any way you could build an ipk? It would be a really good app to have running on the Z.

I'd be asking for Scribus next, of course!

Thanks
[div align=\"right\"][a href=\"index.php?act=findpost&pid=116145\"][{POST_SNAPBACK}][/a][/div]

I've been working on it, really!  Indeed, I posted this thread so that I could compile it, with the full intention of posting an .ipk when I'm done.

I have got everything (seemingly) compiled, and am working on creating the .ipk.  Then I'll need to test it, and if it works (and is less than the 5 MB posting limit), I'll post it here.

Armagon
Sharp Zaurus SL-C1000 -- 2 GB SD Card -- Zippy Slim Mini Keyboard -- Loving pdaXii13!

macwiz

  • Full Member
  • ***
  • Posts: 151
    • View Profile
    • http://www.macwiz.co.uk
Inkscape
« Reply #16 on: February 26, 2006, 06:21:58 pm »
Super. Hope it goes well!
Macwiz
c860, never quite lived up to my expectations... my fault I guess
17in MacBook Pro lovely xxxx
iPhone 3G ummm
SE P990i with UIQ3. Never enough RAM.
Pocket Loox 720 used for designing ebooks. Just don't like it though!

macwiz: apple mac support in Oxfordshire
Twitter: @boffinboy

Armagon

  • Full Member
  • ***
  • Posts: 106
    • View Profile
    • http://
Inkscape
« Reply #17 on: February 27, 2006, 04:17:13 pm »
DRUM ROLL PLEASE:

For your computing enjoyment, I give you: inkscape!

I have finally got it compiled and packaged up.  It should work on all the Zaurus models except the 5x00s.

There are two packages:
  • inkscape_0.43-Z1_armv5tel.ipk - the actual program
  • inkscape-data_0.43_armv5tel.ipk - tutorials and example files (see more about it, below)
Note: When I uploaded the files, the dashes were changed to underscores.  I don't know if that matters.

PERFORMACE:

I'm afraid inkscape really wants a more powerful machine than my C1000.  Not to scare you off, but:
  • the window is larger than the screen, and can't be resized [thank goodness for alt-dragging!]
  • it takes 30 seconds to start up
  • if I try to load a tutorial file (from the data package), it uses up all my RAM and terminates.
  • it really eats up the CPU!  It'll often be running at 100%, and it still seems unresponsive
On the plus side:
  • it sure looks nice
  • it will save and load files
  • the calligraphy tool is great with a touch screen!
Note: I decided it didn't serve much point to have the data files if you couldn't load them, which is why I put them in a separate .ipk.

For best performance, I found (and I can't believe I'm recommending this) that it works better if you overclock your machine.  [20 seconds to load instead of 30!]  Also, I expect that if you had a swap partition that it would work better for you.


DEPENDANCIES:

I believe I entered the dependancies into the .ipk correctly.  But, if you are like me, and don't have automatic dependancies working, the following may be useful (note that all version numbers are from the 1.1.0beta1 feeds.  I have no idea if it'll work with earlier versions.):

You most likely need to install the following:
  • libxslt_1.1.0_armv5tel.ipk
  • gnome-vfs_2.10.0_armv5tel.ipk
  • gconf_2.10.0-1_armv5tel.ipk
  • libbonobo_2.8.1_armv5tel.ipk
  • orbit2_2.10.2_armv5tel.ipk
You probably don't need to install these dependancies, as I believe they come with the standard pdaXrom install.
  • gtk2_2.6.2_armv5tel.ipk
  • atk_1.10.1_armv5tel.ipk
  • pango_1.10.0_armv5tel.ipk
  • libstdcxx_5.0.5_armv5tel.ipk
  • libxml2_2.6.13-1_armv5tel.ipk
  • libpng_1.2.5_armv5tel.ipk
  • popt_1.7_armv5tel.ipk
  • glib2_2.8.1-1_armv5tel.ipk
  • xfree_4.4.0_armv5tel.ipk
  • fontconfig_2.2.96_armv5tel.ipk
  • libiconv_1.9.2_armv5tel.ipk
  • freetype_2.1.9_armv5tel.ipk
  • libz_2.3_armv5tel.ipk
  • glibc_2.2.5_armv5tel.ipk
  • libgcc_1_armv5tel.ipk
  • expat_1.95.8_armv5tel.ipk
WHAT'S NEXT?

Well, I'd like to hear how well it works for you.  If you'd like to mirror the files, go right ahead.  I hope to look at the code and see if I can make it work better for the Z, but I'm not giving any guarantees that it can be made to work better.

Oh, and I hope to post some more build notes, for anyone who is interested.

Armagon
Sharp Zaurus SL-C1000 -- 2 GB SD Card -- Zippy Slim Mini Keyboard -- Loving pdaXii13!

Armagon

  • Full Member
  • ***
  • Posts: 106
    • View Profile
    • http://
Inkscape
« Reply #18 on: February 28, 2006, 12:49:10 am »
BUILD NOTES

Here are some more technical notes on how I compiled inkscape.  I'm posting them so they can be a reference for other people compiling this, or something similar, and so that more knowledgeable people can tell me how to do it better.  Many of the issues discussed in this thread are included in the notes (although without any detail as to the "why" they are done.)


TARGET DIRECTORY

I installed the libraries and application into ~/Zaurus/Cross/install, by using the --prefix=$HOME/Zaurus/Cross/install when I configured the compilations.  Anything using a previously compiled library needs to know where it is.  After initializing the SDK, execute this in the shell:

Code: [Select]
export PKG_CONFIG_PATH=~/Zaurus/Cross/install/lib/pkgconfig:$PKG_CONFIG_PATH
BUILDING THE LIBRARIES

In the end, I only did need to build the libraries mentioned in http://wiki.inkscape.org/wiki/index.php/CompilingInkscape :
  • Boehm-GC
  • libSigc++
  • GlibMM
  • GtkMM
The wiki page links to the source code, and recommends building the files as static libraries, which I did.  [At some future date, I may try building them as dynamic libraries.]

My standard config line was:

Code: [Select]
CPPFLAGS=-I$HOME/Zaurus/Cross/install/include LDFLAGS=-L$HOME/Zaurus/Cross/install/lib ./configure --host=armv5tel-cacko-linux --build=i686-linux --prefix=$HOME/Zaurus/Cross/install --enable-static --disable-shared
followed by a "make" and "make install"

The order of building was also important, as later libraries depended upon the former.


GtkMM caused me a little bit of trouble.  I grabbed the latest version (2.8.3), which required GTK+ >= 2.8.0.  Inkscape itself only requires GTK+-2.0 >= 2.4.0.  pdaXrom 1.1.0beta1 provides GTK+ 2.6.2 (and I didn't feel it was worthwhile recompiling that!)

I downloaded an earlier version of GtkMM (2.4.11), and it didn't compile right.  I then tried version 2.6.5, and it didn't compile right, either.  I noticed, however, that it was in the examples folder that it was having trouble, and decided to "make install" it anyways.  It worked.  I presume some of the examples have greater dependancies than the library itself.


BUILDING INKSCAPE

To cross-compile inkscape, you first need to patch it -- as, in one of the configure steps, it tests that the Boehm-GC library works, by trying to build something with it and then run it -- which will not work when cross-compiling.  

koen provided a patch.  After applying the patch, you need to regenerate the configure script, by executing:

Code: [Select]
M4=`which m4` autoconf
Now you can configure it:

Code: [Select]
CPPFLAGS=-I$HOME/Zaurus/Cross/install/include LDFLAGS=-L$HOME/Zaurus/Cross/install/lib ./configure --host=armv5tel-cacko-linux --build=i686-linux --prefix=$HOME/Zaurus/Cross/install
This next step is a kludge.  I'm sure there is a better way to do it, likely by specifying something in the configure command.  If anyone knows how, please tell me!

Edit the config.h file.  You need to change three paths.
INKSCAPE_DATADIR becomes "/usr/share"
INKSCAPE_LIBDIR becomes "/usr/lib"
PACKAGE_LOCALE_DIR becomes "/usr/share/locale"

Before editing, these paths were all in "~/Zaurus/Cross/install" instead of "/usr".  Without making this change, assets such as the toolbar icons can not be found when you run the application.

Now, you need to "M4=`which m4` make" and then "make install"

And that's it.  Not nearly as bad in retrospect as it was before I'd done it.

Finally, I'll have to admit I was amazed when I stripped the executable, and it went down in size from 52 MB to 7 MB!

Thanks for your help everyone,
Armagon
Sharp Zaurus SL-C1000 -- 2 GB SD Card -- Zippy Slim Mini Keyboard -- Loving pdaXii13!

Armagon

  • Full Member
  • ***
  • Posts: 106
    • View Profile
    • http://
Inkscape
« Reply #19 on: February 28, 2006, 01:04:49 am »
I realized that I didn't invoke any compiler optimizations when I built this.

Doing just a little bit of searching, I came across a post about compiling advanced MAME for the Z.

He used this configure line:

Code: [Select]
./configure CFLAGS="-O3 -march=armv5te -mtune=xscale -fomit-frame-pointer" LDFLAGS="-s"
and asked for feedback.  One response was:

Quote
if you compile it with gcc 3.3.4 and with -march=iwmmx it will run faster on C1000/C3x00.


I therefore tried this for inkscape:

Code: [Select]
CFLAGS="-O3 -march=iwmmx -mtune=xscale -fomit-frame-pointer" CPPFLAGS="-I$HOME/Zaurus/Cross/install/include" LDFLAGS="-L$HOME/Zaurus/Cross/install/lib -s" ./configure --host=armv5tel-cacko-linux --build=i686-linux --prefix=$HOME/Zaurus/Cross/install
and got an error that the c compiler cannot create executables.

I removed the -march flag, and it configured happily [and is slowly compiling right now.]

How do I enable the iwmmx optimizations?  Oh, and there is an option I can pass to configure that will enable MMX optimisations.  Would those be x86 specific, or would they provide a boost here?

I recognize that the iwmmx optimizations limits the executables to the C1000 and C3x00.  Does the -mtune=xscale have a similar effect?

One last question.  Does it help to recompile the libraries with these flags, or is it not worth the effort?

Thank you,
Armagon
Sharp Zaurus SL-C1000 -- 2 GB SD Card -- Zippy Slim Mini Keyboard -- Loving pdaXii13!

Armagon

  • Full Member
  • ***
  • Posts: 106
    • View Profile
    • http://
Inkscape
« Reply #20 on: February 28, 2006, 09:40:24 am »
Curiously, this new "optimised" build seems to be a little bit slower, taking 35 seconds to load.
Sharp Zaurus SL-C1000 -- 2 GB SD Card -- Zippy Slim Mini Keyboard -- Loving pdaXii13!

koen

  • Hero Member
  • *****
  • Posts: 1008
    • View Profile
    • http://dominion.thruhere.net/koen/cms/
Inkscape
« Reply #21 on: February 28, 2006, 10:10:00 am »
Quote
I recognize that the iwmmx optimizations limits the executables to the C1000 and C3x00.  Does the -mtune=xscale have a similar effect?
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]

-mtune=xscale would be ok, -mcpu=xscale not.

From [a href=\"http://gcc.gnu.org/onlinedocs/gcc-4.0.2/gcc/ARM-Options.html:]http://gcc.gnu.org/onlinedocs/gcc-4.0.2/gc...M-Options.html:[/url]

Quote
-mtune=name
This option is very similar to the -mcpu= option, except that instead of specifying the actual target processor type, and hence restricting which instructions can be used, it specifies that GCC should tune the performance of the code as if the target were of the type specified in this option, but still choosing the instructions that it will generate based on the cpu specified by a -mcpu= option. For some ARM implementations better performance can be obtained by using this option.

You might also try using -Os, which does the same optimizations as -O2, but produces smaller binaries (= faster load time + more free ram)
Forums are not bugtrackers!!! Smart questions
Ångström release team
iPAQ h2210, iPAQ h5550, iPAQ hx4700, Zaurus SL-C700, Nokia 770, all running some form of GPE
My blog

john4

  • Newbie
  • *
  • Posts: 41
    • View Profile
Inkscape
« Reply #22 on: March 01, 2006, 04:58:06 am »
Great work!!!!!

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Inkscape
« Reply #23 on: March 01, 2006, 07:53:57 am »
May I suggest if you haven't tried it already... Dia is also a great tool to have on the Zaurus.. I have sodipodi for arty vector graphics and Dia for more serious diagrams.

-Andy
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

koen

  • Hero Member
  • *****
  • Posts: 1008
    • View Profile
    • http://dominion.thruhere.net/koen/cms/
Inkscape
« Reply #24 on: March 01, 2006, 08:36:44 am »
Quote
May I suggest if you haven't tried it already... Dia is also a great tool to have on the Zaurus.. I have sodipodi for arty vector graphics and Dia for more serious diagrams.

[div align=\"right\"][a href=\"index.php?act=findpost&pid=116518\"][{POST_SNAPBACK}][/a][/div]

You do know that inkscape is the successor or sodipodi, right?
Forums are not bugtrackers!!! Smart questions
Ångström release team
iPAQ h2210, iPAQ h5550, iPAQ hx4700, Zaurus SL-C700, Nokia 770, all running some form of GPE
My blog

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Inkscape
« Reply #25 on: March 01, 2006, 11:32:43 am »
Quote
Quote
May I suggest if you haven't tried it already... Dia is also a great tool to have on the Zaurus.. I have sodipodi for arty vector graphics and Dia for more serious diagrams.

[div align=\"right\"][a href=\"index.php?act=findpost&pid=116518\"][{POST_SNAPBACK}][/a][/div]

You do know that inkscape is the successor or sodipodi, right?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=116523\"][{POST_SNAPBACK}][/a][/div]

Actually inkscape is a fork of sodipodi, sodipodi has undergone some work since inkscape, it's in the OpenBSD ports tree and does everything that I want... I'm not suggesting using sodipodi though. I'm just suggesting that Dia is better than both inkscape and sodipodi for certain types of diagram.

-Andy
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

koen

  • Hero Member
  • *****
  • Posts: 1008
    • View Profile
    • http://dominion.thruhere.net/koen/cms/
Inkscape
« Reply #26 on: March 01, 2006, 11:47:51 am »
Quote
Quote
Quote
May I suggest if you haven't tried it already... Dia is also a great tool to have on the Zaurus.. I have sodipodi for arty vector graphics and Dia for more serious diagrams.

[div align=\"right\"][a href=\"index.php?act=findpost&pid=116518\"][{POST_SNAPBACK}][/a][/div]

You do know that inkscape is the successor or sodipodi, right?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=116523\"][{POST_SNAPBACK}][/a][/div]

Actually inkscape is a fork of sodipodi, sodipodi has undergone some work since inkscape, it's in the OpenBSD ports tree and does everything that I want... I'm not suggesting using sodipodi though. I'm just suggesting that Dia is better than both inkscape and sodipodi for certain types of diagram.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=116545\"][{POST_SNAPBACK}][/a][/div]

I just added dia 0.95-pre3 to OE. It crosscompiled cleanly and didn't need to many deps:

Quote
Depends: dia-locale*, libxml2 (>= 2.6.22), libglib-2.0-0 (>= 2.8.4), libc6 (>= 2.3.5+cvs20050627), gtk+ (>= 2.8.9), libgcrypt11 (>= 1.2.2), libgpg-error0 (>= 1.0), libxext6 (>= 0.0+cvs20060301), libxcursor1 (>= 1.1.2), libxfixes0 (>= 2.0.1), libatk-1.0-0 (>= 1.10.1), pango (>= 1.10.2), libcairo2 (>= 1.0.2), libxrender1 (>= 0.8.4), libx11-6 (>= 6.2.1+cvs20060301), libxau0 (>= 0.1.1), libpng12-0 (>= 1.2.8), libfontconfig1 (>= 2.2.95), libexpat1 (>= 2.0.0), libfreetype6 (>= 2.1.10), libz1 (>= 1.2.3), libgcc1 (>= 4.0.2)

That's basically gtk+, expat and libxml2.

So it shouldn't be too hard to compile it for pdaX.
Forums are not bugtrackers!!! Smart questions
Ångström release team
iPAQ h2210, iPAQ h5550, iPAQ hx4700, Zaurus SL-C700, Nokia 770, all running some form of GPE
My blog

Armagon

  • Full Member
  • ***
  • Posts: 106
    • View Profile
    • http://
Inkscape
« Reply #27 on: March 02, 2006, 01:59:02 am »
I've been experimenting with different compilation flags.  I've even made a shell script to automate the process -- if I stop tweaking it so much, I'll post it.

Unfortunately, none of them have seemed to have helped matters, and some of them have hindered things.

I had to try --host=iwmmx and --host=scale, and neither of those worked.  It also seems like -mtune=iwmmx is a bad idea [I read about another app segfaulting, and had really strange behaviour -- but that may not be the source of my problems.]

I did try the --enable-mmx flag when configuring inkscape, and got errors like:

Quote
armv5tel-cacko-linux-gcc  -Wall -W -O3 -march=iwmmxt -mcpu=iwmmxt -fomit-frame-pointer -w -c -o libnr/have_mmx.o `test -f 'libnr/have_mmx.S' || echo './'`libnr/have_mmx.S
have_mmx.S: Assembler messages:
have_mmx.S:10: Error: alignment too large: 15 assumed
have_mmx.S:12: Error: unrecognized symbol type ""
have_mmx.S:15: Error: bad instruction `push %ebx'
have_mmx.S:19: Error: bad instruction `pushfl'
have_mmx.S:20: Error: bad instruction `popl %eax'
have_mmx.S:21: Error: bad instruction `movl %eax,%ebx'
have_mmx.S:22: Error: bad instruction `xorl $0x00200000,%eax'
have_mmx.S:23: Error: bad instruction `pushl %eax'
have_mmx.S:24: Error: bad instruction `popfl'
have_mmx.S:25: Error: bad instruction `pushfl'
have_mmx.S:26: Error: bad instruction `popl %eax'
have_mmx.S:28: Error: bad instruction `cmpl %eax,%ebx'
have_mmx.S:30: Error: bad instruction `je .notfound'
have_mmx.S:34: Error: bad instruction `movl $1,%eax'
have_mmx.S:35: Error: bad instruction `cpuid'
...

I guess they are using x86 assembly, with mmx instructions.  As I understand it, the iwmmx extensions include the mmx ones ... but obviously the arm chip wont run x86 instructions.

And then the other thing I need to figure out is how to make it so they aren't fighting against my flags.  It seems to me (and I need to do more research) that -Wall -W and -w don't mix, and nor do -g and -O.

Well, I'll keep plugging away at it.
Armagon
Sharp Zaurus SL-C1000 -- 2 GB SD Card -- Zippy Slim Mini Keyboard -- Loving pdaXii13!

Armagon

  • Full Member
  • ***
  • Posts: 106
    • View Profile
    • http://
Inkscape
« Reply #28 on: March 05, 2006, 11:11:14 am »
Here is my script to help compile inkscape, build_inkscape.sh.  I hope someone finds it useful.  Please let me know if you encounter a bug.

[I ran out or hard drive space, and thought I had backed everything up, but I nearly missed this file!  With a full hdd, and needing to update anyways, I'm upgrading my laptop from Mandrake 10.1 to kubuntu Breezy (5.10)]

Next, I need to look into how to profile an application under linux.

Armagon
« Last Edit: March 05, 2006, 06:20:30 pm by Armagon »
Sharp Zaurus SL-C1000 -- 2 GB SD Card -- Zippy Slim Mini Keyboard -- Loving pdaXii13!

desertrat

  • Hero Member
  • *****
  • Posts: 743
    • View Profile
    • http://
Inkscape
« Reply #29 on: March 16, 2006, 05:20:45 am »
Quote
  • libSigc++
  • GlibMM
  • GtkMM


GtkMM caused me a little bit of trouble.  I grabbed the latest version (2.8.3), which required GTK+ >= 2.8.0.  Inkscape itself only requires GTK+-2.0 >= 2.4.0.  pdaXrom 1.1.0beta1 provides GTK+ 2.6.2 (and I didn't feel it was worthwhile recompiling that!)

I downloaded an earlier version of GtkMM (2.4.11), and it didn't compile right.  I then tried version 2.6.5, and it didn't compile right, either.  I noticed, however, that it was in the examples folder that it was having trouble, and decided to "make install" it anyways.  It worked.  I presume some of the examples have greater dependancies than the library itself.

Any chance of making these available? I'm trying to compile

http://icculus.org/~jcspray/GNUDoku/GNUDoku-0.93.tar.gz

-- cheers
SL-C3100 / Ambicon WL1100C-CF / pdaXrom 1.1.0beta3 / IceWM