After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 576615 - [GEGL] These patches are required for successful vendor compiles on non-linux machines
[GEGL] These patches are required for successful vendor compiles on non-linux...
Status: RESOLVED OBSOLETE
Product: GEGL
Classification: Other
Component: general
git master
Other All
: High normal
: Future
Assigned To: Default Gegl Component Owner
Default Gegl Component Owner
Depends on:
Blocks:
 
 
Reported: 2009-03-24 21:09 UTC by The Written Word
Modified: 2014-02-05 10:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
quilt series file (468 bytes, text/plain)
2009-03-24 21:11 UTC, The Written Word
  Details
config.h needs to be included at the top of every .c file in an autoconf project (21.78 KB, patch)
2009-03-24 21:12 UTC, The Written Word
committed Details | Review
older aix and irix compilers choke on trailing commas in enum decls (2.67 KB, patch)
2009-03-24 21:13 UTC, The Written Word
committed Details | Review
enum values must be less than INT_MAX (sign bit is illegal) (468 bytes, patch)
2009-03-24 21:14 UTC, The Written Word
committed Details | Review
some vendor C compilers choke on C++ comments (6.01 KB, patch)
2009-03-24 21:14 UTC, The Written Word
committed Details | Review
some vendor compilers can't compile non-constant elements of compound struct initializers (15.77 KB, patch)
2009-03-24 21:15 UTC, The Written Word
committed Details | Review
some vendor compilers choke on compound declaration casts (4.78 KB, patch)
2009-03-24 21:17 UTC, The Written Word
committed Details | Review
variadic macros are non-portable, use a glib like configure-time scheme falling back to variadic functions (17.63 KB, patch)
2009-03-24 21:17 UTC, The Written Word
none Details | Review
null-statements caused by trailing semi-colons are non-portable (7.95 KB, patch)
2009-03-24 21:18 UTC, The Written Word
none Details | Review
support hpux use of dsos with .sl suffixes (1.17 KB, patch)
2009-03-24 21:19 UTC, The Written Word
none Details | Review
the Makefile.ams shouldn't use deprecated automake features, or redundant declarations (25.97 KB, patch)
2009-03-24 21:21 UTC, The Written Word
none Details | Review
rewrite xml-insert.sh in portable bourne-shell (3.23 KB, patch)
2009-03-24 21:22 UTC, The Written Word
none Details | Review
don't try to pass gcc flags to vendor compilers (554 bytes, patch)
2009-03-24 21:22 UTC, The Written Word
none Details | Review
unsized arrays are not supported by many vendor compilers (1.13 KB, patch)
2009-03-24 21:24 UTC, The Written Word
none Details | Review
don't try to return a value from a void function (649 bytes, patch)
2009-03-24 21:25 UTC, The Written Word
none Details | Review
changes to Makefile.am and configure.ac to support gnulib modules in the next patch (7.73 KB, patch)
2009-03-24 21:25 UTC, The Written Word
none Details | Review
for completeness only, you should probably ignore this (6.03 KB, patch)
2009-03-24 21:26 UTC, The Written Word
none Details | Review
gnulib modules required for portable compilation (73.34 KB, patch)
2009-03-24 21:28 UTC, The Written Word
none Details | Review
files generated by modern autotools (225.14 KB, application/octet-stream)
2009-03-24 21:30 UTC, The Written Word
  Details
series (348 bytes, text/plain)
2009-03-30 01:48 UTC, The Written Word
  Details
