Bug 276425 - build fails - exception.h
Summary: build fails - exception.h
Status: RESOLVED UNMAINTAINED
Alias: None
Product: grantlee
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Solaris
: NOR normal
Target Milestone: 0.2
Assignee: Stephen Kelly
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-24 23:27 UTC by tropikhajma
Modified: 2021-07-12 10:51 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch (3.75 KB, patch)
2011-07-05 14:07 UTC, tropikhajma
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tropikhajma 2011-06-24 23:27:23 UTC
Version:           unspecified (using Devel) 
OS:                Solaris

building grantlee 0.1.9 fails with errors like the one pasted below.

pkgbuild: "/export/home/kdebuild/packages/BUILD/grantlee-0.1.9/i386/grantlee-0.1.9/templates/defaulttags/cycle.cpp", line 40: Error: Exception is not a member of Grantlee.

this is because exception.h is already present on my system.

I found that doing

-#include "exception.h"
+#include "../lib/exception.h"

in the affected files made the issue go away.

Reproducible: Always
Comment 1 Stephen Kelly 2011-07-02 17:46:39 UTC
Hi,

Do you have any idea what is particular to Solaris to cause this issue? It is not present on other platforms. I thought that the include directories would be searched in the order they are specified and that the grantlee exception would be found first?

Anyway, I will apply the patch if you send it on.
Comment 2 tropikhajma 2011-07-04 20:19:53 UTC
actually this seems to stem from our build system.
The apache stdcxx standard library has only recently been integrated to Solaris  so the version of the compiler we're using (12u1) does not support it natively.
We're passing the -Ipath to the stdcxx headers (exception.h is there) as part of the CXXFLAGS so this path is on the same level of importance to the compiler as the -Ipath covering the insides of grantlee.

The CC man page (http://developers.sun.com/sunstudio/documentation/ss12/mr/man1/CC.1.html) gives this search order for includes:

The compiler searches for quote-included files (of
               the form #include "foo.h") in this order:
               1.   In the directory containing the source
               2.   In the directories named with -I options, if
                    any
               3.   In the include directories for compiler-
                    provided C++ header files, ANSI C header
                    files, and special-purpose files
               4.   In /usr/include

With this it is clear that the "exception.h" in grantlee is searched inside (2), so the confusion with stdcxx's exception.h.
With the change I used, it became findable inside (1) so it built.

This may no longer be an issue in Solaris Studio 12u2, that added native support for the stdcxx library. We're not using 12u2 as it came with a few regressions.

So, it looks there's nothing particularly wrong with grantlee and hopefully this will be resolved when studio 12u3 is out. Of course it might be preferable to have exact paths to the exception.h header to prevent similar issues in the future so let me know if you're still interested and I'll clean up the patch we have and put it here.
Comment 3 tropikhajma 2011-07-05 14:07:47 UTC
Created attachment 61626 [details]
patch
Comment 4 Andrew Crouthamel 2018-11-06 15:10:47 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Andrew Crouthamel 2018-11-18 03:27:56 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand.

Thank you for helping us make KDE software even better for everyone!