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 664800 - Compilation fails for babl 0.1.6 on Solaris 9 with Sun Studio compiler
Compilation fails for babl 0.1.6 on Solaris 9 with Sun Studio compiler
Status: RESOLVED FIXED
Product: GEGL
Classification: Other
Component: babl
unspecified
Other Solaris
: Normal normal
: ---
Assigned To: Default Gegl Component Owner
Default Gegl Component Owner
Depends on:
Blocks:
 
 
Reported: 2011-11-25 13:05 UTC by Dagobert Michelsen
Modified: 2013-10-09 07:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use inttypes.h if stdint.h is not available (2.62 KB, patch)
2011-11-25 13:05 UTC, Dagobert Michelsen
none Details | Review

Description Dagobert Michelsen 2011-11-25 13:05:09 UTC
Created attachment 202126 [details] [review]
Use inttypes.h if stdint.h is not available

I have some compilation issues with babl 0.1.6 on Solaris 9 Sparc with
Sun Studio 12:

1. There is stdint.h unconditionally included

This can easily be solved by wrapping the include with the detected
HAVE_INTTYPES_H instead. The attached patch fixes the issue.

2. Sun Studio need -lpthread or -mt instead of -pthread.

For now I just patched tests/Makefile.in to use -lpthread instead of -pthread,
but I guess it would be better to switch to ACX_PTHREAD or similar in autoconf:
 http://ac-archive.sourceforge.net/ac-archive/acx_pthread.html

3. I have one failing test which may or may not be a real issue:

PASS: n_components
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
Comment 1 André Klapper 2012-02-02 21:11:19 UTC
Comment on attachment 202126 [details] [review]
Use inttypes.h if stdint.h is not available

[Setting "patch" flag and correcting mime type]
Comment 2 André Klapper 2012-02-14 09:26:00 UTC
[Setting QA Contact to 'bugs at gegl.org' so people interested in following GEGL bug reports' changes can still follow if the assignee changes to a real person.]
Comment 3 Tim Mooney 2012-03-16 21:13:02 UTC
I'm building on x86_64-sun-solaris2.10 with the Studio 12 compilers.  Since I'm on Solaris 10 I didn't notice the stdint.h issue, but I agree with the comment & the patch.

I can confirm seeing both issue #2 & issue #3 on this version and architecture too.
Comment 4 Øyvind Kolås (pippin) 2012-04-05 15:04:45 UTC
The report about the models not being symmetric is unrelated; but also a bit concerning. Since it means that the compiler generates code with lower floating point precision than what we are seeing under linux.
Comment 5 Michael Muré 2012-05-12 08:39:01 UTC
stdint.h in present in Solaris 10, released in 2005. Also, it's a C99 standard header.

Honest question here, I don't want to be rude or anything, but at what point do we consider that system are obsolete and we don't care about them ?
Comment 6 Dagobert Michelsen 2012-05-12 20:29:21 UTC
I would think portability is generally a good thing. That being said as the checks are already present in autoconf and the fix is rather trivial there should be really no argument against it. The more concerning issue is the loss of precision which is also present in the Solaris 10 mainline release.
Comment 7 Tim Mooney 2012-05-12 20:51:14 UTC
I would say any time supporting an older platform becomes non-trivial or when there aren't people that are willing to test or help provide patches for that platform, then it becomes a candidate for being dropped.

As Dagobert said, in this case it's still pretty easy to make minimal efforts to support Solaris 9.

Regarding the loss of precision, I wonder if it's just the case that the default flags or perhaps the optimization level I chose is causing the compiler to generate less precise floating point?  I can experiment with different optimization levels, but my long history of building open source software has taught me that different compilers will commonly have minor differences in what floating point results they generate.  What I'll need is some kind of a guide or test that will help me decide when the results are close enough to be considered compatible.
Comment 8 Daniel Sabo 2013-10-09 07:42:18 UTC
Babl and GEGL both build for me now on Solaris 11 using gcc, there are still
some issues with make check in both libraries.

Babl:
commit ffb3a4d01c81961baa09d206bf87eea587e5392c
Author: Daniel Sabo <DanielSabo@gmail.com>
Date:   Tue Oct 8 23:17:57 2013 -0700

    Request a C99 compatible compiler

 configure.ac | 1 +
 1 file changed, 1 insertion(+)

GEGL:
commit f6bc68aa47bf17f27d03c9ebee8169e3e560e64f
Author: Daniel Sabo <DanielSabo@gmail.com>
Date:   Wed Oct 9 00:05:02 2013 -0700

    Request a C99 compatible compiler

 configure.ac | 1 +
 1 file changed, 1 insertion(+)