gagolews / stringi

Fast and portable character string processing in R (with the Unicode ICU)
https://stringi.gagolewski.com/
Other
304 stars 44 forks source link

installation issue on R 3.3.2 #271

Closed yassinebha closed 7 years ago

yassinebha commented 7 years ago

Hi I'm trying to install stringi without sucess on R 3.3.2,I on ubuntu 14.04. If you have any clue why this happening.Thanks

here is the full error message: (sorry for the long output message)

`Installing package into ‘/home/yassinebha/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/stringi_1.1.5.tar.gz'
Content type 'unknown' length 3645872 bytes (3.5 MB)
==================================================
downloaded 3.5 MB

* installing *source* package ‘stringi’ ...
** package ‘stringi’ successfully unpacked and MD5 sums checked
checking for local ICUDT_DIR... icu55/data
checking for R_HOME... /usr/lib/R
checking for R... /usr/lib/R/bin/R
checking for R >= 3.1.0 for C++11 use... yes
checking for R < 3.4.0 for CXX1X flag use... yes
checking for cat... /bin/cat
checking for gcc... gcc -std=gnu99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking elf.h usability... yes
checking elf.h presence... yes
checking for elf.h... yes
checking whether we are using the GNU C++ compiler... yes
checking whether g++ -std=c++11 accepts -g... yes
checking whether the C++ compiler supports the long long type... yes
checking whether the compiler implements namespaces... yes
checking whether the compiler supports Standard Template Library... yes
checking whether std::map is available... yes
checking for pkg-config... /usr/bin/pkg-config
checking with pkg-config for the system ICU4C... 52.1
checking for ICU4C >= 52... yes
checking for additional required CPPFLAGS, LDFLAGS, and LIBS... done
checking whether we may build an ICU4C-based project... yes
checking programmatically for sufficient U_ICU_VERSION_MAJOR_NUM... yes
checking for available ICU data library (ucnv, uloc, utrans)... yes
checking for available ICU data library (ucol)... yes
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating src/uconfig_local.h
config.status: creating src/install.libs.R

*** stringi configure summary:
    ICU_FOUND=1
    STRINGI_CXXSTD=CXX_STD=CXX11
    STRINGI_CFLAGS=   -fpic
    STRINGI_CPPFLAGS=-I. -I/usr/include/x86_64-linux-gnu     -UDEBUG -DNDEBUG -DU_HAVE_ELF_H
    STRINGI_CXXFLAGS=   -fpic
    STRINGI_LDFLAGS=-L/usr/lib/x86_64-linux-gnu    
    STRINGI_LIBS=-licui18n -licuuc -licudata    

*** compiler settings used:
    CC=gcc -std=gnu99
    CPP=g++ -E
    LD=g++
    CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fpic  
    CPPFLAGS=   -UDEBUG -DNDEBUG
    CXX=g++ -std=c++11
    CXXFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -fpic  
    LDFLAGS=  
    LIBS=  

** libs
g++ -std=c++11 -I/usr/share/R/include -DNDEBUG -I. -I/usr/include/x86_64-linux-gnu     -UDEBUG -DNDEBUG -DU_HAVE_ELF_H    -fpic -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c stri_brkiter.cpp -o stri_brkiter.o
g++ -std=c++11 -I/usr/share/R/include -DNDEBUG -I. -I/usr/include/x86_64-linux-gnu     -UDEBUG -DNDEBUG -DU_HAVE_ELF_H    -fpic -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c stri_collator.cpp -o stri_collator.o
g++ -std=c++11 -I/usr/share/R/include -DNDEBUG -I. -I/usr/include/x86_64-linux-gnu     -UDEBUG -DNDEBUG -DU_HAVE_ELF_H    -fpic -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c stri_common.cpp -o stri_common.o
g++ -std=c++11 -I/usr/share/R/include -DNDEBUG -I. -I/usr/include/x86_64-linux-gnu     -UDEBUG -DNDEBUG -DU_HAVE_ELF_H    -fpic -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c stri_compare.cpp -o stri_compare.o
In file included from /usr/include/c++/4.8/random:50:0,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from stri_compare.cpp:39:
/usr/include/c++/4.8/bits/random.h:628:7: error: ‘void std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::seed(std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type)’ cannot be overloaded
        */
       ^
In file included from /usr/include/c++/4.8/random:50:0,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from stri_compare.cpp:39:
/usr/include/c++/4.8/bits/random.h:517:7: error: with ‘void std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::seed(std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type)���
       seed(result_type __sd = default_seed);
       ^
In file included from /usr/include/c++/4.8/random:50:0,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from stri_compare.cpp:39:
/usr/include/c++/4.8/bits/random.h:636:9: error: ‘template<class _UIntType, long unsigned int __w, long unsigned int __n, long unsigned int __m, long unsigned int __r, _UIntType __a, long unsigned int __u, _UIntType __d, long unsigned int __s, _UIntType __b, long unsigned int __t, _UIntType __c, long unsigned int __l, _UIntType __f> template<class _Sseq> typename std::enable_if<std::is_class<_Sseq>::value>::type std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::seed(_Sseq&)’ cannot be overloaded
       void
         ^
In file included from /usr/include/c++/4.8/random:50:0,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from stri_compare.cpp:39:
/usr/include/c++/4.8/bits/random.h:521:9: error: with ‘template<class _UIntType, long unsigned int __w, long unsigned int __n, long unsigned int __m, long unsigned int __r, _UIntType __a, long unsigned int __u, _UIntType __d, long unsigned int __s, _UIntType __b, long unsigned int __t, _UIntType __c, long unsigned int __l, _UIntType __f> template<class _Sseq> typename std::enable_if<std::is_class<_Sseq>::value>::type std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::seed(_Sseq&)’
         seed(_Sseq& __q);
         ^
In file included from /usr/include/c++/4.8/random:50:0,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from stri_compare.cpp:39:
/usr/include/c++/4.8/bits/random.h:643:7: error: ‘static constexpr std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::min()’ cannot be overloaded
       /**
       ^
In file included from /usr/include/c++/4.8/random:50:0,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from stri_compare.cpp:39:
/usr/include/c++/4.8/bits/random.h:527:7: error: with ‘static constexpr std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::min()’
       min()
       ^
In file included from /usr/include/c++/4.8/random:50:0,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from stri_compare.cpp:39:
/usr/include/c++/4.8/bits/random.h:651:7: error: ‘static constexpr std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::max()’ cannot be overloaded
        *        generator objects of the same type for equality.
       ^
In file included from /usr/include/c++/4.8/random:50:0,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from stri_compare.cpp:39:
/usr/include/c++/4.8/bits/random.h:534:7: error: with ‘static constexpr std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::max()’
       max()
       ^
In file included from /usr/include/c++/4.8/random:50:0,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from stri_compare.cpp:39:
/usr/include/c++/4.8/bits/random.h:658:7: error: ‘void std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::discard(long long unsigned int)’ cannot be overloaded
        * @returns true if the infinite sequences of generated values
       ^
In file included from /usr/include/c++/4.8/random:50:0,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from stri_compare.cpp:39:
/usr/include/c++/4.8/bits/random.h:541:7: error: with ‘void std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::discard(long long unsigned int)’
       discard(unsigned long long __z);
       ^
In file included from /usr/include/c++/4.8/random:50:0,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from stri_compare.cpp:39:
/usr/include/c++/4.8/bits/random.h:668:7: error: ‘std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::operator()()’ cannot be overloaded
       /**
       ^
In file included from /usr/include/c++/4.8/random:50:0,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from stri_compare.cpp:39:
/usr/include/c++/4.8/bits/random.h:544:7: error: with ‘std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::operator()()’
       operator()();
       ^
In file included from /usr/include/c++/4.8/random:50:0,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from stri_compare.cpp:39:
/usr/include/c++/4.8/bits/random.h:683:24: error: ‘subtract_with_carry_engine’ does not name a type
  operator<<(std::basic_ostream<_CharT, _Traits>&,
                        ^
/usr/include/c++/4.8/bits/random.h:684:10: error: ‘subtract_with_carry_engine’ does not name a type
      const std::subtract_with_carry_engine<_UIntType1, __w1,
          ^
/usr/include/c++/4.8/bits/random.h:684:43: error: ‘bool std::operator==(const int&, const int&)’ must have an argument of class or enumerated type
      const std::subtract_with_carry_engine<_UIntType1, __w1,
                                           ^
/usr/include/c++/4.8/bits/random.h:705:12: error: ‘subtract_with_carry_engine’ in namespace ‘std’ does not name a type

            ^
/usr/include/c++/4.8/bits/random.h:705:43: error: expected ‘,’ or ‘...’ before ‘<’ token

                                           ^
/usr/include/c++/4.8/bits/random.h:724:11: error: ‘std::subtract_with_carry_engine’ has not been declared
   template<typename _UIntType, size_t __w, size_t __s, size_t __r>
           ^
/usr/include/c++/4.8/bits/random.h:724:37: error: expected ‘,’ or ‘...’ before ‘<’ token
   template<typename _UIntType, size_t __w, size_t __s, size_t __r>
                                     ^
/usr/include/c++/4.8/bits/random.h:728:23: error: ‘long_lag’ was not declared in this scope
         const std::subtract_with_carry_engine<_UIntType, __w,
                       ^
/usr/include/c++/4.8/bits/random.h:747:22: error: ‘subtract_with_carry_engine’ in namespace ‘std’ does not name a type
       typedef typename _RandomNumberEngine::result_type result_type;
                      ^
/usr/include/c++/4.8/bits/random.h:747:53: error: expected ‘,’ or ‘...’ before ‘<’ token
       typedef typename _RandomNumberEngine::result_type result_type;
                                                     ^
/usr/include/c++/4.8/bits/random.h:750:25: error: ‘bool std::operator!=(int)’ must have an argument of class or enumerated type
       static constexpr size_t block_size = __p;
                         ^
/usr/include/c++/4.8/bits/random.h:1464:11: error: ‘subtract_with_carry_engine’ does not name a type
     /** The type of the generated random value. */
           ^
/usr/include/c++/4.8/bits/random.h:1467:11: error: ‘subtract_with_carry_engine’ does not name a type
     // constructors, destructors and member functions
           ^
/usr/include/c++/4.8/bits/random.h:1470:32: error: ‘ranlux24_base’ was not declared in this scope
/usr/include/c++/4.8/bits/random.h:1470:54: error: template argument 1 is invalid
/usr/include/c++/4.8/bits/random.h:1470:64: error: invalid type in declaration before ‘;’ token
/usr/include/c++/4.8/bits/random.h:1472:32: error: ‘ranlux48_base’ was not declared in this scope
/usr/include/c++/4.8/bits/random.h:1472:54: error: template argument 1 is invalid
/usr/include/c++/4.8/bits/random.h:1472:64: error: invalid type in declaration before ‘;’ token
In file included from /usr/include/c++/4.8/random:52:0,
                 from /usr/include/c++/4.8/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8/algorithm:62,
                 from stri_compare.cpp:39:
/usr/include/c++/4.8/bits/random.tcc: In member function ‘void std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::seed(std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type)’:
/usr/include/c++/4.8/bits/random.tcc:331:7: error: ‘_M_x’ was not declared in this scope
/usr/include/c++/4.8/bits/random.tcc: In member function ‘typename std::enable_if<std::is_class<_Sseq>::value>::type std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::seed(_Sseq&)’:
/usr/include/c++/4.8/bits/random.tcc:372:6: error: ‘_M_x’ was not declared in this scope
/usr/include/c++/4.8/bits/random.tcc:387:11: error: ‘_M_x’ was not declared in this scope
/usr/include/c++/4.8/bits/random.tcc: At global scope:
/usr/include/c++/4.8/bits/random.tcc:399:21: error: no ‘void std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::_M_gen_rand()’ member function declared in class ‘std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>’
/usr/include/c++/4.8/bits/random.tcc: In member function ‘void std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::discard(long long unsigned int)’:
/usr/include/c++/4.8/bits/random.tcc:440:16: error: there are no arguments to ‘_M_gen_rand’ that depend on a template parameter, so a declaration of ‘_M_gen_rand’ must be available [-fpermissive]
/usr/include/c++/4.8/bits/random.tcc:440:16: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/usr/include/c++/4.8/bits/random.tcc: In member function ‘std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::operator()()’:
/usr/include/c++/4.8/bits/random.tcc:459:14: error: there are no arguments to ‘_M_gen_rand’ that depend on a template parameter, so a declaration of ‘_M_gen_rand’ must be available [-fpermissive]
/usr/include/c++/4.8/bits/random.tcc:462:25: error: ‘_M_x’ was not declared in this scope
/usr/include/c++/4.8/bits/random.tcc: At global scope:
/usr/include/c++/4.8/bits/random.tcc:526:31: error: expected initializer before ‘<’ token
/usr/include/c++/4.8/bits/random.tcc:530:31: error: expected initializer before ‘<’ token
/usr/include/c++/4.8/bits/random.tcc:534:31: error: expected initializer before ‘<’ token
/usr/include/c++/4.8/bits/random.tcc:538:31: error: expected initializer before ‘<’ token
/usr/include/c++/4.8/bits/random.tcc:542:31: error: expected initializer before ‘<’ token
/usr/include/c++/4.8/bits/random.tcc:571:7: error: too many template-parameter-lists
/usr/include/c++/4.8/bits/random.tcc:595:14: error: expected nested-name-specifier before ‘subtract_with_carry_engine’
/usr/include/c++/4.8/bits/random.tcc:595:40: error: expected initializer before ‘<’ token
/usr/include/c++/4.8/bits/random.tcc:633:15: error: ‘subtract_with_carry_engine’ does not name a type
/usr/include/c++/4.8/bits/random.tcc:633:41: error: expected ‘,’ or ‘...’ before ‘<’ token
/usr/include/c++/4.8/bits/random.tcc: In function ‘std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, int)’:
/usr/include/c++/4.8/bits/random.tcc:646:10: error: ‘__x’ was not declared in this scope
/usr/include/c++/4.8/bits/random.tcc:647:15: error: ‘__x’ was not declared in this scope
/usr/include/c++/4.8/bits/random.tcc: At global scope:
/usr/include/c++/4.8/bits/random.tcc:658:9: error: ‘subtract_with_carry_engine’ has not been declared
/usr/include/c++/4.8/bits/random.tcc:658:35: error: expected ‘,’ or ‘...’ before ‘<’ token
/usr/include/c++/4.8/bits/random.tcc: In function ‘std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, int)’:
/usr/include/c++/4.8/bits/random.tcc:667:10: error: ‘__x’ was not declared in this scope
/usr/include/c++/4.8/bits/random.tcc:668:15: error: ‘__x’ was not declared in this scope
make: *** [stri_compare.o] Error 1
ERROR: compilation failed for package ‘stringi’
* removing ‘/home/yassinebha/R/x86_64-pc-linux-gnu-library/3.3/stringi’
* restoring previous ‘/home/yassinebha/R/x86_64-pc-linux-gnu-library/3.3/stringi’
Warning in install.packages :
  installation of package ‘stringi’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpJp1gHU/downloaded_packages’`
gagolews commented 7 years ago

This is highly unusual and most likely has nothing to do with stringi. Are you able to compile other packages?

Could you try upgrading R and all ubuntu packages (especially the gcc compiler collection) and see if it works then?

yassinebha commented 7 years ago

Thank you so much, I upgraded gcc and R as you suggested and now it worked. For info, here is how I updated my gcc on ubuntu 14.04 https://askubuntu.com/questions/466651/how-do-i-use-the-latest-gcc-on-ubuntu

I guess you can close the issue now Thanks again.

gagolews commented 7 years ago

Jolly good.