-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Package installation error: "C++11 standard requested but CXX11 is not defined" #26
Comments
Hi @stgries. This was a bug in the CRAN R release. They have release a patch and we are in the process of patching our distribution right now. You should see an update soon. |
Hi Aaren
Thanks a lot for the quick response and I'm looking forward to the fix!
Cheers, STG
|
Hi @stgries, |
We will targeting a fix for this in our next release. Unfortunately it's not as simple as just updating our compiler flags since we are using a different toolchain to enable support for older platforms. In the meantime, you should be able to copy the correct flags into your /etc/Makeconf. The provided Makeconf configuration should work for CentOS 7. |
@aarongrider Provided patch for Makeconf fails under CENTOS7 Based on CRAN R 3.4.0 notes
It seems CXX1X is no longer accepted by R 3.4 version. Will have to double check this. CENTOS 7 compiler also gives error on a bunch of packages based on Makeconf patch gcc/g++ parameters :
Please confirm if next MRO release will be the 3.4.1 version. If so then this will be ~1 month after CRAN R 3.4.1 release? |
Same problem on ubuntu 14.04 cant install fst package
|
I have the same issue on Red Hat Enterprise Linux 7.3. The OS is fully updated. In my case I am attempting to install package xgboost.
GCC details.
|
I'm running into the same problem when trying to install the feather package in MRO 3.4.0 on Red Hat Enterprise Linux 7.3: |
I was able to get past the error by editing the Makeconf file as follows:
Now the compile fails at the linking stage:
EDIT:
In summary, all instances of "CXX1X" should be replaced with "CXX11" in your
for system changes or
for per user changes to resolve the
error when building some packages that depend on C++11 code. |
Thanks mjmg, I edited the Makeconf according to your instructions and it almost works. But eventually, it now throws the following error (when trying to install the feather package):
Feels like I'm almost there. Do you have any more ideas for the workaround? EDIT: Ignore that, I had a typo in one of the flag names despite double-checking everything twice. mjmg's solution works for me as well. |
@bgreve Package feather installs fine on my CENTOS7 docker container and FEDORA 25 host |
thanks @mjmg your solution worked. I would add it wasn't as simple as replace Here are the original (comment out) and 'corrections'
edit: if you need a |
Same problem on SLES12 and installing shiny. @mjmg solution works! |
I'm getting the same error while installing ITKR using the following command.
However, I don't have Makeconf file in my /etc/ directory.
|
yo904, it's not in your /etc under root. Have you checked within your R_HOME directory for the etc directory, perhaps in one of the subfolders? |
Thank you for your comment. I found Makeconf at /etc/R/.
|
I am still getting this when installing packages on 3.4.1. The same edits to Makeconf above worked. |
Dear all, Why this issue doesn't fix? Should I make a push request? |
This error re-appears with install.packages("forecast") on MRO 3.4.1, Ubuntu 16.04, on the "RcppArmadillo" install. It turns out that |
install.packages('httpuv') It comes to:
So it seems |
This issue also reproducible in CentOS 7. |
This issue seems to be fixed in MRO 3.4.2 ${R_HOME}/etc/Makeconf gives:
|
Yeah, exactly right. That was fix correctly. I tested on a new VPS.
Best,
Seongho
From: mjmg [mailto:notifications@github.com]
Sent: Monday, October 30, 2017 1:50 AM
To: Microsoft/microsoft-r-open <microsoft-r-open@noreply.github.com>
Cc: Seongho <seongho@kw.ac.kr>; Comment <comment@noreply.github.com>
Subject: Re: [Microsoft/microsoft-r-open] Package installation error: "C++11 standard requested but CXX11 is not defined" (#26)
This issue seems to be fixed in MRO 3.4.2
${R_HOME}/etc/Makeconf gives:
CXX11 = g++
CXX11FLAGS = -DU_STATIC_IMPLEMENTATION -g -O2
CXX11PICFLAGS = -fpic
CXX11STD = -std=gnu++11
CXX14 =
CXX14FLAGS =
CXX14PICFLAGS =
CXX14STD =
CXX17 =
CXX17FLAGS =
CXX17PICFLAGS =
CXX17STD =
SHLIB_CFLAGS =
SHLIB_CXXFLAGS =
SHLIB_CXXLD = $(CXX)
SHLIB_CXXLDFLAGS = -shared
SHLIB_CXX98LD = $(CXX98) $(CXX98STD)
SHLIB_CXX98LDFLAGS = -shared
SHLIB_CXX11LD = $(CXX11) $(CXX11STD)
SHLIB_CXX11LDFLAGS = -shared
SHLIB_CXX14LD = $(CXX14) $(CXX14STD)
SHLIB_CXX14LDFLAGS = -shared
SHLIB_CXX17LD = $(CXX17) $(CXX17STD)
SHLIB_CXX17LDFLAGS = -shared
## legacy
CXX1X = g++
CXX1XFLAGS = -g -O2
CXX1XPICFLAGS = -fpic
CXX1XSTD = -std=gnu++11
SHLIB_CXX1XLD = $(CXX11) $(CXX11STD)
SHLIB_CXX1XLDFLAGS = -shared
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#26 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AHy0lhO2AlE8c1_HJ3ETL7a2jNDRMIZiks5sxKyagaJpZM4NnpeS> . <https://github.com/notifications/beacon/AHy0lgTOc3DlnmxHx5fwWhV8tDc4Sgx4ks5sxKyagaJpZM4NnpeS.gif>
|
this issue is happening on HDInsight (ubuntu 16.4, Microsoft Machine Learning Server 1.5.0). It is funny Microsoft has changed the name of the product once or twice since rhis bug was reported, however the bug is still here :) |
Any solution to this issue? I have a Microsoft R Enterprise 9.2 (Machine Learning Server) running on Azure Ubuntu VM and we are facing this issue with R and C++11 when try to install Prophet (Facebook Forecasting Library) Best regards. |
Hi,
I tried Microsoft Azure (HDInsight) with Microsoft ML Server 9.1 I do
remember there had compiled R in a strage way. It didnt recognized c++11
standard (I dont say it is your case). It was nightmare.
I culdnt install some R libraries from standard CRAN due to strange
Microsoft paths (Microsoft claimed that if you have Microsoft R from MRAN
you can install any package fro CRAN - which was not true).
My personal advice - if possible switch to AWS. If not possible ask for 5x
more time and big extra money to heal your mental health.
best, Tomas
…On Wed, Jan 10, 2018 at 10:03 PM, reiselgp ***@***.***> wrote:
Any solution to this issue? I have a Microsoft R Enterprise 9.2 (Machine
Learning Server) running on Azure Ubuntu VM and we are facing this issue
with R and C++11 when try to install Prophet (Facebook Forecasting Library)
Best regards.
PS: this is the Makeconf file:
etc/Makeconf. Generated from Makeconf.in by configure.
${R_HOME}/etc/Makeconf R was configured using the following call (not
including env. vars and site configuration) configure ‘ — verbose’ ‘ —
with-x=yes’ ‘ — prefix=/builddir/target/R/Linux’ ‘ — enable-R-shlib’ ‘ —
enable-BLAS-shlib’ ‘ — enable-memory-profiling’ ‘ — with-libpng’ ‘ —
with-ICU’ ‘ — with-jpeglib’ ‘ — disable-rpath’ ‘ — with-tcltk’ ‘ —
with-tcl-config=/builddir/vendor/build/lib/tclConfig.sh’ ‘ —
with-tk-config=/builddir/vendor/build/lib/tkConfig.sh’
‘TCLTK_LIBS=-pthread -lz -lX11 -lXft -ltcl8.6 -ltk8.6 -lz’
‘TCLTK_CPPFLAGS=-pthread’ ‘PKG_CONFIG_PATH=/builddir/vendor/build/lib/pkgconfig’
‘CFLAGS=-I/builddir/vendor/build/include -DU_STATIC_IMPLEMENTATION -O2
-g’ ‘LDFLAGS=-L/builddir/vendor/build/lib’ ‘LIBS=-licui18n -licuuc
-licudata -lstdc++’ ‘CPPFLAGS=-I/builddir/vendor/build/include
-DU_STATIC_IMPLEMENTATION’ ‘CXXFLAGS=-I/builddir/vendor/build/include
-DU_STATIC_IMPLEMENTATIN -O2 -g’ This fails if it contains spaces, or if
it is quoted
include $(R_SHARE_DIR)/make/vars.mk
AR = ar
BLAS_LIBS = -L$(R_HOME)/lib$(R_ARCH) -lRblas
C_VISIBILITY = -fvisibility=hidden
CC = gcc -std=gnu99
CFLAGS = -DU_STATIC_IMPLEMENTATION -O2 -g $(LTO)
CPICFLAGS = -fpic
CPPFLAGS = -DU_STATIC_IMPLEMENTATION
CXX = g++
CXXCPP = $(CXX) -E
CXXFLAGS = -DU_STATIC_IMPLEMENTATIN -O2 -g $(LTO)
CXXPICFLAGS = -fpic
CXX1X =
CXX1XFLAGS =
CXX1XPICFLAGS =
CXX1XSTD =
DYLIB_EXT = .so
DYLIB_LD = $(CC)
DYLIB_LDFLAGS = -shared -fopenmp# $(CFLAGS) $(CPICFLAGS)
DYLIB_LINK = $(DYLIB_LD) $(DYLIB_LDFLAGS) $(LDFLAGS)
ECHO = echo
ECHO_C =
ECHO_N = -n
ECHO_T =
NB, set FC before F77 as on Solaris make, setting FC sets F77
FC = gfortran
FCFLAGS = -g -O2 $(LTO)
additional libs needed when linking with $(FC), e.g. on Solaris
FCLIBS =
F77 = gfortran
F77_VISIBILITY = -fvisibility=hidden
FFLAGS = -g -O2 $(LTO)
FLIBS = -lgfortran -lm
FCPICFLAGS = -fpic
FPICFLAGS = -fpic
FOUNDATION_CPPFLAGS =
FOUNDATION_LIBS =
JAR =
JAVA =
JAVAC =
JAVAH =
JAVA_HOME might be used in the next three. They are for packages ‘JavaGD’
and ‘rJava’
JAVA_HOME =
JAVA_CPPFLAGS =
JAVA_LIBS =
JAVA_LD_LIBRARY_PATH =
LAPACK_LIBS = -L$(R_HOME)/lib$(R_ARCH) -lRlapack
we only need this is if it is external, as otherwise link to R
LIBINTL=
LIBM = -lm
LIBR0 = -L$(R_HOME)/lib$(R_ARCH)
LIBR1 = -lR
LIBR = -L$(R_HOME)/lib$(R_ARCH) -lR
LIBS = -lpcre -llzma -lbz2 -lz -lrt -ldl -lm -licui18n -licuuc -licudata
-lstdc++ -licuuc -licui18n
needed by R CMD config
LIBnn = lib64
LIBTOOL = $(SHELL) “$(R_HOME)/bin/libtool”
LDFLAGS =
LTO =
needed to build applications linking to static libR
MAIN_LD = $(CC)
MAIN_LDFLAGS = -Wl, — export-dynamic -fopenmp
MAIN_LINK = $(MAIN_LD) $(MAIN_LDFLAGS) $(LDFLAGS)
MKINSTALLDIRS = $(R_HOME)/bin/mkinstalldirs
OBJC =
OBJCFLAGS = $(LTO)
OBJC_LIBS =
OBJCXX =
R_ARCH =
RANLIB = ranlib
SAFE_FFLAGS = -g -O2 -ffloat-store
SED = sed
SHELL = sh
SHLIB_CFLAGS =
SHLIB_CXXFLAGS =
SHLIB_CXXLD = $(CXX)
SHLIB_CXXLDFLAGS = -shared
SHLIB_CXX1XLD = $(CXX1X) $(CXX1XSTD)
SHLIB_CXX1XLDFLAGS = -shared
SHLIB_EXT = .so
SHLIB_FCLD = $(FC)
SHLIB_FCLDFLAGS = -shared
SHLIB_FFLAGS =
SHLIB_LD = $(CC)
SHLIB_LDFLAGS = -shared# $(CFLAGS) $(CPICFLAGS)
SHLIB_LIBADD =
We want to ensure libR is picked up from $(R_HOME)/lib before e.g.
/usr/local/lib if a version is already installed.
SHLIB_LINK = $(SHLIB_LD) $(SHLIB_LDFLAGS) $(LIBR0) $(LDFLAGS)
SHLIB_OPENMP_CFLAGS = -fopenmp
SHLIB_OPENMP_CXXFLAGS = -fopenmp
SHLIB_OPENMP_FCFLAGS = -fopenmp
SHLIB_OPENMP_FFLAGS = -fopenmp
STRIP_LIBS = strip — strip-unneeded
STRIP_STATIC_LIBS = strip — strip-debug
TCLTK_CPPFLAGS = -pthread
TCLTK_LIBS = -pthread -lz -lX11 -lXft -ltcl8.6 -ltk8.6 -lz
YACC = bison -y
for linking to libR.a
STATIC_LIBR = # -Wl, — whole-archive “$(R_HOME)/lib$(R_ARCH)/libR.a” -Wl,
— no-whole-archive $(BLAS_LIBS) $(FLIBS) $(LIBINTL) -lreadline -lncurses
$(LIBS)
R_XTRA_CFLAGS =
R_XTRA_CPPFLAGS = -I$(R_INCLUDE_DIR) -DNDEBUG
R_XTRA_CXXFLAGS =
R_XTRA_FFLAGS =
ALL_CFLAGS = $(R_XTRA_CFLAGS) $(PKG_CFLAGS) $(CPICFLAGS) $(SHLIB_CFLAGS)
$(CFLAGS)
ALL_CPPFLAGS = $(R_XTRA_CPPFLAGS) $(PKG_CPPFLAGS) $(CPPFLAGS)
$(CLINK_CPPFLAGS)
ALL_CXXFLAGS = $(R_XTRA_CXXFLAGS) $(PKG_CXXFLAGS) $(CXXPICFLAGS)
$(SHLIB_CXXFLAGS) $(CXXFLAGS)
ALL_OBJCFLAGS = $(PKG_OBJCFLAGS) $(CPICFLAGS) $(SHLIB_CFLAGS) $(OBJCFLAGS)
ALL_OBJCXXFLAGS = $(PKG_OBJCXXFLAGS) $(CXXPICFLAGS) $(SHLIB_CXXFLAGS)
$(OBJCXXFLAGS)
ALL_FFLAGS = $(R_XTRA_FFLAGS) $(PKG_FFLAGS) $(FPICFLAGS) $(SHLIB_FFLAGS)
$(FFLAGS)
LIBR here as a couple of packages use this without SHLIB_LINK
ALL_LIBS = $(PKG_LIBS) $(SHLIB_LIBADD) $(LIBR)# $(LIBINTL)
.SUFFIXES:
.SUFFIXES: .c .cc .cpp .d .f .f90 .f95 .m .mm .M .o
.c.o:
$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c $< -o $@
.c.d:
@echo <https://github.com/echo> “making $@ from $<”
@$(CC) -MM $(ALL_CPPFLAGS) $< > $@
.m.d:
@echo <https://github.com/echo> > $@
.cc.o:
$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -c $< -o $@
.cpp.o:
$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -c $< -o $@
.cc.d:
@echo <https://github.com/echo> “making $@ from $<”
@$(CXX) -M $(ALL_CPPFLAGS) $< > $@
.cpp.d:
@echo <https://github.com/echo> “making $@ from $<”
@$(CXX) -M $(ALL_CPPFLAGS) $< > $@
.m.o:
$(OBJC) $(ALL_CPPFLAGS) $(ALL_OBJCFLAGS) -c $< -o $@
.mm.o:
$(OBJCXX) $(ALL_CPPFLAGS) $(ALL_OBJCXXFLAGS) -c $< -o $@
.M.o:
$(OBJCXX) $(ALL_CPPFLAGS) $(ALL_OBJCXXFLAGS) -c $< -o $@
.f.o:
$(F77) $(ALL_FFLAGS) -c $< -o $@
.f95.o:
$(FC) $(PKG_FCFLAGS) $(FCPICFLAGS) $(FCFLAGS) -c $< -o $@
.f90.o:
$(FC) $(PKG_FCFLAGS) $(FCPICFLAGS) $(FCFLAGS) -c $< -o $@
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABEe5AJfxOIxyuO4UK0rv5JyycyGGWz3ks5tJSW3gaJpZM4NnpeS>
.
|
emmm.....,i solve this problem by finding {R_HOME}. in my system it is /usr/lib/R , thank you @mjmg |
Hi
I have been trying to install packages such as text2vec on MRO open 3.4.0 on a completely updated Linux Mint 18.1 64 bit system and I am getting the above-mentioned error message; here are more details:
.libPaths()
[1] "/home/laptop/R/x86_64-pc-linux-gnu-library/3.3"
[2] "/usr/lib64/microsoft-r/3.4/lib64/R/library"
install.packages("text2vec", lib=.libPaths()[2])
[...]
* installing source package ‘text2vec’ ...
** package ‘text2vec’ successfully unpacked and MD5 sums checked
** libs
Error in .shlib_internal(args) :
C++11 standard requested but CXX11 is not defined
* removing ‘/usr/lib64/microsoft-r/3.4/lib64/R/library/text2vec’
I have seen this discussion http://r.789695.n4.nabble.com/R-3-4-has-broken-C-11-support-td4732692.html but it didn't help me figure out what to do. Here's some info that might help:
R.version
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 3
minor 4.0
year 2017
month 04
day 21
svn rev 72570
language R
version.string R version 3.4.0 (2017-04-21)
nickname You Stupid Darkness
Any thoughts?
The text was updated successfully, but these errors were encountered: