Just the FAQs, please!
Last updated: Thursday, 10-Sep-1998 01:06:33 CDT
General | Plug-Ins | GTK+ | Script-Fu | Platforms |
---|
If your question isn't here, it might be more of a User FAQ than a developer FAQ. Look there before you panic.
The latest version of this FAQ should always be available at http://www.rru.com/~meo/gimp/faq-dev.html .
You may submit material to the maintainer, Miles O'Neal, at meo@rru.com . [an error occurred while processing this directive]
Yes. To produce a much smaller GIMP, do the following:
rm config.cache LDFLAGS="-s" ; export LDFLAGS # for csh use setenv LDFLAGS "-s" ./configure --disable-debug makeThen, if you run into problems...
rm config.cache LDFLAGS="" ; export LDFLAGS # for csh use unsetenv LDFLAGS ./configure --enable-debug make # for just the libraries and executables needing debugging
You need to hand-edit the "libtool" file and set LD=ld .
Workaround
In either your site gimprc file, or your personal gimprc file, uncomment the line that looks like this:
# (install-colormap)
You may need to use gmake (GNU's make). It's available wherever GNU utilities are available, such as ftp.sunsite.edu .
Two reasons. First, in a word, ``bloat''. Instead of one reasonably-sized program plus whatever plug-ins happened to be running at the moment, you would have one humongous program.
The other problem is ownership. Right now, anyone can write a plug-in, maintain it, fix it, enhance it, etc, and it has no effect on anything else in the gimp, or on any other developers. If everything moved into one package, the whole multi-developer paradigm would quickly bog down in detail, and ultimately, one person would end up holding the bag.
There are two shared memory issues - operating system shared memory and X shared memory.
There are lots of GIMP pages out there now, but these are the primary starting points for developers, at this time.
Michael J. Hammel <mjhammel@csn.net> is coordinating this effort. The docs will be handled in SGML, but if you really can't deal with SGML when you document your code, send him flat files, HTML, or anything else that's a common, standard format.
subscribe gimp-developer your-email-addresssubstituting your preferred email address for the string ``your-email-address'' .
See previous question.
It's under development. For more information, see Owen Taylor's <otaylor@gtk.org> page about XInput support for GTK and the GIMP.
You either don't have the XPM package installed, or you have the wrong version of XPM installed, or it's in a non-standard place. Check the GIMP install document to see which version you need; then make sure the include files and library are in paths defined in the Makefile (usually /usr/{lib,include}/X11 or /usr/local/{lib,include}).
If they are elsewhere, modify the Makefile appropriately.
Ingo Luetkebohle has developed an automated registry.
Browse a complete selection of plug-ins, with easy downloading, automated submission of new plug-ins and lots more to come at:http://gimp.foebud.org/registry/
The easiest way is to find a similar plug-in and modify it. If you don't see all the features you want in one, take parts from several. It's best to start simply, and add features. This has several advantages - you are concentrating on one thing at a time so you can do a better job, you will only have to debug one thing at a time (a BIG win), and you will probably learn each piece more thoroughly. (If you look at the available plug-ins, you will see that most of them branched from just a few originals.) This is actually a good way to learn almost any new language, library, system, etc.
Each entry has three elements: the type, a name string, and a definition string. Both string values are user-definable. The first element must be one of the types defined in the GParamType enumerated type in libgimp/gimpenums.h .
The first three entries in the GParamDef array must be of the correct types, in order: PARAM_INT32, PARAM_IMAGE, and PARAM_DRAWABLE. You need all three of these, and might as well just copy them verbatim from an existing plug-in.
In the words of Quartic (Federico Mena):
``The PARAM_IMAGE parameter refers to the image the plug-in was invoked from. Most plug-ins do not make use of that parameter, since they only care about getting a drawable to operate on (the third parameter).
``If you want to write a plug-in for RGB images only, then you should specify one of the "RGB", "RGBA", "RGB*" strings when calling gimp_install_procedure() in your query_proc. That is where the GIMP knows what types of images the plug-in can accept.''
Again in the words of Quartic (Federico Mena):
``Run_modes tell the plug-in whether it is being called interactively (i.e. the user selected it from an image's pop-up menu) or non-interactively (from a script, for example). If a plug-in is called interactively, it should display its dialog box if it has one. If it is called non-interactively, it should not display any kind of user interface; instead it should use the parameters it is passed.''
The three definitions for the run modes are RUN_INTERACTIVE, RUN_NONINTERACTIVE, and RUN_WITH_LAST_VALS. Again, if you base your plug-in on an existing one, you'll see clues to where you need to worry about the modes by looking for these. You might want to look at a complex plug-in as well as a simple one to make sure you have all the bases covered.
Some of the plug-ins have proven unstable. These have been moved into a separate download, which should be available wherever you got the GIMP, in the file gimp-plugins-unstable-VERSION.tar.gz or gimp-plugins-unstable-VERSION.tar.bz2 .
Since this list can change frequently, it is not included here.
You can use GDK_DISPLAY() for that.
Box packing refers to how your controls are laid out in an hbox or vbox. Raph Levien has written a tutorial on box packing.
Thanks again to Quartic:
At the start of your callback function:if (!GTK_TOGGLE_BUTTON(button)->active) return; /* or whatever you want to do */
If you are seeing complaints about the wrong number of arguments for some gtk function[s], and/or an unresolved reference to some gtk function[s], you need a newer version of GTK. Get it at
ftp://ftp.gimp.org/pub/gtk/ .After you build it, remove any old versions (or move them elsewhere) and install the new version. The GIMP build process insists on using the installed gtk+ libraries at this time.
Dov Grobgeld is working on a tutorial specifically to get Script-Fu users up to speed quickly. You might also check out MIT's Scheme page.
Tim Mooney asked about scheme documentation on the developer's mailing list; here is his summary:
Regarding my query on good references for a would-be Schemer, thanks to: "Daniel X. Pape" <dpape@ncsa.uiuc.edu> Quartic (federico@nuclecu.unam.mx) Erik Nygren <nygren@mit.edu> Andy Thomas <alt@picnic.demon.co.uk> Quartic and Erik indicated that the canonical reference for Scheme is: Abelson, H., G. Sussman and J. Sussman "Structure and Interpretation of Computer Programs" MIT Press, 2nd ed. August 1996 ISBN 0-262-01153-0 657 pp. $60.00 (cloth) There is a web page companion for the book at: http://www-mitpress.mit.edu/sicp/ Daniel suggested I just do a net search and provided me with a good starting point at Yahoo: http://www.yahoo.com/Computers_and_Internet/Programming_Languages Andy pointed out that there is a SIOD reference at: http://people.delphi.com/gjc/siod.html While doing some searching with HotBot for the book Quartic and Erik mentioned, I found another possibly useful site: http://www.schemers.com/products.html Also, check out Mark Galassi's documentation page, at: http://nis-www.lanl.gov/~rosalia/mydocs/ Mark is the primary maintainer for Guile, the GNU Scheme extension language.Giacomo Boffi offered an alternative viewpoint:
Structure and Interpretation of Computer Programs is invaluable as a learning tool for computer science. on the contrary, its usefulness wrt learning scheme, taking into account the limited aims that prompt most fu-scripters, could be questioned i'd like to point to another book by MIT PRESS, The Little Schemer - 4th Edition by Daniel P. Friedman and Matthias Felleisen drawings by Duane Bibby foreword by Gerald J. Sussman 1995 ISBN 0-262-56099-2 216 pp. 12 illus. $17.50 (paper) that imho is much more appropriate as a learning tool for scheme (or lisp, in general) note also that it cost substantially less!
Hopefully one day someone will determine why and fix it! Until then, however, use gimp-image-remove-layer instead of gimp-layer-delete and things should work fine.
This is one of the few platforms where gcc isn't the right answer. Acording to Stephen Eglen,
During compilation, cc doesn't like the following code found in app/layer.c (line 56) and app/channel.c (line 45). enum { LAST_SIGNAL }; static gint layer_signals[LAST_SIGNAL] = { 0 }; The compiler comes up with the following error: cc: Error: layer.c, line 56: In the declaration of "layer_signals", the array bound "LAST_SIGNAL" is not a positive integer. static gint layer_signals[LAST_SIGNAL] = { 0 }; So I changed the line to: vv static gint layer_signals[LAST_SIGNAL+1] = { 0 }; ^^ which kept the compiler happy, although maybe now that has broken something else. I also had to use a private colourmap by adding the following to gimprc: (install-colormap) Without this private colourmap, I still get a sigabrt: ** ERROR **: BadMatch (invalid parameter attributes) gimp fatal error: sigabrt caught [Note also that once I got it working with cc, I didn't recompile it under gcc to see if gcc works with private colourmaps.]
ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
If you are using a 64-bit OS, you need to add the `-o32' option for the compiler, or use gcc. With the SGI compiler, you may also need to play with optimization. Some modules may have exhibit problems unless compiled with `-O1' or even `-O0'.
Script-Fu requires the POSIX-compliant regex functions, which SGI only supports with IRIX 6.2 and later versions. The GNU version of regex should work just fine, though, and is available at:
http://wuarchive.wustl.edu/systems/gnu/regex-0.12.tar.gz
Quartic posted this fix, which showed up as a result of a GIMP IRC discussion:
(This is Steve, aka valiant@deeptht.armory.com.)Here's the fix for the configure/SCO/-lXext problem:
In gtk+/configure.in, line 75:
The last argument should be: -lX11 $X_EXTRA_LIBS
Instead of: -lX11
Run autoconf and configure again.
The reason this broke: OSR5 requires -lsocket for the X stuff to work. This is detected correctly a few steps prior. In the -lXext test however, a compilation is attempted with XShmAttach() to see if it is resolved properly with -lXext. Since in this test -lsocket is not included, link errors are produced and the test fails, so configure assumes -lXext does not help and does not put it in the Makefiles.
The GIMP is interacting in such a way with your system that it thinks you have XIM extensions when you don't. Run the configure script again, with the `--disable-xim' option, and recompile.
You can also try compiling with `--disable-shared'.
Or you can install a version of X11R6. 8^)
If you are linking with GNU's ld, this is probably the problem.
Try using /usr/ccs/bin/ld
instead.
If you just want to use freefonts or sharefonts, you can copy these files into the appropriate directory (such as /usr/openwin/lib/fonts/freefonts/ or /usr/openwin/lib/fonts/sharefonts/), or merge them with the appropriate fonts.dir and fonts.scale files if you mixed in freefonts and sharefonts with existing fonts:
Or just try using fontadmin
instead of
mkfontdir
.
I've never run into a Solaris system missing this, but according to From Neil Corlett:
The 'fontadmin' tool is a openwin demo program and sometimes does not exist. To properly add fonts the finagled directory requires fonts.dir, fonts.scale files to exist. mkfontdir does the first of these OK. For the second I built groff and downloaded type1inst-0.6.1 from an X contrib archive. type1inst (which needs groff) will build the fonts.scale file from the pfb files automatically.Solaris 2.6 is supposed to include better font editor and admin tools.
There may be a number of reasons. Several peoples' answers are here. The most detailed answers, list first, are the best bets with their noted versions.
According to resident Gimp on SOlaris guru Jim Harmon, more recent versions (0.99.25 on) should compile easily, but you may need to make a change in /usr/graphics/gtk-config.in:
OLD: --libs) echo -L${exec_prefix}/lib -L/usr/openwin/lib -R/usr/openwin/lib \ -lgtk -lgdk -lglib -lXext -lX11 -lsocket -lnsl -lm ;; NEW: (subs. your own GTK path for /usr/graphics ) --libs) echo -L${exec_prefix}/lib -L/usr/openwin/lib -R/usr/openwin/lib \ -L/usr/graphics/gtk+-0.99.10/gtk/.libs \ -R/usr/graphics/gtk+-0.99.10/gtk/.libs -lgtk \ -L/usr/graphics/gtk+-0.99.10/gdk/.libs \ -R/usr/graphics/gtk+-0.99.10/gdk/.libs -lgdk \ -L/usr/graphics/gtk+-0.99.10/glib/.libs \ -R/usr/graphics/gtk+-0.99.10/glib/.libs -lglib \ -lXext -lX11 -lsocket -lnsl -lm ;;
Jim Harmon compiled GIMP 0.99.19 and GTK+ 0.99.5 on Solaris 2.5, SPARC 5. Here are the steps he took:
(*) If you're installing a NEW VERSION, first: (*) o cd(/usr/graphics/gtk+ ) (*) o make uninstall clean (*) o rm -r ~/.gimp THEN: o mkdir /usr/graphics o mv g*.tar.gz /usr/graphics o tar xvfz gtk+-0.99.5.tar.gz created /usr/graphics/gtk+-0.99.5 o cd gtk+-0.99.5 o ./configure, make, make install (executed successfully) o cd .. o tar xvfz gimp+-0.99.19.tar.gz created /usr/graphics/gimp+-0.99.19 o cd gimp+-0.99.18 o ./configure NOW: *** Edit "config.status" *** o vi config.status /LDFLAGS o change: (note, the following are SINGLE LINES, remove any "\" characters and duplicate objects in the string if you cut/paste these into your config.status file...) s%@LDFLAGS@% -L/usr/openwin/lib -R/usr/openwin/lib \ -lgtk -lgdk -lglib \ -lXext -lX11 -lsocket -lnsl -lm%g to: (*) s%@LDFLAGS@% -L/usr/local/lib -R/usr/local/lib \ -L/usr/openwin/lib -R/usr/openwin/lib \ -L/usr/graphics/gtk+-0.99.5/gtk/.libs \ -R/usr/graphics/gtk+-0.99.5/gtk/.libs -lgtk \ -L/usr/graphics/gtk+-0.99.5/gdk/.libs \ -R/usr/graphics/gtk+-0.99.5/gdk/.libs -lgdk \ -L/usr/graphics/gtk+-0.99.5/glib/.libs \ -R/usr/graphics/gtk+-0.99.5/glib/.libs -lglib \ -lXext -lX11 -lsocket -lnsl -lm%g (*) O To SAVE SPACE in compiling, in the config.status file, REMOVE the "-g" option from the CFLAGS line: [was] s%@CFLAGS@% -g -I/usr/openwin/include -O2 -Wall%g [is] s%@CFLAGS@% -I/usr/openwin/include -O2 -Wall%g o ./config.status, make, make install (In other words, where "-lgtk -lgdk -lglib" appear on the LDFLAGS line, add the GTK+ path to the libs with the format of "-L/usr/graphics/gtk+-0.99.3//.libs -R/usr/graphics/gtk+-0.99.3//.libs -l", subsituting gtk/gdk/glib for ) (*) Also bear in mind that "/usr/local/lib" won't exist if not added as shown to LDFLAGS. - - - CAVEATS: I'm using the precompiled GCC 2.7.2.3 for Solaris 2.6, and gmake instead of make. To get GCC and GMAKE working, I had to set the paths to /usr/xpg4/bin and /usr/ccs/bin to the PATH variable, so that different compiler tools could be found. (ar, bison, cpp, etc.)
Jim Harmon compiled GIMP 0.99.18 and GTK+ 0.99.3 on Solaris 2.5, SPARC 5. Here are the steps he took:
o mkdir /usr/graphics o mv g*.tar.gz /usr/graphics o tar xvfz gtk+-0.99.3.tar.gz created /usr/graphics/gtk+-0.99.3 o cd gtk+-0.99.3 o ./configure, make, make install (executed successfully) o cd .. o tar xvfz gimp+-0.99.18.tar.gz created /usr/graphics/gimp+-0.99.18 o cd gimp+-0.99.18 o ./configure NOW: *** Edit "config.status" *** o vi config.status /LDFLAGS o change: (note, the following are SINGLE LINES, remove anycharacters in the string if you cut/paste it into your config.status file...) s%@LDFLAGS@% -L/usr/openwin/lib -R/usr/openwin/lib -lgtk -lgdk -lglib -lXext -lX11 -lsocket -lnsl -lm%g to: s%@LDFLAGS@% -L/usr/openwin/lib -R/usr/openwin/lib -L/usr/graphics/gtk+-0.99.3/gtk/.libs -R/usr/graphics/gtk+-0.99.3/gtk/.libs -lgtk -L/usr/graphics/gtk+-0.99.3/gdk/.libs -R/usr/graphics/gtk+-0.99.3/gdk/.libs -lgdk -L/usr/graphics/gtk+-0.99.3/glib/.libs -R/usr/graphics/gtk+-0.99.3/glib/.libs -lglib -lXext -lX11 -lsocket -lnsl -lm%g o ./config.status, make, make install (In other words, where "-lgtk -lgdk -lglib" appear on the LDFLAGS line, add the GTK+ path to the libs with the format of "-L/usr/graphics/gtk+-0.99.3/ /.libs -R/usr/graphics/gtk+-0.99.3/ /.libs -l ", subsituting gtk/gdk/glib for ) -------------------------------- CAVEATS: I'm using the precompiled GCC 2.7.2.3 for Solaris 2.6, and gmake instead of make. To get GCC and GMAKE working, I had to set the paths to /usr/xpg4/bin and /usr/ccs/bin to the PATH variable, so that different compiler tools could be found. (ar, bison, cpp, etc.)
According to Keyyly Price, here's a major one for 0.99.10 .
``If you do a -lX11, you must also include -lsocket, or it won't compile
anything of X on Solaris 2.5. X doesn't have the socket lib.
Which means you'll need to setenv LIBS -lsocket while running configure if
you run Solaris 2.5.''
Will Lowe did the following to get the GIMP compiled for Solaris 2.5.1 : (You should replace /usa/lowe/usb_lowe/gimp in each "-L" part with whereever you are compiling gimp, and replace /usa/lowe/gimp/lib in the "-R" parts with whereever you're going to install gimp. -Will)
Get gimp source (duh) (gimp-0.99.9). uncompress and untar the source. ./configure --without-libtiff rm docs/pdb.info gimp/gtk+/gdk/gdkimage.c Remove these three lines: #if defined (HAVE_IPC_H) && defined (HAVE_SHM_H) && defined (HAVE_XSHM_H) #define USE_SHM #endif gimp/gtk+/gdk/Makefile: change the variable "libgdk_la_LDFLAGs" to include: -L/usa/lowe/usb_lowe/gimp/gtk+/glib/.libs -R/usa/lowe/gimp/lib before "-lglib" gimp/gtk+/gtk/Makefile: change the variable "libgtk_la_LDFLAGS" to include: -L/usa/lowe/usb_lowe/gimp/gtk+/gdk/.libs -R/usa/lowe/gimp/lib before "-lgdk" gimp/libgimp/Makefile: change the variable "libgimp_la_LDFLAGS" to include: -L/usa/lowe/usb_lowe/gimp/gtk+/glib/.libs -R/usa/lowe/gimp/lib before "-lglib" change "libgimpui_la_LDFLAGS" to include -L/usa/lowe/usb_lowe/gimp/gtk+/gtk/.libs -R/usa/lowe/gimp/lib before "-lgtk" gimp/plug-ins/dgimp/dgimp.c move "#include <sys/types.h>" to above "#include <sys/socket.h>" gimp/plug-ins/dgimp/lpg.c same as dgimp.cFor 0.99.pre11, Sheldon E. Newhouse suggests the following change to the libtool files:
#archive_cmds='$LD -G -z text -h $soname -o $lib$libobjs$deplibs' archive_cmds='$LD -G -h $soname -o $lib$libobjs$deplibs'Or, you can just grab the current binaries from http://www.cs.wustl.edu/~paul/ , courtesy of T. Paul McCartney.
A bug appeared in the code. Here's the pacth, courtesy of Petr A. Ovchenkov and Dov Grobgeld:
-------------- cut here -------------- *** plug_in.c.orig Sun Oct 12 18:49:27 1997 --- plug_in.c Sun Oct 12 18:39:25 1997 *************** *** 219,226 **** g_warning ("shmat failed...disabling shared memory tile transport\n"); shm_ID = -1; } ! else ! shmctl (shm_ID, IPC_RMID, 0); } } --- 219,226 ---- g_warning ("shmat failed...disabling shared memory tile transport\n"); shm_ID = -1; } ! /* else ! shmctl (shm_ID, IPC_RMID, 0); */ } } *************** *** 336,341 **** --- 336,345 ---- plug_in_destroy (plug_in); } + if ( shm_ID != -1 ) { + shmctl( shm_ID, IPC_RMID, 0 ); + shm_ID = -1; + } } void -------------- cut here --------------
Yes. Try the following:
ftp://s9412a.steinan.ntnu.no/pub/gimp/
http://www.linkexplorer.com/gimp
According to Rob Payne...
There are old .src.rpm's on ftp.redhat.com for gimp and gtk that if used to build new gtk+ and gimp will create all kinds of headaches for the builder.
The gtk SPEC file manually moves header files from gtk default installation place, and then the CFLAGS returned by gtk-config are incorrect when it comes time to build/install gimp. I was successful in bringing the gtk+ SPEC file up to date by removing the following lines from (gtk-970925.spec) to build 0.99.7 and 0.99.8:
(cd $RPM_BUILD_ROOT/usr/local/include mkdir glib mv glib.h glibconfig.h glib)Of course, the %files section of that SPEC need to be changed, as well to include the differences in places for the header files, and to include gtk-config.
I hope that information is useful to someone. If you have any questions about any of this, please let me know.
Another possibility is for this error (far less common) is that there is an old library compiled with the other hanging around somewhere on the system. Remove old copies of libgimp.
You probably just installed the graphics libraries. You also need to install the development portion as well; it's called the libgr source package. After installing that, GIMP should compile easily.
``Some of the X include files and libraries are not in /usr/include/X11 and /usr/lib/X11 as you may expect. This is because HP allows support for X11R4 and X11R5 on the same machine. You must modify a configuration file so that the Makefile created by imake looks for these files and libraries in an alternate location. See "Motif and Xt" on page A-5 and "Xaw and Xmu" on page A-6 for details on installation of OSF/Motif, Xt, Xaw and Xmu.
...
``HP does not ship or support these widget libraries; however, they are widely used for X public domain software. Binaries and header files are available from the Interworks library. Source is available from public domain archives. The name of the binary package in the Interworks library is x8.0s700.tar.Z. You may also be able to locate these files on another machine and copy them to your machine.''
The ref'd package is at:
ftp://www.interworks.org/pub/comp.hp/Look for the x8.0s[378]00.tar.Z files.
You are probably not using the GNU make. Most, if not all, non-GNU makes will fail on the GIMP makefiles. Get the GNU make package.
It's a bug in AcceleratedX with shared memory. Turn off shared memory when you start the GIMP (--no-xshm) or pick up the patch to AcceleratedX's X server from ftp://ftp.xinside.com/ax/patches/v3.1/beta/ . At least one person has found this bug (or another one with the same symptoms) to still be present in 4.1 .
This is a bug in XFree. You need to upgrade to XFree3.3.2 .
Here is a patch from Jim Geuther. This will disappear from the FAQ when it's fixed in the master source copy.
Contributors: Spencer Kimball & Peter Mattis, Thomas Bahls, Zach Beane, Giacomo Boffi, Victor Brilon, Eli Burke, Seth Burgess, Neil Corlett, Christopher Curtis, Bert Driehuis, Ian Donaldson, Pat Dunn (?), Stephen Eglen, Eugene Filippov, Rial Fletcher, Steve Ginzburg, Trond Eivind Glomsrĝd, Dov Grobgeld, Michael J. Hammel, Pete Harlan, Jim Harmon, Thimo Jansen, Philippe Lavoie, Marc Lehmann, Adrian Karstan Likins, Will Lowe, Ingo Lütkebohle, T. Paul McCartney, Adam Moss, Tim Mooney, Sven Neumann, Sheldon E. Newhouse, Miles O'Neal, Rob Payne, Mark Powell, Quartic (Federico Mena), Deon Ramsey, William L. Sebok, Terrelle Shaw, Mike Sweet, Eiichi Takamori, Mike Taylor, Owen Taylor
Last updated: 10 September 1998 [an error occurred while processing this directive]