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

cannot install stringi on CentOS 6 in R-3.4.4 #296

Closed upton9265 closed 5 years ago

upton9265 commented 6 years ago

I get this error when attempting to install stringi using this command from within R install.packages("stringi",configure.args='--disable-pkg-config')

checking for R_HOME... /usr/lib64/R checking for R... /usr/lib64/R/bin/R checking for endianness... little checking for R >= 3.1.0 for C++11 use... yes checking for R < 3.4.0 for CXX1X flag use... no checking for local ICUDT_DIR... icu61/data checking for cat... /bin/cat checking for gcc... gcc -m64 -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 -m64 -std=gnu99 accepts -g... yes checking for gcc -m64 -std=gnu99 option to accept ISO C89... none needed checking how to run the C preprocessor... g++ -m64 -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++ -m64 -std=gnu++0x 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 The use of system ICU4C has been disabled. checking whether we may compile src/icu61/common/putil.cpp... no checking whether we may compile src/icu61/common/putil.cpp with -D_XPG6... no The ICU4C bundle could not be build. Upgrade your compiler flags. ERROR: configuration failed for package ‘stringi’

The downloaded source packages are in ‘/tmp/Rtmpyulf1Z/downloaded_packages’ Warning message: In install.packages("stringi", configure.args = "--disable-pkg-config") : installation of package ‘stringi’ had non-zero exit status

I also get similar errors when attempting to install using these instructions:

wget https://github.com/gagolews/stringi/archive/master.zip
unzip stringi-master.zip
R CMD INSTALL stringi-master

I read through several similar errors and have made several attempts but to no avail. Not sure where to go from here.

thanx steve

gagolews commented 6 years ago

Why don't you give --disable-cxx11 a try? I see you use g++ -m64 -std=gnu++0x, which does no fully support c++11, maybe there's the problem (try editing the /usr/lib64/R/etc/Makeconf to set up correct compiler flags for c++11)

srvanderplas commented 6 years ago

I am having a similar problem on CentOS 6.

[root]# lsb_release -a
LSB Version:    :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: CentOS
Description:    CentOS release 6.9 (Final)
Release:        6.9
Codename:       Final
[root]# R --version
R version 3.4.3 (2017-11-30) -- "Kite-Eating Tree"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
http://www.gnu.org/licenses/.
[root]# R CMD INSTALL stringi-master --disable-cxx11
Warning: unknown option ‘--disable-cxx11’
* installing to library ‘/usr/lib64/R/library’
* installing *source* package ‘stringi’ ...
checking for R_HOME... /usr/lib64/R
checking for R... /usr/lib64/R/bin/R
checking for endianness... little
checking for R >= 3.1.0 for C++11 use... yes
checking for R < 3.4.0 for CXX1X flag use... no
checking for local ICUDT_DIR... icu61/data
checking for cat... /bin/cat
checking for gcc... gcc -m64 -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 -m64 -std=gnu99 accepts -g... yes
checking for gcc -m64 -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... g++ -m64 -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++ -m64 -std=gnu++0x 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... no
*** pkg-config did not detect ICU4C-devel libraries installed
*** Trying with "standard" fallback flags
checking whether we may build an ICU4C-based project... no
*** The available ICU4C cannot be used
checking whether we may compile src/icu61/common/putil.cpp... no
checking whether we may compile src/icu61/common/putil.cpp with -D_XPG6... no
*** The ICU4C bundle could not be build. Upgrade your compiler flags.
ERROR: configuration failed for package ‘stringi’
* removing ‘/usr/lib64/R/library/stringi’
* restoring previous ‘/usr/lib64/R/library/stringi’

I'm using a different compiler version (gcc -m64 -std=gnu99) and getting the same basic error.

[root]# yum install libicu-devel
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.advancedhosters.com
 * epel: mirror.us-midwest-1.nexcess.net
 * extras: mirrors.advancedhosters.com
 * updates: mirrors.advancedhosters.com
Package libicu-devel-4.2.1-14.el6.x86_64 already installed and latest version
Nothing to do

Any other suggestions?

aronatkins commented 6 years ago

On a Centos6.9 host, the following lets stringi install:

install.packages(c("stringi"),configure.args=c("--disable-cxx11"),repos="https://cran.rstudio.com")
hadley commented 6 years ago

@gagolews is it possible to have stringi support this out of the box? Otherwise it causes problems for our internal package hosting tools, and also our customers.

gagolews commented 6 years ago

It's a good idea. I'll file an update to stringi on ~Friday/Saturday, because the Windows build also fails.

jeff-m-sullivan commented 6 years ago

This command: install.packages(c("stringi"),configure.args=c("--disable-cxx11"),repos="https://cran.rstudio.com")

Doesn't work for me:

Error: Stopping on error

In addition: Warning message:

In download.file(paste(href, fname, sep = ""), icudtzipfname, mode = "wb") :
  cannot open URL 'http://www.gagolewski.com/software/stringi/icudt55l.zip': HTTP status was '403 Forbidden'

Execution halted

*** icudt download failed. stopping.

ERROR: configuration failed for package 'stringi'
gagolews commented 6 years ago

@jeffPHE as per the download error, can you check the most recent development version? I just upgraded the mirror list (run devtools::install_github("gagolews/stringi"))

jeff-m-sullivan commented 6 years ago

The dev version doesn't have difficulty downloading, but it still doesn't compile unfortunately. I tried it with and without the --disable-cxx11 flag:

In file included from icu61/i18n/number_types.h:14:0, 
                 from icu61/i18n/number_affixutils.h:11,
                 from icu61/i18n/number_affixutils.cpp:8: 
