GNOME Bugzilla – Bug 569459
Fix for libical includes
Last modified: 2013-09-14 16:52:50 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.
Created attachment 127392 [details] [review] Patch
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.
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.
Committed the fix.
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?
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?
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."
So how do you guys end up with {includedir} in your flags at all? do you set it manually?
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.
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...)
(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>
(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.
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.
(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.
(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 :/
(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.
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?
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,
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 :-)
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
(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.
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.
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
(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 ;-)
I don't understand myself but I already did make distclean and it does not work, no idea why...
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.
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
Looks good to me. Thanks, Suman.
Patch committed to SVN trunk as r10036 http://svn.gnome.org/viewvc/evolution-data-server?view=revision&revision=10036
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
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}
(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?
Yup, you've right, when I unpatch my libical checkout I'm not able to compile eds. Libical upstream is soooooooo crappy :(
@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.
Yes my build script invokes autogen every time I (try to) build.
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.
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.
(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).
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.
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.
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..
That finally seems to work without me having to do some CFLAGS tricks :)
FYI - The LIBICAL_EXTRA_{CFLAGS|LIBS} may be removed once we start to depend on libical-0.44
Oh good, it's fixed upstream then finally?
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 :-) )
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.
FYI - libical-0.44 is now released