'Trying to complie ICU by unicode on RHEL7 system

I am trying to install ICU from git clone repo.

I run ./cnfigure and everything seems fine.

When i go to run make I get a bunch of errors.

I am new to Linux and cannot find any fixes anywhere.

it seems to be a problem with the uarrsort.ccp but that is the extent of what i know.

Here are the errors i run into when running make:

   g++   ...  uarrsort.cpp
uarrsort.cpp: In function ‘constexpr int32_t sizeInMaxAlignTs(int32_t)’:
uarrsort.cpp:40:34: error: ‘max_align_t’ is not a member of ‘std’
     return (sizeInBytes + sizeof(std::max_align_t) - 1) / sizeof(std::max_align_t);
                                  ^
uarrsort.cpp:40:34: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/cstddef:42:0,
                 from uarrsort.cpp:21:
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h:425:3: note:   ‘max_align_t’
 } max_align_t;
   ^
uarrsort.cpp:40:66: error: ‘max_align_t’ is not a member of ‘std’
     return (sizeInBytes + sizeof(std::max_align_t) - 1) / sizeof(std::max_align_t);
                                                                  ^
uarrsort.cpp:40:66: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/cstddef:42:0,
                 from uarrsort.cpp:21:
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h:425:3: note:   ‘max_align_t’
 } max_align_t;
   ^
uarrsort.cpp:41:1: error: body of constexpr function ‘constexpr int32_t sizeInMaxAlignTs(int32_t)’ not a return-statement
 }
 ^
uarrsort.cpp: In function ‘void insertionSort(char*, int32_t, int32_t, int32_t (*)(const void*, const void*, const void*), const void*, UErrorCode*)’:
uarrsort.cpp:144:26: error: ‘max_align_t’ is not a member of ‘std’
     icu::MaybeStackArray<std::max_align_t, sizeInMaxAlignTs(STACK_ITEM_SIZE)> v;
                          ^
uarrsort.cpp:144:26: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/cstddef:42:0,
                 from uarrsort.cpp:21:
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h:425:3: note:   ‘max_align_t’
 } max_align_t;
   ^
uarrsort.cpp:144:26: error: ‘max_align_t’ is not a member of ‘std’
     icu::MaybeStackArray<std::max_align_t, sizeInMaxAlignTs(STACK_ITEM_SIZE)> v;
                          ^
uarrsort.cpp:144:26: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/cstddef:42:0,
                 from uarrsort.cpp:21:
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h:425:3: note:   ‘max_align_t’
 } max_align_t;
   ^
uarrsort.cpp:144:77: error: template argument 1 is invalid
     icu::MaybeStackArray<std::max_align_t, sizeInMaxAlignTs(STACK_ITEM_SIZE)> v;
                                                                             ^
uarrsort.cpp:144:76: error: ‘constexpr int32_t sizeInMaxAlignTs(int32_t)’ called in a constant expression
     icu::MaybeStackArray<std::max_align_t, sizeInMaxAlignTs(STACK_ITEM_SIZE)> v;
                                                                            ^
uarrsort.cpp:144:77: note: in template argument for type ‘int’ 
     icu::MaybeStackArray<std::max_align_t, sizeInMaxAlignTs(STACK_ITEM_SIZE)> v;
                                                                             ^
uarrsort.cpp:144:80: error: invalid type in declaration before ‘;’ token
     icu::MaybeStackArray<std::max_align_t, sizeInMaxAlignTs(STACK_ITEM_SIZE)> v;
                                                                                ^
