#155 unable to install tuxpaint from source

seshagiri prabhu

Hello everyone,

Some days before i downloaded the Tuxpaint's latest source (v0.9.21) from the CVS repos. I found it as interesting when i went through the code. I tried to install Tuxpaint from source, but i got so many errors. I have pasted it below, can anyone help me to fix it?

seshagiri@seshagiri:~/tuxpaint$ make

...Linking Tux Paint...
cc -O2 -W -Wall -fno-common -ffloat-store -fvisibility=hidden -Wcast-align -Wredundant-decls -Wbad-function-cast -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wstrict-aliasing=2 -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -I/usr/include/fribidi -DVER_DATE=\"2011-01-09\" -DVER_VERSION=\"\" -DDATA_PREFIX=\"/usr/local/share/tuxpaint/\" -DDOC_PREFIX=\"/usr/local/share/doc/tuxpaint/\" -DLOCALEDIR=\"/usr/local/share/locale/\" -DIMDIR=\"/usr/local/share/tuxpaint/im/\" -DCONFDIR=\"/usr/local/etc/tuxpaint/\" -DMAGIC_PREFIX=\"/usr/local/lib/tuxpaint/plugins/\" \ -o tuxpaint obj/tuxpaint.o obj/i18n.o obj/im.o obj/cursor.o obj/pixels.o obj/rgblinear.o obj/playsound.o obj/fonts.o obj/parse.o obj/progressbar.o obj/dirwalk.o obj/get_fname.o obj/postscript_print.o \ -lSDL -lSDL_image -lSDL_ttf -lSDL_mixer -lSDL_Pango -pthread -lrsvg-2 -lgio-2.0 -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0 -lpng12 -lgthread-2.0 -lrt -lglib-2.0 -lcairo -lpaper -lfribidi
obj/tuxpaint.o: In function render_text_w': tuxpaint.c:(.text+0x6505): warning: memset used with constant zero length parameter; this could be due to transposed parameters obj/tuxpaint.o: In functionparse_file_options':
tuxpaint.c:(.text+0x98c6): undefined reference to parse_one_option' tuxpaint.c:(.text+0x9926): undefined reference toPARSE_CLOBBER'
tuxpaint.c:(.text+0x995f): undefined reference to PARSE_CLOBBER' obj/tuxpaint.o: In functionsetup_config':
tuxpaint.c:(.text+0x18f62): undefined reference to PARSE_CLOBBER' tuxpaint.c:(.text+0x18fd4): undefined reference toPARSE_NO'
tuxpaint.c:(.text+0x1905d): undefined reference to PARSE_CLOBBER' tuxpaint.c:(.text+0x19079): undefined reference toPARSE_CLOBBER'
tuxpaint.c:(.text+0x190c4): undefined reference to PARSE_YES' tuxpaint.c:(.text+0x190e3): undefined reference toPARSE_YES'
tuxpaint.c:(.text+0x19102): undefined reference to PARSE_YES' tuxpaint.c:(.text+0x19121): undefined reference toPARSE_YES'
tuxpaint.c:(.text+0x19140): undefined reference to PARSE_YES' obj/tuxpaint.o:tuxpaint.c:(.text+0x1915f): more undefined references toPARSE_YES' follow
obj/tuxpaint.o: In function setup_config': tuxpaint.c:(.text+0x1968a): undefined reference toparse_one_option'
tuxpaint.c:(.text+0x19829): undefined reference to `PARSE_CLOBBER'
collect2: ld returned 1 exit status
make: *** [tuxpaint] Error 1

i have installed all the tuxpaint's dependencies before the 'make'. Is there any other formalities to be done before the 'make' command.


  • I am using ubuntu 10.10 64bit.

  • Hi - the issues with 'parse_one_option' are probably due to the 'parse.o' object not being created. The source to that object, 'parse.c', is based on a ".gperf" input file. Be sure you have 'gperf' installed, and that 'obj/parse_step1.c' and 'obj/parse.c' are being generated, and are not empty (0 byte) files. If so, make sure you've installed the 'gperf package. (It seems the Makefile should do a better job at failing if gperf isn't installed...)

    Good luck!

  • Makefile now aborts if it detects that '/usr/bin/gperf' is not installed.

  • Hello community,

                   Well after a one long week i installed the Tux paint in my system-yesterday exactly at the same time. It was not the problem of the gperf, it was already installed. The parse.c and parse_step1.c were zero size files(A special thanks to wkendrick for mentioning about the size's). So, i deleted all the files in obj/ folder and then compilation happened successfully. But the problem is not yet over. During the execution of the application, it generates a few errors like this:

    (gdb) run
    Starting program: /home/seshagiri/Tuxpaint/tuxpaint/tuxpaint
    [Thread debugging using libthread_db enabled]
    lang (nil), locale (nil)
    lang "(null)", locale "(null)"
    DEBUG: Language is en (17) /
    lang_prefixes[17] is "en"
    NOT running font scanner
    [New Thread 0x7fffea686700 (LWP 2647)]
    [Thread 0x7fffea686700 (LWP 2647) exited]
    [New Thread 0x7fffea686700 (LWP 2648)]
    [New Thread 0x7fffe9e85700 (LWP 2649)]

    Program received signal SIGSEGV, Segmentation fault.
    0x00007ffff4f92b33 in memcpy () from /lib/libc.so.6

  • Hrm, I do see that the memset() in render_text_w had the value (0) and length (ufstr_max) arguments reversed. Fixed in CVS. Please do a "cvs up -dPC && make clean && make". I'm not sure it will help the crash, but it'd be help to make sure we're both building and running based on the same code. Thanks!

  • Alas!!

    After 10 days of battle with the libraries and requirement. I finally installed tux paint from source. This will be the finest moment as a step to a milestone in my life. Thanks to Tux paint, for giving a good challenge at the beginning of my voyage.

    For debian Users these are the basic steps to be done before 'make'

    sudo apt-get build-dep tuxpaint

    sudo apt-get install gperf


    *This software is used by those little masters who'll be future Einstien or Ramanujam *

    Have fun
    Cheers :)

  • Glad you got it working. BTW, the "gperf" step will be unnecessary once the tuxpaint package is updated in Ubuntu, since it will be installed as part of the build-dep step you listed. But since it's new in CVS, it's necessary to do separately. Thanks for the follow-up!