icu61/unicode/numberformatter.h:688:21: error: 'icu_61::number::Notation::Notation' names constructor 
icu61/unicode/numberformatter.h:1072:20: error: 'icu_61::number::Rounder::Rounder' names constructor 
icu61/unicode/numberformatter.h:1110:20: error: 'icu_61::number::Rounder::Rounder' names constructor 
icu61/unicode/numberformatter.h:1146:20: error: 'icu_61::number::Rounder::Rounder' names constructor
make: *** [icu61/i18n/number_affixutils.o] Error 1
ERROR: compilation failed for package 'stringi'
gagolews commented 6 years ago

I hope it's fixed now, can you all try devtools::install_github("gagolews/stringi")? Thanks

jeff-m-sullivan commented 6 years ago

Thanks, but I’m still getting the same compilation errors:

In file included from icu61/i18n/number_types.h:14:0, from icu61/i18n/number_affixutils.h:11, from icu61/i18n/number_affixutils.cpp:8: icu61/unicode/numberformatter.h:688:21: error: 'icu_61::number::Notation::Notation' names constructor icu61/unicode/numberformatter.h:1072:20: error: 'icu_61::number::Rounder::Rounder' names constructor icu61/unicode/numberformatter.h:1110:20: error: 'icu_61::number::Rounder::Rounder' names constructor icu61/unicode/numberformatter.h:1146:20: error: 'icu_61::number::Rounder::Rounder' names constructor make: *** [icu61/i18n/number_affixutils.o] Error 1

-- Jeff Sullivan | Director, Advanced Modeling | 310.984.7730 or 617.807.4230 From: andersonfrailey notifications@github.com Reply-To: gagolews/stringi reply@reply.github.com Date: Friday, May 11, 2018 at 9:16 AM To: gagolews/stringi stringi@noreply.github.com Cc: "Sullivan, Jeff" jeff.sullivan@PrecisionHealthEconomics.com, Mention mention@noreply.github.com Subject: Re: [gagolews/stringi] cannot install stringi on CentOS 6 in R-3.4.4 (#296)

I hope it's fixed now, can you all try devtools::install_github("gagolews/stringi")? Thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/gagolews/stringi/issues/296#issuecomment-388360154, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHngXyAdnaiXFZdo-lY2pubF6GyhPUtdks5txY8KgaJpZM4Txqy8.

The information contained in this email and any attachments is confidential and may be subject to copyright or other intellectual property protection. If you are not the intended recipient, you are not authorized to use or disclose this information, and we request that you notify us by reply mail or telephone and delete the original message from your mail system.

gagolews commented 6 years ago

@jeffPHE Weird, could you give me the full "compilation report", especially the output of ./configure?

jeff-m-sullivan commented 6 years ago

Of course. It's attached. stringi_install.log

aronatkins commented 6 years ago

On a Centos6.9 host, the following lets stringi install from the master branch without configure flags:

install.packages("https://github.com/gagolews/stringi/archive/master.tar.gz", repos = NULL, type = "source")

@gagolews do you know when this change will make its way to CRAN?

gagolews commented 6 years ago

Its "pending" (for quite a long time now) on CRAN..

hadley commented 6 years ago

It's worth emailing them to ask for an update - sometimes they lose packages in the queue.

aronatkins commented 6 years ago

@gagolews Could you tag 1.2.3 (https://github.com/gagolews/stringi/releases), or does that not happen until CRAN approval is final?

aronatkins commented 6 years ago

Confirmed that 1.2.3 is on CRAN and successfully installs without modification on CentOS6.

gagolews commented 6 years ago

thanks for the feedback!

Sivaranjani14 commented 5 years ago

Hi @gagolews ,

I am getting the same error as @jeffPHE mentioned above:

In file included from icu61/i18n/number_types.h:14:0, from icu61/i18n/number_affixutils.h:11, from icu61/i18n/number_affixutils.cpp:8: icu61/unicode/numberformatter.h:688:21: error: ?icu_61_stringi::number::Notation::Notation? names constructor icu61/unicode/numberformatter.h:1072:20: error: ?icu_61_stringi::number::Rounder::Rounder? names constructor icu61/unicode/numberformatter.h:1110:20: error: ?icu_61_stringi::number::Rounder::Rounder? names constructor icu61/unicode/numberformatter.h:1146:20: error: ?icu_61_stringi::number::Rounder::Rounder? names constructor make: *** [icu61/i18n/number_affixutils.o] Error 1 ERROR: compilation failed for package ?stringi?

I am trying to install stringi for R 3.5.1, could you please help in fixing the issue? I have tried with the master package mentioned above but still getting the same error.

Your help will be much appreciated.

Thanks!

gagolews commented 5 years ago

OK, I was finally able to replicate that. I'm on it.

gagolews commented 5 years ago

Should be working now.

By the way, if you have no internet access on local machines, you can build a distributable source package that includes all the required ICU data files (for off-line use) by omitting some relevant lines in the .Rbuildignore file. The following command sequence should do the trick:

wget https://github.com/gagolews/stringi/archive/master.zip -O stringi.zip
unzip stringi.zip
sed -i '/\/icu..\/data/d' stringi-master/.Rbuildignore
R CMD build stringi-master

Assuming the most recent development version is 1.3.1, a file named stringi_1.3.1.tar.gz is created in the current working directory. The package can now be installed (the source bundle may be propagated via scp etc.) by executing:

R CMD INSTALL stringi_1.3.1.tar.gz

or by calling install.packages("stringi_1.3.1.tar.gz", repos=NULL), from within an R session.