variadic-macros.patch (21.02 KB, patch)
2009-03-30 01:49 UTC, The Written Word
committed Details | Review
null-statements.patch (7.95 KB, patch)
2009-03-30 01:50 UTC, The Written Word
committed Details | Review
hpux-plugins.patch (1.17 KB, patch)
2009-03-30 01:51 UTC, The Written Word
committed Details | Review
modernize-makefile-ams.patch (27.51 KB, patch)
2009-03-30 01:53 UTC, The Written Word
committed Details | Review
portable-xml-insert.patch (3.23 KB, patch)
2009-03-30 01:54 UTC, The Written Word
committed Details | Review
gcc-flags-vs-vendor-compilers.patch (554 bytes, patch)
2009-03-30 01:55 UTC, The Written Word
committed Details | Review
unsized-arrays.patch (1.13 KB, patch)
2009-03-30 01:57 UTC, The Written Word
committed Details | Review
void-returns.patch (649 bytes, patch)
2009-03-30 01:58 UTC, The Written Word
committed Details | Review
G_STRFUNC.patch (791 bytes, patch)
2009-03-30 02:00 UTC, The Written Word
committed Details | Review
dont-assume-GNU-runtime.patch (1.48 KB, patch)
2009-03-30 02:02 UTC, The Written Word
committed Details | Review
gnulib-prep.patch (7.73 KB, patch)
2009-03-30 02:03 UTC, The Written Word
reviewed Details | Review
tww.patch (5.59 KB, patch)
2009-03-30 02:04 UTC, The Written Word
reviewed Details | Review
gnulib.patch (75.69 KB, patch)
2009-03-30 02:06 UTC, The Written Word
reviewed Details | Review
auto.patch.bz2 (229.23 KB, application/octet-stream)
2009-03-30 02:08 UTC, The Written Word
  Details
series (126 bytes, text/plain)
2009-04-02 00:34 UTC, The Written Word
  Details
use-ruby-from-PATH.patch (480 bytes, patch)
2009-04-02 00:35 UTC, The Written Word
reviewed Details | Review
run-test-cases-fix.patch (421 bytes, patch)
2009-04-02 00:38 UTC, The Written Word
committed Details | Review

Description The Written Word 2009-03-24 21:09:15 UTC
Please describe the problem:
It is very difficult to compile gegl unless you are
using gcc and gmake with the GNU coreutils and ruby, on a
linux host.

With the attached patches I was able to successfully build
everything with the vendor compilers on these 27 architectures:

  SuSE SLES 10 (x86_64 and i686);
  Redhat RHEL3, RHEL4 and RHEL5 (x86_64 and i686);
  Redhat 9 and RHEL 2.1 (i686);
  Solaris 10 (x86 and sparc);
  Solaris 2.6, 7, 8 and 9 (sparc);
  AIX 4.3.3, 5.1, 5.2, 5.3 and 6.1 (powerpc);
  HPUX 11.31 (ia64);
  HPUX 11.23 (pa-risc and ia64);
  HPUX 10.20, 11.0 and 11.11 (pa-risc);
  IRIX 6.5 (mips).

(I was unable to get a working build on OSF 5.1 and RH linux 7.1, and will post to the mailing list separately for help on this).

Here is a list of some of the problems solved by the
attached patches, which would otherwise prevent
proper compilation by one or more vendor C compilers:

 * use gnulib for systems that don't have full GNU environment
 * support shl_load -ldl library loader on HPUX
 * remove extraneous trailing commas from *CONVERSION mcros
 * automake INCLUDES is deprecated, use AM_CPPFLAGS
 * support srcdir != builddir builds
 * use automake source file inference in tests/
 * variadic macros are not portable
 * don't use non-constant struct initializers
 * don't use the MSB of a signed integer type in an enum
 * don't use C++ comments
 * rewrite xml_instert.sh not to rely on GNU coreutils
 * for gnulib and autoconf to work properly, every .c file
   needs to #include "config.h" before anything else!

Steps to reproduce:
1. go to a non-linux machine
2. try to compile git master gegl with the vendor compiler



Actual results:
compilation fails in most cases, or else if gegl does compile, all the tests
fail catastrophically

Expected results:
everything works the same as with gcc on linux

Does this happen every time?
yes

Other information:
Comment 1 The Written Word 2009-03-24 21:11:28 UTC
Created attachment 131289 [details]
quilt series file

