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 569459 - Fix for libical includes
Fix for libical includes
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Calendar
2.26.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Suman Manjunath
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2009-01-28 13:39 UTC by Michael Monreal
Modified: 2013-09-14 16:52 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
Patch (3.76 KB, patch)
2009-01-28 13:48 UTC, Michael Monreal
committed Details | Review
use <libical/ical.h> + workaround the buggy CFlags (4.82 KB, patch)
2009-02-03 07:53 UTC, Suman Manjunath
none Details | Review
use <libical/ical.h> + workaround the buggy CFlags (5.15 KB, patch)
2009-02-03 09:27 UTC, Suman Manjunath
none Details | Review
use <libical/ical.h> + workaround the buggy CFlags (5.66 KB, patch)
2009-02-05 03:21 UTC, Suman Manjunath
committed Details | Review
patch to use with libical-0.44 (2.38 KB, patch)
2009-02-18 08:26 UTC, Suman Manjunath
reviewed Details | Review

Description Michael Monreal 2009-01-28 13:39:59 UTC
libical sets Cflags: -I${includedir}/libical in the .pc file, so EDS should include ical.h instead of libical/ical.h etc

Right now EDS does not compile for me because of this.
Comment 1 Michael Monreal 2009-01-28 13:48:32 UTC
Created attachment 127392 [details] [review]
Patch
Comment 2 Chenthill P 2009-01-30 05:16:43 UTC
Micheal, your right, but I also see a bug in libical which milan pointed to me,
http://sourceforge.net/tracker/index.php?func=detail&aid=2526139&group_id=16077&atid=116077 . But I think we need this patch for now, as EDS fails to build.
At the moment most of the guys have this locally i guess. So it makes sense to commit this now.
Comment 3 Chenthill P 2009-01-30 05:37:07 UTC
even more I don understand if its a bug in libical to have /libical for include directory.

http://sourceforge.net/tracker/index.php?func=detail&aid=2526139&group_id=16077&atid=116077 is the exact link.
Comment 4 Chenthill P 2009-01-30 06:14:02 UTC
Committed the fix.
Comment 5 Milan Crha 2009-01-30 11:10:58 UTC
No no no, this change is wrong, definitely wrong. We should not workaround libical's fault, really. Why do I think so? It's because they showed me.
When you compile and install libical, you can notice two ical.h files under your {includedir}. One is in that folder, and the second is in a libical subfolder. The content of the former is very simple:

#warning "#include <ical.h> is deprecated.  Please #include <libical/ical.h> instead."
#include <libical/ical.h>

So this exactly tells you that you are doing things wrong. Or not?
Comment 6 Suman Manjunath 2009-01-30 11:36:44 UTC
hmm.. after reading /usr/include/ical.h - I agree with Milan.. I think the libical folks want to keep it that way.. my opinions a.t.m 

1) the libical.pc is perfectly alright - if the {includedir} is _not_ substituted properly, only then is that bug valid
2) we should include <libical/ical.h> and not <ical.h>

Chen - what do you think? 
Comment 7 Milan Crha 2009-01-30 14:55:02 UTC
Also, when I'm compiling evolution-exchange or evolution-mapi, then I get nice bunch of warnings like this:
In file included from /build/local/include/evolution-data-server-2.26/libecal/e-cal-component.h:26,
                 from /build/local/include/evolution-data-server-2.26/libecal/e-cal-util.h:27,
                 from /build/local/include/evolution-data-server-2.26/libedata-cal/e-cal-backend.h:28,
                 from /build/local/include/evolution-data-server-2.26/libedata-cal/e-cal-backend-sync.h:10,
                 from e-cal-backend-mapi.h:29,
                 from e-cal-backend-mapi.c:31:
/build/local/include/ical.h:22:2: warning: #warning "#include <ical.h> is deprecated.  Please #include <libical/ical.h> instead."
Comment 8 Michael Monreal 2009-01-31 11:20:04 UTC
So how do you guys end up with {includedir} in your flags at all? do you set it manually?
Comment 9 Chenthill P 2009-01-31 20:36:50 UTC
Ok I got it now. I never noticed the ical.h file under <prefix>/include. But then, its fails to compile if I have installed libical with a prefix other than /usr/ as <prefix>/include does not get included in C flags. In that case it causes a compilation error as it tries to find libical/ical.h under <prefix>/include/libical. How can we solve that ? Each one manually editing C flags might not be a right solution IMHO.
Comment 10 Matthew Barnes 2009-01-31 21:03:40 UTC
EVO_SET_COMPILE_FLAGS() can take up to four arguments, the last two being EXTRA-CFLAGS and EXTRA-LIBS.  Maybe this would work:

   EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR,
                         $EVOLUTION_CALENDAR_DEPS, -I${includedir})

(Haven't tested it myself yet...)
Comment 11 Suman Manjunath 2009-02-01 14:17:00 UTC
(In reply to comment #9)
> In that case it
> causes a compilation error as it tries to find libical/ical.h under
> <prefix>/include/libical. How can we solve that ? 

Interesting observation. I think the reason why that would happen is because the CFlags in libical.pc goes something like: 

CFlags: {includedir}/libical ... 

Since libical wants apps to include <libical/ical.h>, this ^^ is obviously wrong. 

I see two things to be done here for evo and friends: 

1) (for now before sending a patch upstream) - fix the libical.pc
Steps: 
 a) remove {includedir}/libical from the CFlags of libical.pc

2) Fix the includes in our modules. 
Steps: 
 a) mv <prefix>/include/ical.h <prefix>/include/ical.h.orig
 b) compile all modules and fix all occurrences of #include <ical.h> with #include <libical/ical.h>
Comment 12 Milan Crha 2009-02-02 10:37:06 UTC
(In reply to comment #8)
> So how do you guys end up with {includedir} in your flags at all? do you set it
> manually?

Yes, unfortunately manually.

(In reply to comment #9)
> ... How can we solve that? ...

Force them to fix it, it's their fault.

(In reply to comment #11)
> 1) (for now before sending a patch upstream) - fix the libical.pc
> Steps: 
>  a) remove {includedir}/libical from the CFlags of libical.pc

Nono, not remove, but change it to {includedir} only

> 2) Fix the includes in our modules. 

Reverting patch from comment #1? ;) also grepping for <ical.h> should work too.
Comment 13 Michael Monreal 2009-02-02 10:53:16 UTC
So to sum it up:

1.) libical wants ppl to include <ical.h> but that doesn't work out of the box
2.) libical provides a {includedir}/ical.h which is - I think - meant to make things work and keep backward compatibility, but really it fails to achieve this goal

Judging from the number of .h files (7) vs subdirectories (111) in my include/ directory, having include/ical.h is not the way to go anymore because pkgconfig does the include magic anyway.
Comment 14 Milan Crha 2009-02-02 12:10:30 UTC
(In reply to comment #13)
> 1.) libical wants ppl to include <ical.h> but that doesn't work out of the box

I believe they *do not* want to, but their .pc file forces people to do so, even not intentionally from their side.
Comment 15 Michael Monreal 2009-02-02 12:34:19 UTC
(In reply to comment #14)
> I believe they *do not* want to, but their .pc file forces people to do so

Right, that was what I was trying to say... but looks like I got confused :/

Comment 16 Chenthill P 2009-02-03 05:44:09 UTC
(In reply to comment #10)
> EVO_SET_COMPILE_FLAGS() can take up to four arguments, the last two being
> EXTRA-CFLAGS and EXTRA-LIBS.  Maybe this would work:
> 
>    EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR,
>                          $EVOLUTION_CALENDAR_DEPS, -I${includedir})
> 
> (Haven't tested it myself yet...)
> 

Suman is making a fix with the same. Once it done, we would commit the patch and revert patch at comment #1. 
Comment 17 Suman Manjunath 2009-02-03 07:53:06 UTC
Created attachment 127813 [details] [review]
use <libical/ical.h> + workaround the buggy CFlags

Patch replaces all <ical.h> with <libical/ical.h>. Also uses some extra CFLAGS as suggested by Matt. 

Michael and Chen: could you guys please test if this patch works for you?
Comment 18 Michael Monreal 2009-02-03 08:46:51 UTC
Does NOT work for me:

gcc -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"evolution-data-server\" -DPREFIX=\"/opt/gnome2.24\" -DSYSCONFDIR=\"/opt/gnome2.24/etc\" -DDATADIR=\"/opt/gnome2.24/share\" -DLIBDIR=\"/opt/gnome2.24/lib\" -I.. -I../addressbook -I../addressbook -I../calendar -I../calendar -I../calendar -DEVOLUTION_LOCALEDIR=\""/opt/gnome2.24/share/locale"\" -I/opt/gnome2.24/include/libsoup-2.4 -I/opt/gnome2.24/include/libxml2 -I/opt/gnome2.24/include/glib-2.0 -I/opt/gnome2.24/lib/glib-2.0/include     -DORBIT2=1 -pthread -I/opt/gnome2.24/include/libgnome-2.0 -I/opt/gnome2.24/include/orbit-2.0 -I/opt/gnome2.24/include/gconf/2 -I/opt/gnome2.24/include/gnome-vfs-2.0 -I/opt/gnome2.24/lib/gnome-vfs-2.0/include -I/opt/gnome2.24/include/glib-2.0 -I/opt/gnome2.24/lib/glib-2.0/include -I/opt/gnome2.24/include/libbonobo-2.0 -I/opt/gnome2.24/include/bonobo-activation-2.0 -I/opt/gnome2.24/include/libical -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/nspr      -DORBIT2=1 -pthread -I/opt/gnome2.24/include/libxml2 -I/opt/gnome2.24/include/libbonobo-2.0 -I/opt/gnome2.24/include/glib-2.0 -I/opt/gnome2.24/lib/glib-2.0/include -I/opt/gnome2.24/include/orbit-2.0 -I/opt/gnome2.24/include/bonobo-activation-2.0 -I/opt/gnome2.24/include/libsoup-2.4 -I/opt/gnome2.24/include/gconf/2 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/nspr         -g -O2 -pipe -Wall -Wmissing-prototypes  -Wno-sign-compare -Wno-pointer-sign -MT offline-listener.o -MD -MP -MF .deps/offline-listener.Tpo -c -o offline-listener.o offline-listener.c
In file included from server.c:48:
../calendar/libedata-cal/e-data-cal-factory.h:25:26: error: libical/ical.h: No such file or directory
In file included from ../calendar/libecal/e-cal-util.h:27,
                 from ../calendar/libedata-cal/e-cal-backend.h:28,
                 from ../calendar/libedata-cal/e-cal-backend-factory.h:27,
                 from ../calendar/libedata-cal/e-cal-backend-loader-factory.h:27,
Comment 19 Suman Manjunath 2009-02-03 09:27:08 UTC
Created attachment 127820 [details] [review]
use <libical/ical.h> + workaround the buggy CFlags

(In reply to comment #18)
> Does NOT work for me:

Thanks. This patch will. It was a completely unrelated error. There is an unsubstituted variable $(WERROR) that is causing the problem.

I have two questions: 
1) What does $(WERROR) expand to? 
2) If it actually gets substituted on some arch and some platform, _and_ assuming it expands to some compiler options, should we not just leave it to the user building on that platform?

I checked the configure.in to see if there was any other usage of this particular variable. There wasn't. I checked the generated Makefiles if any other autofoo substituted it. Nothing like that. I've removed it in this patch. 

Request Michael/Chen to test this patch again :-)
Comment 20 Michael Monreal 2009-02-03 10:00:11 UTC
Sorry

