[sword-devel] ICU related errors to compile

Greg Hellings greg.hellings at gmail.com
Wed Nov 28 10:53:05 MST 2018


It is not necessary to make code changes to get past this compile issue. At
least, not at present.

I have this patch[0] that is, as yet, not committed to SVN that fixes the
problem in the CMake tree with just a compiler definition. The test should
be for ICU > 61, then add this preprocessor definition to CPPFLAGS. I have
tested locally that manually setting CPPFLAGS=-DU_USING_ICU_NAMESPACE
before calling ./usrinst.sh fixes the problem. Setting autotools to detect
this and add the same preprocessor flag would probably be better than
adding the namespace directly to our code.

The benefit to this fix is that it maintains backwards compatibility
without need to change the actual source tree. If you work up an autotools
fix for it, feel free to make a single commit with my diff as well so we
can point packagers to it (myself in Fedora, the Debian packager, and I
believe Arch have all faced this without code changes) when they come
across this in the future.

--Greg

[0]
https://src.fedoraproject.org/rpms/sword/blob/master/f/sword-1.8.1-icu61.diff

On Wed, Nov 28, 2018 at 11:34 AM Troy A. Griffitts <scribe at crosswire.org>
wrote:

> Yes, I ran into these issues with ICU on the latest fedora. I have a patch
> (which simply adds the ICU namespace where needed with the new version of
> ICU) in my local work area but wanted to test that it still works on older
> versions of ICU before I committed it. I'll try to commit it today
> regardless of whether or not I get a chance to test on older distros. Then
> we can add conditional build checks if needed in the future.
>
> On November 28, 2018 10:28:37 AM MST, "refdoc at gmx.net" <refdoc at gmx.net>
> wrote:
>>
>> I am, btw on Debian testing
>>
>> Sent from my mobile. Please forgive shortness, typos and weird
>> autocorrects.
>>
>>
>> -------- Original Message --------
>> Subject: [sword-devel] ICU related errors to compile
>> From: Peter von Kaehne
>> To: sword-devel
>> CC:
>>
>>
>> Following a recent system update I can not compile Sword anymore.
>>
>> I checked out a clean svn repo to ensure it is not something I had done
>> to my system. Here is the make log at the relevant part
>>
>>
>> In file included from ../src/mgr/swmgr.cpp:108:
>> ../include/utf8transliterator.h:53:2: error: ‘UnicodeString’ does not
>> name a type
>> UnicodeString resource;
>> ^~~~~~~~~~~~~
>> ../include/utf8transliterator.h:56:24: error: ISO C++ forbids
>> declaration of ‘type name’ with no type [-fpermissive]
>> typedef std::map SWTransMap;
>> ^~~~~~~~~~~~~
>> ../include/utf8transliterator.h:56:50: error: wrong number of template
>> arguments (1, should be at least 2)
>> typedef std::map SWTransMap;
>> ^
>> In file included from /usr/include/c++/8/map:61,
>> from ../include/swmgr.h:60,
>> from ../src/mgr/swmgr.cpp:33:
>> /usr/include/c++/8/bits/stl_map.h:100:11: note: provided for
>> ‘template class
>> std::map’
>> class map
>> ^~~
>> In file included from ../src/mgr/swmgr.cpp:108:
>> ../include/utf8transliterator.h:57:19: error: ‘UnicodeString’ was not
>> declared in this scope
>> typedef std::pair SWTransPair;
>> ^~~~~~~~~~~~~
>> ../include/utf8transliterator.h:57:19: note: suggested alternative:
>> In file included from ../include/utf8transliterator.h:41,
>> from ../src/mgr/swmgr.cpp:108:
>> /usr/include/unicode/unistr.h:289:20: note: ‘icu_63::UnicodeString’
>> class U_COMMON_API UnicodeString : public Replaceable
>> ^~~~~~~~~~~~~
>> In file included from ../src/mgr/swmgr.cpp:108:
>> ../include/utf8transliterator.h:57:45: error: template argument 1 is
>> invalid
>> typedef std::pair SWTransPair;
>> ^
>> ../include/utf8transliterator.h:84:2: error: ‘Transliterator’ does not
>> name a type; did you mean ‘UTransliterator’?
>> Transliterator *createTrans(const UnicodeString& ID, UTransDirection
>> dir, UErrorCode &status);
>> ^~~~~~~~~~~~~~
>> UTransliterator
>> libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../incl
>>
>>
>> _______________________________________________
>> sword-devel mailing list: sword-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
>>
>>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20181128/50b2d251/attachment-0001.html>


More information about the sword-devel mailing list