put this file and all other attachments into a patches directory, and apply
with 'quilt push all'

alternatively, apply each patch manually in the order shown in the series file
Comment 2 The Written Word 2009-03-24 21:12:37 UTC
Created attachment 131290 [details] [review]
config.h needs to be included at the top of every .c file in an autoconf project
Comment 3 The Written Word 2009-03-24 21:13:45 UTC
Created attachment 131292 [details] [review]
older aix and irix compilers choke on trailing commas in enum decls
Comment 4 The Written Word 2009-03-24 21:14:31 UTC
Created attachment 131294 [details] [review]
enum values must be less than INT_MAX (sign bit is illegal)
Comment 5 The Written Word 2009-03-24 21:14:59 UTC
Created attachment 131295 [details] [review]
some vendor C compilers choke on C++ comments
Comment 6 The Written Word 2009-03-24 21:15:49 UTC
Created attachment 131296 [details] [review]
some vendor compilers can't compile non-constant elements of compound struct initializers
Comment 7 The Written Word 2009-03-24 21:17:03 UTC
Created attachment 131297 [details] [review]
some vendor compilers choke on compound declaration casts
Comment 8 The Written Word 2009-03-24 21:17:37 UTC
Created attachment 131298 [details] [review]
variadic macros are non-portable, use a glib like configure-time scheme falling back to variadic functions
Comment 9 The Written Word 2009-03-24 21:18:31 UTC
Created attachment 131299 [details] [review]
null-statements caused by trailing semi-colons are non-portable
Comment 10 The Written Word 2009-03-24 21:19:51 UTC
Created attachment 131300 [details] [review]
support hpux use of dsos with .sl suffixes
Comment 11 The Written Word 2009-03-24 21:21:16 UTC
Created attachment 131301 [details] [review]
the Makefile.ams shouldn't use deprecated automake features, or redundant declarations 

This patch removes most of the warnings and errors thrown by automake-1.10.1,
and the smaller Makefile.ams are easier to read

It doesn't address the use of gmake wildcard extensions, so you still can't use a vendor make to build gegl.
Comment 12 The Written Word 2009-03-24 21:22:01 UTC
Created attachment 131302 [details] [review]
rewrite xml-insert.sh in portable bourne-shell
Comment 13 The Written Word 2009-03-24 21:22:55 UTC
Created attachment 131303 [details] [review]
don't try to pass gcc flags to vendor compilers 

some vendor compilers warn about unknown flags but otherwise compile (noisily,
with a warning for every unknown flag on every compilation unit)

since we know these are gcc flags, only see whether they work when we're
compiling with gcc
Comment 14 The Written Word 2009-03-24 21:24:13 UTC
Created attachment 131304 [details] [review]
unsized arrays are not supported by many vendor compilers
Comment 15 The Written Word 2009-03-24 21:25:08 UTC
Created attachment 131305 [details] [review]
don't try to return a value from a void function
Comment 16 The Written Word 2009-03-24 21:25:42 UTC
Created attachment 131306 [details] [review]
changes to Makefile.am and configure.ac to support gnulib modules in the next patch
Comment 17 The Written Word 2009-03-24 21:26:41 UTC
Created attachment 131307 [details] [review]
for completeness only, you should probably ignore this 

these changes are for our in-house packaging system, and require a patched
libtool... but maybe useful if subsequent patches don't apply correctly with
this one missing.

mostly useless :)
Comment 18 The Written Word 2009-03-24 21:28:25 UTC
Created attachment 131308 [details] [review]
gnulib modules required for portable compilation 

likely you only need gnulib-cache.m4 from here to see which modules I needed,
the patch was with our own slightly patched gnulib.  I've attached this for
completeness, since it is part of my working, ported and tested gegl tarball.

Most likely, you should fetch your own gnulib from git and:

    gnulib-tool --import extensions fpieee floorf pathmax