gcc -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"evolution-data-server\" -DPREFIX=\"/opt/gnome2.24\" -DSYSCONFDIR=\"/opt/gnome2.24/etc\" -DDATADIR=\"/opt/gnome2.24/share\" -DLIBDIR=\"/opt/gnome2.24/lib\" -I.. -I../addressbook -I../addressbook -I../calendar -I../calendar -I../calendar -DEVOLUTION_LOCALEDIR=\""/opt/gnome2.24/share/locale"\" -I/opt/gnome2.24/include/libsoup-2.4 -I/opt/gnome2.24/include/libxml2 -I/opt/gnome2.24/include/glib-2.0 -I/opt/gnome2.24/lib/glib-2.0/include     -DORBIT2=1 -pthread -I/opt/gnome2.24/include/libgnome-2.0 -I/opt/gnome2.24/include/orbit-2.0 -I/opt/gnome2.24/include/gconf/2 -I/opt/gnome2.24/include/gnome-vfs-2.0 -I/opt/gnome2.24/lib/gnome-vfs-2.0/include -I/opt/gnome2.24/include/glib-2.0 -I/opt/gnome2.24/lib/glib-2.0/include -I/opt/gnome2.24/include/libbonobo-2.0 -I/opt/gnome2.24/include/bonobo-activation-2.0 -I/opt/gnome2.24/include/libical -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/nspr      -DORBIT2=1 -pthread -I/opt/gnome2.24/include/libxml2 -I/opt/gnome2.24/include/libbonobo-2.0 -I/opt/gnome2.24/include/glib-2.0 -I/opt/gnome2.24/lib/glib-2.0/include -I/opt/gnome2.24/include/orbit-2.0 -I/opt/gnome2.24/include/bonobo-activation-2.0 -I/opt/gnome2.24/include/libsoup-2.4 -I/opt/gnome2.24/include/gconf/2 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/nspr         -g -O2 -pipe -Wall -Wmissing-prototypes  -Wno-sign-compare -Wno-pointer-sign -MT offline-listener.o -MD -MP -MF .deps/offline-listener.Tpo -c -o offline-listener.o offline-listener.c
In file included from offline-listener.h:33,
                 from offline-listener.c:27:
../calendar/libedata-cal/e-data-cal-factory.h:25:26: error: libical/ical.h: No such file or directory
In file included from ../calendar/libecal/e-cal-util.h:27,
                 from ../calendar/libedata-cal/e-cal-backend.h:28,
                 from ../calendar/libedata-cal/e-cal-backend-factory.h:27,
                 from ../calendar/libedata-cal/e-cal-backend-loader-factory.h:27,
                 from ../calendar/libedata-cal/e-data-cal-factory.h:27,
                 from offline-listener.h:33,
                 from offline-listener.c:27:
../calendar/libecal/e-cal-component.h:118: error: field ‘start’ has incomplete type
../calendar/libecal/e-cal-component.h:121: error: field ‘end’ has incomplete type
Comment 21 Matthew Barnes 2009-02-03 10:11:45 UTC
(In reply to comment #19)
> 1) What does $(WERROR) expand to? 

Presumably -Werror at one time, but --enable-compile-warnings=error looks like the way to get this now.  I think it can be safely removed.

I expect a -I/opt/gnome2.24/include in Michael's output above but don't see it.  Perhaps the $1_CFLAGS="[$]$1_CFLAGS $3 " isn't sticking for some reason.  Some fun autofoo debugging is in order.
Comment 22 Suman Manjunath 2009-02-03 10:14:16 UTC
Michael, in your {buildroot}/evolution-data-server/calendar/backends/Makefile 

can you search for EVOLUTION_CALENDAR_CFLAGS and paste that entire line here?

Also, what does the following command say:

pkg-config --variable=includedir libical

