PDA

View Full Version : dfGUI for Linux v3.0.99



bwkaz
08-24-2003, 05:12 PM
The benchmark stuff (./foldtrajlite -bench, that is) isn't done, and neither is the graph scrolling. Which is why it's v3.0.99; maybe 3.1'll be done in a week or two. But:

http://kadzban.is-a-geek.net/dfGUI-linux/dfGUI-3.0.99.tar.gz

Requires Gtk 2, and if you already have installed gtkdatabox (from http://www.eudoxos.net/gtk/gtkdatabox/), then you can pass --without-included-gtkdatabox to the configure script to dynamically link against the system version. But it doesn't require gtkdatabox if you don't have it installed.

There's also an --enable-server switch -- DON'T USE IT! It's broken at the moment. :D

Other than that, have fun. If something breaks and you can figure out what, let me know. Well, even if you can't, let me know, but it'd help a little if you could. I've seen it crash once or twice, which is kind of disheartening, but I've been running it a ton, so it's not a huge deal. I guess. ;)

IronBits
08-24-2003, 05:34 PM
Can you post a pre-compiled version with all the stuff included so it just runs as a binary under *nix?

rsbriggs
08-24-2003, 06:56 PM
I'm running Red Hat 9.0, and get these error messages when I attempt to compile it. I first do a ./configure then a make in the directory where I un-zip-tarred it...



In file included from common.h:21,
from callbacks.h:6,
from main.c:14:
/usr/include/netinet/in.h:261: parse error before '(' token
/usr/include/netinet/in.h:261: parse error before "__u32"
/usr/include/netinet/in.h:262: parse error before '(' token
/usr/include/netinet/in.h:262: parse error before "__u16"
/usr/include/netinet/in.h:264: parse error before '(' token
/usr/include/netinet/in.h:264: parse error before "__u32"
/usr/include/netinet/in.h:266: parse error before '(' token
/usr/include/netinet/in.h:266: parse error before "__u16"
In file included from callbacks.h:6,
from main.c:14:
common.h:27:24: gtkdatabox.h: No such file or directory


If nothing else, it has the problem of not picking up the gtk header from ./include - you have some environment settings I should know about ?

rsbriggs
08-24-2003, 07:50 PM
Did some fiddling with common.h to change the order - forced the earlier include of <netinet/in.h> - that fixed the first problem I was having.


#ifndef __COMMON_H__
#define __COMMON_H__

#include <limits.h>
#include <gtk/gtk.h>
#include <time.h>
#include <netinet/in.h> // moved here and forced include

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#ifdef HAVE_PNG_H
#include <png.h>
#endif

#ifdef HAVE_ASM_BYTEORDER_H
#include <asm/byteorder.h>
#endif

#include <gettext.h>
#include <configstructs.h>

#include <gtkdatabox.h>



I also had to move the two files that live in ./include to /usr/include, or I end up with these error messages. It won't pick them up from the local include directory where you have them:


In file included from callbacks.h:6,
from main.c:14:
common.h:24:24: gtkdatabox.h: No such file or directory


But, I've end up with the following error that I don't know how to get around, since the .la file doesn't exist on my system:


libtool: link: warning: library `../libs/libgtkdatabox.la' was moved.
libtool: link: warning: library `../libs/libgtkdatabox.la' was moved.
libtool: link: cannot find the library `/usr/lib/libgtk-x11-2.0.la'
make[2]: *** [dfGUI] Error 1

rsbriggs
08-24-2003, 08:24 PM
A google search mostly pulls up the following types of questions - all unanswered so far as I can tell. The $64 questions, where does this .la file come from, why did ./configure build things to use it , and where can the rest of us find it?


Hello,

I am currently running Beaver 0.2.4 (the latest branch for which an RPM
is available) and would like to upgrade to 0.3.1. However, while
./configure goes fine, I get the following error on running make:

libtool: link: cannot find the library '/usr/lib/libgtk-x11-2.0.la'

I have the current (2.2) gtk and gtk-devel RPMs installed. There is a
/usr/lib/libgtk-x11-2.0.so, but no /usr/lib/libgtk-x11-2.0.la.

What do I need to install that will provide this library?

Beaver is the only civilized text editor I've found for Linux and I really want
some of the 0.3.1 features. :)

Thanks, xxxxx

IronBits
08-24-2003, 08:29 PM
Does this help?
http://lists.debian.org/debian-devel/1999/debian-devel-199902/msg02640.html
http://www.leidinger.net/FreeBSD/la-files
http://www.google.com/search?q=+%22libgtkdatabox.la%22&hl=en&lr=&ie=UTF-8&oe=UTF-8&as_qdr=all&filter=0

rsbriggs
08-24-2003, 08:43 PM
No :( :cry:

rsbriggs
08-24-2003, 08:54 PM
./configure --without-included-gtkdatabox seems like it might work....

DId the compile. Did make install. Ran dfGUI.

I get only a config screen, which dies when you attempt to do anything:




edit: ran it again - it's WORKING.........

[root@DELL400SC df-1]# dfGUI

(dfGUI:10462): Gtk-CRITICAL **: file gtkwidget.c: line 5139 (gtk_widget_set_size_request): assertion `width >= -1' failed

(dfGUI:10462): Gtk-CRITICAL **: file gtkwidget.c: line 5140 (gtk_widget_set_size_request): assertion `height >= -1' failed

(dfGUI:10462): Gtk-CRITICAL **: file gtkwidget.c: line 5140 (gtk_widget_set_size_request): assertion `height >= -1' failed

(dfGUI:10462): Gtk-CRITICAL **: file gtkwidget.c: line 5140 (gtk_widget_set_size_request): assertion `height >= -1' failed

(dfGUI:10462): Gtk-CRITICAL **: file gtkwidget.c: line 5139 (gtk_widget_set_size_request): assertion `width >= -1' failed

(dfGUI:10462): Gtk-CRITICAL **: file gtkwidget.c: line 5140 (gtk_widget_set_size_request): assertion `height >= -1' failed

(dfGUI:10462): Gtk-CRITICAL **: file gtkwidget.c: line 5140 (gtk_widget_set_size_request): assertion `height >= -1' failed

(dfGUI:10462): Gtk-CRITICAL **: file gtkwidget.c: line 5140 (gtk_widget_set_size_request): assertion `height >= -1' failed

(dfGUI:10462): Gtk-CRITICAL **: file gtkwidget.c: line 5140 (gtk_widget_set_size_request): assertion `height >= -1' failed

(dfGUI:10462): Gtk-CRITICAL **: file gtkwidget.c: line 5140 (gtk_widget_set_size_request): assertion `height >= -1' failed

(dfGUI:10462): Gtk-CRITICAL **: file gtkwidget.c: line 5140 (gtk_widget_set_size_request): assertion `height >= -1' failed

(dfGUI:10462): Gtk-CRITICAL **: file gtkwidget.c: line 5140 (gtk_widget_set_size_request): assertion `height >= -1' failed

(dfGUI:10462): Gtk-CRITICAL **: file gtkwidget.c: line 5140 (gtk_widget_set_size_request): assertion `height >= -1' failed

(dfGUI:10462): Gtk-CRITICAL **: file gtkwidget.c: line 5140 (gtk_widget_set_size_request): assertion `height >= -1' failed

(dfGUI:10462): Gtk-CRITICAL **: file gtkwidget.c: line 5140 (gtk_widget_set_size_request): assertion `height >= -1' failed

(dfGUI:10462): Gtk-CRITICAL **: file gtkwidget.c: line 5139 (gtk_widget_set_size_request): assertion `width >= -1' failed

(dfGUI:10462): Gtk-CRITICAL **: file gtkprogress.c: line 557 (gtk_progress_set_percentage): assertion `percentage >= 0 && percentage <= 1.0' failed

(dfGUI:10462): GLib-CRITICAL **: file gtimer.c: line 130 (g_timer_elapsed): assertion `timer != NULL' failed
Segmentation fault

bwkaz
08-24-2003, 09:01 PM
Originally posted by IronBits
Can you post a pre-compiled version with all the stuff included so it just runs as a binary under *nix? http://kadzban.is-a-geek.net/dfGUI-linux/dfGUI-precompiled

I'm not positive whether it'll work on your machine, but it's worth a shot. It still needs Gtk 2 though.

As for the other stuff (rsbriggs' posts), err... that's interesting. I don't have anything that I know of in my environment. But I do have a problem in my Makefile.am, and that's why it can't find the included header file (...oops :o).

As for the netinet/in.h thing, I think if you just move <asm/byteorder.h> after <netinet/in.h>, that should do it. I never got that when building it, except for once when I did a make distcheck (which runs through a complete compilation, basically). I thought it was weird that it only showed up when doing distcheck, but I figured it was all right. Guess not... :o Anyway, I'm doing distcheck again to see if moving the include helped at all. Yep, it looks like it did.

The warnings from libtool (that libgtkdatabox.la was moved) are nothing to worry about, I guess. If you look at the .la file, you'll see a "directory this was installed into" line; that's what it's complaining about. If you want to get rid of that warning, edit that line so that the path to the base directory of the dfGUI source is OK. But it shouldn't matter too much.

The other error, though, is a lot more severe, obviously... I assume you have Gtk 2 installed, right? Do you also have the gtk2-devel package installed? You'll need it...

Edit: OK, looks like you're running into something else now. You might want to try the new version (just updated now, so if you get it after reading this, it should work a lot better), but if you get the same thing...

Is DF running when you start up dfGUI?

The first thing you have to do in the config screen is to browse to where the DF client directory is (the folder button thingy). I assume you've done that, right? Are you getting these assertion failures when you hit the "save" button on the config screen? (You are hitting save and not revert, right?)

rsbriggs
08-24-2003, 09:09 PM
I get the same string of GTK error messages as the one I compiled. THey are mentioned above ((dfGUI:10428): Gtk-CRITICAL **: file gtkwidget.c: line 5140 (gtk_widget_set_size_request): assertion `height >= -1' failed )

However, it does run once you enter the config screen and point it to a foldit file.... :thumbs:

It's quite cool :notworthy

bwkaz
08-24-2003, 09:12 PM
Holy cow we're crossing posts... ;)

If you want to retry the source, feel free -- like I said, it's been updated.

How were you able to start clicking things before you browsed to the client directory? I got a segfault when I clicked refresh before giving it a client directory (have to remember to disable that button, too...), but never got all those assertions...

Oh -- you didn't by any chance have an empty ~/.dfGUI.rc file, did you?

rsbriggs
08-24-2003, 09:26 PM
{ Why is the message entry box box so small for this forum??? }

How were you able to start clicking things before you browsed to the client directory? I got a segfault when I clicked refresh before giving it a client directory (have to remember to disable that button, too...), but never got all those assertions...

Oh -- you didn't by any chance have an empty ~/.dfGUI.rc file, did you?

Uh-oh. Please tell me that there are separate config files for all 6 copies of dfGUI that I'm running on this machine - two for the copies of foldit I'm running on this machine, and 4 copies being run, one in each of the NFS mounted client workstation directories. You DID mean they live in ./.dfGUI.rc, rather than ~/.dfGUI.rc , right ?? :scared:

Probably DID have an empty .rc file after trying to run the copy that I compiled several times.... BTW, I get those assertions every time I run the program. Start xterm window. Type ./dfGUI-precompiled. See the errors in the window, then the main GUI screen pops up....

bwkaz
08-24-2003, 09:42 PM
Umm.... uh oh. No, that was ~/.dfGUI.rc... the idea originally was to only be able to run one copy per machine. That was something else that the --enable-server was going to enable -- not only letting you monitor remote machines over a network (rather than needing to NFS-mount the directories), but also being able to monitor more than one with one client window. They'd be tabbed per IP address, or something like that. But yeah, that's pretty broken (plus I don't think I've published the server piece), so don't bother with it ATM.

I should be able to change the config file location, though, hang on.

Yeah, that seems to work fairly well. The only problem is, if you run it from somewhere other than a place you've got set up already, then it'll just go right to the configuration screen. Which probably isn't too bad, though. Yet another updated version is up. ;) The binary is updated too.

As for those assertions, ... I can't seem to get them. What version of Gtk 2 do you have? Do an ls -l /usr/lib/libgtk-x11*.so to find out -- the one file that gets listed should be a symlink to the real Gtk library. On my system, that's:


$ ls -l /usr/lib/libgtk-x11*.so
lrwxrwxrwx 1 gtk libs 25 May 16 11:58 /usr/lib/libgtk-x11-2.0.so ->
libgtk-x11-2.0.so.0.200.1* (the stuff in bold is the important piece). I've got Gtk 2.2.1 installed; if your version is older, then that might be at least part of it.

Don't worry though, Gtk 2 is backward compatible (that is, if you upgrade to a newer release of Gtk 2, your other Gtk 2-requiring programs should still work -- Gtk 2 is not backward-compatible with Gtk 1.2).

bwkaz
08-24-2003, 09:58 PM
OK, last update for today (I hope). You can no longer hit any of the buttons except for "browse" and "quit" until you've browsed to the foldit script.

Once you do that, everything else reenables itself.

Updated source and binaries are at the previous locations.

I'll put together a webpage for this tomorrow sometime, I hope.

rsbriggs
08-24-2003, 10:00 PM
Still unable to compile - I'm in the process of doing things like:

ln -s /usr/include/gtk-2.0/gtk /usr/include/gtk
ln -s /usr/include/gtk-2.0/gdk /usr/include/gdk

Haven/t figured out yet how to handle glib.h - I'm certain that I'll end up doing something like:

ln -s /usr/include/glib-2.0/glib.h /usr/include/glib.h

Sigh. There are about a zillion that I have to fix....

rsbriggs
08-24-2003, 10:07 PM
lrwxrwxrwx 1 root root 25 Aug 18 17:00 /usr/lib/libgtk-x11-2.0.so -> libgtk-x11-2.0.so.0.200.1

lrwxrwxrwx 1 root root 24 Aug 24 19:47 gtk -> /usr/include/gtk-2.0/gtk



[root@DELL400SC include]# rpm -q -a | grep -i gtk
gtk+-1.2.10-25
gtk2-2.2.1-4
gtk+-devel-1.2.10-25
gtk2-devel-2.2.1-4

bwkaz
08-24-2003, 11:17 PM
Originally posted by rsbriggs
Still unable to compile - I'm in the process of doing things like:

ln -s /usr/include/gtk-2.0/gtk /usr/include/gtk
ln -s /usr/include/gtk-2.0/gdk /usr/include/gdk That's ... err... odd.

What does pkg-config --cflags gtk+-2.0 say?

The build system runs that to figure out the right include paths to use... if you're getting the wrong include paths (i.e., you're not getting -I/usr/include/gtk-2.0 in your compilation commands), then look at your /usr/lib/pkgconfig/gtk+-2.0.pc file. Sounds like that file might be messed up...