Comment 19 The Written Word 2009-03-24 21:30:13 UTC
Created attachment 131309 [details]
files generated by modern autotools 

bzip2 compressed patch file

again, just for completeness to show you what my working aclocal.m4,
config.h.in etc look like using stock autoconf-2.63 and automake-1.10.1 with
our own lightly patched libtool-1.5.x

You should probably 'autoreconf -fvi' with the latest/blessed versions of those
tools yourself rather than apply this patch
Comment 20 Martin Nordholts 2009-03-26 18:32:39 UTC
(In reply to comment #8)
> Created an attachment (id=131298) [edit]
> variadic macros are non-portable, use a glib like configure-time scheme falling
> back to variadic functions 

This patch does not apply cleanly any longer so it needs to be update. I think the best would be to wait for the git migration to be complete and then we can handle the distribution of commits using the git facilities

The patches before that are commited now.

Comment 21 The Written Word 2009-03-30 01:44:20 UTC
(In reply to comment #20)
> (In reply to comment #8)
> > Created an attachment (id=131298) [edit]
> > variadic macros are non-portable, use a glib like configure-time scheme falling
> > back to variadic functions 
> 
> This patch does not apply cleanly any longer so it needs to be update. I think
> the best would be to wait for the git migration to be complete and then we can
> handle the distribution of commits using the git facilities

Gegl seems to get more code churn than babl, and some of my original patches had bitrotted since I posted them.  I've updated from git and regenerated everything now.

The ones that needed updates (plus a new G_STRFUNC patch to match my babl submissions) are all attached below, along with a new series file.


Comment 22 The Written Word 2009-03-30 01:48:03 UTC
Created attachment 131664 [details]
series

put this file and all other attachments into a patches directory, and apply
with 'quilt push all'

alternatively, apply each patch manually in the order shown in the series file
Comment 23 The Written Word 2009-03-30 01:49:23 UTC
Created attachment 131665 [details] [review]
variadic-macros.patch

variadic macros are non-portable, use a glib like configure-time scheme falling
back to variadic functions
Comment 24 The Written Word 2009-03-30 01:50:41 UTC
Created attachment 131666 [details] [review]
null-statements.patch

null-statements caused by trailing semi-colons are non-portable
Comment 25 The Written Word 2009-03-30 01:51:30 UTC
Created attachment 131667 [details] [review]
hpux-plugins.patch

support hpux use of dsos with .sl suffixes
Comment 26 The Written Word 2009-03-30 01:53:04 UTC
Created attachment 131668 [details] [review]
modernize-makefile-ams.patch

The Makefile.ams shouldn't use deprecated automake features, or redundant
declarations.

This patch removes most of the warnings and errors thrown by automake-1.10.1,
and the smaller Makefile.ams are now easier to read

It doesn't address the use of gmake wildcard extensions, so you still can't use
a vendor make to build gegl.
Comment 27 The Written Word 2009-03-30 01:54:01 UTC
Created attachment 131669 [details] [review]
portable-xml-insert.patch

rewrite xml-insert.sh in portable bourne-shell
Comment 28 The Written Word 2009-03-30 01:55:17 UTC
Created attachment 131670 [details] [review]
gcc-flags-vs-vendor-compilers.patch

don't try to pass gcc flags to vendor compilers 

some vendor compilers warn about unknown flags but otherwise compile (noisily,
with a warning for every unknown flag on every compilation unit)

since we know these are gcc flags, only see whether they work when we're
compiling with gcc
Comment 29 The Written Word 2009-03-30 01:57:05 UTC
Created attachment 131671 [details] [review]
unsized-arrays.patch

unsized arrays are not supported by many vendor compilers
Comment 30 The Written Word 2009-03-30 01:58:47 UTC
Created attachment 131672 [details] [review]
void-returns.patch

don't try to return a value from a void function (it chokes some picky vendor compilers)
Comment 31 The Written Word 2009-03-30 02:00:20 UTC
Created attachment 131673 [details] [review]
G_STRFUNC.patch

avoid the need for CPPFLAGS='-D__FUNCTION__="unknown"' on some vendor compilers
Comment 32 The Written Word 2009-03-30 02:02:42 UTC
Created attachment 131674 [details] [review]
dont-assume-GNU-runtime.patch

`ls -1' and `diff -U 50' are GNUisms.  The -1 isn't necessary in any case, and I changed -U to -C just to get it working... if you need unified diffs, then a configure time check for GNU diff (possibly called gdiff) in PATH will be needed instead of this easy fix.
Comment 33 The Written Word 2009-03-30 02:03:54 UTC
Created attachment 131675 [details] [review]
gnulib-prep.patch

changes to Makefile.am and configure.ac to support gnulib modules in the (generated) gnulib.patch
Comment 34 The Written Word 2009-03-30 02:04:55 UTC
Created attachment 131676 [details] [review]
tww.patch

for completeness only, you should probably ignore this 

these changes are for our in-house packaging system, and require a patched
libtool... but maybe useful if subsequent patches don't apply correctly with
this one missing.

mostly useless :)
Comment 35 The Written Word 2009-03-30 02:06:45 UTC
Created attachment 131677 [details] [review]
gnulib.patch

gnulib modules required for portable compilation 

likely you only need gnulib-cache.m4 from here to see which modules I needed,
the patch was with our own lightly modified gnulib.  I've attached this for
completeness, since it is part of my working, ported and tested gegl tarball.

Most likely, you should fetch your own gnulib from git and:

    gnulib-tool --import extensions fpieee floorf pathmax
Comment 36 The Written Word 2009-03-30 02:08:14 UTC
Created attachment 131678 [details]
auto.patch.bz2

files generated by modern autotools 

bzip2 compressed patch file

again, just for completeness to show you what my working aclocal.m4,
config.h.in etc look like using stock autoconf-2.63 and automake-1.10.1 with
our own lightly patched libtool-1.5.x

You should probably 'autoreconf -fvi' with the latest/blessed versions of those
tools yourself rather than apply this patch
Comment 37 Martin Nordholts 2009-03-31 20:26:57 UTC
(In reply to comment #33)
> Created an attachment (id=131675) [edit]
> gnulib-prep.patch
> 
> changes to Makefile.am and configure.ac to support gnulib modules in the
> (generated) gnulib.patch 
> 

Got a problem with this for GEGl as well, same build problem as for babl.

I also had to re-add

  exr_load_la_SOURCES = exr-load.cpp

because automake failed otherwise, probably because it looked for .c not a .cpp.

The preceding patches have been commited. Could you look into this gnulib stuff please?
Comment 38 Martin Nordholts 2009-03-31 20:43:54 UTC
I just noted that the changes to test/Makefile.am does not run those two tests by default when doing a make check any longer which is of course pretty sever. Could you look into that too please? All tests should be run on a make check. If I would have noticed this before commiting the Makefile.am patch, I wouldn't have commited it :/
Comment 39 The Written Word 2009-04-01 23:58:18 UTC
(In reply to comment #37)
> (In reply to comment #33)
> > Created an attachment (id=131675) [edit]
> > gnulib-prep.patch
> > 
> > changes to Makefile.am and configure.ac to support gnulib modules in the
> > (generated) gnulib.patch 
> > 
> 
> Got a problem with this for GEGl as well, same build problem as for babl.
> 
> I also had to re-add
> 
>   exr_load_la_SOURCES = exr-load.cpp
> 
> because automake failed otherwise, probably because it looked for .c not a
> .cpp.
> 
> The preceding patches have been commited. Could you look into this gnulib stuff
> please?

Same solution as babl, pasted below (more-or-less):


This patch needs to be applied at the same time as gnulib.patch... I kept them separate because gnulib-prep.patch are the edits that I made to GEGL files manually, and gnulib.patch itself is the files that are automatically generated by gnulib-tool.  Depending on your commit policy, you may or may not keep automatically generated files under version control.  Normally, projects that use gnulib for portability commit m4/gnulib-cache.m4 only... this allows people to run 'gnulib-tool' on a freshly checked out tree and autogenerate sources and Makefile.am for the right modules.

Remember also that my attached gnulib.patch contains the automatically generated files from our lightly patched in-house gnulib, so rather than applying that directly, I would recommend pulling the current git master of gnulib onto your dev-machine, and running gnulib-tool from there:

  $ cd $HOME/Devo
  $ git clone git://git.savannah.gnu.org/gnulib.git gnulib--master--0
  $ PATH=$HOME/Devo/gnulib--master--0:$PATH
  $ cd $HOME/Devo/GEGL--master--0
  $ patch -p0 < patches/gnulib-prep.patch
  $ gnulib-tool --import extensions fpieee floorf pathmax

At this point everything will build again after an autoreconf (as before, I attached a patch that contains the generated files from our lightly patched in-house autoconf,automake and libtool incase you want to compare to your own output if things aren't behaving as you'd expect).

Thanks again Martin for wading through these for me!
Comment 40 The Written Word 2009-04-02 00:34:37 UTC
Created attachment 131882 [details]
series

New series file to match unapplied patches against current git master.
Comment 41 The Written Word 2009-04-02 00:35:58 UTC
Created attachment 131883 [details] [review]
use-ruby-from-PATH.patch

Don't assume #!/usr/bin/ruby, call ruby from PATH in Makefiles.
Comment 42 The Written Word 2009-04-02 00:38:23 UTC
Created attachment 131884 [details] [review]
run-test-cases-fix.patch

Fixes breakage in earlier modernize-makefile-ams.patch
Comment 43 The Written Word 2009-04-02 00:43:44 UTC
(In reply to comment #38)
> I just noted that the changes to test/Makefile.am does not run those two tests
> by default when doing a make check any longer which is of course pretty sever.
> Could you look into that too please? All tests should be run on a make check.
> If I would have noticed this before commiting the Makefile.am patch, I wouldn't
> have commited it :/

G'ah.. thought they were link tests, sorry!  Fixed by run-test-cases-fix.patch attached above.

(Subsequent patches in the series file apply with fuzz, so I didn't reattach.)

Comment 44 Martin Nordholts 2009-04-11 07:53:09 UTC
Gary, just wanted to tell you about this fix I had to make:

2009-04-11  Martin Nordholts  <martinn@svn.gnome.org>

	* gegl/Makefile.am: Move the libgegl build libs from LIBS to
	_LIBADD because dependency tracking doesn't seem to work
	otherwize. That is, changes in gegl/operation/liboperation.la
	doesn't cause a rebuild of libgegl-@GEGL_API_VERSION@.la.

since it is a rather server building problem.
Comment 45 Martin Nordholts 2009-05-30 09:21:11 UTC
I am working towards 0.1.0 and don't consider the last parts of this a blocker.
Comment 46 Martin Nordholts 2009-06-21 20:22:43 UTC
No sign of Gary for a while, so let's move this to milestone 'Future' so we can enjoy the site with no bugs on the 0.1.0 milestone list for GEGL.
Comment 47 Martin Nordholts 2009-06-23 05:01:05 UTC
What remains to be done is to use the gnulib library in the same way M4 does
it, see:
http://www.mail-archive.com/gegl-developer@lists.xcf.berkeley.edu/msg00582.html

and the messages after that.
Comment 48 The Written Word 2009-06-25 11:02:14 UTC
Hi Martin,

Sorry for the silence... I've been trying to get glibmm/cairomm/gtkmm to compile on all my machines recently.  This isn't forgotten, but I won't be able to get back to it for a few more weeks.
Comment 49 Daniel Sabo 2013-10-08 08:55:03 UTC
There are still some patches in here, are they still necessary?