Like Matt said, I also expect to see -I/opt/gnome2.24/include in your CFLAGS. I can confirm that the extra CFLAGS does stick as I can see it in my Makefile.
Comment 23 Michael Monreal 2009-02-03 10:36:39 UTC
EVOLUTION_CALENDAR_CFLAGS = -DORBIT2=1 -pthread -I/opt/gnome2.24/include/libical -I/opt/gnome2.24/include/libxml2 -I/opt/gnome2.24/include/libbonobo-2.0 -I/opt/gnome2.24/include/glib-2.0 -I/opt/gnome2.24/lib/glib-2.0/include -I/opt/gnome2.24/include/orbit-2.0 -I/opt/gnome2.24/include/bonobo-activation-2.0 -I/opt/gnome2.24/include/gconf/2 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include    -I/opt/gnome2.24/include

$ pkg-config --variable=includedir libical
/opt/gnome2.24/include
Comment 24 Suman Manjunath 2009-02-03 11:20:44 UTC
(In reply to comment #23)
> EVOLUTION_CALENDAR_CFLAGS = -DORBIT2=1 -pthread
> -I/opt/gnome2.24/include/libical -I/opt/gnome2.24/include/libxml2
   ...
> -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include    -I/opt/gnome2.24/include

Clearly, <libical/ical.h> will be found with this set of include directories. 

Your build is most likely broken. make clean && make distclean might help. 

The patch achieves what it is intended to do though. I would be committing it sooner rather than later ;-)
Comment 25 Michael Monreal 2009-02-03 11:39:03 UTC
I don't understand myself but I already did make distclean and it does not work, no idea why...
Comment 26 Matthew Barnes 2009-02-04 17:34:51 UTC
Reopening this because there's one more outstanding issue.  We need to export libical's ${includedir} to libecal.pc, so that packages trying to build against libecal don't suffer the same problem.

I've already seen this with evolution-exchange.
Comment 27 Suman Manjunath 2009-02-05 03:21:40 UTC
Created attachment 127986 [details] [review]
use <libical/ical.h> + workaround the buggy CFlags

same patch as before + use the LIBICAL_EXTRA_CFLAGS in libecal.pc
Comment 28 Matthew Barnes 2009-02-05 03:44:25 UTC
Looks good to me.  Thanks, Suman.
Comment 29 Suman Manjunath 2009-02-05 06:36:34 UTC
Patch committed to SVN trunk as r10036
http://svn.gnome.org/viewvc/evolution-data-server?view=revision&revision=10036
Comment 30 Michael Monreal 2009-02-05 09:20:51 UTC
Nice, but it does not at all fix my initial problem (tried with a fresh checkout):

gcc -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"evolution-data-server\" -DPREFIX=\"/opt/gnome2.24\" -DSYSCONFDIR=\"/opt/gnome2.24/etc\" -DDATADIR=\"/opt/gnome2.24/share\" -DLIBDIR=\"/opt/gnome2.24/lib\" -I.. -I../addressbook -I../addressbook -I../calendar -I../calendar -I../calendar -DEVOLUTION_LOCALEDIR=\""/opt/gnome2.24/share/locale"\" -I/opt/gnome2.24/include/libsoup-2.4 -I/opt/gnome2.24/include/libxml2 -I/opt/gnome2.24/include/glib-2.0 -I/opt/gnome2.24/lib/glib-2.0/include     -DORBIT2=1 -pthread -I/opt/gnome2.24/include/libgnome-2.0 -I/opt/gnome2.24/include/orbit-2.0 -I/opt/gnome2.24/include/gconf/2 -I/opt/gnome2.24/include/gnome-vfs-2.0 -I/opt/gnome2.24/lib/gnome-vfs-2.0/include -I/opt/gnome2.24/include/glib-2.0 -I/opt/gnome2.24/lib/glib-2.0/include -I/opt/gnome2.24/include/libbonobo-2.0 -I/opt/gnome2.24/include/bonobo-activation-2.0 -I/opt/gnome2.24/include/libical -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/nspr      -DORBIT2=1 -pthread -I/opt/gnome2.24/include/libxml2 -I/opt/gnome2.24/include/libbonobo-2.0 -I/opt/gnome2.24/include/glib-2.0 -I/opt/gnome2.24/lib/glib-2.0/include -I/opt/gnome2.24/include/orbit-2.0 -I/opt/gnome2.24/include/bonobo-activation-2.0 -I/opt/gnome2.24/include/libsoup-2.4 -I/opt/gnome2.24/include/gconf/2 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/nspr         -g -O2 -pipe -Wall -Wmissing-prototypes  -Wno-sign-compare -Wno-pointer-sign -MT offline-listener.o -MD -MP -MF .deps/offline-listener.Tpo -c -o offline-listener.o offline-listener.c
In file included from server.c:48:
../calendar/libedata-cal/e-data-cal-factory.h:25:26: error: libical/ical.h: No such file or directory
In file included from ../calendar/libecal/e-cal-util.h:27,
                 from ../calendar/libedata-cal/e-cal-backend.h:28,
                 from ../calendar/libedata-cal/e-cal-backend-factory.h:27,
                 from ../calendar/libedata-cal/e-cal-backend-loader-factory.h:27,
                 from ../calendar/libedata-cal/e-data-cal-factory.h:27,
                 from server.c:48:
