Request for new version of xpp

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

Request for new version of xpp

#1 Post by vovchik »

Dear puppians,

I tried out xpp and think is a very useful addition to the Puppy distro, since you can control many more printing parameters for CUPS installations than are offered via the html pages. Moreover, it's very small and fast, and it can replace the lp or lpr commands in applications that don't really want to make use of CUPS. What I don't like about it is that it was compiled with an earlier version of FLTK, which looks terrible and makes use of ugly fonts. Recent versions of FLTK have xft support and allow the user/developer to chose the style of widgets. I installed the fltk package from source and it compiled just fine (v. 1.1.8). When I try to compile anything with it, however (even "hello, world"), I get the following errors:

Code: Select all

root$ [/tmp/NewDir/xpp-1.5]-> make
/usr/local/bin/fluid -c mainwindow.fl
c++ -DPACKAGE=\"xpp\" -DVERSION=\"1.5\" -DHAVE_LIBX11=1 -DHAVE_LIBXEXT=1 -DHAVE_LIBGL=1 -DHAVE_LIBGLU=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBPNG=1 -DHAVE_LIBM=1 -DSTDC_HEADERS=1 -DHAVE_CUPS_CUPS_H=1 -DHAVE_FL_FL_H=1 -DHAVE_LIBCUPS=1  -I. -I.    -I/usr/X11R6/include  -g -O2 -c mainwindow.cxx
mainwindow.cxx: In member function `void xppMainWindow::cb_Apply_i(Fl_Return_Button*, void*)':
mainwindow.cxx:914: warning: `fl_ask' is deprecated (declared at /usr/local/include/FL/fl_ask.H:59)
mainwindow.cxx:914: warning: `fl_ask' is deprecated (declared at /usr/local/include/FL/fl_ask.H:59)
c++ -DPACKAGE=\"xpp\" -DVERSION=\"1.5\" -DHAVE_LIBX11=1 -DHAVE_LIBXEXT=1 -DHAVE_LIBGL=1 -DHAVE_LIBGLU=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBPNG=1 -DHAVE_LIBM=1 -DSTDC_HEADERS=1 -DHAVE_CUPS_CUPS_H=1 -DHAVE_FL_FL_H=1 -DHAVE_LIBCUPS=1  -I. -I.    -I/usr/X11R6/include  -g -O2 -c passworddialog.cxx
c++ -DPACKAGE=\"xpp\" -DVERSION=\"1.5\" -DHAVE_LIBX11=1 -DHAVE_LIBXEXT=1 -DHAVE_LIBGL=1 -DHAVE_LIBGLU=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBPNG=1 -DHAVE_LIBM=1 -DSTDC_HEADERS=1 -DHAVE_CUPS_CUPS_H=1 -DHAVE_FL_FL_H=1 -DHAVE_LIBCUPS=1  -I. -I.    -I/usr/X11R6/include  -g -O2 -c cupshelper.cxx
c++ -DPACKAGE=\"xpp\" -DVERSION=\"1.5\" -DHAVE_LIBX11=1 -DHAVE_LIBXEXT=1 -DHAVE_LIBGL=1 -DHAVE_LIBGLU=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBPNG=1 -DHAVE_LIBM=1 -DSTDC_HEADERS=1 -DHAVE_CUPS_CUPS_H=1 -DHAVE_FL_FL_H=1 -DHAVE_LIBCUPS=1  -I. -I.    -I/usr/X11R6/include  -g -O2 -c xpp.cxx
xpp.cxx: In member function `int printFiles::copyInstance(int, const char*)':
xpp.cxx:2370: warning: `fl_ask' is deprecated (declared at /usr/local/include/FL/fl_ask.H:59)
xpp.cxx:2370: warning: `fl_ask' is deprecated (declared at /usr/local/include/FL/fl_ask.H:59)
xpp.cxx:2381: warning: `fl_ask' is deprecated (declared at /usr/local/include/FL/fl_ask.H:59)
xpp.cxx:2381: warning: `fl_ask' is deprecated (declared at /usr/local/include/FL/fl_ask.H:59)
c++ -DPACKAGE=\"xpp\" -DVERSION=\"1.5\" -DHAVE_LIBX11=1 -DHAVE_LIBXEXT=1 -DHAVE_LIBGL=1 -DHAVE_LIBGLU=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBPNG=1 -DHAVE_LIBM=1 -DSTDC_HEADERS=1 -DHAVE_CUPS_CUPS_H=1 -DHAVE_FL_FL_H=1 -DHAVE_LIBCUPS=1  -I. -I.    -I/usr/X11R6/include  -g -O2 -c xppmain.cxx
c++ -DPACKAGE=\"xpp\" -DVERSION=\"1.5\" -DHAVE_LIBX11=1 -DHAVE_LIBXEXT=1 -DHAVE_LIBGL=1 -DHAVE_LIBGLU=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBPNG=1 -DHAVE_LIBM=1 -DSTDC_HEADERS=1 -DHAVE_CUPS_CUPS_H=1 -DHAVE_FL_FL_H=1 -DHAVE_LIBCUPS=1  -I. -I.    -I/usr/X11R6/include  -g -O2 -c inputslider.cxx
c++  -g -O2  -o xpp  mainwindow.o passworddialog.o cupshelper.o xpp.o xppmain.o inputslider.o  -lcups -lnsl -lm -lfltk_images -lpng -lz -ljpeg -lfltk -lGLU -lGL -lXext -lX11  -L/usr/X11R6/lib -lSM -lICE
/usr/lib/gcc/i486-t2-linux-gnu/3.4.4/../../../../i486-t2-linux-gnu/bin/ld: warning: libstdc++.so.5, needed by /usr/X11R6/lib/libGLU.so, may conflict with libstdc++.so.6
/usr/lib/gcc/i486-t2-linux-gnu/3.4.4/../../../libfltk_images.a(Fl_GIF_Image.o)(.text+0xe34): In function `Fl_GIF_Image::Fl_GIF_Image(char const*)':
: undefined reference to `__stack_chk_fail_local'
/usr/lib/gcc/i486-t2-linux-gnu/3.4.4/../../../libfltk_images.a(Fl_GIF_Image.o)(.text+0x1dc4): In function `Fl_GIF_Image::Fl_GIF_Image(char const*)':
: undefined reference to `__stack_chk_fail_local'
/usr/lib/gcc/i486-t2-linux-gnu/3.4.4/../../../libfltk_images.a(Fl_JPEG_Image.o)(.text+0x3ac): In function `Fl_JPEG_Image::Fl_JPEG_Image(char const*)':
: undefined reference to `__stack_chk_fail_local'
/usr/lib/gcc/i486-t2-linux-gnu/3.4.4/../../../libfltk_images.a(Fl_JPEG_Image.o)(.text+0x71c): In function `Fl_JPEG_Image::Fl_JPEG_Image(char const*)':
: undefined reference to `__stack_chk_fail_local'
/usr/lib/gcc/i486-t2-linux-gnu/3.4.4/../../../libfltk_images.a(Fl_PNM_Image.o)(.text+0x744): In function `.L51':
: undefined reference to `__stack_chk_fail_local'
/usr/lib/gcc/i486-t2-linux-gnu/3.4.4/../../../libfltk_images.a(Fl_PNM_Image.o)(.text+0xe94): more undefined references to `__stack_chk_fail_local' follow
/usr/lib/gcc/i486-t2-linux-gnu/3.4.4/../../../libfltk.a(fl_font.o)(.text+0xff): In function `fl_destroy_xft_draw(unsigned long)':
: undefined reference to `XftDrawChange'
/usr/lib/gcc/i486-t2-linux-gnu/3.4.4/../../../libfltk.a(fl_font.o)(.text+0x147): In function `fl_draw(char const*, int, int, int)':
: undefined reference to `XftDrawChange'
/usr/lib/gcc/i486-t2-linux-gnu/3.4.4/../../../libfltk.a(fl_font.o)(.text+0x17e): In function `fl_draw(char const*, int, int, int)':
: undefined reference to `XftDrawSetClip'
/usr/lib/gcc/i486-t2-linux-gnu/3.4.4/../../../libfltk.a(fl_font.o)(.text+0x223): In function `fl_draw(char const*, int, int, int)':
: undefined reference to `XftDrawString8'
/usr/lib/gcc/i486-t2-linux-gnu/3.4.4/../../../libfltk.a(fl_font.o)(.text+0x268): In function `fl_draw(char const*, int, int, int)':
: undefined reference to `XftDrawCreate'
/usr/lib/gcc/i486-t2-linux-gnu/3.4.4/../../../libfltk.a(fl_font.o)(.text+0x3d6): In function `fl_width(char const*, int)':
: undefined reference to `XftTextExtents8'
/usr/lib/gcc/i486-t2-linux-gnu/3.4.4/../../../libfltk.a(fl_font.o)(.text+0x5b4): In function `fontopen(char const*, bool)':
: undefined reference to `XftFontOpen'
/usr/lib/gcc/i486-t2-linux-gnu/3.4.4/../../../libfltk.a(fl_line_style.o)(.text+0x203): In function `fl_line_style(int, int, char*)':
: undefined reference to `__stack_chk_fail_local'
/usr/lib/gcc/i486-t2-linux-gnu/3.4.4/../../../libfltk.a(fl_scroll_area.o)(.text+0x25f): In function `fl_scroll(int, int, int, int, int, int, void (*)(void*, int, int, int, int), void*)':
: undefined reference to `__stack_chk_fail_local'
/usr/lib/gcc/i486-t2-linux-gnu/3.4.4/../../../libfltk.a(screen_xywh.o)(.text+0x29): In function `screen_init()':
: undefined reference to `XineramaIsActive'
/usr/lib/gcc/i486-t2-linux-gnu/3.4.4/../../../libfltk.a(screen_xywh.o)(.text+0x55): In function `screen_init()':
: undefined reference to `XineramaQueryScreens'
/usr/lib/gcc/i486-t2-linux-gnu/3.4.4/../../../libfltk.a(Fl_File_Chooser2.o)(.text+0x821): In function `Fl_File_Chooser::rescan()':
: undefined reference to `__stack_chk_fail_local'
/usr/lib/gcc/i486-t2-linux-gnu/3.4.4/../../../libfltk.a(Fl_File_Chooser2.o)(.text+0x9ba): In function `Fl_File_Chooser::rescan_keep_filename()':
: undefined reference to `__stack_chk_fail_local'
/usr/lib/gcc/i486-t2-linux-gnu/3.4.4/../../../libfltk.a(Fl_File_Chooser2.o)(.text+0xc7f): In function `Fl_File_Chooser::newdir()':
: undefined reference to `__stack_chk_fail_local'
/usr/lib/gcc/i486-t2-linux-gnu/3.4.4/../../../libfltk.a(Fl_File_Chooser2.o)(.text+0x1068): In function `Fl_File_Chooser::fileListCB()':
: undefined reference to `__stack_chk_fail_local'
/usr/lib/gcc/i486-t2-linux-gnu/3.4.4/../../../libfltk.a(Fl_File_Chooser2.o)(.text+0x143e): In function `Fl_File_Chooser::showChoiceCB()':
: undefined reference to `__stack_chk_fail_local'
/usr/lib/gcc/i486-t2-linux-gnu/3.4.4/../../../libfltk.a(Fl_File_Chooser2.o)(.text+0x16b7): more undefined references to `__stack_chk_fail_local' follow
collect2: ld returned 1 exit status
make: *** [xpp] Error 1
root$ [/tmp/NewDir/xpp-1.5]->
I am attaching the source - with my modified gui - for anybody else to take a stab at (~110k). I would also be grateful for any advice regarding the errors I am getting with fltk.

