Niels Horn's Blog
Random thoughts, tips & tricks about Slackware-Linux, Lego and Star WarsGetting Zarafa 6.40.2 to work on Slackware
September 5th, 2010 by Niels Horn in Patches, Slackware, zarafa
A few days ago, while working on the update of my SlackBuild for Zarafa version 6.40.1, version 6.40.2 was released. At first I thought of submitting the script using the newest version, but soon found out that it was not that simple… The newest release simply would not build on Slackware… Since I had already spent some time to get 6.40.1 working fine, I decided not to delay the submission more, and finished the script for that version and uploaded the packages to my site.
So now that 6.40.1 was available for Slackware, I decided to get back at the problem and investigate some more.
I found several problems with the newest version, all in the code of the ECTestTools subdirectory. My impression is that the authors were in a bit of a hurry to get 6.40.2 out (that solves some bugs in the previous versions), but forgot the check / alter the test tools.
In total I found three problems, which I managed to solve by patching the code (2x) and Makefile (1x).
These were my findings:
Problem1: rectest.cpp:82: error: no matching function for call to 'RecurrenceState::ParseBlob(char*, size_t)'
The ParseBlob function was changed in 6.40.2 but the rectest.cpp file was not altered accordingly. It needs and extra parameter, so I checked the code to see how it was called in other places and patched it like this:
--- zarafa-6.40.2/ECtools/ECTestTools/RecurrenceTest/rectest.cpp 2010-08-30 08:01:44.000000000 -0300 +++ zarafa-6.40.2_patched/ECtools/ECTestTools/RecurrenceTest/rectest.cpp 2010-09-04 13:27:42.000000000 -0300 @@ -79,7 +79,7 @@ RecurrenceState r; - hr = r.ParseBlob((char *)strBin.c_str(), strBin.size()); + hr = r.ParseBlob((char *)strBin.c_str(), strBin.size(), 0); if(hr == hrSuccess) { cerr << "Recurrence OK" << std::endl;
Problem 2: mapi2ical.cpp:173: error: no matching function for call to 'MapiToICal::AddMessage(IMessage*&, int)'
This was also caused by a change in the number of parameters, this time in the AddMessage function. Again, I checked the code to understand how this function was called and noticed that in several places it was altered by using std::string()
for the extra parameter, so I added this patch:
--- zarafa-6.40.2/ECtools/ECTestTools/ICalTests/mapi2ical.cpp 2010-08-30 08:01:44.000000000 -0300 +++ zarafa-6.40.2_patched/ECtools/ECTestTools/ICalTests/mapi2ical.cpp 2010-09-04 13:55:38.000000000 -0300 @@ -170,7 +170,7 @@ goto next; - hr = lpMapiToICal->AddMessage(lpMessage, 0); + hr = lpMapiToICal->AddMessage(lpMessage, std::string(), 0); if (hr != hrSuccess) { cerr << "-- broken message!" << stringify(hr, 1) << endl; goto next;
Problem 3: ../../../libicalmapi/.libs/libicalmapi.so: undefined reference to `RecurrenceState::ParseBlob(char*, unsigned int, unsigned int)'
(plus several other similar messages)
This one was a bit more complicated to trace, but I found out that some files had changed position in the source tree and I managed to solve this in the Makefile.in that is used by ./configure to create the Makefile:
--- zarafa-6.40.2/ECtools/ECTestTools/ICalTests/Makefile.in 2010-08-30 04:31:48.000000000 -0300 +++ zarafa-6.40.2_patched/ECtools/ECTestTools/ICalTests/Makefile.in 2010-09-04 15:09:39.000000000 -0300 @@ -272,6 +272,7 @@ ${top_builddir}/common/libcommon_mapi.la \ ${top_builddir}/common/libcommon_util.la \ ${top_builddir}/libicalmapi/libicalmapi.la \ + ${top_builddir}/libfreebusy/libfreebusy.la \ $(PROG_LIBS) $(ICAL_LIBS) mapi2ical_SOURCES = mapi2ical.cpp
After applying this patch the SlackBuild completed without problems!
I posted these patches on the Zarafa forum as well so I hope that the author will fix it for the next official release.
I'm testing the resulting binaries on my server, and if they continue running without problems for a few days, I'll submit the new script and upload the new packages to my site.
update: The patch can be downloaded here and the packages are available on my site.