Re: Building 1.9.0 against ICU 75

Jaak Ristioja <jaak-89mTbI93R4uuvFJfX82//[email protected]>
Newsgroups gmane.comp.literature.sword.devel
Message-ID <[email protected]>
Hi,

On 17.06.24 22:29, David "Judah's Shadow" Blue wrote:
> So my distro (openSUSE Tumbleweed) upgraded to ICU v75.1, this gave me all
> sorts of linking errors when trying to link BIBISH against sword 1.9.0. So I
> figured I'd rebuild the library, but now I'm getting compile errors from sword.
> I'm using the usrinst.sh and when I build I get the following errors
> 
> In file included from /usr/include/unicode/unistr.h:39,
>                   from ../include/utf8transliterator.h:43,
>                   from ../src/mgr/swmgr.cpp:108:
> /usr/include/unicode/stringpiece.h:133:29: error: ‘enable_if_t’ in namespace
> ‘std’ does not name a template type
>    133 |             typename = std::enable_if_t<
>        |                             ^~~~~~~~~~~
> /usr/include/unicode/stringpiece.h:133:24: note: ‘std::enable_if_t’ is only
> available from C++14 onwards
>    133 |             typename = std::enable_if_t<
>        |                        ^~~
> /usr/include/unicode/stringpiece.h:133:40: error: expected ‘>’ before ‘<’
> token
>    133 |             typename = std::enable_if_t<
>        |                                        ^
> In file included from /usr/include/unicode/uenum.h:25,
>                   from /usr/include/unicode/utrans.h:22,
>                   from /usr/include/unicode/translit.h:29,
>                   from ../include/utf8transliterator.h:45:
> /usr/include/unicode/localpointer.h:561:26: error: parameter declared ‘auto’
>    561 | template <typename Type, auto closeFunction>
>        |                          ^~~~
> /usr/include/unicode/localpointer.h:573:76: error: template argument 2 is
> invalid
>    573 |     explicit LocalOpenPointer(std::unique_ptr<Type,
> decltype(closeFunction)> &&p)
>        |
> ^
> /usr/include/unicode/localpointer.h:583:78: error: template argument 2 is
> invalid
>    583 |     LocalOpenPointer &operator=(std::unique_ptr<Type,
> decltype(closeFunction)> &&p) {
>        |
> ^
> /usr/include/unicode/localpointer.h:599:59: error: template argument 2 is
> invalid
>    599 |     operator std::unique_ptr<Type, decltype(closeFunction)> () && {
>        |                                                           ^
> /usr/include/unicode/uenum.h:69:1: note: invalid template non-type parameter
>     69 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUEnumerationPointer, UEnumeration,
> uenum_close);
>        | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/include/unicode/uset.h:358:1: note: invalid template non-type parameter
>    358 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUSetPointer, USet, uset_close);
>        | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/include/unicode/utrans.h:258:1: note: invalid template non-type parameter
>    258 | U_DEFINE_LOCAL_OPEN_POINTER(LocalUTransliteratorPointer,
> UTransliterator, utrans_close);
>        | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> make[1]: *** [Makefile:1426: swmgr.lo] Error 1
> make[1]: Leaving directory '/home/judahsshadow/Downloads/sword-1.9.0/lib'
> make: *** [Makefile:630: all-recursive] Error 1
> 
> Has anyone built against ICU 75 or perhaps this is fixed in SVN?

The template std::enable_if_t was introduced to the C++ standard library 
in C++14. However sword still builds with -std=c++11, leading to the 
above failure.

According to ICU4C configure.ac file [1] and commit 7ec1765ce87c [2] it 
seems that ICU 75.1 requires C++17 to build. I suppose this now also 
holds for for users for the respective header files.


Best regards,
J

[1]: 
https://github.com/unicode-org/icu/blob/release-75-1/icu4c/source/configure.ac#L528-L544
[2]: 
https://github.com/unicode-org/icu/commit/7ec1765ce87c32ad250fcdc7362a272e8b44687f
_______________________________________________
sword-devel mailing list: [email protected]
http://crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.