With kind regards,
vovchik
Attachments
xpp1.5-bvl.tar.gz
(110.4 KiB) Downloaded 372 times

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#2 Post by muggins »

i can get it to compile. but i had to dload, make & make install these:

http://optusnet.dl.sourceforge.net/sour ... ce.tar.bz2

http://ftp.easysw.com/pub/fltk/snapshot ... 40.tar.bz2

but you definitely need cups include and library files to compile it, and a running cups server for it to work, so i don't see how you can use it independently of cups? maybe there's some compile options i missed?

in the end i still couldn't it to work with the labyrinthal cups, so i needed to re-install pakt's cups, and then it works OK.

i still get the "deprecated" warnings...but it ends up like this:

Code: Select all

xpp.cxx: In member function `int printFiles::copyInstance(int, const char*)':
xpp.cxx:2370: warning: `fl_ask' is deprecated (declared at /usr/include/FL/fl_ask.H:59)
xpp.cxx:2370: warning: `fl_ask' is deprecated (declared at /usr/include/FL/fl_ask.H:59)
xpp.cxx:2381: warning: `fl_ask' is deprecated (declared at /usr/include/FL/fl_ask.H:59)
xpp.cxx:2381: warning: `fl_ask' is deprecated (declared at /usr/include/FL/fl_ask.H:59)
c++ -DPACKAGE=\"xpp\" -DVERSION=\"1.5\" -DHAVE_LIBX11=1 -DHAVE_LIBXEXT=1 -DHAVE_LIBGL=1 -DHAVE_LIBGLU=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBPNG=1 -DHAVE_LIBM=1 -DSTDC_HEADERS=1 -DHAVE_CUPS_CUPS_H=1 -DHAVE_FL_FL_H=1 -DHAVE_LIBCUPS=1  -I. -I.    -I/usr/X11R6/include  -I/usr/X11R6/include -g -O2 -c xppmain.cxx
c++ -DPACKAGE=\"xpp\" -DVERSION=\"1.5\" -DHAVE_LIBX11=1 -DHAVE_LIBXEXT=1 -DHAVE_LIBGL=1 -DHAVE_LIBGLU=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBPNG=1 -DHAVE_LIBM=1 -DSTDC_HEADERS=1 -DHAVE_CUPS_CUPS_H=1 -DHAVE_FL_FL_H=1 -DHAVE_LIBCUPS=1  -I. -I.    -I/usr/X11R6/include  -I/usr/X11R6/include -g -O2 -c inputslider.cxx
c++  -I/usr/X11R6/include -g -O2  -o xpp  mainwindow.o passworddialog.o cupshelper.o xpp.o xppmain.o inputslider.o  -lcups -lnsl -lm -L/usr/X11R6/lib -lfltk_images -lpng -lz -ljpeg -lfltk -ldl -lm -lXext -lX11 -lGLU -lGL -lXext -lX11  -L/usr/X11R6/lib -lSM -lICE
# 

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

Good work

#3 Post by vovchik »

Dear muggins,

I have cups running - and all requisite libs and headers) and the fltk package on my machine (I compiled it from source and it works). My problem was - and is - that I can't even get the simplest fltk app, including xpp, to compile without bombing, and the reason for the "__stack_chk_fail_local" error still eludes me. I'll try to install the new fltk package (fltk-1.1.x-r5940.tar.bz2) and have another go.

In the mean time, could you possibly post your version of xpp here? I'm curious to see what it looks like.

Many thanks in advance and kind regards,
vovchik

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#4 Post by muggins »

hi vovchik,

yes i've attached the xpp .pet. but i haven't compiled it any special way...does it need any particular ./configure options to enable the xft support that you mention? if so, let me know & i'll recompile it.

to run just type xpp in a console.
Attachments
xpp2.jpg
(21.97 KiB) Downloaded 1749 times
xpp-1.5-i486.pet
(130.75 KiB) Downloaded 290 times

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

ugly fonts and buttons

#5 Post by vovchik »

Hi muggins,

Many thanks for your assistance. I have attached what I was hoping to see after compilation. This screen shot shows the gui as seen in the fluid gui designer running on my machine. Murga-lua apps also look like this when running. Your version of xpp still looks like the old one, except that it inherited my round button change (but without the shading on the widgets and without clear fonts) since you used by mainwindow.cxx and .h. I enabled xft when compiling the fltk package with --enable-xft, or something like that. You need the xft devel libs for that to work. Just run ./configure --help and you'll see the proper syntax for that feature. I also enabled the images option. As for the style, my fluid is set up for "plastic". I'll have a look at your fltk source package tonight to see whether the nice graphic features can be enabled. And I still can't get my version of fltk to compile. #$@!#!

With kind regards,
vovchik
Attachments
xpp-fluid.jpg
(95.25 KiB) Downloaded 1023 times

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#6 Post by muggins »

well i've tried passing various options to xpp, but it still comes out looking non-plastic! where did you see the image you've uploaded? you've made me curious now as to how to enable fltk plastic as compiler option?

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

Plastic scheme

#7 Post by vovchik »

The image is from my own machine. I loaded the mainwindow.fl file into fluid and took a snapshot. All recent fltk apps can look like that. You first have to set up Preferences in fluid. Apps are suppossed to take on the "theme" appearance if there is an appropriate environmental variable in the system. I have:

Code: Select all

export FLTK_SCHEME=plastic
in /etc/profile.local.

You can also run apps that don't take other command line parameters as follows:

Code: Select all

fltkprog -s plastic.
When I run your xpp, however, I don't see the plastic but do see the round buttons (without shading). I now have your fltk set up and still have trouble compiling even the simplest fltk app (hello, world), although all the test apps compile fine and display with the plastic scheme.

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

Compilation succeeded

#8 Post by vovchik »

Dear muggins,

Here is a screenshot of xpp compiled by me a few hours ago. My previous problem with xpp compilation was that the makefile didn't contain the right libraries. I added -lXft and -lgdkxft to the list (and adjusted the lib directories), and was, in the end, able to compile an xft-enabled version. The fonts are much better now. xpp still ignores the fltk environmental variable assigning the "plastic" scheme, but I now want to try to hard code "plastic" into the *.cxx. In order to do that, and not knowing anything about fltk at the moment, I think I will have to do some reading beforehand. Have you had any luck? You will have to recompile your fltk package with the --enable-xft switch before trying to compile xpp again. I think one of us will actually succeed before too long.

With kind regards,
vovchik
Attachments
xpp-xft.jpg
(97.51 KiB) Downloaded 820 times

Post Reply