../calendar/libecal/e-cal-component.h:118: error: field ‘start’ has incomplete type
../calendar/libecal/e-cal-component.h:121: error: field ‘end’ has incomplete type
../calendar/libecal/e-cal-component.h:122: error: field ‘duration’ has incomplete type
../calendar/libecal/e-cal-component.h:161: error: expected specifier-qualifier-list before ‘icalparameter_cutype’
../calendar/libecal/e-cal-component.h:212: error: expected declaration specifiers or ‘...’ before ‘icalcomponent’
../calendar/libecal/e-cal-component.h:213: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
../calendar/libecal/e-cal-component.h:276: warning: ‘struct icalgeotype’ declared inside parameter list
../calendar/libecal/e-cal-component.h:276: warning: its scope is only this definition or declaration, which is probably not what you want
../calendar/libecal/e-cal-component.h:277: warning: ‘struct icalgeotype’ declared inside parameter list
../calendar/libecal/e-cal-component.h:312: error: expected declaration specifiers or ‘...’ before ‘icalproperty_status’
../calendar/libecal/e-cal-component.h:313: error: expected declaration specifiers or ‘...’ before ‘icalproperty_status’
../calendar/libecal/e-cal-component.h:347: warning: ‘struct icalgeotype’ declared inside parameter list
../calendar/libecal/e-cal-component.h:408: error: field ‘rel_duration’ has incomplete type
../calendar/libecal/e-cal-component.h:409: error: field ‘abs_time’ has incomplete type
../calendar/libecal/e-cal-component.h:418: error: field ‘duration’ has incomplete type
../calendar/libecal/e-cal-component.h:441: error: expected declaration specifiers or ‘...’ before ‘icalattach’
../calendar/libecal/e-cal-component.h:442: error: expected declaration specifiers or ‘...’ before ‘icalattach’
../calendar/libecal/e-cal-component.h:457: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from ../calendar/libecal/e-cal-util.h:28,
                 from ../calendar/libedata-cal/e-cal-backend.h:28,
                 from ../calendar/libedata-cal/e-cal-backend-factory.h:27,
                 from ../calendar/libedata-cal/e-cal-backend-loader-factory.h:27,
                 from ../calendar/libedata-cal/e-data-cal-factory.h:27,
                 from server.c:48:
../calendar/libecal/e-cal-recur.h:36: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
../calendar/libecal/e-cal-recur.h:44: error: expected declaration specifiers or ‘...’ before ‘ECalRecurResolveTimezoneFn’
../calendar/libecal/e-cal-recur.h:46: error: expected declaration specifiers or ‘...’ before ‘icaltimezone’
In file included from ../calendar/libedata-cal/e-cal-backend.h:28,
                 from ../calendar/libedata-cal/e-cal-backend-factory.h:27,
                 from ../calendar/libedata-cal/e-cal-backend-loader-factory.h:27,
                 from ../calendar/libedata-cal/e-data-cal-factory.h:27,
                 from server.c:48:
../calendar/libecal/e-cal-util.h:68: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
../calendar/libecal/e-cal-util.h:69: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
../calendar/libecal/e-cal-util.h:71: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
../calendar/libecal/e-cal-util.h:72: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
../calendar/libecal/e-cal-util.h:78: error: expected declaration specifiers or ‘...’ before ‘ECalRecurResolveTimezoneFn’
../calendar/libecal/e-cal-util.h:80: error: expected declaration specifiers or ‘...’ before ‘icaltimezone’
../calendar/libecal/e-cal-util.h:86: error: expected declaration specifiers or ‘...’ before ‘ECalRecurResolveTimezoneFn’
../calendar/libecal/e-cal-util.h:88: error: expected declaration specifiers or ‘...’ before ‘icaltimezone’
../calendar/libecal/e-cal-util.h:93: error: expected ‘)’ before ‘*’ token
../calendar/libecal/e-cal-util.h:96: error: expected ‘)’ before ‘*’ token
../calendar/libecal/e-cal-util.h:97: error: expected ‘)’ before ‘*’ token
../calendar/libecal/e-cal-util.h:98: error: expected ‘)’ before ‘*’ token
../calendar/libecal/e-cal-util.h:99: error: expected ‘)’ before ‘*’ token
../calendar/libecal/e-cal-util.h:100: error: expected ‘)’ before ‘*’ token
../calendar/libecal/e-cal-util.h:101: error: expected ‘)’ before ‘*’ token
../calendar/libecal/e-cal-util.h:102: error: expected ‘)’ before ‘*’ token
../calendar/libecal/e-cal-util.h:103: error: expected ‘)’ before ‘*’ token
../calendar/libecal/e-cal-util.h:132: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
../calendar/libecal/e-cal-util.h:134: error: expected ‘)’ before ‘*’ token
In file included from ../calendar/libedata-cal/e-cal-backend-factory.h:27,
                 from ../calendar/libedata-cal/e-cal-backend-loader-factory.h:27,
                 from ../calendar/libedata-cal/e-data-cal-factory.h:27,
                 from server.c:48:
