[Gegl-developer] babl portability patches, and a test failure

Gary V. Vaughan gegl-developer at mlists.thewrittenword.com
Tue Feb 17 06:12:39 PST 2009


It is very difficult to compile babl-0.0.22 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, and pass all but one
test (failure output below) on these 30 architectures:

  SuSE SLES 10 (x86_64 and i686);
  Redhat RHEL3, RHEL4 and RHEL5 (x86_64 and i686);
  Redhat 7.1, 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);
  Tru64 Unix 5.1 (ev5).

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:

 * build the extensions with libtool
 * support '.sl' shared library ext on HPUX
 * use correct includedir entry in babl.pc
 * use gnulib stdint.h for systems that don't have one
 * 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/
 * pregenerate changelog.rss (ruby is not commonly installed)
 * don't double #include <math.h>
 * 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!

I also wrapped the body of BABL_DETECT_CFLAGS in a GCC test,
since some vendor compilers simply warn and ignore unknown
flags.  It would be better to fix this properly.

Correct compilation on Tru64 relies on use of the -ieee
flag to cc, which I passed manually.  It would be better to
detect this at configure time with a correctly implemented
BABL_DETECT_CFLAGS macro.

I regenerated the autotools files with latest released
versions of autoconf, automake and libtool which results
in a huge diff, not attached!

I also removed the babl-0.0 include subdirectory and some
other instances of the @API-VERSION@, which are superflous
for our installations (each package already installs to
/opt/fsw/@pkg at -@version@/), but is almost certainly the
wrong thing to do in upstream releases.

With these patches applied, all hosts (except linux) always
fail the final test case.  I'm not sure whether this is an
anticipated rounding error that the test itself should be
tolerant of, or if there is a genuine problem with all of
the non-linux builds?

PASS: grayscale_to_rgb
PASS: rgb_to_bgr
PASS: rgb_to_ycbcr
PASS: srgb_to_lab_u8
PASS: sanity
PASS: babl_class_name
PASS: types
R'G'B'
        test:     60323.989 75673.805 55655.807 10508.764
        clipped:  60324.000 75673.819 55655.817 1.000
        trnsfrmd: 60324.010 75673.832 55655.827 1.000
R'G'B'
        test:     22002.791 20097.686 55166.163 25341.894
        clipped:  22002.794 20097.689 55166.173 1.000
        trnsfrmd: 22002.798 20097.693 55166.182 1.000
R'G'B'
        test:     31145.225 44052.134 43954.156 9807.322
        clipped:  31145.230 44052.142 43954.163 1.000
        trnsfrmd: 31145.235 44052.149 43954.171 1.000
R'G'B'
        test:     21854.712 45827.089 6242.623 90425.124
        clipped:  21854.716 45827.097 6242.624 1.000
        trnsfrmd: 21854.719 45827.105 6242.624 1.000
R'G'B' is not symmetric
R'G'B'A
        test:     60323.989 75673.805 55655.807 10508.764
        clipped:  60324.000 75673.819 55655.817 10508.764
        trnsfrmd: 60324.010 75673.832 55655.827 10508.764
R'G'B'A
        test:     22002.791 20097.686 55166.163 25341.894
        clipped:  22002.794 20097.689 55166.173 25341.894
        trnsfrmd: 22002.798 20097.693 55166.182 25341.894
R'G'B'A
        test:     31145.225 44052.134 43954.156 9807.322
        clipped:  31145.230 44052.142 43954.163 9807.322
        trnsfrmd: 31145.235 44052.149 43954.171 9807.322
R'G'B'A
        test:     21854.712 45827.089 6242.623 90425.124
        clipped:  21854.716 45827.097 6242.624 90425.124
        trnsfrmd: 21854.719 45827.105 6242.624 90425.124
R'G'B'A is not symmetric
R'aG'aB'aA
        test:     60323.989 75673.805 55655.807 10508.764
        clipped:  60324.000 75673.819 55655.817 10508.764
        trnsfrmd: 60324.010 75673.832 55655.827 10508.764
R'aG'aB'aA
        test:     22002.791 20097.686 55166.163 25341.894
        clipped:  22002.794 20097.689 55166.173 25341.894
        trnsfrmd: 22002.798 20097.693 55166.182 25341.894
R'aG'aB'aA
        test:     31145.225 44052.134 43954.156 9807.322
        clipped:  31145.230 44052.142 43954.163 9807.322
        trnsfrmd: 31145.235 44052.149 43954.171 9807.322
R'aG'aB'aA
        test:     21854.712 45827.089 6242.623 90425.124
        clipped:  21854.716 45827.097 6242.624 90425.124
        trnsfrmd: 21854.719 45827.105 6242.624 90425.124
R'aG'aB'aA is not symmetric
Y'
        test:     60323.989 75673.805 55655.807 10508.764
        clipped:  68802.171 68802.171 68802.171 1.000
        trnsfrmd: 68802.183 68802.183 68802.183 1.000
Y'
        test:     22002.791 20097.686 55166.163 25341.894
        clipped:  24665.123 24665.123 24665.123 1.000
        trnsfrmd: 24665.127 24665.127 24665.127 1.000
