GNOME Bugzilla – Bug 60842
configure/compile error. Line too long when generating gtk/stock-icons/Makefile
Last modified: 2010-07-10 04:07:49 UTC
gtk-1.3.8 During the configure step, an error message is output: 'Output line too long' This does not stop the configure. The actual failure occurs during the compile. The compile fails in gtk/stock-icons. I traced the failure to gtk/stock-icons/Makefile. The 'VARIABLES = ' line is truncated. Neither gtk/stock-icons/Makefile.am and gtk/stock-icons/Makefile.in get truncated. When the gtk/stock-icons/Makefile gets generated, a whole bunch of tabs get added between the filenames and pushes the line length over 4000 characters (counting tabs as 1 char). The truncation is at exactly 4000. GNU make version 3.79.1 gcc version 2.95.2 bash 2.03.0(1)-release (sun's version distributed with solaris 8) All of the automake/autoconf stuff was prebuilt because this was an unstable release tarball.
btw, /bin/sh on the Sun is NOT just a link to /bin/bash. It is a seperate binary.
OK. This actually compiles without incident if the #!/bin/sh in the configure script is changed to #!/bin/bash. Apparently Sun's sh has a lower maximum line length than bash. I suppose this is more a bug in Sun's sh than in gtk. Nevertheless, this is still worth looking into if Solaris is a target platform.
This could be solved either by calling gdk-pixbuf-csource multiple times and concating the result, or by adding a --file-list option to read variable/filename pairs from a file. I think the read-from-a-file-approach would be cleanest.
Generating stock-icons could be done like this: d:\devel\gtk+\gtk> gdk-pixbuf-csource --build-list stock-icons (with stock-icons being a directory) It would require that all files are named after there corresponding variable name. There is currently only one exception to this rule: stock_missing_image $(srcdir)/stock_broken_image.png As an additional benefit this would greatly simplify the process of maintaining a set of additional makefiles (e.g. for win32/msvc :-) The following patch use the not yet included patch from #63667
Created attachment 5967 [details] [review] patch against gtk+/gdk-pixbuf/gdk-pixbuf-csource.c with --ignore-space-change
Don't think we are going to get this fixed for 2.0.0. There was some general unenthusiasm for the "all the icons in the directory, with names derived from the filenames" solution.
Low-tech 2.0.0 workaround. Wed Feb 27 18:39:25 2002 Owen Taylor <otaylor@redhat.com> * gtk/stock-icons/Makefile.am: Split big VARIABLES variable that was causing overlong lines into 6 variables with 20 in each one.
Owen, if the general unenthusiasm came from the fact that stock ids are directly derived from filename, may I propose that we could use a text chunk called "stock-id" in the pngs to provide the stock id (falling back to the filename if there is no stock- id text chunk.
Well, the name was part of it, but another part of it is that if it shouldn't happen that if I do: cp foo.png foo-bak.png that suddenly I get another entry. Plus, requiring special text chunks would make it harder for people to edit the icons, and easier to get editing them wrong.
What we have now works, if it isn't elegant, so => 2.4.