I wonder if compiling Gtk 2 myself was a good idea... not that I had a choice (I use LFS), but still, I wonder if I configured something strangely when I set it up...

GHOST
08-27-2003, 04:07 AM
Thanks bwkaz!

I installed it in mandrake. It asked for gtk2.0 and i installed it. No problems. I'm a newbie, it did take me a few minutes to figure out how to start it after the install.

Looks good.

rsbriggs
08-27-2003, 07:38 AM
pkg-config gtk+-2.0 --cflags


-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
-I/usr/include/atk-1.0 -I/usr/include/pango-1.0
-I/usr/X11R6/include -I/usr/include/freetype2
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include


But when I do the make, those includes do NOT show up in the compile line for doing main.c (see below)

Without making the soft links, this is the error I receive after doing ./configure --without-included-gtkdatabox followed by make


...
gcc -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -c `test -f main.c || echo './'`main.c
main.c:10:21: gtk/gtk.h: No such file or directory
In file included from main.c:12:
interface.h:5: parse error before '*' token
interface.h:5: warning: data definition has no type or storage class
...


Attempting to run ./configure without including the --without-included-gtkdatabox and then doing a make seems to result in the proper gcc flags to compile main, but it also seems to be choking on the the -static flag. I end up with the following errors:


...
mkdir .libs
libtool: link: warning: library `../libs/libgtkdatabox.la' was moved.
libtool: link: warning: library `../libs/libgtkdatabox.la' was moved.
libtool: link: cannot find the library `/usr/lib/libgtk-x11-2.0.la'
make[2]: *** [dfGUI] Error 1

rsbriggs
08-27-2003, 08:16 AM
here is the .pc file


prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
target=x11

gtk_binary_version=2.2.0
gtk_host=i686-pc-linux-gnu

Name: GTK+
Description: GIMP Tool Kit (${target} target)
Version: 2.2.2
Requires: gdk-${target}-2.0 atk
Libs: -L${libdir} -lgtk-${target}-2.0
Cflags: -I${includedir}/gtk-2.0

bwkaz
08-27-2003, 09:58 AM
I'm suspecting that it's due to more bugs in Makefile.am, especially the part where the wrong CFLAGS get passed to gcc when you use the --without-included-gtkdatabox switch. Sorry about that... I'll have to wait until I'm home to be able to fix it though. Sometime tonight is when that should happen.

The "can't find library" error, though, I'm not so sure about. I think that it's coming from the libgtkdatabox.la file's "requires" line, but I'm not sure. Does it help to edit the "installed path" line in that file, so that you get rid of the other two warnings? If that is the problem, then I'll have to come up with a better way to do it; if not, I might just have to abandon libtool completely...

bwkaz
08-28-2003, 08:30 PM
OK, yeah, it was a(nother) bug in Makefile.am. Apparently you can't use Automake conditionals if the first character on the line affected by the conditional is a tab. It makes some sense, seeing how make itself interprets tabs differently from other whitespace, but automake doesn't depend on make. But whatever. I've fixed that and rebuilt Makefile.in -- the updated package has (again) been uploaded.

The .la file thing looks like it might be a bug in your gtk-devel, but it turns out that it's easy enough to work around. If I get rid of the libgtkdatabox.la file, remove it from EXTRA_DIST, and change the link commands to specifically include the static .a file instead of the .la file. That way, libtool doesn't check the dependencies inside the .la file.

The "problem" is that the libgtkdatabox.la file is set to require .la files instead of .so files. And you don't have those files. It'll work just as well using the .so files without libtool, because everything that libgtkdatabox requires is already included in the link commands (because it's all Gtk stuff in general).

So that's in the updated version too.

The one thing I'm still looking at is all the assertion warnings. I still think it's related to the Gtk version (I've actually got 2.2.1 installed). But I do have an idea -- the assertions are happening in gtk_widget_set_size_request, and a grep for that function in all the source turns it up in src/interface.c -- in that file, a bunch of the widgets are getting size requests set to -2 for one or the other dimension (-2 is the default). -2 is, indeed, less than -1, and I think that's what's causing the assertions.

I also have run into that before, using Gtk+ 2.0.something and not realizing it (the shared libs from 2.0.X were the ones that were symlinked to, but 2.2.1 was installed when Glade wsa compiled). I chalked it up to a bug in Glade, and was running a sed script on that file before compiling, to "fix" it. But then I realized the issue with the symlinks, and reinstalled 2.2.1. After doing that, the assertions went away so I stopped doing the sed script.

I think if you do a sed -e 's/\(gtk_widget_set_size_request.*\)-2/\1-1/' <src/interface.c >interface.c && mv -f interface.c src from the dfGUI-3.0.99 directory, that might work around it.

According to the Gtk docs, -1 means "the natural size", and -2 isn't even listed as an option. So I think that my Gtk library is saying "use the default if it's <0", and yours is saying "use the default if it's -1, and if it's <-1, fail that assertion".

rsbriggs
08-28-2003, 08:59 PM
Ok - I follow maybe a couple words of that :D

There is something obviously wrong with my system - probably a consequence of initially doing an everything install of Red Hat. I've tried to build a little GUI in Glade, and can't get it to compile. I know you are supposed run autogen.sh, followed by a make, but autogen dies part way through, and it never manages to build a make file.

I'm hoping to do a Gentoo install on another box over the weekend. Once it's set, I shouldn't have to do much more than an "emerge glade" to have everything installed and set up. Guess I'll hold off until then.

Or maybe you can give me a clue -

error: po/Makefile.in is already registered with AC_CONFIG_FILES

any idea what that means?

bwkaz
08-28-2003, 09:16 PM
Originally posted by rsbriggs
Or maybe you can give me a clue -

error: po/Makefile.in is already registered with AC_CONFIG_FILES This is with your package, not dfGUI, right?

What version of glade? I'm using 2.0.0...

What version of automake and autoconf?

Would it be possible to post configure.ac (or, if glade still generates configure.in, then that file)?

rsbriggs
08-28-2003, 09:32 PM
Glade help->about says 0.6.4 ??
automake 1.6.3
autoconf 2.57

I presume these are the most current versions, as bundled with Red Hat....

I'll post configure.in if you think it is worth doing....

bwkaz
08-28-2003, 10:18 PM
Automake 1.7 is the newest version of that, actually. I don't know about autoconf, though; I'm still running 2.53 of it.

But your glade is definitely old. I do know that there were bugs with Gtk 2 and older glade versions (i.e. before glade 2.0.0). Interestingly enough, I don't believe there was a glade 1.0 at all.

But the thing is, you're not getting to the part where you depend on anything in Gtk; you're still running automake or autoconf when this error happens...

Well, hang on, I do remember having to manually update the build system with glade 0.something (I used it for v2.2betaX); the glade-generated build system was giving errors all over the place. It still does give one warning, having to do with aclocal.m4 and some of the glade-generated config.h defines, but that's just a warning.

You might try running autoupdate in your source directory. If that doesn't work, then yeah, post the new configure.in.

rsbriggs
08-28-2003, 10:25 PM
Let's see if I can't upgrade to a more current version of Glade before trying to do anything else then... I'll go poke around glade.gnome.org to see what I can find. Thanks.

bwkaz
08-29-2003, 11:11 PM
OK, let me know. You may have to compile glade from source. Shouldn't be too hard, IIRC (but I may not remember correctly... let me know if you have problems).

rsbriggs
08-29-2003, 11:55 PM
Couldn't find a newer version for Red Hat. I'm in the process of doing a Gentoo install on another box. Just starting X - be another 10 hours or so before I'm ready to try to emerge glade (the Gentoo package is version 2. something or another ).

No point in trying to patch things up so some old version runs. Might just as well get current...