Y'
        test:     31145.225 44052.134 43954.156 9807.322
        clipped:  40181.806 40181.806 40181.806 1.000
        trnsfrmd: 40181.813 40181.813 40181.813 1.000
Y'
        test:     21854.712 45827.089 6242.623 90425.124
        clipped:  34146.725 34146.725 34146.725 1.000
        trnsfrmd: 34146.731 34146.731 34146.731 1.000
Y' is not symmetric
Y'A
        test:     60323.989 75673.805 55655.807 10508.764
        clipped:  68802.171 68802.171 68802.171 10508.764
        trnsfrmd: 68802.183 68802.183 68802.183 10508.764
Y'A
        test:     22002.791 20097.686 55166.163 25341.894
        clipped:  24665.123 24665.123 24665.123 25341.894
        trnsfrmd: 24665.127 24665.127 24665.127 25341.894
Y'A
        test:     31145.225 44052.134 43954.156 9807.322
        clipped:  40181.806 40181.806 40181.806 9807.322
        trnsfrmd: 40181.813 40181.813 40181.813 9807.322
Y'A
        test:     21854.712 45827.089 6242.623 90425.124
        clipped:  34146.725 34146.725 34146.725 90425.124
        trnsfrmd: 34146.731 34146.731 34146.731 90425.124
Y'A is not symmetric
Y'aA
        test:     60323.989 75673.805 55655.807 10508.764
        clipped:  68802.171 68802.171 68802.171 10508.764
        trnsfrmd: 68802.183 68802.183 68802.183 10508.764
Y'aA
        test:     22002.791 20097.686 55166.163 25341.894
        clipped:  24665.123 24665.123 24665.123 25341.894
        trnsfrmd: 24665.127 24665.127 24665.127 25341.894
Y'aA
        test:     31145.225 44052.134 43954.156 9807.322
        clipped:  40181.806 40181.806 40181.806 9807.322
        trnsfrmd: 40181.813 40181.813 40181.813 9807.322
Y'aA
        test:     21854.712 45827.089 6242.623 90425.124
        clipped:  34146.725 34146.725 34146.725 90425.124
        trnsfrmd: 34146.731 34146.731 34146.731 90425.124
Y'aA is not symmetric
Y'CbCr
        test:     60323.989 75673.805 55655.807 10508.764
        clipped:  60323.989 75673.855 55655.819 1.000
        trnsfrmd: 60323.988 75673.904 55655.832 1.000
Y'CbCr
        test:     22002.791 20097.686 55166.163 25341.894
        clipped:  22002.810 20097.691 55166.172 1.000
        trnsfrmd: 22002.829 20097.696 55166.181 1.000
Y'CbCr
        test:     31145.225 44052.134 43954.156 9807.322
        clipped:  31145.230 44052.178 43954.166 1.000
        trnsfrmd: 31145.235 44052.222 43954.176 1.000
Y'CbCr
        test:     21854.712 45827.089 6242.623 90425.124
        clipped:  21854.693 45827.155 6242.625 1.000
        trnsfrmd: 21854.673 45827.221 6242.628 1.000
Y'CbCr is not symmetric
Y'CbCrA
        test:     60323.989 75673.805 55655.807 10508.764
        clipped:  60323.989 75673.855 55655.819 10508.764
        trnsfrmd: 60323.988 75673.904 55655.832 10508.764
Y'CbCrA
        test:     22002.791 20097.686 55166.163 25341.894
        clipped:  22002.810 20097.691 55166.172 25341.894
        trnsfrmd: 22002.829 20097.696 55166.181 25341.894
Y'CbCrA
        test:     31145.225 44052.134 43954.156 9807.322
        clipped:  31145.230 44052.178 43954.166 9807.322
        trnsfrmd: 31145.235 44052.222 43954.176 9807.322
Y'CbCrA
        test:     21854.712 45827.089 6242.623 90425.124
        clipped:  21854.693 45827.155 6242.625 90425.124
        trnsfrmd: 21854.673 45827.221 6242.628 90425.124
Y'CbCrA is not symmetric
FAIL: models
===================
1 of 8 tests failed
===================

If I can provide clarification for the necessity of any of
the changes I made, or if a complete tarball with patches
preapplied would be useful, or if you would like me to
test a prerelease version with some of these fixes already
applied, please don't hesitate to ask.

Thanks for your work on BABL and GEGL!

Cheers,
	Gary
-- 
Gary V. Vaughan (gary at thewrittenword.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tww.patch
Type: text/x-diff
Size: 183634 bytes
Desc: not available
Url : /lists/gegl-developer/attachments/20090217/3d188730/attachment-0003.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config-h.patch
Type: text/x-diff
Size: 16594 bytes
Desc: not available
Url : /lists/gegl-developer/attachments/20090217/3d188730/attachment-0004.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnulib.patch
Type: text/x-diff
Size: 81192 bytes
Desc: not available
Url : /lists/gegl-developer/attachments/20090217/3d188730/attachment-0005.bin 


More information about the Gegl-developer mailing list