uarrsort.cpp:145:40: error: request for member ‘getCapacity’ in ‘v’, which is of non-class type ‘int’
     if (sizeInMaxAlignTs(itemSize) > v.getCapacity() &&
                                        ^
uarrsort.cpp:146:15: error: request for member ‘resize’ in ‘v’, which is of non-class type ‘int’
             v.resize(sizeInMaxAlignTs(itemSize)) == nullptr) {
               ^
uarrsort.cpp:151:62: error: request for member ‘getAlias’ in ‘v’, which is of non-class type ‘int’
     doInsertionSort(array, length, itemSize, cmp, context, v.getAlias());
                                                              ^
uarrsort.cpp: In function ‘void quickSort(char*, int32_t, int32_t, int32_t (*)(const void*, const void*, const void*), const void*, UErrorCode*)’:
uarrsort.cpp:238:26: error: ‘max_align_t’ is not a member of ‘std’
     icu::MaybeStackArray<std::max_align_t, sizeInMaxAlignTs(STACK_ITEM_SIZE) * 2> xw;
                          ^
uarrsort.cpp:238:26: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/cstddef:42:0,
                 from uarrsort.cpp:21:
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h:425:3: note:   ‘max_align_t’
 } max_align_t;
   ^
uarrsort.cpp:238:26: error: ‘max_align_t’ is not a member of ‘std’
     icu::MaybeStackArray<std::max_align_t, sizeInMaxAlignTs(STACK_ITEM_SIZE) * 2> xw;
                          ^
uarrsort.cpp:238:26: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/cstddef:42:0,
                 from uarrsort.cpp:21:
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include/stddef.h:425:3: note:   ‘max_align_t’
 } max_align_t;
   ^
uarrsort.cpp:238:81: error: template argument 1 is invalid
     icu::MaybeStackArray<std::max_align_t, sizeInMaxAlignTs(STACK_ITEM_SIZE) * 2> xw;
                                                                                 ^
uarrsort.cpp:238:76: error: ‘constexpr int32_t sizeInMaxAlignTs(int32_t)’ called in a constant expression
     icu::MaybeStackArray<std::max_align_t, sizeInMaxAlignTs(STACK_ITEM_SIZE) * 2> xw;
                                                                            ^
uarrsort.cpp:238:81: note: in template argument for type ‘int’ 
     icu::MaybeStackArray<std::max_align_t, sizeInMaxAlignTs(STACK_ITEM_SIZE) * 2> xw;
                                                                                 ^
uarrsort.cpp:238:85: error: invalid type in declaration before ‘;’ token
     icu::MaybeStackArray<std::max_align_t, sizeInMaxAlignTs(STACK_ITEM_SIZE) * 2> xw;
                                                                                     ^
uarrsort.cpp:239:42: error: request for member ‘getCapacity’ in ‘xw’, which is of non-class type ‘int’
     if(sizeInMaxAlignTs(itemSize)*2 > xw.getCapacity() &&
                                          ^
uarrsort.cpp:240:16: error: request for member ‘resize’ in ‘xw’, which is of non-class type ‘int’
             xw.resize(sizeInMaxAlignTs(itemSize) * 2) == nullptr) {
                ^
uarrsort.cpp:246:21: error: request for member ‘getAlias’ in ‘xw’, which is of non-class type ‘int’
                  xw.getAlias(), xw.getAlias() + sizeInMaxAlignTs(itemSize));
                     ^
uarrsort.cpp:246:36: error: request for member ‘getAlias’ in ‘xw’, which is of non-class type ‘int’
                  xw.getAlias(), xw.getAlias() + sizeInMaxAlignTs(itemSize));
                                    ^
*** Failed compilation command follows: ----------------------------------------------------------
g++ -D_REENTRANT -DU_HAVE_ELF_H=1 -DU_HAVE_STRTOD_L=1 -DU_HAVE_XLOCALE_H=1 -I. -DDEFAULT_ICU_PLUGINS="/usr/local/lib/icu"  -DU_ATTRIBUTE_DEPRECATED= -DU_COMMON_IMPLEMENTATION -O3 -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long -std=c++11 -c -DPIC -fPIC -o uarrsort.o uarrsort.cpp
--- ( rebuild with "make VERBOSE=1 all" to show all parameters ) --------
make[1]: *** [uarrsort.o] Error 1

Sorry I am a noob. any help will be much appreciated.

thanks :)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source