Wednesday, May 03, 2006

tuxpaint

One of my girls came home from school yesterday raving about Tux Paint.

It looks pretty good stuff to me. (The fact that one of my girls is mad about penguins might also make it popular.)

They're using it on Windows at School, but it's cross-platform, so I built it for Solaris too.

I had to go through the prerequistes:
In all cases I did a

(setenv CC cc ; setenv CXX CC ; setenv F77 f77 ; ./configure )
gmake
gmake install

to build, using the free Sun Compiler, as libtool couldn't cope with gcc for some reason.

Then to build tuxpaint

gmake CC=gcc


This wasn't quite enough. I needed to add an explicit

-lpng -lsocket

to the link list, and then it fails because it needs strcasestr().

OK, so I grabbed a shim copy of strcasestr from OpenSolaris (for example, this one), compiled it, and linked that in.

And, because it used a simple makefile, fixing up the problems was trivial.

Oh, and I've filed a couple of bugs. One against tuxpaint so that it handles a missing strcasestr (or doesn't require it at all); and an RFE that Solaris include this function (as opposed to the several private copies dotted about in the source), as this isn't the first time I've seen applications want it.

2 comments:

Alan said...

I usually write the configure line using env:

env CC=cc CXX=cc F77=f77 ./configure

This style works equally well in either csh or sh.

Anonymous said...

Thank you for posting the work around for compiling tuxpaint on Solaris. I am using Nevada b76 (x64) with Sun Studio 12...

I am attempting to compile the latest version of tuxpaint (0.9.17). I have all the SDL and freefont libraries, etc.

strcasestr is a problem (how did you compile and link the snipet from opensolaris.org?) as the Sun Compiler complains about undefined symbol in SUNWspro/../crt1.o (main)?

As well, the i18n components don't compile at all.

It appears that tuxpaint and/or opensolaris are not going to change either way after reviewing your comments on opensolaris.org (with the responses).

Is there a Solaris package (binary) that I have missed somewhere?

Your sage advice is greatly appreciated!

Thanks!