> I did this > > [halogen@enigmatic cyrus-imapd-3.2.5]$ export CFLAGS="-g -O2 -Wall -Wextra > -Werror -Wl,--as-needed" > [halogen@enigmatic cyrus-imapd-3.2.5]$ export CXXFLAGS="-g -O2 -Wall -Wextra > -Werror -Wl,--as-needed" > > then started again from `autoreconf -i` > > [...] > master/master.c:2172:5: error: ignoring return value of 'ftruncate' declared > with attribute 'warn_unused_result' [-Werror=unused-result] > [...] > > I then ran `make` and this is the error that showed up:
Okay, that's a red herring: your compiler warns about something ours don't, and -Werror is upgrading that to an error. It would be good to fix, but it's unrelated to the immediate problem. I'll ask you for more diagnostics about this later though, once it all builds correctly! > It looks like the libtool command line might be missing -lxapian - is there a > way to fix that or tell configure to give it that option? It's not though; from your earlier build output we established that libcyrus_imap.so was being linked against -lxapian correctly, and everything else that needs Xapian links against that. The "undefined reference to" functions (xapian_dbw_end_doc et al) are _ours_, from imap/xapian_wrap.cpp. So it's not xapian that's not being linked correctly, but our wrapper functions around it.... A hunch struck me late last night, and when I checked this morning I was correct: these wrapper functions are not marked for export in the library. I guess your compiler has stricter defaults than ours, and since we don't say to export these functions, it keeps them private. I'm attaching a quick and dirty patch which just adds our EXPORTED tag to the functions that should be exported. I'm not certain that this will work -- after all, this particular module is C++, not C, so the requirements might be different -- so could you please test it out and report back whether it helps, or what the new errors are? You can discard the CFLAGS/CXXFLAGS changes, they're not useful for now. I think the patch should apply cleanly to a fresh unzip, and I assume you know how to apply a patch, but please let me know if you need further help. If the patch fixes the problem, I'll re-do it properly, and if it doesn't, hopefully some new errors will point us in the right direction. :) Cheers, ellie ------------------------------------------ Cyrus: Devel Permalink: https://cyrus.topicbox.com/groups/devel/Tf544987d7d6a54fd-M3bfb5ba78ed3d3145dbec591 Delivery options: https://cyrus.topicbox.com/groups/devel/subscription
xapian-wrap-export.patch
Description: Binary data