../calendar/libedata-cal/e-cal-backend.h:111: error: expected specifier-qualifier-list before ‘icaltimezone’
../calendar/libedata-cal/e-cal-backend.h:119: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘e_cal_backend_get_kind’
../calendar/libedata-cal/e-cal-backend.h:167: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
../calendar/libedata-cal/e-cal-backend.h:168: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from ../calendar/libedata-cal/e-cal-backend-loader-factory.h:27,
                 from ../calendar/libedata-cal/e-data-cal-factory.h:27,
                 from server.c:48:
../calendar/libedata-cal/e-cal-backend-factory.h:47: error: expected specifier-qualifier-list before ‘icalcomponent_kind’
../calendar/libedata-cal/e-cal-backend-factory.h:54: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘e_cal_backend_factory_get_kind’
server.c: In function ‘gnome_segv_handler’:
server.c:117: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result
server.c: In function ‘queue_termination’:
server.c:169: warning: dereferencing type-punned pointer will break strict-aliasing rules
server.c:174: warning: dereferencing type-punned pointer will break strict-aliasing rules
make[3]: *** [server.o] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from offline-listener.h:33,
                 from offline-listener.c:27:
../calendar/libedata-cal/e-data-cal-factory.h:25:26: error: libical/ical.h: No such file or directory
In file included from ../calendar/libecal/e-cal-util.h:27,
                 from ../calendar/libedata-cal/e-cal-backend.h:28,
                 from ../calendar/libedata-cal/e-cal-backend-factory.h:27,
                 from ../calendar/libedata-cal/e-cal-backend-loader-factory.h:27,
                 from ../calendar/libedata-cal/e-data-cal-factory.h:27,
                 from offline-listener.h:33,
                 from offline-listener.c:27:
../calendar/libecal/e-cal-component.h:118: error: field ‘start’ has incomplete type
../calendar/libecal/e-cal-component.h:121: error: field ‘end’ has incomplete type
../calendar/libecal/e-cal-component.h:122: error: field ‘duration’ has incomplete type
../calendar/libecal/e-cal-component.h:161: error: expected specifier-qualifier-list before ‘icalparameter_cutype’
../calendar/libecal/e-cal-component.h:212: error: expected declaration specifiers or ‘...’ before ‘icalcomponent’
../calendar/libecal/e-cal-component.h:213: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
../calendar/libecal/e-cal-component.h:276: warning: ‘struct icalgeotype’ declared inside parameter list
../calendar/libecal/e-cal-component.h:276: warning: its scope is only this definition or declaration, which is probably not what you want
../calendar/libecal/e-cal-component.h:277: warning: ‘struct icalgeotype’ declared inside parameter list
../calendar/libecal/e-cal-component.h:312: error: expected declaration specifiers or ‘...’ before ‘icalproperty_status’
../calendar/libecal/e-cal-component.h:313: error: expected declaration specifiers or ‘...’ before ‘icalproperty_status’
../calendar/libecal/e-cal-component.h:347: warning: ‘struct icalgeotype’ declared inside parameter list
../calendar/libecal/e-cal-component.h:408: error: field ‘rel_duration’ has incomplete type
../calendar/libecal/e-cal-component.h:409: error: field ‘abs_time’ has incomplete type
../calendar/libecal/e-cal-component.h:418: error: field ‘duration’ has incomplete type
../calendar/libecal/e-cal-component.h:441: error: expected declaration specifiers or ‘...’ before ‘icalattach’
../calendar/libecal/e-cal-component.h:442: error: expected declaration specifiers or ‘...’ before ‘icalattach’
../calendar/libecal/e-cal-component.h:457: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from ../calendar/libecal/e-cal-util.h:28,
                 from ../calendar/libedata-cal/e-cal-backend.h:28,
                 from ../calendar/libedata-cal/e-cal-backend-factory.h:27,
                 from ../calendar/libedata-cal/e-cal-backend-loader-factory.h:27,
                 from ../calendar/libedata-cal/e-data-cal-factory.h:27,
                 from offline-listener.h:33,
                 from offline-listener.c:27:
../calendar/libecal/e-cal-recur.h:36: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
../calendar/libecal/e-cal-recur.h:44: error: expected declaration specifiers or ‘...’ before ‘ECalRecurResolveTimezoneFn’
../calendar/libecal/e-cal-recur.h:46: error: expected declaration specifiers or ‘...’ before ‘icaltimezone’
In file included from ../calendar/libedata-cal/e-cal-backend.h:28,
                 from ../calendar/libedata-cal/e-cal-backend-factory.h:27,
                 from ../calendar/libedata-cal/e-cal-backend-loader-factory.h:27,
                 from ../calendar/libedata-cal/e-data-cal-factory.h:27,
                 from offline-listener.h:33,
                 from offline-listener.c:27:
