规格:
操作系统:SLES 11 SP3Makeconf:
C_VISIBILITY = -fvisibility=hidden
CC = gcc -std=gnu99
CFLAGS = -g -O2 $(LTO)
CPICFLAGS = -fpic
CPPFLAGS = -I/usr/local/include
CXX = g++
CXXCPP = $(CXX) -E
CXXFLAGS = -g -O2 $(LTO)
CXXPICFLAGS = -fpic
CXX1X = g++
CXX1XFLAGS = -g -O2 $(LTO)
CXX1XPICFLAGS = -fpic
CXX1XSTD = -std=gnu++11
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 =
FC = gfortran
FCFLAGS = -g -O2 $(LTO)
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 =
JAVA_CPPFLAGS =
JAVA_LIBS =
JAVA_LD_LIBRARY_PATH =
LAPACK_LIBS = -L\$(R_HOME)/lib\$(R_ARCH) -lRlapack
LIBINTL=
LIBM = -lm
LIBR0 = -L\$(R_HOME)/lib\$(R_ARCH)
LIBR1 = -lR
LIBR = -L\$(R_HOME)/lib\$(R_ARCH) -lR
LIBS = -lpcre -llzma -lbz2 -lrt -ldl -lm
LIBnn = lib64
LIBTOOL = $(SHELL) "\$(R_HOME)/bin/libtool"
LDFLAGS = -L/usr/local/lib64
LTO =
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 = /bin/sed
SHELL = /bin/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 =
SHLIB_LINK = $(SHLIB_LD) $(SHLIB_LDFLAGS) $(LIBR0) $(LDFLAGS)
SHLIB_OPENMP_CFLAGS = -fopenmp
SHLIB_OPENMP_CXXFLAGS = -fopenmp
SHLIB_OPENMP_FCFLAGS =
SHLIB_OPENMP_FFLAGS =
STRIP_LIBS = strip --strip-unneeded
STRIP_STATIC_LIBS = strip --strip-debug
TCLTK_CPPFLAGS =
TCLTK_LIBS =
YACC = bison -y
STATIC_LIBR = # -Wl,--whole-archive "\$(R_HOME)/lib\$(R_ARCH)/libR.a" -Wl,--no-whole-archive $(BLAS_LIBS) $(FLIBS) $(LIBINTL) $(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)
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 "making $@ from $<"
@\$(CC) -MM $(ALL_CPPFLAGS) $< > $@
.m.d:
@echo > $@
.cc.o:
$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -c $< -o $@
.cpp.o:
$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -c $< -o $@
.cc.d:
@echo "making $@ from $<"
@\$(CXX) -M $(ALL_CPPFLAGS) $< > $@
.cpp.d:
@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 $@
问题:
即使在安装了所有先决条件之后,bsts安装也会失败。 我还尝试安装与R 3.2.5兼容的更高版本的bsts,但也没有运气。
**Error Message:**
**Error bsts_0.5.1:**
t-325-test:/var/opt/teradata/packages/R/R_packages # R CMD INSTALL bsts_0.5.1.tar.gz
* installing to library ‘/usr/local/lib64/R/library’
* installing *source* package ‘bsts’ ...
** package ‘bsts’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/local/lib64/R/include -DNDEBUG -I /usr/local/lib64/R/bin/Rscript -e cat(system.file(package='Boom')) /include -DNO_BOOST_THREAD DNO_BOOST_FILESYSTEM -DADD_ -DR_NO_REMAP -DRLANGUAGE -I/usr/local/include -I"/usr/local/lib64/R/library/Boom/include" -I"/usr/local/lib64/R/library/BH/include" -fpic -g -O2 -c aggregate_time_series.cc -o aggregate_time_series.o
aggregate_time_series.cc:8:10: fatal error: LinAlg/Types.hpp: No such file or directory
#include "LinAlg/Types.hpp"
compilation terminated.
make: *** [aggregate_time_series.o] Error 1
ERROR: compilation failed for package ‘bsts’ removing ‘/usr/local/lib64/R/library/bsts’
=================================================================
**Error bsts_0.6.5:**
t-325-test:/var/opt/teradata/packages/R/R_packages # R CMD INSTALL bsts_0.6.5.tar.gz
* installing to library ‘/usr/local/lib64/R/library’
* installing *source* package ‘bsts’ ...
** package ‘bsts’ successfully unpacked and MD5 sums checked
** libs
g++ -std=gnu++11 -I/usr/local/lib64/R/include -DNDEBUG -I/usr/local/lib64/R/bin/Rscript -e cat(system.file(package='Boom'))/include -DNO_BOOST_THREADS -DNO_BOOST_FILESYSTEM -DADD_ -DR_NO_REMAP -DRLANGUAGE -I/usr/local/include -I"/usr/local/lib64/R/library/Boom/include" -I"/usr/local/lib64/R/library/BH/include" -fpic -g -O2 -c aggregate_time_series.cc -o aggregate_time_series.o
In file included from /usr/local/lib64/R/library/Boom/include/Models/DataTypes.hpp:33:0,
from /usr/local/lib64/R/library/Boom/include/Models/CategoricalData.hpp:22,
from /usr/local/lib64/R/library/Boom/include/r_interface/boom_r_tools.hpp:30,
from aggregate_time_series.cc:9:
/usr/local/lib64/R/library/Boom/include/cpputil/Ptr.hpp:128:33: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
template <class Y> Ptr(std::auto_ptr<Y> &rhs): pt(rhs){}
In file included from /usr/local/include/c++/7.2.0/bits/locale_conv.h:41:0,
from /usr/local/include/c++/7.2.0/locale:43,
from /usr/local/include/c++/7.2.0/iomanip:43,
from /usr/local/lib64/R/library/Boom/include/cpputil/report_error.hpp:22,
from /usr/local/lib64/R/library/Boom/include/LinAlg/Array.hpp:29,
from /usr/local/lib64/R/library/Boom/include/r_interface/boom_r_tools.hpp:28,
from aggregate_time_series.cc:9:
/usr/local/include/c++/7.2.0/bits/unique_ptr.h:51:28: note: declared here
template<typename> class auto_ptr;
In file included from /usr/local/lib64/R/library/Boom/include/Models/DataTypes.hpp:33:0,
from /usr/local/lib64/R/library/Boom/include/Models/CategoricalData.hpp:22,
from /usr/local/lib64/R/library/Boom/include/r_interface/boom_r_tools.hpp:30,
from aggregate_time_series.cc:9:
/usr/local/lib64/R/library/Boom/include/cpputil/Ptr.hpp:142:32: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
Ptr & operator=(const std::auto_ptr<Y> &rhs){
In file included from /usr/local/include/c++/7.2.0/bits/locale_conv.h:41:0,
from /usr/local/include/c++/7.2.0/locale:43,
from /usr/local/include/c++/7.2.0/iomanip:43,
from /usr/local/lib64/R/library/Boom/include/cpputil/report_error.hpp:22,
from /usr/local/lib64/R/library/Boom/include/LinAlg/Array.hpp:29,
from /usr/local/lib64/R/library/Boom/include/r_interface/boom_r_tools.hpp:28,
from aggregate_time_series.cc:9:
/usr/local/include/c++/7.2.0/bits/unique_ptr.h:51:28: note: declared here
template<typename> class auto_ptr;
g++ -std=gnu++11 -I/usr/local/lib64/R/include -DNDEBUG -I /usr/local/lib64/R/bin/Rscript -e "cat(system.file(package='Boom'))/include -DNO_BOOST_THREADS -DNO_BOOST_FILESYSTEM -DADD_ -DR_NO_REMAP -DRLANGUAGE -I/usr/local/include -I"/usr/local/lib64/R/library/Boom/include" -I"/usr/local/lib64/R/library/BH/include" -fpic -g -O2 -c bsts.cc -o bsts.o
In file included from /usr/local/lib64/R/library/Boom/include/Models/DataTypes.hpp:33:0,
from /usr/local/lib64/R/library/Boom/include/Models/CategoricalData.hpp:22,
from /usr/local/lib64/R/library/Boom/include/r_interface/boom_r_tools.hpp:30,
from utils.h:7,
from bsts.cc:3:
/usr/local/lib64/R/library/Boom/include/cpputil/Ptr.hpp:128:33: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
template <class Y> Ptr(std::auto_ptr<Y> &rhs): pt(rhs){}
In file included from /usr/local/include/c++/7.2.0/bits/locale_conv.h:41:0,
from /usr/local/include/c++/7.2.0/locale:43,
from /usr/local/include/c++/7.2.0/iomanip:43,
from /usr/local/lib64/R/library/Boom/include/cpputil/report_error.hpp:22,
from /usr/local/lib64/R/library/Boom/include/LinAlg/Array.hpp:29,
from /usr/local/lib64/R/library/Boom/include/r_interface/boom_r_tools.hpp:28,
from utils.h:7,
from bsts.cc:3:
/usr/local/include/c++/7.2.0/bits/unique_ptr.h:51:28: note: declared here
template<typename> class auto_ptr;
In file included from /usr/local/lib64/R/library/Boom/include/Models/DataTypes.hpp:33:0,
from /usr/local/lib64/R/library/Boom/include/Models/CategoricalData.hpp:22,
from /usr/local/lib64/R/library/Boom/include/r_interface/boom_r_tools.hpp:30,
from utils.h:7,
from bsts.cc:3:
/usr/local/lib64/R/library/Boom/include/cpputil/Ptr.hpp:142:32: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
Ptr & operator=(const std::auto_ptr<Y> &rhs){
In file included from /usr/local/include/c++/7.2.0/bits/locale_conv.h:41:0,
from /usr/local/include/c++/7.2.0/locale:43,
from /usr/local/include/c++/7.2.0/iomanip:43,
from /usr/local/lib64/R/library/Boom/include/cpputil/report_error.hpp:22,
from /usr/local/lib64/R/library/Boom/include/LinAlg/Array.hpp:29,
from /usr/local/lib64/R/library/Boom/include/r_interface/boom_r_tools.hpp:28,
from utils.h:7,
from bsts.cc:3:
/usr/local/include/c++/7.2.0/bits/unique_ptr.h:51:28: note: declared here
template<typename> class auto_ptr;
g++ -std=gnu++11 -I/usr/local/lib64/R/include -DNDEBUG -I/usr/local/lib64/R/bin/Rscript -e "cat(system.file(package='Boom'))" /include -DNO_BOOST_THREADS -DNO_BOOST_FILESYSTEM -DADD_ -DR_NO_REMAP -DRLANGUAGE -I/usr/local/include -I"/usr/local/lib64/R/library/Boom/include" -I"/usr/local/lib64/R/library/BH/include" -fpic -g -O2 -c mixed_frequency.cc -o mixed_frequency.o
In file included from /usr/local/lib64/R/library/Boom/include/Models/DataTypes.hpp:33:0,
from /usr/local/lib64/R/library/Boom/include/Models/CategoricalData.hpp:22,
from /usr/local/lib64/R/library/Boom/include/r_interface/boom_r_tools.hpp:30,
from mixed_frequency.cc:6:
/usr/local/lib64/R/library/Boom/include/cpputil/Ptr.hpp:128:33: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
template <class Y> Ptr(std::auto_ptr<Y> &rhs): pt(rhs){}
In file included from /usr/local/include/c++/7.2.0/bits/locale_conv.h:41:0,
from /usr/local/include/c++/7.2.0/locale:43,
from /usr/local/include/c++/7.2.0/iomanip:43,
from /usr/local/lib64/R/library/Boom/include/cpputil/report_error.hpp:22,
from /usr/local/lib64/R/library/Boom/include/LinAlg/Array.hpp:29,
from /usr/local/lib64/R/library/Boom/include/r_interface/boom_r_tools.hpp:28,
from mixed_frequency.cc:6:
/usr/local/include/c++/7.2.0/bits/unique_ptr.h:51:28: note: declared here
template<typename> class auto_ptr;
In file included from /usr/local/lib64/R/library/Boom/include/Models/DataTypes.hpp:33:0,
from /usr/local/lib64/R/library/Boom/include/Models/CategoricalData.hpp:22,
from /usr/local/lib64/R/library/Boom/include/r_interface/boom_r_tools.hpp:30,
from mixed_frequency.cc:6:
/usr/local/lib64/R/library/Boom/include/cpputil/Ptr.hpp:142:32: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
Ptr & operator=(const std::auto_ptr<Y> &rhs){
In file included from /usr/local/include/c++/7.2.0/bits/locale_conv.h:41:0,
from /usr/local/include/c++/7.2.0/locale:43,
from /usr/local/include/c++/7.2.0/iomanip:43,
from /usr/local/lib64/R/library/Boom/include/cpputil/report_error.hpp:22,
from /usr/local/lib64/R/library/Boom/include/LinAlg/Array.hpp:29,
from /usr/local/lib64/R/library/Boom/include/r_interface/boom_r_tools.hpp:28,
from mixed_frequency.cc:6:
/usr/local/include/c++/7.2.0/bits/unique_ptr.h:51:28: note: declared here
template<typename> class auto_ptr;
mixed_frequency.cc: In function ‘void {anonymous}::TranscribeResponseData(BOOM::Ptr<BOOM::AggregatedStateSpaceRegression>, BOOM::Ptr<BOOM::StateSpaceModel>, BOOM::RErrorReporter*)’:
mixed_frequency.cc:262:66: error: invalid initialization of reference of type ‘std::vector<BOOM::Ptr<BOOM::UnivData<double>, true>, std::allocator<BOOM::Ptr<BOOM::UnivData<double>, true> > >&’ from expression of type ‘BOOM::IID_DataPolicy<BOOM::StateSpace::MultiplexedDoubleData>::DatasetType {aka std::vector<BOOM::Ptr<BOOM::StateSpace::MultiplexedDoubleData, true>, std::allocator<BOOM::Ptr<BOOM::StateSpace::MultiplexedDoubleData, true> > >}’
std::vector<Ptr<BOOM::DoubleData> > & data(augmented_model->dat());
~~~~~~~~~~~~~~~~~~~~^~
make: *** [mixed_frequency.o] Error 1
ERROR: compilation failed for package ‘bsts’
* removing ‘/usr/local/lib64/R/library/bsts’
显示失败的原因是什么? 此外,构建库所需的最早GCC版本是什么? 此外,是否可以使用已编译的bsts包?