../calendar/libecal/e-cal-util.h:68: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
../calendar/libecal/e-cal-util.h:69: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
../calendar/libecal/e-cal-util.h:71: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
../calendar/libecal/e-cal-util.h:72: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
../calendar/libecal/e-cal-util.h:78: error: expected declaration specifiers or ‘...’ before ‘ECalRecurResolveTimezoneFn’
../calendar/libecal/e-cal-util.h:80: error: expected declaration specifiers or ‘...’ before ‘icaltimezone’
../calendar/libecal/e-cal-util.h:86: error: expected declaration specifiers or ‘...’ before ‘ECalRecurResolveTimezoneFn’
../calendar/libecal/e-cal-util.h:88: error: expected declaration specifiers or ‘...’ before ‘icaltimezone’
../calendar/libecal/e-cal-util.h:93: error: expected ‘)’ before ‘*’ token
../calendar/libecal/e-cal-util.h:96: error: expected ‘)’ before ‘*’ token
../calendar/libecal/e-cal-util.h:97: error: expected ‘)’ before ‘*’ token
../calendar/libecal/e-cal-util.h:98: error: expected ‘)’ before ‘*’ token
../calendar/libecal/e-cal-util.h:99: error: expected ‘)’ before ‘*’ token
../calendar/libecal/e-cal-util.h:100: error: expected ‘)’ before ‘*’ token
../calendar/libecal/e-cal-util.h:101: error: expected ‘)’ before ‘*’ token
../calendar/libecal/e-cal-util.h:102: error: expected ‘)’ before ‘*’ token
../calendar/libecal/e-cal-util.h:103: error: expected ‘)’ before ‘*’ token
../calendar/libecal/e-cal-util.h:132: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
../calendar/libecal/e-cal-util.h:134: error: expected ‘)’ before ‘*’ token
In file included from ../calendar/libedata-cal/e-cal-backend-factory.h:27,
                 from ../calendar/libedata-cal/e-cal-backend-loader-factory.h:27,
                 from ../calendar/libedata-cal/e-data-cal-factory.h:27,
                 from offline-listener.h:33,
                 from offline-listener.c:27:
../calendar/libedata-cal/e-cal-backend.h:111: error: expected specifier-qualifier-list before ‘icaltimezone’
../calendar/libedata-cal/e-cal-backend.h:119: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘e_cal_backend_get_kind’
../calendar/libedata-cal/e-cal-backend.h:167: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
../calendar/libedata-cal/e-cal-backend.h:168: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from ../calendar/libedata-cal/e-cal-backend-loader-factory.h:27,
                 from ../calendar/libedata-cal/e-data-cal-factory.h:27,
                 from offline-listener.h:33,
                 from offline-listener.c:27:
../calendar/libedata-cal/e-cal-backend-factory.h:47: error: expected specifier-qualifier-list before ‘icalcomponent_kind’
../calendar/libedata-cal/e-cal-backend-factory.h:54: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘e_cal_backend_factory_get_kind’
make[3]: *** [offline-listener.o] Error 1
make[3]: Leaving directory `/home/nx/code/svn/gnome/evolution-data-server/src'
make[2]: *** [all] Error 2
rm GNOME_Evolution_DataServer.server.in
make[2]: Leaving directory `/home/nx/code/svn/gnome/evolution-data-server/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/nx/code/svn/gnome/evolution-data-server'
make: *** [all] Error 2
Comment 31 Milan Crha 2009-02-05 10:49:32 UTC
Did you revert your changes in libical and reconfigured it as well? I believe you did some changes in libical, didn't you? The changes works for me fine, thus it should be something with your version.

Hehe, actually, I have patched libical too, with this:
-Cflags: -I${includedir}/libical
+Cflags: -I${includedir}/libical -I${includedir}
Comment 32 Michael Monreal 2009-02-05 11:59:30 UTC
(In reply to comment #31)
> Did you revert your changes in libical and reconfigured it as well? I believe
> you did some changes in libical, didn't you?
No I use the latest unpatched release 

> Hehe, actually, I have patched libical too, with this:
> -Cflags: -I${includedir}/libical
> +Cflags: -I${includedir}/libical -I${includedir}
...which explains why it works for you and not me, doesn't it?
Comment 33 Milan Crha 2009-02-05 13:20:40 UTC
Yup, you've right, when I unpatch my libical checkout I'm not able to compile eds. Libical upstream is soooooooo crappy :(
Comment 34 Matthew Barnes 2009-02-05 14:15:12 UTC
@Michael / Milan:

Stupid question perhaps, but are you guys running autoreconf or autogen.sh after applying the patch?  The patch only modifies configure.in.  autoconf needs to run to propagate the change from configure.in to all the Makefile.in's, and automake needs to run to propagate the change from Makefile.in to Makefile.

I was able to successfully build the Fedora packages against the broken libical.pc with the latest patch.  I'll try again from SVN later today.
Comment 35 Michael Monreal 2009-02-05 14:55:33 UTC
Yes my build script invokes autogen every time I (try to) build.
Comment 36 Milan Crha 2009-02-05 18:14:34 UTC
mine as well, first calls make clean or make distclean and then ./autogen.sh with some parameters, like --prefix= and couple additional.

Maybe that's the magic, the prefix is never /usr for me, it's out of any usual tree.
Comment 37 Michael Monreal 2009-02-05 19:50:14 UTC
I think it's supposed to work for /usr like this but not any other prefix as long as you don't manually add $prefix/include to the CFLAGS.
Comment 38 Suman Manjunath 2009-02-06 03:15:59 UTC
(In reply to comment #37)
> I think it's supposed to work for /usr like this but not any other prefix as
> long as you don't manually add $prefix/include to the CFLAGS.

No. It will work with libical installed in any prefix. I'm forced to ask the same question again *sigh*

What does the line containing EVOLUTION_CALENDAR_CFLAGS read in e-d-s/calendar/Makefile in your fresh checkout?

If you built and installed libical in <prefix> , then ^^ this should contain <prefix>/include (as well as <prefix>/include/libical). 
Comment 39 Suman Manjunath 2009-02-06 03:18:32 UTC
FYI - if you read the JHBuild modulesets carefully, you would see that e-d-s does not support non-srcdir-builds. Might be something of concern here.
Comment 40 Michael Monreal 2009-02-06 08:03:27 UTC
EVOLUTION_CALENDAR_CFLAGS = -DORBIT2=1 -pthread -I/opt/gnome2.24/include/libical -I/opt/gnome2.24/include/libxml2 -I/opt/gnome2.24/include/libbonobo-2.0 -I/opt/gnome2.24/include/glib-2.0 -I/opt/gnome2.24/lib/glib-2.0/include -I/opt/gnome2.24/include/orbit-2.0 -I/opt/gnome2.24/include/bonobo-activation-2.0 -I/opt/gnome2.24/include/gconf/2 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include    -I/opt/gnome2.24/include

And yes: it. does. not. work. with. this.

Whatever EVOLUTION_CALENDAR_CFLAGS is used for, it does not end up in the actual compiler call:

gcc -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"evolution-data-server\" -DPREFIX=\"/opt/gnome2.24\" -DSYSCONFDIR=\"/opt/gnome2.24/etc\" -DDATADIR=\"/opt/gnome2.24/share\" -DLIBDIR=\"/opt/gnome2.24/lib\" -I.. -I../addressbook -I../addressbook -I../calendar -I../calendar -I../calendar -DEVOLUTION_LOCALEDIR=\""/opt/gnome2.24/share/locale"\" -I/opt/gnome2.24/include/libsoup-2.4 -I/opt/gnome2.24/include/libxml2 -I/opt/gnome2.24/include/glib-2.0 -I/opt/gnome2.24/lib/glib-2.0/include     -DORBIT2=1 -pthread -I/opt/gnome2.24/include/libgnome-2.0 -I/opt/gnome2.24/include/orbit-2.0 -I/opt/gnome2.24/include/gconf/2 -I/opt/gnome2.24/include/gnome-vfs-2.0 -I/opt/gnome2.24/lib/gnome-vfs-2.0/include -I/opt/gnome2.24/include/glib-2.0 -I/opt/gnome2.24/lib/glib-2.0/include -I/opt/gnome2.24/include/libbonobo-2.0 -I/opt/gnome2.24/include/bonobo-activation-2.0 -I/opt/gnome2.24/include/libical -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/nspr      -DORBIT2=1 -pthread -I/opt/gnome2.24/include/libxml2 -I/opt/gnome2.24/include/libbonobo-2.0 -I/opt/gnome2.24/include/glib-2.0 -I/opt/gnome2.24/lib/glib-2.0/include -I/opt/gnome2.24/include/orbit-2.0 -I/opt/gnome2.24/include/bonobo-activation-2.0 -I/opt/gnome2.24/include/libsoup-2.4 -I/opt/gnome2.24/include/gconf/2 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/nspr         -g -O2 -pipe -Wall -Wmissing-prototypes  -Wno-sign-compare -Wno-pointer-sign -MT offline-listener.o -MD -MP -MF .deps/offline-listener.Tpo -c -o offline-listener.o offline-listener.c

Note the missing -I/opt/gnome2.24/include

I don't care for non-srcdir-builds. I'm not even using jhbuild here, I'm doing this totally by hand now.
Comment 41 Chenthill 2009-02-17 09:04:10 UTC
michael, another fix has been committed to fix this completely. Please apply the fix at http://svn.gnome.org/viewvc/evolution-data-server?view=revision&revision=10065 and test if it solves the issue for you too..
Comment 42 Michael Monreal 2009-02-17 09:59:29 UTC
That finally seems to work without me having to do some CFLAGS tricks :)
Comment 43 Suman Manjunath 2009-02-18 03:47:51 UTC
FYI - The LIBICAL_EXTRA_{CFLAGS|LIBS} may be removed once we start to depend on libical-0.44
Comment 44 Matthew Barnes 2009-02-18 04:18:27 UTC
Oh good, it's fixed upstream then finally?
Comment 45 Suman Manjunath 2009-02-18 08:26:45 UTC
Created attachment 128957 [details] [review]
patch to use with libical-0.44

(In reply to comment #44)
> Oh good, it's fixed upstream then finally?

Yes Matt, with SVN commit revision 916

Attaching the patch which may be committed after libical-0.44 is released and approved by GNOME r-t for use by evolution-data-server. (nothing more than reverting a couple of patches :-) )
Comment 46 Matthew Barnes 2009-02-18 10:52:57 UTC
We should make sure 0.44 eventually becomes the minimum version for GNOME (as shown on the External Dependencies sheet), probably during the 2.27 timeframe.
Comment 47 Suman Manjunath 2009-09-27 15:22:43 UTC
FYI - libical-0.44 is now released